1 Introduction

For public transport to be an attractive alternative to the private car, it is important that the traveler is provided with good connections from all possible origins to all possible destinations by the public transport system. This is only possible if the changes between lines and travel modes can be made efficiently. Wished for are interchange stations where delays caused by conflicting pedestrian flows and waiting crowds can be avoided. It is also important to save space, which is expensive and extends the walking distance between transports. Moreover, changing transport and waiting is considered a substantial inconvenience in itself, so any improvement of the interchange process is important for the attractiveness of the public transport system.

A large part of the research concerning the functionality of public transport stations are focused on qualitative issues, such as how the station is perceived by different groups of passengers, accessibility for passengers with disabilities, and various comfort related issues, see e.g. Guo and Wilson (2011), Hine and Scott (2000) and the PIRATE (2003) project. The results of such research are central to the planning of any pedestrian facility. To predict the operational level of service of a station, quantitative analysis methods are also required. Since the interactions between the passengers are complex, and the passenger population is differentiated with respect to both preferences and abilities, microsimulation is a suitable method for such quantitative analyses.

The last decades have seen substantial advancements in microsimulation of pedestrian movements, made possible by the rapid increase in available computational capacity. Several different techniques have been developed, the most frequent in the literature are cellular automaton based models, social force based models and a wide variety of models generally referred to as agent based. There is also a large collection of macroscopic and mesoscopic models. For reviews of the most common techniques, see for example Daamen (2004), or Johansson (2009). The existing applications of pedestrian microsimulation to public transport stations are mostly validation and calibration studies, visualizations for architectural purposes, and some quantitative analyses of macroscopic quantities, such as density and throughput, to identify potential bottlenecks and to examine evacuation processes, see e.g. Klugl and Rindsfuser (2007) or Daamen (2004).

In this paper we consider the social force model by Helbing and Molnár (1995), which has a solid theoretical foundation on the behavioral level and has been closely examined in the literature, for example by Moussaïd et al. (2009) and Ma et al. (2010). Johansson (2009) and Zanlungo et al. (2011) calibrated the model using video tracking software and genetic algorithms.

The contribution of this paper is the proposal of a set of measures related to the effectiveness of pedestrian flow. The measures are based on an idea of using moving averages of flow characteristics instead of averages over fixed areas, such as those used by Fruin (1971). More exactly, the proposed measures are obtained by the use of a Gaussian smoothing filter on the same scale as the range of the pedestrian interactions in the social force model by Helbing and Molnár (1995), which is used to simulate the movements of the pedestrians. This results in measures that are defined on the whole walkable area, and that vary on a scale that is relevant in relation to the model used. The proposed measures correspond to density, delay, acceleration and discomfort, but further measures may be defined using the same method. Furthermore, the contribution of this paper includes an investigation of the relations between the measures in various traffic situations simulated using an implementation of the social force model.

Finally we apply the social force model to conduct a detailed simulation of an important and spatially well restricted component of an interchange station: a railway platform. We do this to demonstrate the use of pedestrian microsimulation in combination with our proposed measures for level of service analyses of public transport interchange stations. The measures developed can be used as measures of the efficiency and comfort of the simulated platform.

The remainder of this paper is organized as follows. We begin in Sect. 2 with a description of the social force model, followed in Sect. 3 by a description of the details of our implementation of it. In Sect. 4 we motivate and define our measures and discuss some related previously proposed measures; in Sect. 5 we examine the relations between them, and in Sect. 6 we briefly demonstrate the usage of them.

2 The model

Since the work presented in this paper is to a large part an investigation of the properties of the social force model and measures closely related to the model we start with a rather detailed description of the model and our implementation.

2.1 Model structure

In order to simulate the behavior of pedestrians at a multi-modal public transport interchange station several models are needed; there is no simple general rule that can describe the behavior in the multitude of situations possible. Rather a hierarchy of models is needed, as described for example by Hoogendoorn and Bovy (2004), modeling the behavior of pedestrians at different levels of abstraction, spatial and temporal extent, and level of consciousness.

Since the flow of pedestrians at an interchange station is far from evenly distributed in time and space, passengers alighting from a bus or a train form a sharp peak in the distribution of arrival times to the station. This, in combination with the highly dynamic nature of pedestrian flow, implies that the operational level in Fig. 1 is potentially critical for the overall performance of the station. Thus the operational level can not be safely ignored when evaluating the performance of a pedestrian facility.

Fig. 1
figure 1

Structure of models for pedestrian movement

The operational level can accurately and explicitly be modeled by a microscopic simulation model. There are several available microscopic models of pedestrian traffic, see e.g. the review of Daamen (2004). One of the most studied microscopic models, with available calibrated parameters, is the social force model of Helbing and Molnár (1995), which also is easily implemented. The model has been investigated and calibrated by Johansson (2009) and calibrated and extended by Zanlungo et al. (2011), and the properties of the model has been studied by Helbing et al. (2000) in the context of evacuation simulation, and Helbing et al. (2002) in both evacuation and normal conditions. The SFM has also been implemented in major commercial software for general traffic simulation (Kretz et al. 2011).

A minimal model based on the social force model has been the basis for the analysis in this paper. The model is minimal in the sense that it has been kept as clean as possible in order for the results not to be perturbed by the inclusion of nonstandard model elements. The implementation consists of the elliptical specification of the social force model by Johansson (2009), further described in Sect. 2.2, coupled by the desired velocity to a shortest path route choice mechanism.

