Fire safety of buildings has always been an important aspect of societal research. An important development in recent years is the shift from prescriptive building codes to performance-based building [1], meaning that instead of requiring aspects of buildings to satisfy certain regulations, new building structures increasingly have to be able to attain certain goals, without exactly specifying how these can be accomplished. This increases the need of understanding the different aspects of fire emergencies. Models and simulations of fire spread and evacuation scenarios play an important role in this trend, since they are able to complement experimental research. This paper aims to contributes in models of the latter category: how and under what circumstances occupants evacuate from a building.

Building evacuations are too complex to be investigated exhaustively in short time. Differences in psychological state, rational, panicked or altruistic behaviour have significant impact on the progress of the evacuation. Moreover, not all occupants share the same degree of familiarity with the building they are in, which greatly affects their behaviour. In this paper, we focus on the interaction between two groups of occupants; one group is very familiar with the building and its layout and one group misses this familiarity and must thus rely on the former group for evacuating safely. One example of its relevance is described in [2]—an investigation of an evacuation from an office building, where, in hindsight, evacuees where asked about their knowledge of the building and their actions regarding the evacuation. Among the conclusions drawn was that there were significant behavioural differences between habitual occupants and one-time guests. Not including this feature in crowd simulations can, in some cases, lead to large deviations from realistic evacuation behaviour. This is precisely the place where we contribute.

We concern ourselves with a scenario resembling the one described in [2]: occupants with different levels of knowledge evacuate from a large indoor building. By placing the occupants in a simulation-based framework including complex geometries, we computationally explore the effects the environment knowledge has on the evacuation speed and pedestrian flow congestion. We stress the importance of knowledge by modifying the evacuation conditions to include fire and smoke production, limiting agents visual perception and freedom of movement.

This paper is the start of a larger initiative designed to develop interactive simulations as a decision support tool for crowd management, in which interactive evacuations can be steered and optimized based on real-time feedback. For this reason, any simulations proposed should be executable fast in different configurations and complex domains. To achieve this goal, we design a multiscale model that is averaged and fast on a macroscale as well as accurate and slow on a microscale, but, for large crowds, it performs much faster than the usual agent-based models and is significantly more accurate than the purely macroscopic transport models. By screening the crowd both in agent-based representation and continuum representation, we avoid costly agent-to-agent based interactions by deferring the counting of interactions to a macro (observable) scale.

Related Contributions

In line with Pinter-Wollman et al. [3], we show in this paper that knowledge of the building layout drastically affects the collective behaviors of occupants walking through smoke towards the exits. Several other related contributions exist. For instance, [4] reports on the effect of smoke using a social force model à la Helbing. Cirillo and Muntean [5] look into the effects of limited visibility on the group dynamics during an evacuation from a (dark) room without obstacles. Their work has been expanded in [6] to the investigation of the effects of communication efficiency and exit capacity on fundamental diagrams for pedestrian moving through an obscure tunnel. Lovreglio et al. [7] focus on measuring the toxicity due to the smoke inhaled by the occupants. Using a lattice model, [8] looks into the effect of using leader-agents in improving evacuations. When locomotion is biased by a reduced visibility, behavioral rules dominate the choices in the pedestrian flow velocity, see e.g. [9] for a social force model based on behavioral rules. Further relevant literature can be found in [10,11,12,13] and references cited therein.

Despite the obvious influence of distance and vision on social interactions, constraints imposed by the built environment are significant especially when one wants to forecast specific types of collective behaviors of humans during an evacuation in the presence of an unexpected fire (e.g. group formation or boundary-following lanes). Understanding the collective behavior of humans in built environments will certainly lead to a better foundation of environmental psychology as well as to an improved efficiency of way-signaling of route choices, setting the stage for an intelligent crowd management system; see [14] for a list of challenges that environmental psychology currently encounters and [15] about shortcomings in existing crowd management policies.

All these modeling descriptions reflect the evacuation situation of a given length scale, either micro (at the pedestrian level) or macro (at the level of a continuum crowd), or perhaps at some intermediate mesoscopic level (compare [16], e.g.). In [17], the authors start thinking of connecting relevant microscopic and macroscopic crowd scales by looking for mathematical arguments to ensure the consistency of eventual micro-to-macro transitions between agent-based and continuum representations. On the other hand, Richardson [18] proposes detailed explanations of a micro–macro model (originally proposed to the computer vision community by Narain et al. [19]) and checks its suitability in a number of test cases (including also a music festival setup). In the framework of this paper, we develop further the micro–macro approach from [18] and expand it to allow for the presence of a fire as well as for smoke production and dissipation in two different types of confinements.

