Control Systems · stability

Traffic Jam Simulator

Put cars on a circular road with no junctions, no lights and nothing in the way. Pack them tightly enough — or make them slow enough to react — and a jam appears anyway, with nothing causing it.
IDM car-following
22 cars · 230 m ring

Scenario

stopped
Nothing needs to go wrong for a jam to form. Press Run and wait — or use Tap the brakes to have one driver dab the pedal once, and watch what that one dab does two minutes later.

Road & traffic

Cars22
Ring length230 m
Target speed30 km/h

Drivers

Reaction time 0.60 s
Preferred gap, in seconds1.20 s
Driver-to-driver variation10%
Reaction time and preferred gap are different things, and the difference is the whole story — see the notes below.

Vehicle performance

Acceleration1.0 m/s²
Comfortable braking1.5 m/s²
Vehicle length4.5 m

The road

—
as fast as the road allows slowed crawling or stopped one car to follow

Every car, every second

—
moving freely slowed jammed

Speed over time

—
fastest average slowest

The numbers

The rule

A stop-and-go wave crawls backwards at about 15 to 20 km/h

Whatever the traffic is doing, the jam itself moves backwards along the road at a remarkably consistent speed. The cars go forwards; the jam goes the other way, and it does so at roughly walking-pace-times-ten no matter how fast the free-flowing traffic is.

It falls straight out of two numbers. Cars sitting in a queue are packed about one vehicle length plus a small gap apart — call it 7 m. When the queue starts moving, each driver pulls away roughly one headway after the car in front — call it 1.5 s. The back of the jam therefore eats into the queue at 7 m every 1.5 s:

wave speed = (vehicle length + jam gap) ÷ start-up headway = 7 ÷ 1.5 ≈ 4.7 m/s ≈ 17 km/h, backwards.

Nothing in that depends on the speed limit, the weather or how many cars are queued. It is a property of how tightly cars pack and how quickly people react, which is why the number turns up again and again on real motorways.

Where it goes wrong

It scales with what is in the queue. A jam full of lorries has a much longer packing distance, so its wave runs faster backwards. Tailgating drivers with a short start-up headway also speed the wave up, which is the opposite of the intuition that impatient driving clears a jam.

And it only describes the back of a jam that is already there. It says nothing about whether a jam will form in the first place — that is a stability question, and it is what the simulator above is actually for.

Worked example: the speed of the back of a jam

Take the two numbers the rule is built from: queued cars packed 7 m apart, and a start-up headway of 1.5 s. The back of the jam releases one car every 1.5 s and each release frees 7 m of road, so the wave runs at 7 ÷ 1.5 = 4.7 m/s — about 17 km/h, backwards, whatever the traffic ahead is doing.

Now make everyone tailgate: a 1.0 s headway. The wave becomes 7 ÷ 1.0 = 7 m/s, or 25 km/h. Impatient driving does not clear the jam; it sends its back edge upstream faster.

The thing everyone conflates

Reaction time and following distance are not the same control

Both are measured in seconds and both are about following the car in front, so they get muddled constantly. They do opposite things.

Preferred gap is where you choose to sit: the steady-state distance you leave, expressed as the time it would take to cover it. It sets how much road the traffic uses, and therefore how many cars fit before the road is full.

Reaction time is delay in the feedback loop: how long after the car in front changes speed before you do anything about it. It does not change where you sit in steady traffic at all. What it changes is whether steady traffic is stable.

This is the same phenomenon as dead time in a control loop, and it behaves the same way: add enough delay to a feedback loop and a disturbance that used to die away starts to grow instead. A line of cars is a chain of such loops, each one feeding the next.

Density does it too, and independently. Worth being straight about, because it is easy to credit the wrong cause: the 22-car default here is packed tightly enough to collapse even with instantaneous drivers. Reaction time then makes it markedly worse — average speed falls by roughly half again as the delay goes from nothing to 1.4 s — but it is not what tipped it over. For the clean experiment use the Delay alone preset: 16 cars on the same road, stable for as long as you care to run it at a 0.8 s reaction, and jamming when you raise the reaction past about 1.2 s with every other setting untouched.