2.2 The social force model

The social force model for pedestrian dynamics was first introduced in Helbing and Molnár (1995) and later revised in a series of papers, which resulted in a number of different versions of the model summarized in Johansson (2009).

A pedestrian’s basic desire to reach his or her goal is introduced into the social force model in the form of a preferred velocity \(\mathbf{v}^p_i,\) where the index i identifies the pedestrian. From the point of view of the social force model, the preferred velocity is an exogenous variable, originating from a model at a higher level in the model hierarchy. The pedestrian adopts to its preferred velocity by supplying a force,

$$ {\mathbf{F}}^p_i = \frac{1}{\tau}\left( {\mathbf{v}}^p_i - {\mathbf{v}}_i\right), $$
(1)

where τ is the time scale for the adaptation to the preferred velocity and \(\mathbf{v}_i\) is the realized velocity of the pedestrian. The lower the value of τ, the quicker and more aggressively the pedestrians adopt to their preferred velocity.

The basic model of the interaction between the pedestrians postulates that the operative behavior of a pedestrian j under the influence of the presence of pedestrian i is guided by a force given by a potential of the form

$$ V_{ij} = V({\mathbf{r}}_{ij}) = F_0\sigma e^{-b({\mathbf{r}}_{ij})/\sigma}, $$
(2)

where \(\mathbf{r}_{ij}\) is the position of pedestrian j relative to pedestrian i, and V 0 and \(\sigma\) are model parameters describing the magnitude and the range scale of the force, respectively, and \(b(\mathbf{r}_{ij})\) is a function describing the angular dependence of the force. The basic model is rotationally symmetric, and the function simply is \(b(\mathbf{r}_{ij}) = r_{ij},\) i.e. the distance between the pedestrians. Several alternative versions have been discussed in the literature, see for example Johansson (2009) for a review. In this paper we will focus on the elliptical version with

$$ b({\mathbf{r}}_{ij}) = \frac{1}{2}\sqrt{(r_{ij}+|{\mathbf{r}}_{ij}-{\mathbf{v}}_{ij} T_s|)^2 - (T_s v_{ij})^2}, $$
(3)

where \(\mathbf{v}_{ij}\) is the velocity of pedestrian i relative to pedestrian j, and T s is the look-ahead time of pedestrian j. The social force potential is depicted in Fig. 2.

Fig. 2
figure 2

The social force potential of a walker positioned at the origin (0,0), affecting a walker at point (x,y). In the rest frame of the affected walker, the velocity of the affecting walker is 1.34 m/s in the y direction. The social force is the negative of the gradient of this potential at the position off the affected walker.

Since the force,

$$ {\mathbf{F}}_{ij}({\mathbf{r}}) = - \nabla_{\mathbf{r}} V[b({\mathbf{r}}_{ij})], $$
(4)

and,

$$ \nabla_{\mathbf{r}} b({\mathbf{r}}_{ij}) = \frac{1}{4b({\mathbf{r}}_{ij})}\left(r_{ij}+\left|{\mathbf{r}}_{ij}-{\mathbf{v}}_{ij} T_s\right|\right)\left(\frac{{\mathbf{r}}_{ij}}{r_{ij}}+\frac{{\mathbf{r}}_{ij} -T_s {\mathbf{v}}_{ij}}{|{\mathbf{r}}_{ij}-T_s {\mathbf{v}}_{ij}|}\right), $$
(5)

the explicit form of the force becomes

$$ {\mathbf{F}}_{ij} = \frac{\left(r_{ij}+\left|{\mathbf{r}}_{ij}-{\mathbf{v}}_{ij} T_s\right|\right)}{4b({\mathbf{r}}_{ij})}\left(\frac{{\mathbf{r}}_{ij}}{r_{ij}}+\frac{{\mathbf{r}}_{ij} -{\mathbf{v}}_{ij} T_s}{|{\mathbf{r}}_{ij}- {\mathbf{v}}_{ij} T_s |}\right)F_0e^{-b({\mathbf{r}}_{ij})/\sigma} .$$
(6)

For high density flows an additional force term is used to model the physical extent of the pedestrians,

$$ {\mathbf{F}}^{phys}_{ij} = F_0^{phys} e^{(R_i + R_j -r_{ij})/\sigma^{phys}} \frac{{\mathbf{r}}_{ij}}{r_{ij}}, $$
(7)

where R i is the radius of pedestrian i. The scale of the range of the force, \(\sigma^{phys}\) is much shorter than the scale of the social force term Eq. (6), and the maximum force is much stronger (Johansson 2009).

People also tend to avoid to collide with walls, and this behavior is modeled in a similar manner to the interactions between persons. An obstacle force is defined as

$$ {\mathbf{F}}^{obst}_{in} = F^{obst}_{0}e^{-r_{in}/\sigma^{obst}}\frac{{\mathbf{r}}_{in}}{r_{in}}, $$
(8)

where \(\mathbf{r}_{in}\) is the position of walker i relative to the closest point of obstacle n, and F obst0 and σobst are the magnitude and range scale of the force, respectively.

Finally there is a random force term that models any variations in the behavior not included in the model, such as accidental deviation from intended motion.

