Crowd Science

Module 4, lesson 2 · 70 minutes

The social force model

Walking written as Newton’s second law: one equation, six parameters, a room that empties more slowly when everyone hurries, and a careful look at what that does and does not prove.

You’ll be able to

  • write down the Helbing, Farkas and Vicsek (2000) equation and name every term;
  • state its parameter values and say where each comes from;
  • reproduce arching and the model’s faster-is-slower curve in the sandbox, and explain why we run it more than once;
  • say what the model cannot claim about real people.

Introduction

Imagine you are a dot in a square room, 15 m on each side, with 199 other dots and one door a metre wide. You want to get out. Nobody is pushing you, exactly, but everyone around you also wants the door, and the closer you all get to it the less room there is. Now ask: if every dot wanted to go twice as fast, would the room empty sooner?

Common sense says yes. In 2000 a short paper in Nature said the answer can be no. Helbing, Farkas and Vicsek wrote walking as a sum of forces, ran it on a computer, and found that above a desired speed of 1.5 m/s people “reduce the efficiency of leaving”: they jam in arches across the door, and the room empties more slowly. The idea became known as “faster is slower”. By the end of this lesson you will have reproduced it yourself, and you will know exactly how far to trust it.

Walking as a force

The social force model treats each person as a particle with a mass, a position and a velocity, and asks what accelerates it. The answer is a list of forces, added up, and then Newton’s second law, F = ma. Nothing in it is a decision or a plan. The model’s whole claim is that if you choose the forces well, behaviour that looks like decisions comes out.

The first force is the wish to walk. Each person has a desired velocity: a desired speed v⁰ in a desired direction e⁰, usually towards their destination. If their actual velocity v differs from it, they adjust, not instantly but over a relaxation time τ: roughly how long a person takes to get back to their desired velocity after being disturbed. The driving force is

F⁰i = mi · (v⁰i e⁰i − vi) / τi

mi
mass, kg
v⁰i
desired speed, m/s
e⁰i
desired direction (unit vector)
vi
actual velocity, m/s
τi
relaxation time, s

Think of cruise control. A person standing still who wants 1.34 m/s, Weidmann’s mean free speed, with τ = 0.5 s, starts with an acceleration of 1.34 ÷ 0.5 = 2.68 m/s². For an 80 kg body that is a force of about 214 N. The gap closes exponentially: after one relaxation time they are at 63% of their desired speed, after three at 95% (our arithmetic: 1 − e⁻¹ and 1 − e⁻³).

The 1995 model: lanes and oscillating doors

Helbing and Molnár introduced the approach in 1995 for normal walking. Besides the driving term, people were repelled by each other through a potential with elliptical contours stretched along the other person’s direction of travel, so people leave more room in the direction someone is walking. They were also repelled by walls, and the model had an attraction term. Influences from behind counted less: people outside an effective field of view 2φ = 200° were weighted by c = 0.5. Desired speeds were drawn from a normal distribution with mean 1.34 m/s and standard deviation 0.26 m/s, and τ = 0.5 s.

With those ingredients two things appeared that nobody had programmed: opposing streams in a walkway sorted themselves into lanes, and at a narrow door the direction of flow oscillated, a burst one way and then a burst the other. That was the model’s first selling point: simple local rules, collective patterns that match what you see in a station.

The 2000 equation, term by term

For escape, Helbing, Farkas and Vicsek kept the driving force, simplified the social repulsion to a circle, and added the thing the 1995 model lacked: bodies that touch, compress and rub. Each person is a disc of radius ri. The full equation of motion is

mi dvi/dt = mi (v⁰i e⁰i − vi)/τi + Σj fij + ΣW fiW fij = {Ai exp[(rij − dij)/Bi] + k g(rij − dij)} nij + κ g(rij − dij) Δvtji tij

rij
sum of the two radii, ri + rj, m
dij
distance between the two centres, m
g(x)
x if x > 0 (they touch), otherwise 0
nij
unit vector from j to i
tij
unit vector at right angles to nij
Δvtji
difference in tangential velocity, (vj − vi) · tij
A, B
strength (N) and range (m) of the social repulsion
k, κ
body compression (kg/s²) and sliding friction (kg/(m·s))

