A pedestrian flow model with stochastic velocities: microscopic and macroscopic approaches

We investigate a stochastic model hierarchy for pedestrian flow. Starting from a microscopic social force model, where the pedestrians switch randomly between the two states stop-or-go, we derive an associated macroscopic model of conservation law type. Therefore we use a kinetic mean-field equation and introduce a new problem-oriented closure function. Numerical experiments are presented to compare the above models and to show their similarities.


Introduction
The modeling of crowd dynamics is a current research topic and provides a useful tool for evacuation planning. A good overview of the existing literature can be found in [4,7], where mainly two classes of modeling approaches (microscopic versus macroscopic) are distinguished. Microscopic pedestrian models typically rely on Newton-type dynamics as proposed e.g. in [13,20] while macroscopic models can be either derived via limiting processes [6,7,18] or phenomenologically, see e.g. [12,14,20,21]. Starting from a microscopic level model extensions include for example vision cones [8], shortest-path information [10] and diffusion [7,10].
In this work, we focus on a well-known phenomenon in crowds which is the sudden presence of non-moving people stopping immediately due to external attractions or, more recently, new cell phone messages. This leads to significant changes in the individual walking velocities, rerouting actions and hence to local bottlenecks depending on the crowd density. From reality we observe that people stop directly in front of attractions at a high probability and therefore influence other individuals also to stop or keep on walking. This random effect will be included as a stochastic process which is dependent on the position of the pedestrians. The main difference to existing pedestrian models with random effects is the motivation mentioned above and the mathematical representation of the stochastic dynamics. Similar problems have been considered in e.g. [7,10,18], where a formulation of the dynamical system in terms of Brownian motion driven stochastic differential equations (SDEs) has been used to capture intrinsic random decisions in the velocity of pedestrians. However, this approach is not suitable to cover the stop-and-go behavior of pedestrians we have in mind. We will use a continuous-time Markov chain approach [9] to include the random stop-and-go behavior by considering location-dependent switching rates. The overall goal is then to derive a model hierarchy for the microscopic and macroscopic pedestrian flow. In a first step, we develop and define the stochastic microscopic pedestrian model based on the social force model by Helbing and Molnár [13] and prove its existence, see section 2. Then, the kinetic formulation of the microscopic model under the molecular chaos assumption in terms of measures is considered. The derivation of a reasonable closure function to state the associated macroscopic pedestrian model is non-standard and requires some computational effort. Section 3 deals with the numerical treatment of the microscopic and macroscopic equations. We present a stochastic simulation algorithm for the microscopic model and explain how numerical methods for hyperbolic conservation laws can be used to approximate the solution of the macroscopic model. For simulation purposes we present two examples in section 4 and compare qualitatively both approaches by defining reasonable performance measures. An additional experiment with a deterministic situation, i.e., no random velocity drops to zero, will be also discussed.
The following picture 1 summarizes the main properties of the deterministic and stochastic modeling approach for different levels of descriptions. It intends to give an idea on the main ingredients used throughout the sections 2 to 4. In this section, we derive a stochastic microscopic model and deduce a corresponding macroscopic model. First, we define the stochastic microscopic model based on a deterministic social force model [13] and show its well-posedness. Second, we determine the time-evolution of the microscopic model and use a mean field assumption to get a kinetic model. This model is then simplified by an appropriate closure assumption to develop a macroscopic model, cf. existing literature on particle systems, e.g. [5,16,17,18] and pedestrian flow models in e.g. [7].

Microscopic Model
We use the ideas introduced by Helbing and Molnár [13] to describe the dynamical behavior of pedestrians. Let N ∈ N be the number of pedestrians and let i (t)) ∈ R 2 the position of pedestrian i at time t ∈ R ≥0 . The velocity of pedestrian i at time t is given bẏ In the following, we denote by the states of the system consisting of N pedestrians. The model equations are of Newton-type dynamicsẋ The acting forces are divided into the destination force F dest and the interaction force F int i . The determination of boundary and obstacles forces is done using the function V adapted from swarming models [1,2]. We remark that the equations (2.1) are non-standard in the sense that the first equation onẋ i (t) is not dependent on the velocity v i (t) only. The motivation of V (x i (t), v i (t)) will be explained more detailed in the paragraph on obstacle forces.
To keep the notation and calculations well-arranged, we keep the basic model simple and focus on the new modeling ideas.