The sum of all these forces determines the acceleration of the person, but since the forces are social, not physical, a force should only affect a person if the person is aware that the source of the force exists. Thus a weighted sum of the forces is used, with weights depending on to what extent the affected pedestrian is aware of the source,

$$ {\mathbf{a}}_i = \sum_{j} \left( w(\varphi_{ji}){\mathbf{F}}_{ji} + {\mathbf{F}}_{ji}^{phys} \right) + \sum_n {\mathbf{F}}^{obst}_{in} +{\mathbf{F}}^{p}_i + {\mathbf{F}}^{rand}_i, $$
(9)

where the weights \(w(\varphi_{ji})\) depend on the angle between the direction of motion of pedestrian i and the vector describing the position of pedestrian i relative to pedestrian j

$$ w(\varphi_{ji}) = \left( \lambda + (1 - \lambda) \frac{1 - \cos(\varphi_{ji})}{2}\right), $$
(10)

where λ is a model parameter, describing the strength of the isotropy.

The equations of motion for the walkers are thus

$$ \frac{d\tilde{{\mathbf{v}}}_i}{dt} = {\mathbf{a}}_i, $$
(11)

and

$$ \frac{d{\mathbf{x}}_{i}}{dt} = {\mathbf{v}}_i, $$
(12)

where

$$ {\mathbf{v}}_i = \frac{\tilde{{\mathbf{v}}}_i}{\tilde{v}_i} \min \left(\tilde{v}_i , v^{max}_i\right), $$
(13)

so that the actual speed v i is guaranteed not to exceed the maximum speed v max i of the walker.

With just the social force model only the operative behavior can be modeled. In order to obtain a model able to produce correct behavior in an environment with nontrivial obstacles, the social force model has to be extended with some kind of tactical model describing the navigation. In this paper we consider the simplest possible model. The tactical model describes the navigation of a walker by setting the direction of the preferred velocity of the walker such that it in each point is directed along the tangent of the curve describing the shortest walkable path from that point to the destination. Shortest walkable path here denotes the shortest continuous curve that does not overlap any obstacles. The implementation, based on the fast marching method by Sethian (1996), is further described in Sect. 3. Other walkers are ignored by the navigation model and handled exclusively by the SFM.

2.3 Calibration of the social force model

As all models the social force model contains some parameters that have to be determined from observations of real pedestrian traffic. Some of the parameters are assumed to be identical for all pedestrians at the simulated site; these are summarized in Table 1. Note, however, that the constancy of these parameters over the population is a simplification, and further studies are needed in order to determine to what extent this simplification is valid. The only parameter that is assumed to vary over the simulated population, thus populating the model with walkers with different characteristics, is the preferred speed. It has been measured in several studies, with similar results (HCM 2010).

Table 1 The parameters from the calibration efforts reported in Johansson (2009) and Zanlungo et al. (2011)

All parameters may vary with culture, location, dominating traveler type, etc. Thus calibration of the model to the specific characteristics of the situation of interest may be extremely important for the accuracy of the results. However, since the discussion in this paper is focused on general properties of the model and its usage rather than analysis of a specific real case, the only thing that is important is that a consistent set of parameters is used, that is, a set of parameters obtained from data from one specific location or several equivalent locations.

It should be noted that calibrating the social force model is far from a trivial undertaking, for several reasons: pedestrian movements are hard to observe automatically, the model contains parameters that are only possible to estimate indirectly, and there are few studies on how much each parameter varies between locations.

Two attempts to calibrate the social force model have been made by Johansson (2009), and Zanlungo et al. (2011). The studies by Johansson (2009) are based on video footage from a public transport station, while the study by Zanlungo et al. (2011) is based on video footage of controlled experiments. Both studies use genetic algorithms to adapt the parameters so that the deviations between the simulated and observed trajectories are minimized, but Zanlungo et al. (2011) also include a term representing the seriousness of collisions in the objective function. The resulting parameter values are summarized in Table 1. The two parameter sets give significantly different results.

Neither of the calibration efforts include forces from obstacles, or a non-constant desired direction. Since the scenarios simulated in this paper include both of these features, this is a possible source of errors.

In the present implementation the preferred speed is normally distributed around a mean of 1.37 m/s, and with a standard deviation of 0.3 m/s, and it is constrained to the interval 0.5–2.5 m/s. This distribution is approximately adopted from HCM (2010). In this paper, all simulations are performed using the parameters from Johansson (2009).

3 The implementation

The goal of this paper is to discuss properties of, and correlations between, measures of the level of service for a pedestrian facility, obtainable from a microscopic simulation using the social force model. In order for the results to only be dependent on the properties of the measures and on the social force model itself, we have chosen to implement a social force model that is as pure as possible, with the only addition being the shortest path route choice mechanism.

The model of the facility consists of a scalar field indicating the walkable areas and the walls, and a vector field containing the wall force at each point. All fields in the model is discretized with a grid cell size of 0.1 m × 0.1 m. Also, for each possible destination of the walkers, a vector field containing desired directions has been constructed, such that the streamlines of the field constitute the shortest paths to the destination. Since the navigation is independent from the configuration of other pedestrians, the calculation of the desired directions can be made in advance of the simulation run, once for each destination. The result is a set of vector fields which in every point contains the direction in which a pedestrian located at the current point would prefer to walk. During the simulation this direction is read from the vector field corresponding to the chosen destination by the walker and scaled with the walkers characteristic preferred speed to obtain the preferred velocity. Note, however, that although the navigation field is discretized the walkers still move in continuous space.