There are three terms inside fij, and they do very different jobs.

  • Social repulsion, A exp[(rij − dij)/B]. It acts at a distance and keeps people apart before they touch. At the moment of contact it equals A; every extra B metres of gap divides it by e ≈ 2.72.
  • Body force, k g(rij − dij). Zero until the discs overlap, then a stiff spring: the more two bodies are pressed together, the harder they push back.
  • Sliding friction, κ g(rij − dij) Δvt. Also zero until contact. Two bodies pressed together resist sliding past each other, and the harder they are pressed, the more they resist. This is the term that lets arches form.

Walls get the same three terms with the person’s own radius in place of rij; the friction there opposes the person’s own sliding along the wall. Figure 1 shows the geometry.

The geometry of the 2000 model. Repulsion and body force act along n, from one centre to the other; friction acts along t, against sliding. The overlap is exaggerated: at 1 cm the body force is already 1,200 N.

The parameters

Helbing, Farkas and Vicsek (2000) parametersAs used in the sandbox below. Source: the paper, via FACTS G2.
SymbolMeaningValue
mMass80 kg
τRelaxation time0.5 s
AStrength of social repulsion2,000 N
BRange of social repulsion0.08 m
kBody compression coefficient1.2 × 10⁵ kg/s²
κSliding friction coefficient2.4 × 10⁵ kg/(m·s)
riRadius, drawn uniformly (diameters 0.5–0.7 m)0.25–0.35 m

The paper says these values were calibrated so that, at a desired speed of about 0.8 m/s, people pass an effectively 1 m wide door at 0.73 persons per second. It gives free speeds of about 0.6 m/s for relaxed walking, about 1 m/s for normal walking and up to about 1.5 m/s for nervous people. Notice what that means. The six numbers were tuned against one flow at one door; everything else the model does is extrapolation from there.

A worked example: how close do people stand?

Take two people of radius 0.3 m, so rij = 0.6 m, whose centres are 0.8 m apart: a gap of 0.2 m between their bodies. The social repulsion is 2,000 × e^(−0.2/0.08) = 2,000 × 0.082 ≈ 164 N. Compare the driving force of someone who wants 1 m/s and is standing still: 80 × 1 ÷ 0.5 = 160 N. So in a queue at a door, with each person pressing forward at about that strength, the model holds people roughly 20 cm apart (our arithmetic).

Now make them want 5 m/s. The driving force is 800 N, and the gap at which repulsion matches it is 0.08 × ln(2,000 ÷ 800) ≈ 7 cm. In a crowd the pushes add up from behind, so the people at the front are driven together until they touch. Once they overlap by 1 cm, the body force adds 1.2 × 10⁵ × 0.01 = 1,200 N, and if they then slide past each other at 0.5 m/s, friction adds 2.4 × 10⁵ × 0.01 × 0.5 = 1,200 N more (our arithmetic). Figure 2 plots the radial part.

The radial force between two people as their bodies close up, with Helbing’s parameters. The driving forces for v⁰ = 1 and 5 m/s (horizontal lines) show where a lone pair would settle. Crowds push harder than a pair, because the forces from people behind add up.

What happens to the social repulsion term if B is doubled from 0.08 m to 0.16 m? Use the 20 cm example.

The force at contact is still A = 2,000 N, but it falls off half as fast. At a 20 cm gap it becomes 2,000 × e^(−0.2/0.16) ≈ 573 N instead of 164 N. The “social” force reaches further, so people keep larger distances: at v⁰ = 1 m/s the equilibrium gap grows from about 20 cm to about 0.16 × ln(2,000/160) ≈ 40 cm, and a queue takes up more floor.

The sandbox: a room with one door

The sandbox below is Helbing’s room: 15 m by 15 m, a 1 m exit in the right wall, 200 people placed at random without overlapping, everyone heading for the middle of the exit and then straight out. Every person has the same desired speed v⁰, which you set. The live chart counts people leaving.