Interaction and Destination Forces
As in [13], the interaction force acting on pedestrian i is where G : R → R 2 is a given vector field describing the repulsion and attraction.
Let v C > 0 be the comfort speed which is achieved approximately in the relaxation time τ > 0. We define the destination force by where D : R 2 → R 2 describes the direction to the destination of a pedestrian at position x i (t). If x D ∈ R 2 is some destination point, then D can be expressed in the simplest case by Note that alternative destination directions could be achieved by considering the shortest path between the current position x and the destination x D by solving the Eikonal equation, see e.g. [10].

Obstacle Forces
Different to [13], we choose an alternative way to model the obstacle forces by applying a kind of specular reflection, see [1,2]. The reason for this choice is that singular forces can occur close to obstacles leading to numerical difficulties during the simulation of (2.1). Let Γ ⊂ R 2 be a domain with outer normal unit field n which is continuous and defined on Γ. The boundary ∂Γ describes walls as well as obstacles and the outer normal field allows to manipulate the velocity vector such that pedestrians walk along these boundaries. We assume a pedestrian very close to a wall at position x ∈ Γ having a velocity vector v ∈ R 2 which is given by the destination and interaction forces. The position at a later time is then given by x + ∆tv and might be outside of the domain, see figure 2. This is the case if the vector v points out of the domain, i.e., v · n ≥ 0. In the other case v · n < 0, the pedestrian walks into the domain and the velocity vector is admissible. Let d(x, ∂Γ) and to conserve the velocity by the projection, we set such that ||ṽ(v, x)|| = ||v|| holds. Due to the assumption that a pedestrian will not change the direction immediately at the obstacle, we take a sufficiently smooth increasing function J : [0, ∞) → [0, 1] with J(0) = 0 and J(1) = 1 and define Summarizing, the velocity vector is given by and one can easily check that ||V (x, v)|| = ||v||.