The navigation vector field is calculated by the use of the fast marching method (FMM) by Sethian (1996). This algorithm takes as input a discretized field indicating the structure of the walkable area by having the value at the destination area equal to zero, walls and other impassible structures indicated by a big number M, and walkable area indicated by a number larger than the largest possible shortest distance and smaller than M. In the current implementation the impassible areas are extended by 0.4 m in order to avoid giving the walker inconsistent objectives. If this is not done, the walkers are given preferred velocities toward the borders of the obstacles, but are at the same time not willing to move close due to the repulsive social force from the wall, which will result in strange behavior at corners of obstacles. From this the algorithm constructs, at each grid point, a good approximation of the shortest distance to the destination. The preferred direction is then obtained as the negative of the normalized gradient of this field. When a walker is created it is given values of the walker specific preferred speed which together with the preferred direction gives the preferred velocity, and an assigned destination, i.e. a navigation field, according to an origin-specific distribution determined specifically for each origin in each scenario.

Walkers are created at specified points with time headways drawn from a random distribution approximating the observed distribution of alighting times from the Swedish train X2000 (Heinz 2003); a normal distribution with a mean of 3.1 s and a standard deviation of 2.1 s. This distribution is scaled with the width of the source so that the expected flow rate per unit width equals the one observed at train doors. This flow rate is denoted the basic flow rate below.

The update procedure of the simulator is described in Fig. 3. As can be seen in the figure, Eulers method is used to solve the equations of motion of the walkers; the time step is chosen to dt = 0.05s. This is important since the forces are very sensitive to variations in the relative distance between walkers, so a too long time step when using a linear solver will introduce unacceptable errors. A higher order method could allow for a larger time step, but would increase the complexity of the implementation, and also increase the computational burden per time step.

Fig. 3
figure 3

The update procedure of the software used for the simulations presented in this article. Some details are omitted and some notation is simplified for clarity. But in general the notation follows the one in the rest of this article

The implementation contains a loop over all pairs of walkers to calculate the social forces, which implies that the computational cost will increase as the square of the number of simultaneously present walkers in the simulation. This prohibits practical application of the implementation to large scenarios. However, significant gain in computational efficiency is possible, as indicated by Johansson et al. (2007), allowing simulation of several thousand pedestrians. The minimal implementation presented here does not contain any measures to increase the efficiency, again to avoid any unnecessary complications, and since it is not necessary for the applications presented; the simulated scenarios were run at speeds 20 times quicker than real time with 200 simultaneously present walkers on a standard laptop computer.

Further details on the implementation can be found in Johansson (2013).

4 Measures of level of service and effectiveness

The output of a microsimulation model is very detailed data of the state of each entity at each time step. Furthermore, since the model is using stochastic parameters to reproduce the observed variations in the traffic, several runs of a scenario must be performed in order to obtain results that have a reasonable level of uncertainty. In order to obtain any useful information from these enormous amounts of data, some type of averages must be calculated. Traditionally this averaging has been performed at the link level, a procedure probably inherited from the motor vehicle simulation field. Also the measures used to characterize the traffic have been imported from that field: density, speed and flow. These measures work well when applied to motorized traffic since this usually is practically one-dimensional, which makes the direction of flow determined by the infrastructure. In general pedestrian flow, however, there is no direction of flow imposed by the infrastructure or traffic rules, so not just the magnitude, but also the direction of motion becomes dynamically varying. Thus averages over fixed areas as measures of the traffic may miss important information. In addition to this problem, pedestrian facilities are usually not decomposable in a natural way into links and nodes since there often exist wide open spaces with multi-directional or unstructured flow. In such situations the choice of the areas over which the averages are calculated is arbitrary and may heavily influence the conclusions possible to draw from the simulation; adjusting a small area just a little bit may have large effects on the average value since it may cause a previously included pedestrian to be excluded or vice versa. With a large area on the other hand, such edge effects become small, but we may be unable to distinguish important local features of the traffic.

It is clear from the previous discussion that the measures used to describe the traffic situation need to be defined in a way that does not include an arbitrary choice of area, and the resolution of the measures must be such that they can resolve features much smaller than the size of the pedestrian area under investigation. It is also clear that measures of the efficiency of the traffic must incorporate the desired direction of movement of the pedestrians; the mean flow is not enough since some of the pedestrians may move in a direction other than their desired one. A set of measures that satisfies these requirements will be presented in the remainder of this section.

4.1 Density

The density at time t in a domain \(\Upomega \subset {{\rm I}\!{\rm R}^{2}}\) of the walkable area is:

$$ \rho_\Upomega(t) = \frac{1}{A_\Upomega}\sum_i \int_\Upomega \delta ({\mathbf{x}} - {\mathbf{x}}_i(t)) \hbox{d}^2 {\mathbf{x}}, $$
(14)

where \(\mathbf{x} \in {{\rm I}\!{\rm R}^{2}}\) is a location vector, \(\mathbf{x}_i(t)\) is the location of walker i at time \(t,\delta(\mathbf{x})\) is the two dimensional Dirac delta function, and \(A_\Upomega\) is the area of \(\Upomega,\) but since the choice of \(\Upomega\) is arbitrary, this definition is only useful for describing the density in a naturally constrained area, such as a corridor segment. A definition of the density as a continuous field defined on the whole walkable domain, which at the same time is able to resolve local density fluctuations, would be preferable.