Which is the uncomfortable finding: the jam is not caused by a bad driver. It is caused by ordinary drivers with ordinary reflexes, and the only thing anyone can do about it is leave a bigger gap.

Why does a jam move backwards?

Because of two numbers that have nothing to do with the speed limit. Queued cars sit about 7 m apart, and each driver pulls away roughly 1.5 s after the one in front, so the back of the jam eats into the queue at 7 m every 1.5 s — about 4.7 m/s, or 17 km/h, backwards. It is a property of how tightly cars pack and how quickly people react, which is why the figure turns up on every motorway.

Are reaction time and following distance the same thing?

No, and they do opposite things. Your preferred gap is where you choose to sit in steady traffic; it sets how many cars fit on the road. Reaction time is delay in the feedback loop, and it does not change where you sit at all — it changes whether steady traffic is stable. It is dead time in a control loop, and it behaves like it.

Whose fault is a phantom jam?

Nobody’s. It is caused by ordinary drivers with ordinary reflexes in traffic that is dense enough, and the only thing any one of them can do about it is leave a bigger gap.

Is it the delay or the density that tips it over?

Density, on the default here: the 22-car setting is packed tightly enough to collapse even with instantaneous drivers. Reaction time then makes it markedly worse — average speed falls by roughly half again as the delay goes from nothing to 1.4 s — but it is not what caused it. Use the delay-only preset for the clean experiment.

Field notes

Reading the simulation

22 cars230 m ring

Nothing causes it

There is no junction, obstacle or bad driver on this ring. The jam is produced by the interaction of perfectly ordinary drivers, which is why it is called a phantom jam. Sugiyama and colleagues did exactly this with 22 real cars on a 230 m circle in 2008 and got the same result within a couple of minutes.

0.8 vs 1.2 sreaction

Two separate ways to break it

Density and delay each cause a jam on their own. The default 22-car ring is past the stability limit on density alone: it collapses even with instant reflexes. Load the Delay alone preset for the clean experiment: 16 cars on the same road stay steady at a 0.8 s reaction, and jam when you raise it past about 1.2 s with nothing else touched.

Braking is stronger than accelerating

The gap term in the model is squared, so being 20% too close pushes much harder than being 20% too far away pulls. A line of drivers therefore amplifies a slowdown on the way back but smooths an acceleration, which is why waves grow travelling upstream.

15–20 km/hbackwards

The jam moves backwards, the cars do not

Every car drives forwards the whole time, yet the jam travels the other way: it is not an object but a pattern in where the cars happen to be, and new cars keep arriving at its back faster than old ones leave the front. Queued cars pack about 7 m apart and each pulls away about 1.5 s after the one in front, so the back of the queue eats backwards at 7 ÷ 1.5 ≈ 4.7 m/s ≈ 17 km/h, whatever the free-flow speed.

Density does the damage

Hold everything else fixed and add cars. Below a threshold the ring settles to a steady speed forever; above it, no amount of care prevents the collapse. That threshold is what a traffic engineer means by capacity.

The cure is a bigger gap, and it costs you nothing

Increasing the preferred gap makes the traffic stable at higher density: the extra space is repaid because nobody has to stop. The instinct to close the gap is what breaks it, and closing it is why the wave you are sitting in exists.

Version history · 1 release
  1. v4.242026-09-03Two new tools were laid out inside the 300px control rail; check 42 now catches it

Releases in which this page changed, newest last. Derived from the archived copy of every release, not from notes written afterwards — so it reflects what actually shipped. Site-wide passes are left out; they are in the full changelog.

One lane, no overtaking, no junctions. A single-file ring is the cleanest way to show that jams need no cause — real roads add lane changes, gradients, merges and trucks, all of which make things worse rather than better. See Sources.

Rules of thumb are approximations, offered to get you to the right order of magnitude fast. Check anything load-bearing against its source or the exact tool. Privacy · Terms

© 2026 Rules of Thumb · Runs entirely in your browser