Modeling Routing Choices in Unidirectional Pedestrian Flows

In this work we present a simple routing model capable of capturing pedestrians path choices in the presence of a herding effect. The model is tested and validated against data from a large scale tracking campaign which we have conducted during the GLOW 2019 festival (Eindhoven, The Netherlands). The choice between alternative paths is modeled as an individual cost minimization procedure, with the cost function being associated to the (estimated) traveling time. In order to trigger herding effects the cost function is supplemented with a penalty term, modulated as a function of the fraction of pedestrians walking along each route. The model is shown to provide an accurate quantitative description of the decision process.


Introduction
Deepening our understanding of pedestrians choice processes and their macroscale reflections has immediate societal impact, for example in helping to increase safety and comfort in relation to urban design and planning of small and large scale events [1,2].
Several studies [3][4][5][6] have shown that pedestrian routing choices can be modeled in terms of suitable utility (cost) functions that individuals attempt to maximize (minimize). Besides the traveling time, a few other examples of parameters entering such utility functions, which have been shown to be relevant in pedestrian routing processes, are path directness, perceived comfort, and even esthetic aspects [6,7].
While several models are being proposed (see e.g. [8] for a review), a quantitative understanding of pedestrian dynamics is often limited by the lack of large datasets that could allow for testing and calibration purposes. In the past, theories and models were mostly tested on data from small scale experiments conducted in laboratory conditions [9][10][11][12][13][14][15][16], where it is in general complicated to avoid interfering with the observed phenomenon.
During the last decade, pedestrian sensing by means of overhead depth-cameras has emerged as a promising alternative approach, both in terms of accuracy and scalability [17][18][19][20]. In this work, we make use of large dataset of pedestrian trajectories, collected during 7 days of tracking at the Glow 2019 festival in Eindhoven (The Netherlands), to validate a routing model capable of describing pedestrian decisions influenced by herding effects.
We propose a simple model in which choices of single individuals are evaluated as a cost minimization process in which pedestrians aim at minimizing their perceived traveling time, which is in turn modulated by a penalty factor, function of the local density/occupancy of the different paths.
This paper is structured as follows: in Section 2 we introduce the routing model. In Section 3 we provide a brief description of the experimental setup, to then calibrate the model and compare numerical results against experimental data. The paper ends with Section 4 summarizing our results and drawing possible future directions.

Modeling pedestrians routing choices
We consider a simple graph consisting of two nodes, a starting node and a destination node, connected by K links, each representing possible alternative paths. The weight associated to each link is defined by a cost function T i (ζ ζ ζ ), i ∈ {1, . . . , K}, where the vector ζ ζ ζ represents the set of information available to (or estimated by) the pedestrian making the routing choice (e.g. the path length, the number of people traveling along the path, their velocity etc.).
We assume that each pedestrian takes the path associated to the link of minimal cost. Formally, we express the pedestrian choice of taking path i over all other alternatives with the variable x i We consider the following cost function: where f i is a penalty function, t i is the (estimated) traveling time along path i, calculated as the ratio between the walking speed v i and the path length L i . The role of the penalty function is to increase the cost attributed to the path by the pedestrian, de-facto allowing the pedestrian to take suboptimal choices.
We here introduce a penalty function designed to take into account herding effects. In this case, pedestrians will attribute a higher cost to paths that are rarely chosen by other pedestrians. Conversely, the penalty should decrease in such a way that the perceived cost gets closer to its real value as the number of pedestrians walking across a route increases.
We name n i the fraction of pedestrians present in the system (thus visible to the pedestrian making the choice), currently walking across path i. Hence, we propose the following penalty function: The role of the parameters a, s and n 0 is as follows: • a controls the amplitude of the penalty, and the bound holds • s controls the smoothness in the transition between the two asymptotic values of the penalty function; • n 0 determines where the transition occurs.