One way to achieve this is to use the smoothed density field, which is obtained by convolving the pedestrian distribution with a suitable filtering function,

$$ \rho_R({\mathbf{x}},t) = \sum_i \int_{{\rm I}\!{\rm R}^{2}} w({\mathbf{x}} - {\mathbf{x}}^\prime) \delta ({\mathbf{x}}^\prime - {\mathbf{x}}_i(t)) \hbox{d}^2 {\mathbf{x}}^\prime, $$
(15)

where \(w(\mathbf{x})\) is a normalized smoothing filter. The smoothing filter is still arbitrary, but the natural choice is a Gaussian filter:

$$ w({\mathbf{x}}) = \frac{1}{2 \pi \sigma^2} e^{-{\mathbf{x}}^2/2\sigma^2}. $$
(16)

We note that the need to localize the measures has been recognized before; Helbing et al. (2007) proposed localized measures of density, speed and flow, and used them to analyze extremely dense pedestrian traffic. We here propose a specification of their local density, and propose two, to our knowledge, new local measures of the quality of the traffic.

We propose that if the social force model is used, the natural choice of the size of the filter, \(\sigma,\) is the range scale of the interaction forces between pedestrians in the model, since this is the typical length scale on which the pedestrians care of each others presence. Thus we choose \(\sigma_{filter} = \sigma_{social\,force} = \sigma,\) and from both of the calibration efforts we have \(\sigma = 0.6,\) which will be used throughout this paper.

4.2 Discomfort

The density alone cannot give a very detailed description of the traffic situation, unidirectional flow at a given density may be perceived as comfortable, while multi directional flow at the same density can be perceived as very uncomfortable. Thus, any measure of discomfort needs to take both the position and velocity of surrounding pedestrians into account. We propose using the SFM to describe the discomfort caused by a pedestrian as a function of its position and velocity.

The basic assumption of the social force model is that people try to avoid uncomfortable situations by adjusting their acceleration. This is modeled by the repulsive force between pedestrians; the stronger the force, the stronger the desire to move away from each other. This suggests that the presence of another pedestrian produces discomfort related to the size of the force from it, and thus the sum of the magnitudes of all social forces exerted on a pedestrian can be interpreted as a measure of the instantaneous discomfort of the pedestrian. Thus the discomfort density, \(\Updelta\) is,

$$ \Updelta({\mathbf{x}}, t) = \sum_i \int_{{\rm I}\!{\rm R}^{2}} \sum_j |F_{ij}({\mathbf{x}}_i(t), {\mathbf{x}}_j(t)) |\delta({\mathbf{x}}^\prime-{\mathbf{x}}_i(t)) w({\mathbf{x}} -{\mathbf{x}}^\prime) \hbox{d}^2 {\mathbf{x}}^{\prime}. $$
(17)

This measure of course relies heavily on the assumptions underlying the social force model.

Helbing et al. (2001) propose a measure of the discomfort based on deviations from the mean velocity, to be used for optimization of pedestrian facilities, according to,

$$ D_H = \frac{1}{N}\sum_{i}\frac{\overline{({\mathbf{v}}_i - \overline{{\mathbf{v}}}_i)^{2}}}{\overline{{\mathbf{v}}}_i^2}, $$
(18)

where a bar denotes the time average of the quantity. Since this quantifies how much the velocities vary, it is related to the amount of evasive maneuvers performed, and thus could be interpreted as a measure of discomfort. Measures such as this have the advantage that they are model independent, since they are based on more or less directly observable characteristics of the traffic, i.e., they do not contain the preferred velocity or any social force. On the other hand it is aggregated, so it has limited possibilities to resolve spatial inhomogeneities and it does not take into account the variations in preferred speeds on the population. But then again, its purpose was not to analyze, but to optimize the flow, so the high level of aggregation is suitable.

A related measure is the magnitude of the accelerations the pedestrians make. This is related to the amount of evasive maneuvers the pedestrians need to perform but also includes the accelerations needed to navigate through the environment. A version of this measure includes only the amount of acceleration over a certain threshold. This threshold can be chosen so that the measure includes only “almost collision” situations, and ignore slight adjustments of the path, thus becoming a measure of the amount of conflicts,

$$ A({\mathbf{x}}, t) = \sum_i \int_{{\rm I}\!{\rm R}^{2}} \theta(| a_i|-a_0)| a_i | \delta({\mathbf{x}}^\prime-{\mathbf{x}}_i(t)) w({\mathbf{x}} - {\mathbf{x}}^\prime) \hbox{d}^2 {\mathbf{x}}^\prime, $$
(19)

where θ is the Heaviside step function, and a 0 is the threshold value determining if an acceleration is a conflict or not. To use the number of conflicts as a measure of the quality of the traffic situation has a long tradition, dating back to Fruin (1971), but it has the drawback of the arbitrary threshold parameter. In this paper we only consider the case a 0 = 0.

The acceleration density is similar to the discomfort density, since the acceleration in many cases is the same as the sum of the social forces. However, the magnitude of the acceleration, |a i |, included in Eq. (19), is the magnitude of the vector sum of the forces, while the discomfort is the scalar sum of the magnitude of the forces. Furthermore, the acceleration is the result of all forces and the limit of the velocity of the walker, v max i .

