Presets
Playback
Signals
Parameters
Layers
Model check
The science
What you see. A 480 m by 480 m street grid with four east-west and four north-south streets, sixteen signalised crossings and cars that drive one lane per direction. Signal heads show the phase, graphs show the fundamental diagram of the network, the mean speed and a space-time diagram of one street where stop-and-go waves appear as red slanted bands.
Car following. Every car obeys the Intelligent Driver Model (Treiber, Hennecke and Helbing, 2000): a = amax [1 − (v/v0)4 − (s*/s)2] with the desired gap s* = s0 + vT + vΔv / (2√(amax b)). On an empty road the speed approaches the speed limit; behind a slower car or a queue the gap shrinks to the equilibrium value se = (s0 + vT) / √(1 − (v/v0)4), which gives the free-road fundamental diagram drawn as the dashed curve.
Signals. A fixed-time two-phase plan: green for one axis, 3 s yellow, 2 s all-red, then the other axis. A red light is a stationary virtual leader at the stop line, a yellow light stops a car only if it can brake comfortably (3 m/s²). You can synchronise all signals, offset them randomly, or set a green wave along the east-west streets using the travel time at the speed limit. At each crossing a car turns left or right with the chosen probability if the target lane has room.
Honest simplifications. One lane per direction, no overtaking or lane changing, no pedestrians, no conflicts between turning and oncoming cars, no right-of-way rules (the phases are exclusive so cars never meet inside a crossing); the grid is periodic (a car leaving at an edge re-enters at the opposite edge, which keeps the number of cars fixed and fades the car in and out); all cars are identical IDM drivers with the same headway; the delay formula used for the check is a classical approximation. Use it for qualitative effects (capacity drop, queues, the value of signal coordination), not to design real intersections.
Checks. (1) The IDM equilibrium speed from the closed form has zero acceleration and a ring started near it stays there; (2) the simulated ring flow equals the analytic equilibrium flow at four densities; (3) in the full grid there are no collisions, the number of cars is conserved and the two axes are never green together; (4) the mean delay of one signalised approach agrees with Webster's formula (saturation flow measured from the simulated queue discharge) within 30 %.