The proposed model is hybrid. This is not only because it mixes information captured at two separated space scales (micro and macro), but also because it combines continuum, discrete and stochastic elements; see Sect. 3 for a detailed presentation of the main model ingredients.

To get an intuitive level of description of the multiscale features of our model, we suggest the following Gedankenexperiment: Imagine a flow of a fluid, whose internal microstructures (particles) have their own dynamics. Depending on the time-space distribution of particles (i.e. of the approximated density) within the chosen geometry mimicking the built environment, the fluid exhibits both compressible and incompressible regions with a priori unknown locations. The model is able to automatically detect these zones, by relying on a switching on/off relation, usually referred in the literature as unilateral incompressibility constraint. Interestingly, since in our setting we do not allow for agglomerations of particles (groups) exceeding a certain threshold (a priori prescribed maximum-allowed density), a macroscopic repulsion term arises in the setting of the equations for the microscopic dynamics (cf. Sect. 6). Our simulations show pressure plots that clearly exhibit the effect the macroscopic repulsion has on the local arrangements of individual evacuees in the neighborhood of densely packed zones. We then point out the effect the environment knowledge has on our evacuation scenario, where both fire and smoke are present. While contributions exist on modelling the mixing of pedestrians with different levels of knowledge in evacuation scenarios (see e.g. [20] for environment knowledge modelling in a lattice model), to our knowledge, there exists no contribution that combines these crowd dynamics aspects with the appearance and evolution of both smoke and fire, even though several contributions have indicated its significance on human behaviour (see e.g. [2, 21])

The paper is organized as follows. Section 3 contains the presentation of our multiscale crowd model. The obtained simulation results are reported in Sect. 8. We conclude the paper with a short discussion of the main outlets as well as with a concrete to-do-list for the upcoming work. Details on the implementation of our model and related variants can be found in [22].

Multiscale Crowd Simulation Framework

We propose a micro–macro pedestrian dynamics model composed of a space-continuous agent-based representation (the micro level) and a continuum compressible flow model (the macro level). Hybrid crowd models, in varying degree resembling ours, have been presented, for instance, in [23, 24].

The main ingredients of our micro–macro model are:

  • associated evacuation scenario, see Sect. 4;

  • prototypical building geometry, see Sect. 5;

  • fire model, see Sect. 5.1;

  • smoke model, see Sect. 5.2;

  • micro–macro evolution equations for the dynamics of the crowd, see Sects. 5.4, 6 and 6.3.

Evacuation Scenario

As case study, we consider the evacuation of a single floor in a large enclosure with interior walls and multiple exits much like a large office building or shopping mall, filled with occupants. In this enclosure a hydrocarbon pool fire is ignited. The model investigates the situation where all occupants have acknowledged the need to evacuate, although they are not necessary aware where the fire is located. While evacuating, the radiation and heat from the fire repels occupants from moving too close to the location of the fire. A particularly important aspect of our investigation is that the fire produces a dense smoke that reduces the visibility of the occupants, diminishing the locomotion speed.

The occupants belong two one of two groups: those familiar with the local geometry, and those who have to rely on visual cues and on following other people. The complexity of the geometry accentuates the relevance of the environment knowledge on the evacuation.


Our simulation takes place in a two-dimensional rectangular domain, which we refer to as \(\varOmega \). Parts of the domain are filled with rectangular obstacles; their collection is denoted by G. Multiple exits are available. At the start of the evacuation, N evacuees are positioned inside \(\varOmega \). We assume all evacuees have acknowledged the need of evacuation and are attempting to move towards the nearest exit. Figure 1 shows an example geometry. Its complex structure asserts the need of environment knowledge to find the exit in a reasonable time frame. As a specific feature of our choice of geometry, when a fire blocks one of the corridors, alternative options to the exit are available from each location.

Figure 1
figure 1

The geometry in our case study. Obstacles are colored black, the two exits are colored green (Color figure online)

Design Fire

The evolution of a fire can be classified in several stages, encompassing the growth stage, the fully developed stage (post-flashover stage), and the decay stage [25]. In this model, our design fire takes the form of a cylinder-shaped pool fire based on a hydrocarbon fuel that has fully developed and retains a constant heat release throughout the simulation. Experiments (cf. e.g. [26]) show that due to limited air supply in enclosed environments, fires can retain in this stage for a long time.

