← All simulations
Algorithms / CELLULAR TRAFFIC

Traffic Flow: Stop-and-Go Wave Machine

Discover traffic jams emerging from simple vehicle behaviour on a looped road.

INTERACTIVE · CANVAS · REAL MATH
Simulation viewport2D / REAL-TIME
DRAG SLIDERS TO EXPERIMENT

How this simulation works

The Nagel–Schreckenberg traffic model updates each car: accelerate, brake for the gap, randomly slow, then move. Even without intersections, random braking can create waves of congestion.

v ← min(v+1, vmax, gap); with p: v ← max(v−1,0)
✦ TRY THIS EXPERIMENTRaise vehicle density and braking probability to trigger stop-and-go waves.
Made with 🤖 ChatGPT