People are drawn as dots with a heading tick. A dot turns orange and gets a single hatch when the body compression on it exceeds 500 N; it turns dark red with a cross-hatch above 1,600 N/m, the pressure above which the paper counts a person as injured. A pressure in newtons per metre needs a length, so the sandbox divides the contact forces on a person by their body’s circumference. That is our reading of the measure. Treat it as a model output, not a medical threshold.

  1. Press Play at the defaults (v⁰ = 1 m/s). A semicircle forms round the exit and the outflow is steady. Note the time when 90% are out.
  2. Reset, set v⁰ to 3 m/s and play again. Look at the exit: hatched dots form arches between the door frames, hold, then break in a burst. The previous run stays on the chart in grey.
  3. Press “Run the leaving-time experiment”. It runs six desired speeds, three times each, in the background. Where is the curve lowest?
  4. Set v⁰ to 5 m/s and watch the count of people above 1,600 N/m.
  5. Tick “Add a column” and run the experiment again. Does the column help, in this model, with these settings?
  6. Set the exit to 2 m. Does faster-is-slower survive a wider door?

The leaving-time curve dips and then rises: past about 1.5–2 m/s, wanting to go faster empties the room more slowly, because pressed bodies rub, friction locks them into arches across the door, and the arches only break in bursts. That is the model’s faster-is-slower. Now read the note below: people in experiments who rushed without aggressive shoving did not show it.

Model and experiment. This is what the model predicts. In human experiments the picture is mixed. Garcimartín and colleagues (2014) ran 85 students through a 75 cm door: in competitive drills where moderate pushing was allowed, each person took on average 0.38 s against 0.32 s in calm drills, and clogs appeared only in the competitive runs. Haghani, Sarvi and Shahhoseini (2019) asked 114 participants to rush, at three levels, without aggressive shoving, and found that “faster was invariably faster”. A 2024 review concludes that the empirical research has “produced mixed evidence rather than irrefutable support”. Lesson 6.3 takes this further.

Numerics. Semi-implicit Euler with a 0.002 s step, the sliding friction integrated implicitly so it cannot overshoot, a 1.2 m neighbour grid. Each experiment run stops at 300 s.

Reading the curve honestly

Here is what the experiment gives at the defaults: 200 people, a 1 m exit, no column, three runs at each speed (seeds 1, 2 and 3). These are our runs of the sandbox in Chrome, not numbers from the paper. Chrome and Edge should reproduce them exactly; another browser may give slightly different numbers, because the model is chaotic and tiny rounding differences grow.

Leaving times from the sandbox at its defaultsMean of three runs; individual runs in brackets. Our simulations.
Desired speed v⁰90% out (s)Everyone out (s)
0.6 m/s242 (236, 254, 237)not empty by 300 s
1.0 m/s144 (144, 143, 145)200
1.5 m/s112 (108, 117, 110)143
2.0 m/s115 (121, 109, 116)141
3.0 m/s129 (136, 123, 127)147
5.0 m/s148 (144, 141, 160)161

Three things are worth noticing.

  1. The dip and the rise are robust, the exact minimum is not. The 90% time falls from 242 s to 112 s as v⁰ goes from 0.6 to 1.5 m/s, then rises again, to 148 s at 5 m/s: a third longer than the best. The paper says desired speeds above 1.5 m/s reduce the efficiency of leaving. But look at 2 m/s: 115 s, within the scatter of 1.5 m/s. When we ran exactly the same code under a different JavaScript engine (Node), the bottom moved to 2 m/s. The dip and the rise are robust; the exact speed at the bottom is not.
  2. One run is an anecdote. At 5 m/s the time for 90% to leave ranged from 141 s to 160 s across the three runs. Tiny differences in where people start grow into different arches at the door. That is why the experiment runs each speed three times, and why a simulation study that reports one run and one number should make you uneasy.
  3. The last person out is a fragile statistic. At 0.6 m/s the room never quite empties. The final person, if they are one of the larger ones, is held at the door by the frame’s own social repulsion. For a person of radius 0.34 m standing 31 cm short of the doorway, each door edge pushes with about 91 N, and the parts of those pushes that point back into the room add up to about 96 N: exactly the driving force of someone who wants 0.6 m/s (our arithmetic). In the model a wall “keeps its distance” just as a person does. Engineers often report the time for 90% or 95% of people for exactly this kind of reason.