Random Velocity Effects
All forces (interaction, destination and obstacle) considered so far are purely deterministic and include no random effects. Different to pedestrian models modeled by SDEs, we choose an alternative way to include random effects. From phenomenological observations we deduce the intrinsic random effect that pedestrians can decide to walk or to stop independently of each other. This can be done by switching the velocity and acceleration to zero and back again. More precisely, an individual that stops immediately will keep on walking again after a random time.
To include this phenomenon mathematically we describe the positions, velocities and the status, i.e., stop or go, as a time discrete stochastic process. Let ∆t > 0 be a small fixed time stepsize and let x n i ∈ R 2 the position, v n i ∈ R 2 the velocity and r n i ∈ {0, 1} the status of pedestrian i at time t n = n∆t for n ∈ N 0 .
To ease the notation, we denote by F i = F dest + F int i the sum of forces acting on pedestrian i. We consider a stochastic process X = (X n , n ∈ N 0 ) with X n = ( x n , v n , r n ) ∈ E (N ) = R 2N × R 2N × {0, 1} N on some probability space (Ω, A, P ) such that for all i = 1, . . . , N , n ∈ N 0 , z ∈ {0, 1} and some rate function λ : {0, 1} × R 2 → R ≥0 . The rate function λ describes the expected events per unit time and is a given parameter. To avoid doubling effects by the interaction forces and the effects arising from the rate function λ, the rate function is assumed to be only dependent on the position of the pedestrian i itself. Equations (2.2)-(2.4) can be seen as an Euler approximation of the deterministic system (2.1) while equation (2.5) describes the probability to walk (z = 1) or to stop (z = 0) during the next time step t n+1 given the values of the process at time t n . This idea is adapted from [9], where a continuous-time Markov Chains is used to motivate a production model with random breakdowns. Note that for the approach (2.2)-(2.5), we can only expect a well-defined model if ∆tλ(r, x) ∈ [0, 1]. Therefore we assume λ to be uniformly bounded and ∆t ≤ ||λ|| −1 ∞ . Furthermore, we have to fix an initial probability measure µ 0 (N ) on the measurable space (E (N ) , E (N ) ), where we denote by E (N ) = σ(E (N ) ) the smallest σ-algebra containing E (N ) . Summarizing, we state the following definition.
Definition 2.1. A time discrete stochastic process X on some probability space (Ω, A, P µ 0 (N ) ) with values in E (N ) = R 2N × R 2N × {0, 1} N and initial measure µ 0 (N ) satisfying equations (2.2)-(2.5) is called a stochastic microscopic pedestrian model. Now, we will show the well-posedness of the model. We define the mapping U : . . .
Then, well-posedness can be obtained using the Markovian kernel property.
Proof. For simplicity, we identify x as ( x, v, r) in the following. The first step of the proof is to show that for every set B ∈ E (N ) the mapping x → U (x, B) is measurable. In a second step, we have to prove that for every x ∈ E (N ) the mapping B → U (x, B) is a probability measure on (E (N ) , E (N ) ). From the assumptions we get that h is a measurable mapping and hence The function λ is also measurable and the sum as well as the product of (2.6) are finite such that The mapping U consists of a finite sum of weighted Dirac measures on (E (N ) , E (N ) ) and the assumption 0 < ∆t ≤ ||λ|| −1 ∞ implies that weights must be non-negative. So U is a measure on (E (N ) , E (N ) ) and it remains to show that U (x, E (N ) ) = 1 to complete the proof. We calculate and conclude that U is a probability measure in the second component.
The mapping U describes the one step transition probability of the system and allows to define a Markovian semigroup of kernels. We choose the typical composition of Markovian kernels, see e.g. [3], and define The family (U n , n ∈ N 0 ) is then a normal semigroup of Markovian kernels and we get the following well-posedness result.
. . , N be measurable mappings, λ uniformly bounded, ∆t ≤ ||λ|| −1 ∞ and µ 0 (N ) a probability measure on (E (N ) , E (N ) ). Then, there exists a stochastic microscopic pedestrian model. Furthermore, the distribution of N pedestrians at time step t n is given by Proof. The state space E (N ) is a polish space and we hence can use the Daniell-Kolmogorov theorem [3] which guarantees the existence of a canonical coordinate process X = (X n , n ∈ N 0 ) on some probability space (Ω, A, P µ 0 (N ) ) defined by the semigroup of Markovian kernels (U n , n ∈ N 0 ), cf. (2.9). The stochastic process X is a Markov process and therefore (2.10) and are satisfied. By setting x = ( x, v, r) and 2) in the case i = 1. The remaining equations (2.3)-(2.5) can be deduced analogously.

Kinetic Model
We now analyze the evolution of measures given by the microscopic pedestrian flow model. The principal idea is to derive the Kolmogorov forward equation, see e.g. [11], given by the semigroup (U n , n ∈ N 0 ). To do so, we introduce the following spaces of test-functions C (N ) and C to capture the discrete states of the pedestrians: Here, P denotes the power set and B(R) the Borel σ-algebra on R. We make the following assumption: For every n ∈ N 0 there exists a probability measure µ n This is the so-called molecular chaos assumption which forces the N -particle distribution being the product measure of a one particle distribution. In fact, for existing models it is shown that this is true as N tends to infinity, see e.g. [6]. To keep the derivation of the kinetic equation clearly arranged, we state the following lemma.
Proof. The first part of the lemma directly follows by rearranging and collecting the o(∆t) terms. Thus, it remains to show the second part. We have If we apply a Taylor expansion to φ(h( x, v, r, z)), this reads Inserting (2.13) into (2.12) and using the first part of the lemma we end up with Furthermore, to state the discrete time evolution of measures, we have to define a consistency relation.
Definition 2.5. The consistency relation for the initial measure µ 0 (N ) is defined by (2.14) The relation (2.14) means that non-moving pedestrians at the initial time t 0 have zero velocity. The next lemma shows that the consistency relation is also conserved in time.
Lemma 2.6. Let the measure µ 0 (N ) satisfy the consistency relation (2.14), then it holds , v, r)). Proof. The case n = 0 is true by assumption. Let us further assume that (2.15) is true for some arbitrary, fixed n ∈ N 0 , then due to (2.10) d( x, v, r)).

