A simulation in three experiments

The Bunching Attractor

Four buses. Perfect spacing. Watch what an unstable equilibrium looks like when it collapses.

Route length — 1,000 m
Buses — 4
Stops — 10
Duration — 2 hours
Speed
T + 0:00
Experiment I
Natural Drift
No delay. No intervention. Pure passenger arrival noise.
0.00
bunching
index
evenclustered
Experiment II
One Small Delay
Bus 0 holds 45 extra seconds at t = 5 min. Nothing else changes.
0.00
bunching
index
evenclustered
Experiment III
Headway Control
Same delay. Buses now watch the gap ahead and adjust speed.
0.00
bunching
index
evenclustered
The Phase Portrait

Each line traces one bus's headway — the gap to the bus ahead — over time. A perfectly even system would show four flat horizontal lines. Watch instead how they converge, collapse, and in the third experiment, how the control law creates a restoring force that pulls them back toward balance. This is what an attractor basin looks like from the inside.

I — Natural Drift
II — One Small Delay
III — Headway Control
Bus 0 The delayed bus in experiments II & III. Observe how it falls behind, accumulates passengers, slows further.
Stop glow Warm amber indicates passengers waiting. Brighter = longer queue. Watch queues build ahead of slow buses.
Phase lines Each thread is one bus's headway over time. Convergence toward zero means bunching. The target is 250 m.
Index 0.00 → 1.00 Coefficient of variation of headways. Zero is perfect balance. Above 0.8 is severe bunching.
four buses · perfect spacing
Press play to watch an unstable equilibrium collapse.
[ click anywhere to start ]