It is a statement about contact forces. When people press hard enough to touch, friction between bodies lets them lock into arches across a bottleneck, the way grains jam in a hopper. The arches hold, break, and re-form, and the outflow comes in irregular bursts. The paper describes “an irregular succession of arch-like blockings of the exit and avalanche-like bunches of leaving pedestrians”. Without contact and friction there is no faster-is-slower.

What else the paper claims, and what it cannot

The 2000 paper made several further claims from the same model. They are worth knowing precisely, because they are quoted loosely:

  • Pressure and injuries. Simulated pressures reached up to 4,450 N per metre, and people were counted as injured once the pressure on them exceeded 1,600 N/m, which happened around v⁰ = 5 m/s. Our sandbox does not match this: with our reading of the measure, some people cross 1,600 N/m even at 1–1.5 m/s, and peak values are several times 4,450 N/m. We have not been able to reproduce the paper’s pressure figures. Either it computed pressure differently or our reading of the measure is wrong; either way, a model output is only as clear as its definition.
  • Columns. “Improved outflows can be reached by columns placed asymmetrically in front of the exits, which also prevent the build up of fatal pressures.” The claim is stated in the text; there is no figure for it. Experiments since then are split, and lesson 6.3 covers them.
  • Widenings. A corridor that widens and then narrows again causes jamming that reduces efficiency by about 20%.
  • Herding in smoke. With a mixing parameter p between following your own direction and the average direction of your neighbours, 90 people searching for one of two invisible 1.5 m exits at v⁰ = 5 m/s had “optimal chances of survival for a certain mixture of individualistic and herding behaviour”. The paper plots p from 0 to 0.8 and states no numeric optimum.

Now the limits. The model is a mechanical analogy fitted at one point, and its most famous predictions sit far from that point. Everyone in the room is identical apart from their size, has perfect knowledge of the exit, and has no friends, no group and no way of talking. The paper’s title speaks of “escape panic”, but the model contains no psychology at all: v⁰ is a number, and calling 5 m/s “panic” is a label, not a finding. Haghani and colleagues argue that the terms panic, irrationality and herding have no agreed definitions in the research literature and that using them “does not contribute constructively” to it. Module 3 explained why the panic story is wrong about real crowds; the model neither supports it nor needs it.

“Faster is slower” is a property of this model with these parameters. For humans the evidence is mixed: competitive drills with pushing showed slower egress and clogs, while rushing without aggressive shoving was faster. The useful conclusion for practice is about contact and pushing, not about telling people to walk slowly.

Numerical notes for the engineer

If you implement the model yourself, two things bite.

Stiffness. The body force is a very stiff spring. Two 80 kg bodies in contact oscillate at about √(2k/m) = √(2 × 1.2 × 10⁵ ÷ 80) ≈ 55 radians per second, and the friction term damps sliding at a rate κg/m that grows with the overlap. An explicit integrator needs a time step well below both. The sandbox uses 0.002 s. We tried 0.005 s: below about 2 m/s it made no difference, but at 3–5 m/s, where overlaps are largest, it changed the leaving times by up to a quarter compared with 0.001 s, and with the friction term integrated explicitly it produced unphysical forces of hundreds of kilonewtons (our tests).

Cost. Comparing every pair of 200 people is 200 × 199 ÷ 2 = 19,900 force evaluations per step, and the cost grows as N². But with B = 0.08 m the social force is under 4 N beyond a centre distance of 1.2 m, even for the two largest bodies. So the sandbox bins people into a grid of 1.2 m cells and only compares people in neighbouring cells, which makes the cost grow roughly in proportion to N (our arithmetic). Every serious crowd simulator does something like this.

None of this changes the model, but all of it changes the answer you get if you get it wrong. That is the difference between verification (did we solve the equations correctly?) and validation (are they the right equations?), the subject of the first lesson in this module and of the checklist in lesson 5.

  • “The social force model shows that people panic.” It has no psychology in it. High v⁰ is labelled panic; the arches come from friction between pressed bodies.
  • “Faster-is-slower is an established fact about crowds.” It is a robust model prediction. Human experiments are mixed, and depend on whether people actually push.
  • “A = 2,000 N means people push each other with 2,000 N.” A is the strength of a fictitious repulsion at the moment of contact. Real pushing in the model comes from the body term, after contact.
  • “The parameters were measured.” They were calibrated so that one door flow came out right. That makes them plausible, not measured.