Traffic Jam Simulator
Drive 42 cars around a circular road with no lights, no junctions and no obstacles, and watch a traffic jam appear out of nothing and travel backwards at 15 km/h while every car moves forwards.
Average speed
0.0 km/h
0.0 m/s
Cars stopped
0 / 42
below 1 m/s
Tightest gap
0.0 m
bumper to bumper
Density
42 veh/km
0 s simulated
What to watch: nothing is blocking this road. There is no crash, no red light and no slow lorry — only 42 drivers each reacting to the one in front. Yet a red clot of stopped cars persists, and it travels backwards around the ring while every single car is moving forwards.
The strip below the road is the proof. Time runs downwards, position runs left to right, so a stripe that leans left as it goes down is a feature moving backwards. At the current headway of 1.20 s the theoretical wave speed is about −21 km/h, and measurement of this model gives roughly −14 km/h — squarely in the 15–20 km/h band seen on real motorways.
Press Start perfectly smooth to launch every car identically spaced at identical speed. It holds — until you press Brake one car. That single tap of the brakes is enough to nucleate a jam that never goes away. This is metastability, and it is why one distracted driver can ruin an entire motorway.
Experiments worth running
- Drop the density: pull the car count to 20 and reset. The gaps are wide enough that the starting cluster dissolves completely and every car settles at 90 km/h. Around 25 cars a ripple survives but nobody stops; by 30 the first cars are stopping again.
- Raise the headway T: at 42 cars, T = 1.2 s leaves 19 cars stopped; T = 2.5 s cuts that to 4. Bigger gaps let each driver absorb a disturbance instead of amplifying it — the jam thins out from the inside.
- Change acceleration a: a sluggish 0.2 m/s² deepens the jam to 23 stopped cars and drops average speed to 14 km/h. Push a past about 1.5 m/s² and the jam dissolves entirely — brisk, decisive reaccelerating is what starves the queue from behind.
- Watch the slope, not the cars: raise T and the space-time stripes tilt more shallowly, because wave speed is roughly −(s₀ + car length) / T.
The phantom traffic jam
Most drivers assume a jam has a cause: a crash, roadworks, a merge, a red light. But a large fraction of motorway congestion has no cause at all. You crawl for five minutes, reach the front of the queue, and find nothing there. That is a phantom traffic jam — congestion that emerges purely from the interaction of drivers with each other, with no bottleneck anywhere.
Traffic physicists call the stable travelling structure a jamiton, by analogy with a soliton: a self-sustaining wave that keeps its shape as it moves. Cars pour into its upstream edge, sit in it, and eventually accelerate out of its downstream edge. The individual cars are constantly being replaced, but the jam itself persists and can survive for hours and travel tens of kilometres.
The ring road above removes every possible excuse. There is one lane, no junctions, no lights, no lane changes, no obstacles, and every driver wants to go 108 km/h. The jam still forms, and it still refuses to go away.
The Intelligent Driver Model, term by term
Every car above obeys the Intelligent Driver Model (IDM), published by Martin Treiber, Ansgar Hennecke and Dirk Helbing in 2000. It is a deterministic car-following model: each vehicle's acceleration depends only on its own speed, the gap to the car in front, and the speed difference to that car.
dv/dt = a · [ 1 − (v / v₀)^δ − (s* / s)² ]
s* = s₀ + v·T + (v · Δv) / (2·√(a·b))
The bracket holds two competing pressures. The free-road term 1 − (v/v₀)^δ pushes the car towards its desired speed and vanishes as v reaches v₀. The interaction term −(s*/s)² is the braking force: it is negligible when the actual gap s is much larger than the desired gap s*, and it explodes quadratically as the gap closes.
| Term | Meaning | Default | Effect if increased |
|---|---|---|---|
| v₀ | Desired free-road speed | 30 m/s (108 km/h) | Faster free flow; wave speed unchanged |
| T | Safe time headway to the car ahead | 1.2 s | Bigger gaps, lower capacity, more stable, shallower wave |
| a | Maximum acceleration | 0.4 m/s² | Snappier recovery from a queue; above ~1.5 m/s² the jam dissolves |
| b | Comfortable braking deceleration | 1.2 m/s² | Later, harder braking; changes how abruptly the queue front forms |
| s₀ | Minimum bumper gap at a standstill | 2 m | Longer queues for the same number of cars |
| δ | Free-acceleration exponent | 4 | Holds speed nearer v₀ for longer before easing off |
The clever piece is the last part of s*, the term v·Δv / (2√(a·b)). It is an intelligent braking strategy: Δv is the approach rate, and this term is exactly the extra distance needed to shed that speed difference at a deceleration of roughly b. When you are gaining on the car ahead it inflates the desired gap; when the car ahead is pulling away it shrinks it. This is what stops IDM cars from crashing, and it is also what makes their reactions overshoot.
Why the wave moves backwards — and always at about the same speed
A jam is not a group of cars. It is a boundary — the line where free-flowing traffic meets stopped traffic. Watch what happens at that boundary. At the back of the queue, a new car arrives and stops; the boundary jumps one car-length upstream. At the front, a car accelerates away; the boundary also moves upstream by one car-length. The queue gains at the back and loses at the front, so the whole structure slides backwards even though every car in it only ever moves forwards.
The rate is set almost entirely by how quickly cars leave the front. Each departing driver takes roughly the headway time T to pull away and open a gap of s₀ + ℓ (standstill gap plus vehicle length). The upstream front therefore retreats at approximately:
w ≈ −(s₀ + ℓ) / T = −(2 m + 5 m) / 1.2 s ≈ −5.8 m/s ≈ −21 km/h
Notice what is not in that formula: the desired speed v₀. The wave speed depends only on how tightly cars pack when stopped and how long each takes to react and pull away — both of which are properties of drivers and vehicles, not of the speed limit. That is why measured jam waves on motorways in Germany, the Netherlands, Japan and the United States all cluster around 15 to 20 km/h backwards, whether the road is posted at 80 or 130 km/h. It is one of the most reproducible numbers in traffic science.
Measuring the simulation above directly — timing when each car first drops below 1.5 m/s and fitting a line through the jam front — gives about −14 km/h, a little shallower than the idealised formula because real IDM cars in the queue are not all at a dead stop. In the space-time strip below the road, that is the slope of the dark bands: they lean left as they descend, which is precisely what a backward-moving feature looks like when time runs downwards.
Sugiyama 2008: the experiment that settled it
For decades this was a claim about mathematical models. In 2008, Yuki Sugiyama and colleagues published Traffic jams without bottlenecks — experimental evidence for the physical mechanism of the formation of a jam in the New Journal of Physics, and simply did it with real cars and real drivers.
They marked out a circular track roughly 230 m in circumference, placed 22 vehicles on it evenly spaced, and gave the drivers a single instruction: drive at about 30 km/h, keeping a safe distance, and do not overtake. There was no bottleneck of any kind — the track was a perfect loop.
The result: the uniform flow held for a short while, then small fluctuations in individual drivers' speeds grew instead of dying away. Within a couple of minutes a cluster of stopped cars had formed. Some cars came to a complete standstill on an empty circular track where nothing was in the way.
The jam then propagated backwards around the loop at roughly 20 km/h, while the cars themselves continued forwards. Repeating the run with fewer vehicles produced stable, jam-free flow — confirming a genuine density threshold rather than bad driving.
Follow-up experiments made the same point in the other direction. In 2017 a team including Benjamin Seibold, Benedetto Piccoli and Daniel Work ran a similar ring-road experiment in Arizona, but placed a single autonomous vehicle among about 20 human-driven cars. Programmed to hold a steady, smooth gap rather than mirror the car ahead, that one vehicle damped the stop-and-go waves out of the entire ring — cutting the fleet's fuel consumption by roughly 40% and its hard braking events by around 90%.
Metastability, and what it means for your driving
The most important property of this system is metastability. Over a wide band of densities the smooth flow is genuinely stable against tiny disturbances — press Start perfectly smooth above and it will cruise at 49 km/h indefinitely. But it is only locally stable. One driver braking for 2.5 seconds is a large enough kick to knock the system out of that basin, and it collapses to about 22 km/h with 19 of 42 cars stopped, permanently. There is no path back to free flow without removing cars.
That asymmetry is the whole practical lesson. A jam costs almost nothing to create and is nearly impossible to undo. And because the disturbance amplifies as it passes backwards through the queue, a driver ten cars behind brakes harder than you did, and a driver thirty cars behind stops dead.
- Keep a steady gap, not a small one. The IDM shows braking force scaling as
(s*/s)²— the penalty for tailgating is quadratic. Leaving a larger, constant buffer gives you room to absorb the car ahead's fluctuations instead of passing them on amplified. - Brake early and gently. A long, mild deceleration transmits a far weaker pulse backwards than a late, hard one. Ease off the accelerator before you need the brake pedal.
- Accelerate decisively out of a queue. The slider above makes this vivid: raising
apast about 1.5 m/s² dissolves the jam entirely, while dropping it to 0.2 m/s² deepens it. Hesitating at the front of a queue starves nobody — it feeds the jam behind you. - Adaptive cruise control can help — or hurt. ACC holds a constant time headway automatically and never gets distracted, which is exactly the smoothing behaviour the 2017 experiment exploited. But ACC tuned for a short headway and aggressive catch-up is string unstable and amplifies disturbances just like a human tailgater. Settings matter more than the badge.
- Density is the real control. No driving technique beats the threshold. Drop the ring to 20 cars above and the jam dissolves on its own. This is why ramp metering and variable speed limits work: they manage how many vehicles are on the road at once, rather than trying to fix the driving.