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.
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.
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 |
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 |
R R |