Interactive · Phantom traffic jams

Make a traffic jam out of nothing

22 cars on a 230-meter ring. No crash, no red light, no bad drivers. Let it run and watch: a jam shows up on its own. Then change the rules and see what it takes to stop it.

stopped → 22 km/h and up calm driver

Speed
Seconds of space each driver wants behind the car ahead.
Tiny random pushes on the pedal. Every normal driver has them.
Calm drivers
A calm driver doesn't wobble and doesn't chase the car ahead. It holds a smoothed version of its own speed and lets the gap in front stretch and shrink.
Average speed
–
Slowest car
–
First crawl
–

The jam moves backwards

Each row is half a second; time runs down. Each dot is a car, driving to the right. Watch the red band: the cars move forward, but the jam slides back.

← position on the loop →time ↓

One run is a story. Run it 1,000 times.

Same rules as above, five minutes each, different random wobbles every time. A run counts as jammed if any car drops below 3.6 km/h (slower than walking) in the last two and a half minutes. No brake taps.

The rules

The same rules as in the video. This page runs them in your browser.

  1. Every driver would like to go up to 50 km/h.
  2. They want to stay a set number of seconds behind the car ahead (0.7 in the video), plus 1.5 meters when stopped.
  3. They speed up gently and brake harder when the gap shrinks. This is the Intelligent Driver Model (Treiber, Hennecke & Helbing, 2000).
  4. Every foot wobbles on the pedal, just a little, at random.

What it leaves out

One lane, no exits, no lane changes, identical cars. Drivers here react instantly; real drivers need around a second, so a 0.5-second gap that looks fine here would not be safe on a real road. Treat the numbers as clues, not forecasts.

The video's numbers come from our Python code. This page is the same model rewritten in JavaScript, so single runs use different random numbers. The jam rates agree: we checked 13 settings at 2,000 runs each, and every one came out within normal random variation of the Python results.