Numerical results
In this section, we test and calibrate the routing model introduced in the previous section using a dataset of about a hundred thousand trajectories, collected during the 2019 Glow festival in the city of Eindhoven (The Netherlands). The experimental setup, sketched in Fig. 1, was established on the perimeter of the Philips Stadium, along the uni-directional route of the festival amid two consecutive festival exhibits. When approaching the setup, each pedestrian faced a binary choice: passing an external pillar bearing the stadium grandstands either by its right or left side (considering the point of view of snapshot in the botton left corner of Fig. 1). Respectively, these were a slightly shorter and approximately straight path, in the following referred to as path A, and a curved path partially intersecting a bicycle lane (closed during the experiment), named path B henceforth.
We acquired individual pedestrian trajectories at 30 Hz time resolution by means of overhead depth images and the HA-HOG localization method [21]. We collected raw depth images of a walkable area of about 30 m 2 via 8 Orbbec Persee sensors attached underneath a pedestrian overpass, and arranged in a 4x2 grid (see dashed gray line in Fig. 1; cf., e.g., [22,23] for detailed explanations on pedestrian tracking via depth sensor grids).
We start our analysis by taking into account the cost function in Eq. 2, neglecting for the moment the penalty term. We consider therefore a policy in which pedestrians perform their routing choice by trying to minimize their traveling time.
We assume that pedestrians perform their choice at the moment when they enter the experimental setup, and that they are provided with full knowledge of all system variables, such as the number of pedestrians currently present in path A and B, respectively N A and N B , and their walking speed.
In order to evaluate Eq. 2, we need to provide an estimate for what would be the (average) walking speed of a single pedestrian, depending on the routing choice. We extrapolate this information from the fundamental diagram, which puts in relation the average velocity and density (pedestrian count, in our case). In Fig. 2 a)  that as the pedestrian count increases, the average velocity decreases at an approximately linear rate in both cases, consistently with studies conducted in comparatively low-density regimes [9]. In Fig. 2 b), we also show the probability distribution function (PDF) of the velocity, for three different density ranges. The two panels of Fig. 2 do not highlight significant differences between the walking speed of pedestrians across the two paths. For simplicity, we then consider a linear model for the fundamental diagram, in which we assume the same free-stream velocity (v 0 ) and the same slope (κ) for both path A and path B: The black line in Fig. 2 represents the results of the linear fit with v 0 ≈ 0.965 ± 0.012 m/s and κ ≈ 0.014 ± 0.001. By combining Eq. 2 with Eq. 4 we can implement and evaluate the routing model. Operationally, for each pedestrian we take the following steps: 1. We calculate the average velocityv of the pedestrian along its trajectory.
2. We assume that each pedestrian has its own "free-stream" velocity, which we can calculate from Eq. 4 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23   where N i is the number of pedestrians present in the path then chosen by the pedestrian in the moment he entered the system. 3. We consider N A and N B at the time the pedestrian first enters the system, and compute the walking speed v A and v B using Eq. 4 with the previously computed freestream velocity.
4. Finally, using Eq. 2 we compute the cost function associated to each path, and determine the routing choice via Eq. 1.
At this stage, we can compare the routing choice performed by pedestrians with those predicted by the model. In Fig. 3 we show the probability of taking path A, as a function of the global pedestrian count N = N A + N B . The blue curve represents the results obtained implementing the routing policy based on the minimization of the traveling time. The analysis clearly shows that in the range 4 < N < 20 the model strongly departs from the experimental data, suggesting that within this range pedestrians do not manage to optimize their traveling time; this is consistent with other studies which have discussed cases in which route choice can be affected by several factors other than minimization of path length or traveling time [7,24,25].
By comparing the experimental data with the model we observe that pedestrians seem to intentionally avoid taking path B even if in most cases it would represent a better choice, in terms of traveling time, over path A. We can partially explain this behaviour with the fact that path B presents a curvature and partially overlaps with a bicycle lane, which could make pedestrians hesitant from walking across it, especially if no one else does so.
In order to capture this herding effect, we consider again the routing model with the cost function given by Eq. 2, this time including the penalty function in Eq. 3. We apply the penalty function only to the cost function of path B (i.e. f A = 1).
In Fig. 3, the orange line represents the results obtained by applying a penalty to the cost function of path B using the parameters a = 0.2, s = 20 and n 0 = 0.2. The model is in good agreement with the experimental data, and shows that it is possible to explain the choice performed by pedestrians by overestimating the cost of traveling along path B.
Finally, in Fig. 3 we show also the results obtained by introducing fluctuations in the penalty function. The aim is to allow for subjective variability in the perception of the herding effect. We consider the same parameters as in the previous case, but this time n 0 is drawn from a normal distribution n 0 ∼ N (mean = 0.2, std = 0.15). The results are represented by the green curve, which provides a better description of the data as we transition from low to higher density values.

Conclusions
In this work we have presented a simple routing model in which pedestrians select the path associated to the estimated minimal traveling time. The traveling time is in turn adjusted by a penalty function, which allows the description of herding effects.
We have tested and calibrated the model using experimental data consisting of a large dataset of trajectories from a unidirectional pedestrian flow confronted with a binary choice within an asymmetric domain.
The model shows that in our study-case pedestrians do not manage to optimize their traveling time, despite the simplicity of the setup. Besides, the model allows to properly capture the routing choices performed by pedestrians as the penalty function is introduced and its parameters calibrated. We shall point out that we have performed only a coarse scan in a limited search space of the parameters of the penalty function, since its optimization was not a central aspect in the present work.
In the future it will be interesting to define strategies for tuning these parameters from the data, using, e.g., machine-learning techniques, and comparing with different experimental setups.