To describe an experimentally viable scenario, we use measurements from the experiments reported in [26,27,28] and fire physics relations explained based on basic thermodynamics in [29]. Let \({\mathbf {x}}_0\) denote the center of the fire that has radius \(r_0\). The temperature \(T_F\) of our design fire as a function of heat release rate R is given by the following proportionality relation \(R \approx h_c ( T({\mathbf {x}})-T_0)= T_F\exp \left( -\kappa \frac{|{\mathbf {x}} - {\mathbf {x}}_0|}{L}\right) , \) where heat transfer coefficient \(h_c\) is chosen to be \(300\,\hbox {W}\, \hbox {K}^{-1}\), \(\kappa \) represents the convection heat transfer coefficient, chosen to have a typical value of \(20\,\hbox {W} \,\hbox {m}^{-2}\,\hbox {K}^{-1}\), \(T({\mathbf {x}})\) approximates a stationary temperature distribution within the geometry, whose typical length is L, and \(T_0\) denotes room temperature. As an indication, [27] shows heat release rates for fully developed hydrocarbon fires to be in the range of 2.5 and 4.5 kW. Accordingly, we choose \(R=3\,\hbox {kW}\), yielding a fire temperature of \(T_F = 1293\,\hbox {K}\). This calculation assumes a room temperature of \(293\,\hbox {K}\), but notice that the applicability of the model is not limited to these values.

In Sect. 5.4, we elaborate on the effects of fire on the choice of evacuations paths.

Smoke Production

We model the production and spreading of smoke as a diffusive-dominated process. While this does not capture the plume dynamics as a CFD model might, our goal is to relate the smoke density to the visual acuity of the occupants, instead of recovering the exact space-time dynamics of the smoke. The experiments performed in [30] show a linear relationship between the smoke emission rate and the heat release rate. We adopt this relationship and take \(y_s=0.07\,\hbox {g}\, \hbox {kW}^{-1}\,\hbox {s}^{-1}\) as a production coefficient.

The smoke density \(s({\mathbf {x}},t)\), measured in grams per cubic meter, is assumed to respect a diffusion-drift-reaction equation of type