It remains to show that
U φ( x, v, r) = U φ( x, v r, r).
We know that and hence h(( x, v r, r)) = h(( x, v, r)) due to r i ∈ {0, 1}, i.e., r 2 i = r i . Then it is straightforward to see and The discrete time evolution of measures can be finally summarized in the following theorem.
Theorem 2.7. Let the consistency relation (2.14) be satisfied. Then, for all φ ∈ C (N ) , the N -particle distribution (µ n (N ) , n ∈ N 0 ) satisfies 1 ∆t Proof. The result is a direct application of lemma 2.4 and 2.6.
The kinetic model to the stochastic microscopic pedestrian flow model can be derived as follows: If we apply theorem 2.7 on the function φ( x, v, r) = ψ(x 1 , v 1 , r 1 ) ∈ C (N ) , we get where µ n (1) denotes the distribution of the first pedestrian. Using the molecular chaos assumption (2.11), we can express (2.16) as and therefore We introduce (µ t , t ≥ 0) such that µ n (1) = µ n∆t and obtain a continuous time equation for µ t by ∆t → 0 reading Remark 2.8. We prefer to use integral equations instead of a differential representation of (2.17). This is due to the fact that non-moving pedestrians have zero velocity and hence the measure Note that the one-particle distribution µ t is often called kinetic model as the following definition indicates: Definition 2.9. We call a family of measures (µ t , t ≥ 0) satisfying (2.17) for every ψ ∈ C stochastic kinetic pedestrian model.

Macroscopic Model
As we have seen, the kinetic model describes the one particle distribution including detailed information about the velocity of the pedestrians. However, we are mainly interested in the derivation of a simplified deterministic macroscopic model capturing the stochastic dynamics and hence significant less computational costs. Let be the probability to find a pedestrian in B x ∈ B(R 2 ) with status k ∈ {0, 1} and ρ t (B and together with (2.17) we obtain where we consider no change in the velocity any more.
In a next step, we need to approximate the expression with measures ρ t 0 and ρ t 1 to get a closed representation. This can be achieved by the following rescaling arguments of the kinetic pedestrian flow model: Let t δ = tδ and x δ = xδ be the rescaled variables satisfying 1 ≫ δ > 0, then we can rewrite (2.17) as where the index δ at x and t is neglected. By defining we get the new expression x, rv, r))] µ t,δ (d(x, v, r)).

(2.19)
We remark that at this point it is not obvious whether a measure µ t,δ in the limit δ → 0 exists for equation (2.19). However, in [15] it is analytically shown that for expressions of type if G, F dest ∈ W 1,∞ , the sequence of measures µ t,δ weakly converges to a measure µ t,0 satisfying . This motivates the use of a Dirac distribution in the velocity to deduce a simplified macroscopic model. We set We use a Taylor expansion to get for some θ 1 , θ 2 ∈ [0, 1]. and assuming that ψ is twice differentiable with respect to v.
Inserting the Taylor expansion into (2.23) leads to as δ → 0, the first term in (2.24) vanishes and only R remains. This choice for a closure distribution is close to the monokinetic closure (2.20) but with scaling factor (1 + τ λ(1, x)) −1 ≈ 1 − τ λ(1, x). So we end up with a meaningful result since the factor −τ λ(1, x) reduces the velocity about the expected number of stops during the relaxation time τ . Finally, we collect all ideas and computations so far.
for some positive measures ρ I 0 , ρ I 1 on (R 2 , B(R 2 )) is called a stochastic macroscopic pedestrian model.
We are able to obtain the differential representation of the stochastic macroscopic pedestrian model by applying the closure distribution (2.25) to eliminate the dynamics of the velocity. To do so, we assume that the measures ρ t 0 and ρ t 1 are absolutely continuous with respect to the Lebesgue measure and possess density functions u 0 and u 1 , respectively. Then, Note that the latter representation of the stochastic macroscopic pedestrian model also allows for comparisons to the deterministic model setting. Figure 3 illustrates our main results starting from the microscopic model to the resulting first order macroscopic model using the proposed closure velocities. The corresponding deterministic results can be directly obtained from [6,10,15].