4.3 Delay

An interesting measure from an efficiency point of view is the delay induced by crowding. This can be defined per pedestrian as the difference between the O–D travel time and the time it would take to reach the destination in the absence of other pedestrians. This can then be aggregated to OD-pair or any other type of pedestrian categories. A similar measure, but with distance instead of time, is of course also possible to define, but this is not affected by the stopping or slowing down due to congestion, so we do not consider it further in this paper.

In order to localize the delay, i.e. to analyze where it is produced, we use the difference between the rate that the walker approaches its destination and the desired rate. Let \(D(\mathbf{x}_i)\) be the distance to the destination for pedestrian i, and let v free i be the speed at which pedestrian i would have approached its destination in absence of other pedestrians. Then, the rate at which the pedestrian lags behind its free evolution is

$$ \fancyscript{D}_i = \left(v_i^{free} - \frac{d D({\mathbf{x}}_i) }{ d t} \right) \frac{1}{v_i^{free}}. $$
(20)

The time derivative of the distance to the destination is

$$ \frac{d D({\mathbf{x}}_i) }{ d t} = \frac{d D}{d {\mathbf{x}}_i} \frac{d {\mathbf{x}}_i}{d t} = \frac{{\mathbf{v}}_i^p \cdot {\mathbf{v}}_i}{v_i^p}, $$
(21)

since the preferred direction by definition is the gradient of the distance field. During free conditions the pedestrian can follow the shortest path towards its destination, so v free i  = v p i , which gives,

$$ \fancyscript{D}_i = 1 - \frac{{\mathbf{v}}_i^p \cdot {\mathbf{v}}_i}{(v_i^p)^2}. $$
(22)

Integrating this over the total travel time of pedestrian i reveals its total delay T i .

Since we are interested in the efficiency of the flow at different locations, we can interpret \(\fancyscript{D}\) as the contribution to the total delay by pedestrian i at the position \(\mathbf{x}_i.\) Then we can define, in the same way as the other measures the delay rate, \(\Upgamma,\) produced per unit area at time t

$$ \Upgamma({\mathbf{x}}, t) = \sum_i \int_{{\rm I}\!{\rm R}^2} \fancyscript{D}({\mathbf{x}}_i(t)) \delta({\mathbf{x}}^\prime-{\mathbf{x}}_i(t)) w({\mathbf{x}} - {\mathbf{x}}^\prime) \hbox{d}^2 {\mathbf{x}}^\prime .$$
(23)

A closely related measure of the efficiency of the flow is the time averaged similarity between the actual velocity and the desired velocity, as proposed by Helbing et al. (2001). This becomes a dimensionless measure of the effectiveness, E, of the flow in the area under consideration.

$$ E = \frac{1}{N}\sum_{it} \frac{\overline{{\mathbf{v}}_i \cdot {\mathbf{v}}^p_i}}{(v^p_i)^2}, $$
(24)

where a constant preferred velocity is assumed for each pedestrian.

5 Numerical results

In this section we examine the properties of the proposed measures by applying them to pedestrian traffic in two situations common in pedestrian facilities. We also make a preliminary analysis of the correlations between each measure and the local density in these situations. The traffic situations we analyze are opposing flow in a corridor and the flow in two corridors with unidirectional flow crossing at a right angle. Each scenario was simulated five times with different random seeds, and the data analyzed was taken from a period starting after the initial collision of the two groups, with a sampling frequency of two samples per second and for each time sample a random sampling of the points in space was made with a probability of 0.01 per point, each point being 1 dm2.

5.1 Opposing flow

The simulated corridor is 8 m wide and data is collected at the middle 40 m of its length. We consider two different configurations for the creation of walkers. In the first configuration the walkers are created at the opposite ends, with a uniform distribution across the corridor and have the other end as destination. We denote this scenario “Opposing unstructured flow” since there are no boundary conditions at the ends of the corridor that impose any structure on the flow. A schematic map of the scenario is depicted in Fig. 4.

Fig. 4
figure 4

Schematic map of the scenario which is denoted opposing unstructured flow

The second configuration still creates the walkers at the opposite ends of the corridor, but the creation is constrained to opposite halves of the corridor for the two groups, and the destinations are also constrained to the corresponding half on the other end of the corridor, see Fig. 5. This scenario is called “opposing structured flow” since the boundary conditions impose a clear structure that stabilizes the flow. In a real pedestrian facility this situation may arise if, for example, there are escalators in the ends of the corridor.

Fig. 5
figure 5

Schematic map of the scenario which is denoted opposing structured flow

The time integrated and replication averaged measures from the simulations discussed above are presented in Figs. 6, 7, 8, 9. The result of the unstructured scenario is to the left, and the result of the structured scenario to the right in each figure.

Fig. 6
figure 6

The pedestrian density in the opposing unstructured flow scenario (left) and the structured scenario (right)

Fig. 7
figure 7

The discomfort density in the opposing unstructured flow scenario (left) and the structured scenario (right)

Fig. 8
figure 8

The acceleration density in the opposing unstructured flow scenario (left) and the structured scenario (right)

Fig. 9
figure 9

The delay density in the opposing unstructured flow scenario (left) and the structured scenario (right)

