How can I prevent gridlocks?
Traffic is something my friends and I have spent a bit of time on as it is the major choke point in every city. The following is gathered information in a list of bullet points as there just is no other way to do this without rambling:
Traffic AI - Is very stupid... It is a first-come, first-serve mentality with very little variance. Now the AI will often take roundabout routes, but these are rarely helpful and you will often see that a vehicle will drive around in a circle three times before making the right hand turn it wanted to take. So focus on the first-come, first-serve when designing your city and laying down where you want things to flow to.
Avenues vs Streets - Streets and avenues are not interchangeable. You will really never want to use avenues exclusively because they have a meridian. They are meant to handle large traffic routes with as few intersections in them as possible. Of note, it is better to place commercial down avenues as they generally get foot traffic, not vehicle traffic. Streets are much better for everything else and can still be made into high-density. They will allow people to drive to their destination and turn in. This is the major difference and the reason as to why avenues are evil as a street replacement. If a person wants to get to the second building on the left hand side of the avenue they will have to drive all the way down the right side, do a U-turn and come back up in order to turn into their destination. This is a lot of traffic for no good reason.
Mass Transit - The only things that will help traffic in your town are buses and streetcars. Ferries will actually depend heavily on these systems as they only transport people, not vehicles. The key to buses is to NOT put the bus stops at intersections. This has the potential to hold up the traffic at those intersections while people are loading/unloading and can also then clog an intersection with pedestrians recently unloaded. Put them in the middle of roads and keep the green overlay fairly nice. You will want the coverage for this to be anywhere sims will go (buildings, pretty much). Do not worry about covering a street if it only houses a single building (And also put the sign on the side next to the building so the sims do not have to walk :)). The same goes for your education as far as up to high school goes (college and university take the normal public transit systems). Keep the coverage to the residential areas only and avoid intersections. My knowledge on street cars is a bit lower, but I would keep the same notions as the buses. Avoid the corners as this can cause sim overflow in cross walks.
Outside Connections - I am not sure if roads outside are needed in the long run (when you can import/export people/goods via ferry, rail and air port), but this is speculation at this point in time. What makes me hesitant is that you require a road connection to build a City Hall... One is not required to keep it though. I will try and update this when I have more information.
Intersections - This is something that is actually very well done in your layout. For the most part, you are avoiding four way intersections and instead are using quite a few T-intersections. This works out awesomely for traffic as straight-through traffic seems to just 'stop' for some reason at times. No one that I have seen yet has really figured out why; everyone has just started avoiding them. Of special note is when you have an avenue that you want a turn around on without slowing down traffic. Dirt Roads will put in stop signs only for the dirt road, allowing traffic to flow down the street/avenue unimpeded. This can give you a 'lossless' intersection for use in special cases. However, keep an eye on this as sometimes the one little piece of dirt road you place can capture a vehicle in a vicious loop.
Multiple ways to the same location - This is more of just a design consideration, but it will help. Now I started with saying the AI is dumb and aim at a first-come, first-serve mentality. This is the bit of a drawback to that one, but please keep the other statement in mind first. Having multiple ways in and out of an area is a good thing. They do not have to be next to each other and can service from flow that would come from a completely different direction when made available. This will help remove choke points where all traffic eventually has to get to this intersection in order to get to that section of the city.
Now, addressing this to the screenshots of your city in particular. You have a lot of avenues, and I feel that that is going to be the main thing to take care of. Unfortunately, removing an avenue means removing all the buildings along it. This is one of my pet peeves in the game. However, take a peek at the lower image in the bottom right corner. You have a little half moon peel off there (and it's not showing bad traffic, I am just using it as an example!). If the AI randomly decides to come up to that intersection and turn down that little path, it will have to go all the way around the loop to get out again before it can make its decision of where to go. This will probably favor traffic flow in one direction, either people leaving to work/shop/learn or the people returning from working/shopping/learning making the other half get really frustrated on the way back or not make it back at all (sims are not unique, they are spammed and not guaranteed to make it 'home' again so to speak.
Secondly, it does seem that you have some stops at intersections for your mass transit. You can try pushing them away from them. Do not think logically about this of what you would see in the world around you. Focus on avoiding corners and keeping the highlight of the coverage area over the area you are covering.
The information about this game is constantly changing and is being updated currently.
Gridlock
Technically speaking, you're not experiencing Gridlock, which involves cars in intersections that can't move because of other cars in other intersections, which can't move because of the original cars.
In1 ----A---
| |
| |
---B--- In2
Cars entering In1 go straight through A and are blocked at B. Cars entering In2 go straight through B and are blocked at A.
You actually have a traffic jam.
Traffic in Simcity stops for two reasons:
- A stop mechanism such as a stoplight or stopsign, which exists to allow cross traffic through.
- A Car is stopped in the way. If you follow the trail of such cars forward, you will eventually reach a stop mechanism That stop mechanism is the head of the jam.
The basic problem of traffic is - there will always be too much. While there are many solutions, what I want to focus on in this answer is: controlling traffic jams. If you control where the traffic backs up, then it won't back up across your whole city.
Two way intersections
All two way intersections are no-stop. These intersections are handy for allowing u-turns without a stop mechanism. You can make a two-way intersection by sharply angling from the end of an existing street, or by continuing one street with a different street type (a conversion intersection).
Traffic control mechanisms
Stoplights which are locked green (no opposing traffic) have equivalent throughput to no-stop. Stoplights which are switching, are 6 minutes on - 6 minutes off. During that 6 minutes, ~20 cars can get through. That's 100 cars per hour (20 * 0.5 * 10 ).
Stopsigns which have no opposing traffic allow ~10 cars through in 6 minutes. That's 100 cars per hour. Stopsigns which have opposing traffic do not let any cars through.
No-stop intersections allow ~200 cars per hour through.
Buildings
Cars exiting a building have a stopsign when there is opposed traffic. If a jam backs up to a building, the cars inside are stuck - but... unlike a road, a building does not jam other roads. It is not the worst thing in the world for a building to suffer a car exit jam.
Cars enter a building at no-stop speeds. This is great - it means any cars that can reach a building will get off the road! In choosing winners and losers in your traffic setup, it is best to favor cars close to their destination. Get them off the road. Cars far from their destination should be allowed to jam, if it gets more cars off the road.
Traffic Flow Calculation
Consider any street segment. Score each input and each output according to the following.
1 point : Stopsign (also, exiting building) 2 points : Stoplight (also, unopposed stopsign) 4 points : No-stop (also, unopposed stoplight, entering building)
Compute the Flow Score = Input Score - Output Score.
A negative or zero flow score means that this street segment cannot jam. It can still suffer jam from another street that it feeds, but by itself it is great.
For example, this street has 4 inputs blocked by stopsigns, and one output blocked by a stoplight with cross traffic. 4 - 2 = 2 which means this stoplight is being fed cars faster than it can process them. Hopefully the inputs will exhaust before they are forced to stop by the jam.
In In Out S = Stopsign
| | | L = StopLight
S S |
-------------L-- Out
S S |
| | |
In In Out
This picture uses residential buildings instead of side streets. Since a residential building is the same as a sidestreet with a stopsign, the result is the same - an overfed stoplight.
Out R = Res building input.
| L = StopLight
R R |
-------------L-- Out
R R |
|
Out
TL;DR - Under a full gridlock (total freeze), check that outgoing traffic can easily reach the highway.
The existing great answers cover traffic jams - very slow and inefficient, but still moving traffic. I have seen only one near-gridlock-type situation so far. It quickly spread over the whole city. Coal trucks got permanently stuck just one block away from the power plant, resulting in blackouts, termination of most services, and an apocalypse complete with whole streets soon burned to rubble. The gridlock persisted even under significantly reduced population (the common traffic jam usually doesn't).
It all started from a corner building built adjacent to the exit direction of the arterial avenue (that is, the one road all outgoing traffic needs to eventually take). Apparently, a few cars exiting this building for a destination inside the city decided to go the "wrong way" to the nearest intersection, for lack of other options; as soon as that intersection became congested, they could not continue anywhere else. Their presence completely blocked the arterial so no traffic could ever leave the city. A trivial gridlock developed because the few cars were facing traffic in the opposite direction.
After the corner building was re-zoned to face the other avenue, the situation quickly stabilized.