Numerical Approximation
This section deals with the numerical treatment of the presented stochastic microscopic and macroscopic pedestrian model. First, we present a stochastic simulation algorithm for the microscopic model to generate efficiently sample paths. Second, we introduce a numerical approximation scheme for the macroscopic model in its differential form.

Microscopic Model
The generation of sample paths for the microscopic model can be directly implemented with the transition kernel and the Markov property. In detail, let X n = ( x n , v n , r n ) ∈ E (N ) be the current state of the system and ∆t ≤ ||λ|| −1 ∞ . Due to (1 zi (r n i )(1 − ∆tλ(r n i , x n i )) + 1 1−zi (r n i )∆tλ(r n i , x n i )) Closure Velocity

Microscopic
Macroscopicẋ Deterministic Stochastic Figure 3: Overview of the deterministic and stochastic model hierarchy equations implies that the status of each pedestrian r n i to walk or to stop can be chosen independently according to a Bernoulli distribution with probabilities p i = ∆tλ(r n i , x n i ) where λ is the given rate function. Summarizing, we obtain algorithm 1.

Algorithm 1: Euler approximation of the microscopic model for one time-step
Data: Current state ( x n , v n , r n ) begin for i = 1 : N do Note that we need to sample initial values according to the initial distribution µ 0 . Then, trajectories of the microscopic pedestrian model can be computed by algorithm 1 until a finite time horizon is reached.

Macroscopic Model
We consider equations (2.26)-(2.28) to solve the macroscopic pedestrian model numerically by established approximation schemes. Therefore, we decouple the original model into two separate problems (advection and reaction) using a fractional-step method, see e.g. [19], and solve the problems as follows:

Advection term
This is a two dimensional scalar conservation law with space dependent, non-local flux function that is solved by a first order Roe method while the convolution in is approximated by a rectangular rule. Dimension splitting [19] enables the numerical solution of one dimensional problems to solve the two dimensional advection equation in each time step.

Reaction term
These equations can be explicitly solved for every x ∈ R 2 since the reaction is linear. Let denote the solution of the reaction equation, then with λ(x) = λ(0, x) + λ(1, x) and

Computational Results
For simulation purposes, we focus on new effects arising from the stochastic dynamics and qualitative comparisons of the model hierarchy. We need to define performance measures to evaluate the quality of approximations of the microscopic and macroscopic model. Therefore, we assume that the macroscopic measure ρ t admits a Lebesgue density u(x, t) which is approximated by cell means u Mac,n ij on rectangles Q ij with lengths ∆x, ∆y and center x ij at time step t n . Furthermore, the average density of pedestrians in Q ij for the microscopic model is given by This allows to specify the error between the microscopic and macroscopic model as  at some vertical cut at positionx ∈ R determines the amount of mass in front of the cut. This measure extracts information about the time needed that a certain percentage of pedestrians crossed the cut. In the following examples, we assume that the destination force is a point force with destination point x D ∈ R 2 and interaction kernel G as the gradient of a Morse Potential, i.e.
The microscopic model is only comparable to the macroscopic one if we assume that the initial velocities are given by the closure velocities of the macroscopic model, i.e., for randomly generated positions (x 1 , . . . , x N ) and states (r 1 , . . . , r N ), we set where the initial states r i are computed according to a Bernoulli distribution with initial probability P (r i = 0) = p 0 ∈ [0, 1].

