Home▸Chaos & Dynamics▸Megacity Evacuation Routing (2D)

Megacity Evacuation Routing (2D)

Evacuees on a street-grid graph run a live shortest-path search toward the nearest of four exit gates, with a BPR-style congestion model that slows overloaded streets and drives real-time rerouting.

Chaos & Dynamics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-megacity-evacuation-routing ↗ Open standalone

This 2D companion replaces the 3D original's decorative orbiting scene with the actual mechanic its title promises: a real street-grid graph where a multi-source Dijkstra search gives every intersection a live shortest route to the nearest of four exit gates, edge travel times rise with a BPR-style congestion function as agents pile onto a street, and closing the central corridor forces a genuine real-time reroute around the blockage.

⚙ Under the hood

Agent-based evacuation on a grid graph: multi-source Dijkstra from four exit gates, BPR congestion weighting per street segment, and adaptive vs. naive routing modes you can compare directly.

evacuation routingshortest pathdijkstratraffic congestiongraph theoryagent-based simulation

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

What did you find?

Add reproduction steps (optional)