Crowds deciphered: simulation and control of the masses

by dr. Roland Geraerts on 06/02/2018
Still from a movie showcasing the Utrecht University crowd simulation plug-in for the Unity game engine.
Still from a movie showcasing the Utrecht University crowd simulation plug-in for the Unity game engine.

Have you ever felt unsafe when walking in a dense crowd? We have researched a model for simulating crowds in big infrastructures, at events, and in computer games.

How can a city accommodate 500,000 people during an event? How long does it take to evacuate a train station? Where and when can potentially dangerous situations occur, how can we detect them, and what can we do during an event to avoid these situations? These are important questions, illustrated by tragic incidents that happened during events such as the Hajj in Mecca (2,400 deaths), the Love Parade in Germany (21 deaths) and Dutch Remembrance Day (63 injuries). Simulating big crowds can be of vital importance to be better prepared.
So why do we need simulations to answer these questions? Simulations are needed because large-scale exercises (with over 500 people) are impractical or impossible in the real world. For instance, such a real-life exercise has a big impact on the environment or surroundings, it costs a considerable amount of time, tests can be performed on a few scenarios only, and the building/infrastructure may not even exist yet. Using simulations instead can alleviate these problems.

Gaming applications

START-UP • Roland Geraerts and his group have received an NWO Take-off grant. “This allows us to realise our dream: setting up a start-up, uCrowds, which offers a software engine for simulating crowds in big infrastructures, at events or in computer games.”

The availability of more realistic computer games is growing because PCs, consoles and smartphones are becoming more powerful. While much innovation has been done in 3D graphics, the AI side is lagging, including the quality of simulated agents. These agents need a navigation mesh which is difficult to extract from a 3D virtual environment. Agents behave unrealistically, they collide a lot, get trapped near narrow passages and react poorly to sudden changes in the environment (like a collapsing bridge). Hardly an optimal game experience. Finally, current simulations cost a lot of processing power and, consequently, the number of simulated agents is kept to a few hundred at the most.

Software engine

Our team has created a software package for efficient crowd simulation in multi-layered 3D dynamic environments. The framework generates a compact but complete representation of the navigable areas in an environment so the simulation can be run efficiently and accurately. This representation is a navigation mesh suitable for representing the walkable areas in a 2D environment (such as a city with a footprint that represents buildings) or a multi-layered 3D environment, such as a train/metro station, or a soccer stadium.

Still from a movie showcasing the Utrecht University crowd simulation plug-in for the Unity game engine.
Still from a movie showcasing the Utrecht University crowd simulation plug-in for the Unity game engine.

Our simulation framework consists of the following five levels of planning:

  • At the top of the hierarchy, event management and action planning generate a set of geometric path planning queries, consisting of start/goal pairs. In this phase, we support social groups, large groups, re-planning of agents when the navigation mesh changes or when crowd densities change, for instance.
  • Next, the global route planning level uses a query to produce an indicative route for an agent or group, which indicates how they would generally walk.
  • The three lower levels move the crowd in every step of the simulation. On the route following level, the global routes are being traversed, yielding preferred velocities (i.e. speed/direction pairs).
  • The preferred velocities are adapted in the local movement level where an agent might temporarily deviate from its general route to coordinate its movements and to handle potential collisions with the crowd, yielding a velocity that is used by the animation system in the lowest level to move an agent.

Usage in practice

Our software was used to investigate the amount of time it takes to evacuate a metro station. We did that in collaboration with our partner Movares for several stations of the North/South metro line in Amsterdam. With Movares we have also analysed a large range of scenarios that could occur during the Grand Départ of the Tour de France in Utrecht. Finally, we created a plug-in for a popular game engine, Unity, to enrich computer games with big and believable crowds.

Example in real life: Crowd flow optimisation

We performed simulations for the Grand Départ of the Tour the France in 2015. The city of Utrecht wanted to know whether the crowd would be safe when an event might draw anywhere from 600,000 to 800,000 spectators to Utrecht. Based on the simulations, the city decided to move fences, install pedestrian bridges, and have one-way traffic at certain places.

Virtual Grand Départ visitors at the Jaarbeursplein.