Car following. Every vehicle obeys the Intelligent Driver Model (Treiber, Hennecke & Helbing, 2000). Its acceleration depends on its own speed v, the bumper gap s to the leader and the closing speed Δv:
a = A [ 1 - (v/v0)^4 - (s*/s)^2 ]
s* = s0 + max(0, vT + vΔv / (2 sqrt(A B)))
A = 1.3 m/s² B = 2.0 m/s² T = 1.4 s s0 = 2 m
A red or late-yellow light is treated as a stationary obstacle at the stop line. On yellow a driver goes through if stopping would need more than 4 m/s² (the "dilemma zone").
Fundamental diagram. With a = 0 and Δv = 0 the model has an equilibrium speed for every spacing, se(v) = (s0 + vT)/sqrt(1 - (v/v0)^4). Flow is then q = ρ ve. The grey curve is this analytic result for cars; dots are measured. Between roughly 30 and 100 veh/km the uniform state is unstable: tiny perturbations grow into stop-and-go waves (see the time-space diagram) and the measured flow lies below the curve.
Signals. Cycle C = 2(g + Y + r) with Y = 3 s yellow and r = 1 s all-red. An approach can discharge only while its light is green, so its capacity is at most qmax · g/C (shown above). Adaptive mode ends a green early when the approach is empty and the cross street is waiting (min 5 s, max 1.8 g).
Independent numerical check (runs in your browser when the page loads): a signal-free ring of identical cars starts 20% below the analytic equilibrium speed and is integrated for 240 s; the final speed must match the fixed point of se(v).
running check...
Honest simplifications. One lane per direction on a ring (cars that leave re-enter, so density is exact); no turns, lane changes or pedestrians; all drivers share the same IDM parameters except desired speed and length; trucks/buses differ only in length and v0. The free-ring mode ignores crossing conflicts. Numbers are illustrative of real traffic physics, not a calibrated city model.
What to try: (1) Fixed signals at 35 veh/km, then raise green to 40 s and watch the queue and flow trade off. (2) Rush hour preset vs Adaptive demo. (3) Run the density sweep and compare dots with the curve. (4) Tap any car to read its gap, desired gap and acceleration.
Treiber, Hennecke, Helbing, Phys. Rev. E 62, 1805 (2000); Webster, Traffic Signal Settings (1958).