As we can see in Fig. 6, the density is almost uniformly distributed across the corridor, but with slightly lower density along the middle, in both cases. We see that the density is a little bit more structured in the structured case. From observations of the animations of the simulation we know that the flow in the structured case is almost completely divided into two lanes, i.e. regions of uniform walking direction, with only very few walkers venturing out in the opposing flow region. In the unstructured case,on the other hand, the lanes are much more dynamical, with the position, relative flow and number of lanes changing during each simulation run and between replications.

In Figs. 7 and 8 the discomfort density and acceleration density are shown. Here the difference is very clear between the two cases, with the intensity of both measures concentrated along the middle of the corridor in the structured case, and slightly elevated along the walls in the unstructured case. We interpret this as follows: in the structured case, the majority of the discomfort and accelerations occur in a turbulent boundary layer between the opposing flows, where the outermost walkers in each lane have to avoid opposing walkers as the width of the lanes changes slightly due to variations in demand and overtaking.

In the unstructured case on the other hand, the majority of the discomfort and acceleration occur when the structure of the lanes is changed. A probable explanation for the slight elevation closer to the wall is the fact that the walls are fixed, which limits the space available for evasive maneuvers. If an evasive maneuver is performed in the central parts of the corridor, the neighboring walkers will also evade, thus spreading the discomfort over a larger area. This spreading is limited by the walls which results in a higher discomfort and acceleration density close to the walls.

Figure 9 depicts the delay rate density, which just as the acceleration density and discomfort density, in the structured case is concentrated along the middle of the corridor, but not as distinct as for the previous two measures. In the unstructured case, on the other hand, the delay rate density is extremely inhomogeneously distributed. This may indicate that the delay rate density measure is more sensitive to extreme situations than the other two measures.

The relations between the pedestrian density and the densities of discomfort, acceleration and delay, respectively, calculated from the results of the opposing flow simulations are presented in Figs. 10, 11, 12. In these figures we have chosen to exclude data with a pedestrian density below 0.2 m−1 since this is the density at the position of a single pedestrian far away from anyone else. Thus, there is no information of the traffic at these low densities.

Fig. 10
figure 10

Comparison of the relation between the discomfort density and the pedestrian density in the unstructured flow scenario (left figure) and the structured flow scenario (right figure). Note that the unstructured flow has significantly higher discomfort, but low density data points

Fig. 11
figure 11

Comparison of the relation between the acceleration density and the pedestrian density in the unstructured flow scenario (left figure) and the structured flow scenario (right figure)

Fig. 12
figure 12

Comparison of the relation between the delay rate density and the pedestrian density in the unstructured flow scenario (left figure) and the structured flow scenario (right figure). Note that the unstructured flow has significantly higher delay rate data points

In order to obtain figures that include enough data points from the narrow high density end of the distribution to see the structure, we had to include so many data points that the relative density of the data in the low density region became unobservable in the figures, i.e. the plot contains superposed data points.

In Fig. 10, we see the discomfort plotted against the density. The structure of the two plots is similar, but with a few differences. First, in the unstructured case there are more points above the majority of the data than in the structured case; second, the slope of the dense collection of points is slightly higher in the unstructured case. We also note that the extreme values are similar. All of these observations fit well with the discussion regarding Figs. 6, 7, 8, 9, which indicates that the proposed measures are useful to quantify quality of service aspects of simulated pedestrian flows.

The second pair of plots, Fig. 11, shows how the acceleration density depends on the density in the two scenarios. These two figures are very similar, but in the structured flow the data is a little bit more spread out in the direction of increasing acceleration density.

Finally, in Fig. 12, we have the relation between the delay rate density and the density. The distributions are very similar with the exception of the amount of outliers in the direction of high delay rates. Noteworthy is also the significant amount of negative delay rate density data. Negative delay rates correspond to walkers walking at a speed higher than their preferred speed due to social forces from other walkers behind them. The results presented in Fig. 12 imply that this effect is clearly significant. From the model perspective, the reason for this behavior is that the weight function \(w(\varphi),\) Eq. 10, vanishes only when the affecting walker is exactly behind the affected walker, and only when λ = 0 which defines the most anisotropic version of the model obtainable from this form of the weights. So if the effect is smaller in real traffic than what the model predicts, it is necessary to change the form of the weights.

5.2 Crossing flow

Next we examine the traffic predicted by the model at a right angled intersection of two unidirectional flows. A schematic map of the facility is presented in Fig. 13.

Fig. 13
figure 13

Schematic map of the scenario which is denoted crossing flow

The walkers are created to the left and at the bottom of the figure, with destinations to the right and at the top, respectively, according to the same principles as in the opposing flow scenario. We consider two scenarios, differing in the traffic demand. In the first case the rate of production of walkers is twice that of the rate in the opposing flow scenarios, and in the other the rate is only a quarter of it. The resulting densities are presented in Fig. 14, where we can see that the densities are almost uniform in the intersection area in both cases.

Fig. 14
figure 14

The local density when the the flow generated at the left and lower corridors are twice the standard flow rate (left figure), and when the flow rate is one forth of the standard (right figure)

When we look at the discomfort density, Fig. 15, we see that the distribution is a little bit skewed to the lower left corner in both cases.

Fig. 15
figure 15

The discomfort density when the the flow generated at the left and lower corridors are twice the standard flow rate (left figure), and when the flow rate is one forth of the standard (right figure)