$$\begin{aligned} {\left\{ \begin{array}{ll} \partial _t s = {\text {div}}(D\nabla s) - {\text {div}}({\mathbf {v}}s) + y_s H({\mathbf {x}})&{} {\text{ in }} \varOmega \setminus G,\\ (-D\nabla s+ {\mathbf {v}}s)\cdot {\mathbf {n}} = 0 &{} {\text{ on }} \partial \varOmega \cup \partial G,\\ s({\mathbf {x}},0) = 0 &{} {\text{ in }} \varOmega , \end{array}\right. } \end{aligned}$$

where D represents the smoke diffusivity determined by the environment, \({\mathbf {n}}\) is the outer normal vector to \(\partial \varOmega \cup \partial G\), \(\mathbf {v}\) is a given drift corresponding to, for instance, ventilation systems or indoor airflow, while \(H({\mathbf {x}})\) encodes the shape and intensity of the fire, viz.

A snapshot of the smoke density in the geometry under consideration is presented in Fig. 2.

$$\begin{aligned} H({\mathbf {x}}) = {\left\{ \begin{array}{ll} R &{} {\text{ if }} |{\mathbf {x}} - {\mathbf {x}}_0| < r_0\\ 0 &{} {\text{ otherwise }} \end{array}\right. }. \end{aligned}$$
Figure 2
figure 2

Smoke density in the environment at t = 0 in grams per cubic meter

Sight Extinction and Speed Decrease

The smoke density diminishes the sight radius of the occupants. According to the measurements reported in [31], a typical extinction coefficient for a hydrocarbon fuel is \(\sigma = 10\,\hbox {m}^2\,\hbox {g}^{-1}\). This leads to the following empirical relation between the sight radius r and the local smoke density \(s({\mathbf {x}},t)\), taken from [32]:

$$\begin{aligned} r(s({\mathbf {x}},t)) = 3/(\sigma s({\mathbf {x}},t)) {\text{ for }} x\in \varOmega \setminus G, \ t\ge 0. \end{aligned}$$

Jin [32] describes an experimentally acquired relation between the smoke extinction and the walking speed. This relation is expressed here as

$$\begin{aligned} v_s({\mathbf {x}},t) = 1.1 - 0.9\sigma s({\mathbf {x}},t), \end{aligned}$$

where \(v_s\) does not take values outside the range of \(1.1\,\hbox {m} \hbox {s}^{-1}\) and \(0.2\,\hbox {m} \hbox {s}^{-1}\).

Pedestrian Dynamics

Our agent-based representation refers to two groups of evacuees, one familiar and one unfamiliar with the building geometry. These two groups will be referred to as residents and visitors, respectively. The dynamics of the residents are governed by first-order differential equations encoding optimal environment knowledge, while the dynamics of the visitors are governed by second-order differential equation based on flocking behaviour. Note that the difference in model order between the two evacuee groups reflects the fact that second group of evacuees meets a large inertia when taking decision on route choices. While the evacuees governed by the first order model are able to change direction instantaneously, the evacuees governed by the second order model in (8) have their velocity adjusted through the application of (social) forces, reflecting their longer reaction time mainly due to the unfamiliarity of the environment.

Interaction between occupants is transferred to a macroscopic description level by using a continuum flow model. In this continuum model, agents are evaluated as a crowd density, moving according to a flow velocity field that ensures that the crowd satisfies certain density constraints. The micro and macro model representations are coupled and communicate in each time step.

The continuum representation allows us to model efficiently the interactions within the crowd in high-density regions, while the agent-based representation gives control over the individual trajectories. Yet by avoiding computing interactions at agent-based level, we are able to increase significantly the speed of the simulation.

In addition to the effects of smoke described in the previous section, the fire impacts the trajectories as follows. The elevated temperature near the fire repels the evacuees: residents close to the fire will take notice and find an alternative route to an exit, while visitors are forced to simply move in an opposite direction. These dynamics are described in the next section.

Agent-Based Dynamics

Residents and visitors are seen as elements from the sets \(X_A = \{a_1,\ldots ,a_{N_A}\}\) and \(X_B = \{b_1,\ldots ,b_{N_B}\}\), respectively, where \(N_A + N_B=N\). For ease of notation, we denote the complete set of evacuees with \(X:=X_A \cup X_B\). Since we want to emphasize the difference in environment knowledge between the evacuee groups, we employ different path finding algorithms for each group.


To describe the motion of the residents we use a potential field model proposed by Hughes [33] and adapted in [34]. It functions similarly to a floor field function, its counterpart in lattice models like [20, 35]. We augment the potential field model to account for the presence of obstacles, fire and smoke.

The potential field is based on the “minimization of effort” principle, serving as a dynamic generalized distance transform. For each point \({\mathbf {x}}\) in the domain, we introduce a marginal cost field\(u({\mathbf {x}})>0\), defined as

$$\begin{aligned} u({\mathbf {x}}) = \alpha + u_{\mathrm {obs}}({\mathbf {x}}) + wH({\mathbf {x}}). \end{aligned}$$

The marginal cost field is built up from a base level of constant walking effort \(\alpha >0\), information on the geometry and the obstacles \(u_{\mathrm {obs}}\), and information on the fire source w. Here, w takes value 1 if the resident is aware of the location of the fire and 0 otherwise.

Let S be a path from point \({\mathbf {x}}_p\) to point \({\mathbf {x}}_q\). Then the effort of walking on the path S can be expressed as

$$\begin{aligned} \int _S u({\mathbf {\xi }})d{\mathbf {\xi }}=\int _S\alpha + u_{\mathrm {obs}}({\mathbf {\xi }}) + wH({\mathbf {\xi }})d{\mathbf {\xi }}. \end{aligned}$$

At the beginning of the evacuation, w is 0 for all residents. When a resident experiences a significant increase in temperature because of his proximity to the location of the fire, w is set to 4 and S changes, and as a result, the fire is avoided.

Recall that \(G\subset \varOmega \) is the set of all inaccessible locations in the geometry (i.e. those parts of \(\varOmega \) covered by obstacles). Then for all \({\mathbf {x}}\in \varOmega \), the geometry information (i.e. the obstacle cost field) can be expressed as

$$\begin{aligned} u_{\mathrm {obs}}({\mathbf {x}}) = {\left\{ \begin{array}{ll} \infty &{}{\text{ if }} {\mathbf {x}} \in G,\\ \frac{1}{|d({\mathbf {x}},G)|} &{} {\text{ if }} {\mathbf {x}} \notin G {\text{ and }} d({\mathbf {x}},G) \le r_G,\\ 0 &{}{\text{ if }} d({\mathbf {x}},G) > r_G, \end{array}\right. } \end{aligned}$$

where \(r_G\) is a small parameter roughly of the order of the averaged size of the evacuees. The obstacle cost makes sure that obstacle locations are inaccessible, and it adds a tiny layer of repulsion around each obstacle to ensure the basic fact that evacuees do not run into walls.

The preferred path \(S^*\) for an evacuee with location \({\mathbf {x}}_p\) and motion target \({\mathbf {x}}_q\) is determined as

$$\begin{aligned} S^* = \mathop {{{\mathrm{arg\,min}}}}\limits _S \int _S u({\mathbf {\xi }})d{\mathbf {\xi }}, \end{aligned}$$

where we minimize over the set of all possible motion paths S from \({\mathbf {x}}_p\) to \({\mathbf {x}}_q\). In the simulation, the evacuees from \(X_A\) are aware of all exits, and the optimal path \(S^*\) is made available by means of a potential function \(\varPhi \), a solution to the equation

$$\begin{aligned} \left| \left| \nabla \varPhi ({\mathbf {x}})\right| \right| = u({\mathbf {x}}), \end{aligned}$$

where \(||\cdot ||\) denotes the standard Euclidean norm. Visitors do not have access to the optimal paths.

Figures 3 and 4 display the potential field and the corresponding paths for our case study. Figures 5 and 6 display the adaption for residents that are aware of the fire locations and take an alternative route out.

Figure 3
figure 3

Potential field \(\varPhi \) for the environment of the case study, not taking any fire into account

Figure 4
figure 4

Paths generated from the potential field in Fig. 3

Figure 5
figure 5

Potential field \(\varPhi \) for the environment of the case study aware of the fire location

Figure 6
figure 6

Paths generated from the potential field in Fig. 5, avoiding the fire

Let \({\mathbf {x}}_{a_i}(t)\) denote the position of resident \(a_i\) at time t. The dynamical system that governs his motion is expressed as:

$$\begin{aligned} {\left\{ \begin{array}{ll} \frac{d{\mathbf {x}}_{a_i}}{dt} &{}= -v_s({\mathbf {x}}_{a_i},t)\frac{\nabla \varPhi ({\mathbf {x}}_{a_i}) - \nabla p({\mathbf {x}}_{a_i},t)}{||\nabla \varPhi ({\mathbf {x}}_{a_i}) - \nabla p({\mathbf {x}}_{a_i},t)||},\\ {\mathbf {x}}_{a_i}(0) &{}= {\mathbf {x}}_{a_i,0}, \end{array}\right. } \end{aligned}$$

where \({\mathbf {x}}_{a_i,0}\) represents the initial configuration of the evacuees and \(v_s\) represents the evacuation speed defined in (4). In (7), p is a macroscopic pressure term that influences pedestrian interactions at the macroscopic scale. We postpone its definition to Sect. 6.3.


Since visitors are unfamiliar with their environment, they rely solely on information from their fellows. This is a modelling assumption based on experimentally confirmed behavior in primates [36] and which has been applied in other evacuation models as well (e.g. [37]). To represent this, we choose to apply a Cucker–Smale-like model which averages the velocity of nearby evacuees (introduced in [38]). This swarming model is adapted with a Brownian term \({\mathbf {B}}_i\) representing disorienting and chaotic effects of an evacuation in an unknown environment, and a repulsion from the fire source \(\nabla H\). We note that according to the definition in (2), H is not differentiable. To obtain this gradient, we smoothen H with a mollifier.

We denote the position and velocities from evacuee i of \(X_B\) as \({\mathbf {x}}_{b_i}\) and \({\mathbf {v}}_{b_i}\), and positions and velocities from member j of the complete evacuation set X as \({\mathbf {x}}_j\) and \({\mathbf {v}}_j\) respectively. We express the motion of visitor \(b_i\) as

$$\begin{aligned} {\left\{ \begin{array}{ll} \frac{d{\mathbf {v}}_{b_i}}{dt} &{}= \sum _{j\in X} ({\mathbf {v}}_{j} - {\mathbf {v}}_{b_i})w_{ij}- \nabla {H}({\mathbf {x}}_{b_i},t)+ {\mathbf {B}}_i(t)\\ &\quad + \frac{{\mathbf {v}}_{b_i} - \nabla p}{||{\mathbf {v}}_{b_i} - \nabla p||}v_s\left( {\mathbf {x}}_{b_i},t\right) ,\\ \frac{d{\mathbf {x}}_{b_i}}{dt} &{}= {\mathbf {v}}_{b_i},\\ {\mathbf {v}}_{b_i}(0) &{}= {\mathbf {v}}_{b_i,0},\\ {\mathbf {x}}_{b_i}(0) &{}= {\mathbf {x}}_{b_i,0}. \end{array}\right. } \end{aligned}$$

In (8) \(w_{ij}\) are weight factors, decreasing as a function of distance, defined as

$$\begin{aligned} w_{ij}(s) \sim \frac{1}{r_s^2}\exp \left( -\frac{|{{\mathbf {x}}_{{\mathbf {b}}_i}} - {{\mathbf {x}}_{{\mathbf {j}}}}|^2}{r_s^2}\right) . \end{aligned}$$

In (9), \(r_s\) is the sight radius [recall (3)] in the evacuees location. It should be noted that we do not take into account those walls that block the transfer of information between evacuees, since they are ignored in (9). However, in the simulations described in Sect. 8, the size of the walls generally exceeds the interaction radius.

Another important observation is that in this model, visitors do not know which of the other occupants are residents, and which are visitors themselves; they follow others indiscriminately.

Continuum Model Description

The path finding velocities are not yet corrected for the interaction and avoidance tendency among evacuees. Introducing some level of averaged information, we choose to model interactions at the continuum level only. This way, we can access inherent macroscopic properties like densities and crowd pressures (recognized as measures in e.g. [39]). Additionally, we are interested in the influence of fire on the crowd pressure, which both act on the evacuees as macroscopic ‘social’ forces. To adjust the behavior of evacuees in crowded zones, we apply a unilateral incompressibility constraint (UIC) as proposed in [19]. First, we interpolate the agent positions to a macroscopic density \(\rho \) and velocity \({\mathbf {v}}\). Then we introduce a pressure p that forces the macroscopic density to satisfy a prescribed maximum value \(\rho _{\max }\).

Let \(\rho ({\mathbf {x}},t)\) represent the averaged concentration of evacuees in \({\mathbf {x}}\) at time t, the measure of crowdedness. The scalar field \(\rho \) is obtained by convolving all evacuee positions \({\mathbf {x}}_{i}\) pinned as Dirac distributions \(\delta _{{\mathbf {x}}_{i}}\), with a smooth interpolation kernel \(\psi \)

$$\begin{aligned} \rho ({\mathbf {x}},t) = \sum _{i=1}^N\left( \delta _{{\mathbf {x}}_{i}(t)}*\psi \right) ({\mathbf {x}}). \end{aligned}$$

We obtain a macroscopic velocity in a similar fashion; by convolving all evacuee velocities \({\mathbf {v}}_i\) to a velocity field:

$$\begin{aligned} {\mathbf {v}}({\mathbf {x}},t) = \frac{\sum _{i=1}^N{\mathbf {v}}_{i}(t)\left( \delta _{{\mathbf {x}}_{i}(t)}*\psi \right) ({\mathbf {x}})}{\rho ({\mathbf {x}})}. \end{aligned}$$

Finally, we look for a pressure \(p({\mathbf {x}},t)\) that satisfies the following equation

$$\begin{aligned} \frac{\partial \rho }{\partial t} = -{\text {div}}\left( \rho ({\mathbf {v}}- \nabla p)\right) . \end{aligned}$$

subject to the following unilateral incompressibility constraints (UIC) conditions for all x and t:

$$\begin{aligned} \begin{aligned} p({\mathbf {x}},t) \ge 0, \ \ \rho ({\mathbf {x}},t) \ge 0, \ \ p({\mathbf {x}},t)(\rho _{\max } - \rho ({\mathbf {x}},t)) = 0. \end{aligned} \end{aligned}$$

(10) together with the conditions in (11) forces the groups of pedestrians on every patch in \(\varOmega \) to satisfy a maximum density. As soon as a patch violates maximum density \(\rho _{\max }\), a pressure is introduced that steers pedestrians away from the overcrowded location. As a result, the density decreases until it satisfies the maximum density again.

Figure 7
figure 7

Pressure observed in the simulation snapshot of Fig. 8

Figure 8
figure 8

A snapshot of a simulation in the geometry of our case study

Figure 7 illustrates a pressure field in an ongoing simulation which contains incompressible zones. The corresponding pedestrian configuration is displayed in Fig. 8.


In our implementation, we discretize \(\varOmega \) in a rectangular grid fine enough to resolve the obstacles and the exit. We discretize u by averaging (5) over each grid cell so that we obtain an approximation of \(\varPhi \) by numerically solving (6) using a fast marching algorithm [40]. This preferred path minimizes the cost of moving from \({\mathbf {x}}_p\) to \({\mathbf {x}}_q\) where, if this path leads past a fire, a trade-off is made between choosing a short path and maintaining a safe distance from the fire source.

In the pre-processing phase of the simulation, two potential fields are computed, one accounting for the fire, while the other one does not. By keeping track which pedestrians are aware of the fire, the updating of knowledge can be handled in an efficient manner. Equation (10) is discretized as follows: at each time step of the simulation, in any location \({\mathbf {x}}\), if the local density of evacuees \(\rho ({\mathbf {x}})\) exceeds a threshold \(\rho _{\max }\), the UIC takes effect and, if needed, the crowd flow locally changes from a compressible to an incompressible flow regime. We can do this by making sure the macroscopic velocity field \({\mathbf {v}}\) is divergence-free in \({\mathbf {x}}\). As a result, \(\rho ({\mathbf {x}})\) cannot increase and a pressure \(p({\mathbf {x}})\) is introduced that exerts a force on the crowd proportionally to \(\nabla p({\mathbf {x}})\). This way, we are able to control the maximum density of the evacuees for any patch in the domain. The unilateral constraints ensure that no pressure-related forces are applied outside of the high-density zones.

We discretize \(\rho \) and v on the same grid as (1) and (6) as vector objects denoted by \({\varvec {\rho }}^n\) and \({\mathbf {v}}^n\), respectively. The discretized pressure \({\mathbf {p}}^n\) is the solution of the quadratic problem:

Minimize \(f({\mathbf {p}}^n)\), defined as

$$\begin{aligned} f({\mathbf {p}}^n) = \langle {\mathbf {p}}^n, \rho _{\max } - {\varvec {\rho }}^n + {\text {div}}({\varvec {\rho }}^n{\mathbf {v}}^n - {\varvec {\rho }}^n \nabla {\mathbf {p}}^n)\varDelta t \rangle , \end{aligned}$$

subject to the constraints

$$\begin{aligned} ({\mathbf {p}}^n)_i \ge 0, ({\varvec {\rho }}^n)_i \le \rho _{\max } {\text{ for all}}\,1\le i\le n, \end{aligned}$$

where we abuse the notation of \(\hbox {div}\,{\mathbf {u}}\) and \(\nabla {\mathbf {u}}\) to denote a consistent discrete approximation of continuous counterpart \(\hbox {div}\, u\) and \(\nabla u\), respectively.

Exploiting the complementary relation between \(\rho _{\max } - {\varvec {\rho }}^n\) and \({\mathbf {p}}^n\), we can convert (12) to a linear complementarity problem and solve it using the projected Gauss–Seidel algorithm on each time step without creating a bottleneck for the simulation. For more details regarding the algorithm and the implementation, we refer to [18, 19] respectively.

Because of our discretization of the UIC, the avoidance tendency is not maintained on distances smaller than the grid size. Therefore, to model size exclusion, we manually need to move evacuees apart to prevent them occupying locations too close to each other.

Each time step, we compute the propagation of the smoke according to (1), we update the sight radii and the new positions of the agents according to the model in Sect. 6. When an agent reaches the exit, his residence time is recorded and he is removed from the geometry.


The results are run in crowd simulation prototyping application Mercurial [22]. This is an open-source framework developed in Python and Fortran to simulate hybrid crowd representations as the one described in Sect. 3. It provides both agent-based- and continuum-level visualizations. Mercurial supports the design of arbitrary two-dimensional geometries, and has features for collecting and post-processing simulation results. More details on the structure and implementation of Mercurial are found in [18].

We ran the simulation 15 times in our case study containing 1000 evacuees, each time varying the ratio of visitors and residents. We started with a scenario filled with only residents. We indicate the simulation configuration by the ratio of visitors in the environment (\(\frac{N_B}{N_A+N_B}=0\)), and increased this number with 0.05 for each subsequent run. Figures 9 and 10 display two snapshots of the geometry for ratios 0.3 and 0.7, respectively.

Figure 9
figure 9

Snapshot after t = 46 for a visitor ratio of 0.3. Visitors are displayed as empty circles, residents as filled circles. The larger orange circle represents the center of the fire (Color figure online)

Figure 10
figure 10

Snapshot after t = 46 for a visitor ratio of 0.7. Visitors are displayed as empty circles, residents as filled circles. The larger orange circle represents the center of the fire (Color figure online)

We have chosen this environment to resemble the interior of a large building, characterized by corridors. The environment is set up so that without knowledge of the environment, it is possible but quite difficult to find an exit, especially with high densities of smoke.

In Fig. 9, we observe a structured evacuation, with almost of the evacuees belonging to a group moving towards the exit. As one would expect, the evacuation in Fig. 10 progresses more chaotically. Most evacuees move in smaller groups, their direction largely influenced by the outline of the corridor they move in.

The larger groups typically are centered around a resident, constituting a “shepherding effect”: a leader/follower scenario where the leader is surrounded from all sides by a large group of followers. This allows a large number of evacuees to reach the exit in both scenarios, as observed in Fig. 11 which displays the evacuation times for the two cases. This shepherding effect is most strongly present in the beginning of the situation, when the smoke density is still low enough for visitors to maintain a large sight radius. In some configurations, we observed groups of visitor clusters with an \(X_A\) leader to move faster than a typical group of residents.

Notice how in both evacuations there exist a large crowded zone close to the fire location. This is due to the lack of information the residents have about the location of the fire. Attempting to take the fastest route to the exit, takes them through hordes of residents and visitors drawn towards the same location. Because of these conflicting directions, the visitors are not able to consistently follow other evacuees and the evacuation stagnates. This does not happen in the other corridors, regardless of their level of congestion.

Figure 11 depicts the evacuation process as a function of time. In the initial stage of evacuation, egress is controlled by the capacity of the corridors and exits (revealed by the near-constant slope). After that time, the bulk of evacuees has been removed from the scene and the remainder consists of evacuees with a high initial distance to the nearest exit. Note that in spite of the large difference in evacuee ratios, the evacuation times for most residents are quite similar. The observation that large agent systems can be driven with a relatively small number of ’active particles’ is consistent with observations made in other contributions on particle systems (cf. e.g. [41]). This illustrates the effect of the leader-follower dynamics. The evacuation stagnates after all residents have left, leaving only the visitors with a lack of information.

Figure 11
figure 11

Number of evacuees left at time t for two ratios of occupants

The difference in evacuees behavior is also revealed by the formation of the incompressibility zones, shown in Figs. 12 and 13.

The pressures experienced in simulations with low visitor ratios are substantially higher. This can be attributed to the persistence in direction the residents display. Whenever a corridor appears clogged, the visitors are more prone to find an alternative exit. The difference in the pressure plots indicates that the visitors are more successful in avoiding the fire and harmful smoke effects than the residents.

Figure 12
figure 12

Logarithmic heat-map of pressure zones that developed in the scenario for a visitor ratio of 0.3

Figure 13
figure 13

Logarithmic heat-map of pressure zones that developed in the scenario for a visitor ratio of 0.7

Finally, we look at the times on which \(90\%\) of all evacuees have left the geometry. These times are displayed for several visitor ratios in Fig. 14. We observe a positive trend of increasing evacuation time for increasing values of \(\alpha \), but it is apparent that for ratios up to 0.35 the evacuation times are comparable.

Figure 14
figure 14

Evacuation time for various values of occupant ratios

It should be pointed out that in this stage of development we do not aim to predict accurate evacuation times; the evacuation times reported here lose credibility for visitor-dominated simulations. This is mainly due to the assumption that visitors without information walk in random directions, without any aid of memory or evacuation signals usually present in buildings. Rather, these simulations try to provide insight in evacuation behaviors for different crowd compositions.


The simulations shown in Sect. 8 draw attention to three fundamental aspects:

  • A key observation is that evacuations can progress efficiently even when relatively many people have no knowledge of their environment. However, when the number of people that have environment knowledge drops below a certain threshold, evacuation time is strongly impacted. This is in line with conclusions drawn from the experiments in [2], stating that visitors have a significantly longer evacuation time than evacuees familiar with the building.

  • The simulations indicate that having knowledge of the environment increases in some cases the risk to exposure to smoke and fire, possibly due to the fact that no alternatives other than the fastest route to the exit are considered. This is in line with observations made in [21], which states that people tend to follow their normal patters, even if that comes with additional risks. Further experimental research is required to draw quantitative conclusions based on these observations.

  • If visibility is reduced, the crowd dynamics becomes driven by social group behaviors. We expect this to involve a high coordination cost and significant information overload (compare the study [42], e.g.).


Looking forward, it is our aim to extend the applicability of this simulation framework to cope with more realistic scenarios. Concretely, we would like to improve the smoke simulation by assuming the propagation of the smoke plume follows a coupled thermo-diffusion system interlinked with compressible Navier–Stokes equations, possibly in three dimensions. Additionally, it would be interesting to include the effect of smoke inhalation on evacuees.

By including more intelligence for visitors, we aim to obtain more realistic evacuation times. By validating these with data on evacuation experiments, we will be able formulate more quantitative conclusions

Finally, for safety reasons, complex buildings or festivals gathering large crowds are endowed with way-signaling systems showing route choices with indications telling people where to go, enhancing their knowledge of a path towards the exit. This brings in the discussion the complexity of social choices. We have already expanded our simulation framework to cope with way-signaling systems and plan to investigate in the near future their efficiency especially when handling critical pedestrian flow conditions.