Home▸Society & Economics▸On-Ramp Bottleneck — Nagel–Schreckenberg Traffic CA (2D)

On-Ramp Bottleneck — Nagel–Schreckenberg Traffic CA (2D)

A discrete Nagel-Schreckenberg cellular automaton on an open road with an on-ramp merge bottleneck: watch a congestion wave anchor at the merge point and downstream throughput drop as ramp demand rises — a capacity-drop, not a phantom jam.

Society & Economics2DModerate60 FPS⇄ 3D version
2d-traffic-jam ↗ Open standalone

The 3D original places the Nagel–Schreckenberg rule on a closed ring, where jams are a pure noise effect: density is fixed, and phantom jams nucleate at random from the randomization step alone. This 2D companion instead runs the same four-step NaSch update — accelerate, brake to gap, randomize, move — on an open road with two independent boundary inflows: a mainline stream entering on the left at rate α, and an on-ramp merging in partway along at rate β. Cars that cannot merge immediately queue at the ramp rather than vanishing, and cars that reach the right edge simply exit. Because the road is open and controlled by rate, not fixed density, congestion here isn't random noise finding a jam somewhere on the ring — it consistently anchors at the merge point and eats backward into the mainline, and downstream throughput measurably drops once ramp demand exceeds what the merge can absorb, the classic bottleneck "capacity drop" studied in real on-ramp traffic.

⚙ Under the hood

Open-boundary Nagel-Schreckenberg cellular automaton with a merging on-ramp, a live ramp queue, a scrolling space-time diagram anchored at the merge point, and a smoothed downstream-throughput trace that visibly drops once ramp demand exceeds the bottleneck's capacity.

nagel-schreckenbergcellular automatonon-ramp bottleneckcapacity dropspace-time diagramopen boundary

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)