If we look at the acceleration density we see a sharp peak in the upper right corner in the high flow case, which is not reproduced in the low flow case. The corresponding peak is also visible in the delay rate density, Fig. 16, where we also can discern a small elevation in the low flow case. This is a result of that, according to the model, walkers are more inclined to avoid collisions by altering their direction than slowing down, thus drifting in the direction of the crossing flow. This behavior results in such a strong drifting of some walkers that they reach the other side of the crossing flow too far to the right, and have to walk almost straight to the left, opposing the other flow.

Fig. 16
figure 16

The acceleration density when the the flow generated at the left and lower corridors are twice the standard flow rate (left figure), and when the flow rate is one forth of the standard (right figure)

To our knowledge this extreme drifting is not an observed phenomenon in real pedestrian traffic. That it appears in the simulations indicates that there is some behavior, that the model does not replicate correctly. We see two possible candidates: either the social force model’s preference for deviation from the preferred path over deceleration, as a response to a prognosticated collision, is incorrect; or the connection between the operational level and the tactical level in this implementation is too naive. In any case, further investigations of this problem are needed.

In the delay rate density distribution, Fig. 17, we observe an even more distinct skewness toward the lower left corner in both cases, than for the other measures. The reason for this skewness is the phenomenon of stripe formation: walkers to the right in the vertical flow and to the left in the horizontal flow will walk in such a way that they are protected from the crossing flow by fellow walkers, thus forming dynamic stripe patterns in the intersection area.

Fig. 17
figure 17

The delay rate density when the the flow generated at the left and lower corridors are twice the standard flow rate (left figure), and when the flow rate is one forth of the standard (right figure)

We also observe negative delay rate density after the intersection, that is to the right of and above the intersection area, in the figure. This can be interpreted as that the pedestrians emerging from the intersection are eager to leave the crowded region. Thus they speed up slightly. The interesting question raised by also this result is whether this prediction of the social force model is observable or not in real pedestrian traffic.

The relations to the density of the three measures are depicted in Figs. 18, 19, 20. Note that, at least for the high flow case, there seems to be a break point around 1.2 m−1. This is at the same scale as the largest values of the density that occurs before and after the intersection. Thus we can observe the existence of two traffic states, the unidirectional before and after the intersection and the mixed state in the intersection, in the figures.

Fig. 18
figure 18

The relation between the discomfort density and the density in the case of low flow (right) and high flow (left)

Fig. 19
figure 19

The relation between the acceleration density and the density in the case of low flow (right) and high flow (left)

Fig. 20
figure 20

The relation between the delay rate density and the density in the case of low flow (right) and high flow (left)

6 Illustration with a more complex walking area

To illustrate how the measures may perform in a real simulation project, we perform a simulation of two trains arriving at a railway platform at the same time.

In Fig. 21 we see a schematic map of the central part of a platform with two parallel tracks, which is accessed from a walking tunnel via two stairways. To study the alighting process we let two Swedish standard long-distance trains arrive in parallel.

Fig. 21
figure 21

Schematic map of the central part of the simulated platform. The small squares along the edges of the platform are the alighting locations, and the E shaped structures are the stairs down from the platform

The platform edges are here simulated in the same way as solid walls, which of course may be an oversimplification. It may be the case that pedestrians are even less inclined to walk close to platform edges than walls due to the danger of falling. We are, however, not aware of any studies of the differences of pedestrian behavior close to walls compared to that close to platform edges. Thus this difference constitute an interesting possibility for future research.

Five simulations are performed and we present the average values integrated over the whole running time. In Fig. 22 we see the density distribution, with a distinct path structure reaching from the train doors to the stairways. Figures 23, 24 and 25 show the distributions of the acceleration, discomfort and delay rate, respectively. We see clearly that the measures effectively identify the bottlenecks at the stairs down from the platform and that the measures contain different information. We remind, however, that this is only a non-validated illustration.

Fig. 22
figure 22

The density distribution obtained from the simulation of the platform

Fig. 23
figure 23

The acceleration density distribution obtained from the simulation of the platform

Fig. 24
figure 24

The discomfort density distribution obtained from the simulation of the platform

Fig. 25
figure 25

The delay rate density distribution obtained from the simulation of the platform

7 Conclusions and outlook

The purpose of this paper was to improve the the tools available for analysis of pedestrian traffic at interchange stations. We have done this by proposing three local measures of the quality of pedestrian traffic: the discomfort density, acceleration density and the delay rate density. Our simulations demonstrate that the measures can be used to identify critical aspects of both the simulated traffic situation and the model used. The analysis also demonstrates that the information contained in the measures is emphasizing different aspects of the traffic situation, thus providing a more complete picture.

From the application of the measures to the simulations we have performed, we can conclude that the social force model predicts the existence of significant negative delay rates. In one of the simulated cases, the intersection, we can locate the negative delay by using the time integrated delay rate density, locate the negative delay to two small regions downstream of the intersection, which may facilitate the comparison with observations of real pedestrian traffic.

The simulations also reveal that the models have some problems producing realistic behavior in some situations. This failure may be due to either the social force model, or the connection between the social force model and the route choice model. We hope to address this question in future research by investigating how to extend the social force model with realistic models for the tactical level of pedestrian movement. Further we aim at performing validation studies of the combined model.