RunTheSim
← simulations Playable v1 DE

crowd systems

Pedestrian
Bottleneck Flow

A crowd squeezes through a doorway. Push each person to walk faster and the whole crowd exits more slowly. It is not intuition, it is physics, and it is why evacuation drills exist.

moving freely stuck in the jam exited 0 · flow 0.0 /s
What's happening Each agent walks toward the exit under three forces: goal, neighbour repulsion, wall repulsion. Classic social-force model.
What to try Hit Panic. Desired speed jumps, flow drops, arcs form at the doorway. Hit Calm. Flow climbs back up.
Why it matters The faster-is-slower effect is a real mechanism behind stampedes. Safety codes for doorway widths use this physics.

source notes

Model level and refs

  • Social Force Model per Helbing & Molnár 1995, extended by Helbing, Farkas, Vicsek 2000 to explain panic.
  • Forces: goal acceleration (desired velocity over relaxation time tau), pedestrian repulsion (exponential falloff), wall repulsion, body compression if agents overlap.
  • Geometry simplified to a rectangular room with one doorway at the top. Real bottleneck geometries (corners, multiple exits, stair transitions) produce richer effects.
  • Agent bodies are disks, not torsos. Real pedestrians turn shoulders and flow through tighter gaps than disks can; this sim overestimates jamming at very narrow exits.

deeper dive

Why pushing a crowd to run slows it down

Every year there is at least one disaster where a crowd, urged to move faster, ends up moving less. The standard reading in the press is that people "panicked". The physics is sharper: in a narrowing with enough density, higher desired speed produces lower throughput. Push harder, less gets through. The effect has a name, faster-is-slower, and it shows up cleanly in the model above.

The three forces on every person

Each agent has a place it wants to be, and a preferred speed to walk there. That sets a "goal force" pulling it toward the exit. Two other forces push it around: repulsion from nearby bodies (people keep a personal bubble), and repulsion from walls. All three sum to an acceleration, acceleration updates velocity, velocity updates position. The whole simulation is that loop, run on a few hundred agents at once.

When desired speed is modest, the goal force is modest, the repulsion forces stay in balance, and the crowd threads the doorway in a steady single-file-ish flow. When desired speed goes up, the goal force dominates, agents push into each other, repulsion forces rise, and friction between neighbours converts forward motion into sideways pressure. Arcs of compressed bodies form at the doorway edges, and fewer agents per second actually make it through.

Where you see this in the world

Nightclub exits, stadium gates, evacuation stairwells, concert crushes. The Love Parade 2010, the Hillsborough 1989, the Itaewon 2022 crush: all have this mechanism in their forensic report. The shared lesson in architectural safety codes: widen the bottleneck, add multiple exits, and break dense crowds into pre-metered sections before a narrowing. The physics says width helps more than speed.

Tricks you can try

Narrow the exit width slider at normal speed. Flow drops, but smoothly, roughly proportional to width. Then widen the exit back and also push desired speed up. Flow drops non-linearly. The second effect is what the media calls panic and what the physics calls clogging. Push personal space down, too: agents with no sense of distance jam even faster. Close to ant-colony's stigmergy, this sim has no leader, no coordinator, no plan, just local rules making global shape. Browse the full library for other systems where simple rules change the whole picture.