Example 1: Corridor with Space Dependent Rates
As a first example, we consider a strip without obstacles with boundaries given by bold lines, see figure 4. The comfort velocity v C and the relaxation time τ are assumed to be one. The distribution of the initial positions should be Additionally, the initial conditions for the macroscopic model are supplemented by the initial probability to stop p 0 = 1 2 . We are interested in the dynamic behavior of the model for a space dependent rate function: In this scenario, the rate λ describes the number of events per time such that equations (4.3) and (4.4) indicate that pedestrians will stop more frequently than intend to walk inside the circle around the origin with radius 0.5. We expect that walking pedestrians circulate around the nonmoving crowd and merge behind the bulk until a comfort density is reached again, cf. times t = 10 and t = 15 in figure 4. As we can also see, the influence of the space dependent rate on the density is significant since the density is much higher in the region where people stop longer and walk shorter.
Apparently, the results from the microscopic and the macroscopic simulation are quite close, i.e. the density profiles show the same qualitative behavior in time. This can be also verified by the mass balance in figure 5 and the L 1 and L 2 error in figure 6.

Example 2: Corridor including Bottlenecks
Different to the first example, we now focus on a scenario where two obstacles are located oppositely, see bold boundaries in figures 7 and 8. We distinguish the rate functions λ 1 and λ 2 to basically cover two relevant scenarios: The rate function λ 1 is in-homogeneous in space and divided into two cases. In the case x ∈ [−1, 1] which is exactly between the obstacles (e.g. external attractions) pedestrians will stop more often and stay for a longer period. Otherwise, for x ∈ (−∞, −1) ∪ (1, ∞), pedestrians behave deterministic since the scaling factor (1 + τ λ(1, x)) −1 in (2.25) becomes very close to one and we get a velocity which corresponds to the deterministic model, cf. left column in figure 3. On the contrary, the rate function λ 2 is homogeneous in space but will be used as the deterministic benchmark problem, see again figure 3. We consider the following setup: The destination is again located at x D = (100, 0), the comfort speed is v C = 1 and the relaxation time is supposed to be τ = 0.2. The initial distribution is with probability p 0 = 0.01 to stop in the beginning. Therefore, the initial conditions for the macroscopic model read The simulation is performed with step-sizes ∆x = ∆y = 1 40 , N = 100 pedestrians and M = 1000 Monte-Carlo iterations. We have used the same PC as before and the required computation times are 3006 seconds (λ 1 ), 3205 seconds (λ 2 ) for the microscopic model and 485 seconds (λ 1 ), 495 seconds (λ 2 ) for the macroscopic model.
In figures 7-8 we plot the densities for different rate functions. The specular reflection type boundaries seem to work well and the pedestrians are rerouted along the obstacles. For the choice of λ 1 in figure 7, where the pedestrians tend to stop between the obstacles, we observe the expected queuing behavior. In contrast for the deterministic setting λ 2 , higher densities in front of the obstacles result from the spatial conditions only and are not caused by stop-or-go decisions, cf. figure 8.
The influence of different rate functions is also reflected by the comparison of the mass balances in figure 9. The first scenario, the bottleneck situation, reduces significantly the mean velocity of the pedestrians and hence leads to longer travel times, see left picture in figure 9. After Finally, we stress that the error between the microscopic and macroscopic model is again rather small, as figure 10 illustrates, and is not affected by the different rate functions.

Conclusion
We have introduced a stochastic microscopic pedestrian model with specular reflection type boundary conditions and proved its existence. Based on the microscopic model, we have derived a kinetic formulation under a mean field assumption in terms of measures. A non-standard closure assumption has been established to extract a first order macroscopic model given by a system of conservation laws. Numerical comparisons of the microscopic and macroscopic pedestrian flow model have been performed to demonstrate the same dynamical behavior for both modeling approaches.
Future work might include the investigation of a stochastic model hierarchy, where the Eikonal equation (instead of the destination force) is used to determine the shortest travel time to the desired destination, see [10]. The derivation of a second order macroscopic model seems to be also very appealing in this context.