Time
Mean speed
Slowest car
Density
Lane changes

Ride-along

0 m/s

Presets

Each row is a ring with the default drivers, started at its settled speed. One car braked once and the traffic was watched for 60 simulated minutes. On one lane, sparse traffic absorbs the brake; from about a 5 s brake grows into a stop-and-go jam, and from even a 1 s brake does. That tipping point sits at the model's peak flow, about 1,830 cars an hour per lane.

Pick an outcome to load that density and brake duration with the default drivers. The run starts straight away; brake a car to disturb it. Times are simulated; a jam means the slowest car fell below 5 m/s.

About this simulation

The road
The ring stands in for a long stretch of motorway with no junctions, with one to four lanes and identical drivers. Lane 1 is the inside lane; cars overtake towards the outside and may not pass on the inside while the lane outside them is flowing freely. Road geometry only changes how that loop is drawn; bends do not slow the cars. Cars are coloured by speed, and anything at 27.8 m/s () or faster is the same green.
Zoom and pan
Scroll or pinch to zoom, drag to pan, or use the buttons above the road. Zoomed in far enough, cars are drawn to scale. Zoomed out, each car becomes a mark across the road, and the marks merge into a band of colour where traffic is dense.
Starting speed
Every run starts with the cars evenly spaced in every lane at the speed traffic settles to at that density, so nothing happens until a car brakes. Every lane is equally busy, so nobody gains by changing lane until something disturbs the flow.
Following a car
Click the road to follow the car nearest that spot. It is outlined in blue, and the ride-along view under the road shows it from above with the cars around it, on the road unrolled into a straight lane. Brake lights come on when a car is slowing.
Braking
Shift+click the road, or press and hold it, to make the one car nearest that spot brake at 2 m/s² for the chosen duration. In the ride-along view, click a car to brake it, or use the buttons to brake the followed car or the one ahead of it. A car that is already braking keeps whichever end time is later.
Traffic at the speed limit cannot jam with this driver model
Cruising at needs traffic as sparse as about , and at that density disturbances die out: a 10 s brake among 85 cars on faded away. Jams need busy traffic, at around or slower.
Desired speed barely matters in busy traffic
Raising it from 33 to 36 m/s changed little about when jams formed at and denser. There the gaps between cars set the speed, not what the drivers would like to do.
Sliders
Driver sliders take effect immediately, mid-run. Road sliders restart the run. Brake duration applies to the next click.
Run speed and skipping
Run speed stops at 32× because faster than that the display cannot follow the motion: cars appear to crawl or run backwards, as wheels do on film. To jump ahead, the skip buttons run 1, 5 or 10 simulated minutes at once and then redraw. If the computer cannot keep up with the chosen speed, it runs as fast as it can and the line under the road says what speed it is managing.
Collisions
Extreme driver settings can make cars collide. The run then stops; adjust the sliders and press Reset.

The Intelligent Driver Model

The IDM (Treiber, Hennecke and Helbing, 2000) is a car-following model. Each driver picks an acceleration from three things: their own speed, the gap to the car ahead, and how fast they are closing on it. Every car applies the same rule, every 0.1 s.

acceleration = a · [ 1 − (v / v₀)δ − (s* / s)² ]
s* = s₀ + max(0, v·T + v·Δv / (2√(a·b)))

The first bracketed term is the urge to reach the desired speed v₀, which fades as v approaches it. The second is the urge to keep a safe gap: s* is the gap the driver wants right now and s is the gap they have. The wanted gap grows with speed (v·T) and with closing speed Δv, so a driver bearing down on a slower car brakes, and brakes harder the faster they close.

Desired speed v₀
Speed on an empty road.
Time gap T
Following distance expressed as time; 1.5 s is a typical real value.
Standstill gap s₀
Gap kept when queuing.
Acceleration a
Maximum acceleration, and how quickly a driver responds in general.
Comfortable braking b
The deceleration drivers aim not to exceed; the model brakes harder when a gap closes too fast.
Exponent δ
How abruptly the urge to accelerate dies away near v₀. 4 is the usual value.

With identical drivers, traffic settles at the speed where the two urges balance for the gap available, which is why density alone sets the cruising speed here. Whether a disturbance then dies out or grows depends on the density and on a, b and T: when drivers respond sluggishly (small a) and gaps are short, a line of cars amplifies each other's braking and a stop-and-go wave forms.

In this demo the dynamic part of s* is clamped at zero, cars cannot reverse, and there is no reaction delay and no variation between drivers.

MOBIL lane changes

Lane changes follow MOBIL (Kesting, Treiber and Helbing, 2007), "minimising overall braking induced by lane changes". Every half second a driver asks what acceleration the IDM would give them in the lane beside them. A change is safe if neither they nor the car they would pull in front of would have to brake harder than bsafe. It is worth it if their own gain, plus the politeness share p of what the cars behind them in both lanes lose, exceeds the threshold Δa.

Politeness p
Weight on the braking a change forces on others. 0 is selfish; 1 counts their loss as much as the driver's own gain.
Threshold Δa
Net gain a change must deliver before it is made; it stops cars flipping between lanes for nothing.
Keep-left bias
On a keep-left road the threshold is raised by this for moving out and lowered by it for moving back in, so cars drift back to the inside lane when they can.
Safe braking bsafe
Hardest braking a change may force on the changer or the new follower.
Impatience time τ
Published MOBIL has no memory, and a driver stuck beside fast traffic would wait for ever. Here a driver who would gain from a change but is held back grows impatient: over τ seconds their politeness and threshold fade to nothing and the braking they will impose on others doubles, then keeps growing to at most three times bsafe.
Cooperation
A driver who sees a held-back car wanting in ahead of them eases off as if it were already there, braking no harder than this share of bsafe. With 0 nobody makes room, and a car in a stopped lane can only get out once the traffic beside it has slowed on its own.

A car may not pass a slower car in the lane outside it while that lane is flowing freely (above 60 km/h), as the Highway Code requires; in congested traffic the rule is lifted. Each car waits 4 s between lane changes, and when two cars want the same gap the one further ahead takes it.

Settings

Distances

Used for road speeds, densities and road distances. Anything shown in metres or m/s stays as it is.

Road geometry

Only changes the drawing. Bends do not slow the cars.