Sébastien Motsch
email: smotsch@asu.edu.

Mehdi Moussaid
email: moussaid@mpib-berlin.mpg.de

Elsa G Guillot
email: elsa.guillot@gmail.com

Mathieu Moreau
email: mathieu.moreau1@univ-tlse3.fr

Julien Pettré
email: julien.pettre@inria.fr

Guy Theraulaz
email: guy.theraulaz@univ-tlse3.fr

Cecile Appert-Rolland
email: cecile.appert-rolland@th.u-psud.fr

Pierre Degond
email: p.degond@imperial.ac.uk

Sebastien Motsch
email: smotsch@asu.edu

Mehdi Moussaïd

Cécile Appert-Rolland

Modeling crowd dynamics through coarse-grained data analysis

Keywords: 2010 Mathematics Subject Classification. Primary: 93A30, 90B20; Secondary: 35B30 Pedestrian traffic, bi-directional flux, collective behaviour, data-based modeling, macroscopic model

come   L'archive ouverte pluridisciplinaire

1. Introduction. Since 2008, more than half of the world population is living in cities [START_REF] Martine | State of world population 2007: Unleashing the potential of urban growth[END_REF], which asks for the development of large-scale multimodal transportation systems. At the core of such systems, crowds of pedestrians are to be found in transportation facilities. The massive presence of this population in airports, train stations, metro stations, etc. is a challenge in terms of safety and transportation efficiency [START_REF] Rietveld | Non-motorised modes in transport systems: A multimodal chain perspective for The Netherlands[END_REF][START_REF] Wijermans | A landscape of crowdmanagement support: An integrative approach[END_REF][START_REF] Ronchi | Modelling large-scale evacuation of music festivals[END_REF]. This paper deals with the experimental analysis and modeling of crowd movements so as, at longer term, to develop operational tools to manage pedestrians in places as various as airports, train or metro stations or streets.

Managing the comfort and safety for pedestrians is difficult first because they are not operated or regulated as simply as vehicles can be through sets of rules and traffic signals [START_REF] Papageorgiou | Review of road traffic control strategies[END_REF]. Hence, it is difficult to prevent the formation of dense traffic areas, where compacted crowds are exposed to risks of stampedes [START_REF] Still | Crowd Dynamics[END_REF][START_REF] Helbing | Self-organized pedestrian crowd dynamics: Experiments, simulations, and design solutions[END_REF]. For this reason, it is important to design pedestrian traffic management systems similar to those existing for car traffic, and more particularly simulation tools to predict the short-term evolution of the traffic from conditions measure in-situ and in real time.

Today, on the one hand, pedestrian crowd simulators are developed for the purpose of validating the layout and the structure of buildings aimed at hosting a large public. This validation is performed beforehand, at the stage of design [START_REF] Shiwakoti | Enhancing the panic escape of crowd through architectural design[END_REF]. Most are not adapted to an on-line usage. Nevertheless, on the other hand, recent progress in pedestrian tracking technologies, both for detailed trajectories [START_REF] Benfold | Stable multi-target tracking in real-time surveillance video[END_REF][START_REF] Kratz | Tracking pedestrians using local spatio-temporal motion patterns in extremely crowded scenes[END_REF][START_REF] Plaue | Trajectory extraction and density analysis of intersecting pedestrian flows from video recordings[END_REF] or global traffic conditions [START_REF] Ali | Floor fields for tracking in high density crowd scenes[END_REF][START_REF] Zhang | Ordering in bidirectional pedestrian flows and its influence on the fundamental diagram[END_REF][START_REF] Saberi | Spatial fluctuations of pedestrian velocities in bidirectional streams: Exploring the effects of self-organization[END_REF], make possible to initialize a pedestrian traffic simulators with current conditions and to perform short-term traffic predictions. This would open the possibility to anticipate risks of congestion and to react accordingly. Such simulators are lacking today, thus, it is important to focus our attention on simulators which are able to continuously process a flow of input traffic data and which are efficient enough to perform short term predictions on-line. Our work aims at filling this particular gap, by developing online simulation tools to assist the management of pedestrian traffic.

We aim at performing short term predictions in places presenting risks of large attendance and risk of congestion. A specific type of environment retains our attention: corridors. By corridors, we mean elongated areas such as metro corridors, sidewalks or shopping arcade where pedestrians form bidirectional traffic flows. This type of place is particularly interesting to study because corridors generally link large places with high attendance (e.g., a corridor between two platforms). Because the traffic intensity is higher in corridors, they are the place where congestion can more easily initiate. In addition, because corridors are often organized in networks, they offer an opportunity to apply rerouting strategies to locally limit the risk of congestion: pedestrian would be suggested or forced to avoid corridors presenting a risk of future congestion, similarly to car drivers with modern GPS-based assistance systems.

How to perform accurate and fast predictive simulation for bidirectional pedestrian traffic in corridors? Two categories of models are described in the literature: microscopic and macroscopic approaches. The former approach is an ascending one: the motion of individual pedestrians is independently simulated based on multi-agent technique and crowd traffic conditions emerge from combination of interactions between agents. They are fundamentally based on the local models of interactions, which were developed in various disciplines such as physics [START_REF] Helbing | Social force model for pedestrian dynamics[END_REF], computer graphics [START_REF] Reynolds | Flocks, herds and schools: A distributed behavioral model[END_REF] or behavioral and cognitive sciences [START_REF] Ondrej | A synthetic-vision based steering approach for crowd simulation[END_REF][START_REF] Moussaid | How simple rules determine pedestrian behavior and crowd disasters[END_REF][START_REF] Bellomo | Behavioral crowds: Modeling and Monte Carlo simulations toward validation[END_REF], and which dictate how agents influence each other's motion. The latter type of approach are macroscopic ones. They model a crowd as a whole, a matter moving like a compressible fluid. Relying on the conservation law, a macroscopic simulation computes the crowd motion by estimating the temporal variations of local density [START_REF] Rosini | Macroscopic Models for Vehicular Flows and Crowd Dynamics: Theory and Applications[END_REF]. Algorithmic complexity is one fundamental difference between these two types of simulators. Microscopic simulators consider interactions between all possible pairs of agent and are quadratic by nature. In contrast, macroscopic algorithms are linearly complex with the size of the crowd. This difference makes macroscopic approaches a model of choice. While microscopic models are unadapted to produce real time simulations as soon as the pedestrian number becomes large, macroscopic models can provide fast, simple and yet surprisingly accurate results even at large densities.

In this paper, we propose a macroscopic model to predict bi-directional traffic in corridors. To enhance computational efficiency, we consider only the longitudinal direction of the walkway, ignoring the lateral dimension. We show hereafter that despite this simplification a macroscopic model is able to quantitatively reproduce key features of crowd dynamics. In such category of model, the relevant information encoding crowd dynamics is the fundamental diagram, which defines pedestrian flux as a function of pedestrian densities. More precisely, the proposed method relies on a "Bi-directional Fundamental Diagram" (BFD), which captures situations of a crowd made of people moving in the same and opposite directions. Fundamental diagrams are widely used for one-way traffic (since the pioneering work of Lighthill and Whitham [START_REF] Lighthill | On kinematic waves. II. A theory of traffic flow on long crowded roads[END_REF]) but two-way pedestrian traffic has been scarcely investigated under the angle of the BFD [START_REF] Algadhi | A speed-concentration relation for bidirectional crowd movements with strong interaction[END_REF][START_REF] Kretz | Experimental study of pedestrian counterflow in a corridor[END_REF][START_REF] Lam | A generalised function for modeling bi-directional flow effects on indoor walkways in Hong Kong[END_REF][START_REF] Appert-Rolland | Two-way multi-lane traffic model for pedestrians in corridors[END_REF][START_REF] Tory | An adaptive finite-volume method for a model of two-phase pedestrian flow[END_REF][START_REF] Bick | A continuum model for two-directional traffic flow[END_REF][START_REF] Goatin | A mixed system modeling two-directional pedestrian flows[END_REF]]. Yet, two-way traffic is the most common situation in everyday life and counter-flows played a decisive role in several crowd disasters [START_REF] Helbing | Saving human lives: What complexity science and information systems can contribute[END_REF][START_REF] Helbing | Crowd disasters as systemic failures: Analysis of the Love Parade disaster[END_REF].

To characterize the BFD, several experiments have been conducted from which we establish the first result of the present paper: an estimation of the BFD from experimental data. Although Bi-directional flows have already been studied in the literature, it is the first time, up to our knowledge, that it is measured experimentally. The data are acquired in real time tracking experiment using automatic motion capture techniques [START_REF] Moussaid | Traffic instabilities in self-organized pedestrian crowds[END_REF]. Our second result is the validation of the Bi-directional Macroscopic (BM) model which uses the calibrated BFD as its core. We introduce as quantifier the cluster velocity allowing to compare quantitatively experiments and simulations. We demonstrate that the BM model captures essential features of crowd dynamics. We then test our model in a typical forecasting scenario where the crowd is recorded at two distant points. We show that the model accurately predicts the state of the corridor between the recording points and develops traveling waves similar to those observed in the experiments. Our third result is the determination of the optimum of a corridor segregation strategy consisting in separating -or notantagonist pedestrian fluxes according to the corridor occupancy. The BM model suggests that the segregation is efficient when the two antagonist fluxes are roughly balanced, but is counter-productive in strongly unbalanced cases.

Methods.

2.1. Experimental setup. In this section, we describe our experiment on pedestrian traffic. Our objective was to build a Bi-directional Fundamental Diagram (BFD), i.e., to observe the relation between the moving speed of participants under different conditions of density and balance of counter-flows. To this end, we asked participants to walk in a circular corridor delimited by walls (as displayed in Figure 1a). Some participants were instructed to walk in the clockwise direction, some others to walk in the anticlockwise direction. They were assigned a walking direction before each trial. For each trial, participants were initially still in the corridor and their positions randomly distributed. Each replication lasted 60 seconds after starting signal was given.

Participants were not allowed to communicate, and were asked to behave as if they were walking alone in a street to reach a destination. 119 volunteers participated the experiments (we performed two experimental sessions, one with 59 participants and one with 60 participants). They were adults recruited through advertising and with no known pathology which would affect their locomotion. The experiment conformed to the declaration of Helsinki. Participants were naive with respect to the purpose of our experiments.

Experiments took place in 2009 in Rennes, France. The circular corridor internal and external radius was respectively 2 and 4.5 meters. We studied 3 different proportions of fluxes, i.e., the balance of participants walking in a direction versus participants walking in the opposite direction. We studied: 100% -0% balance, 75%-25% balance and 50%-50% balance.

We collected kinematics data. To this end, participants wore white T-shirts and 4 reflexive markers (see Fig. 1b), one on the forehead, one on the left shoulder, and two on the right shoulder. This made the distinction of the left and right shoulders easier. The motion of the markers has been tracked by 8 infra red cameras placed all around the experimental setting. Marker trajectories have been reconstructed using Vicon IQ software (VICON MX-40, Oxford Metrics, UK). The center of mass of the 4 markers projected onto the horizontal plane is computed and recorded as the position of the subjects [START_REF] Moussaid | Traffic instabilities in self-organized pedestrian crowds[END_REF][START_REF] Lemercier | Reconstructing motion capture data for human crowd study[END_REF].

2.2. Data processing. The collected data give access to the two-dimensional Cartesian coordinates (x i , y i )(t n ) (relative to the center of the arena and a fixed reference frame) of each pedestrian, as well as their associated polar coordinates (θ i , r i )(t n ) (with x i = r i cos θ i , y i = r i sin θ i ), sampled at a frequency of 10 Hz (i.e. t n = n∆t with ∆t = 0.1 s). Since we are interested in a one dimensional analysis, we focus on the angular coordinate of the pedestrians. We assign a fixed value for the radial coordinates R med = 3.25m corresponding to the median value. To estimate the density distribution of pedestrians on the arena, we use a classical

(i) = [θ k , θ k+1 ]
and is assigned to the two nodes θ k and θ k+1 in proportion to the area enclosing the opposite node. For instance, on the picture, the assignment to the node θ k is in proportion to the ratio of the shaded area to the area of C n (i).

area-weighting procedure (a.k.a. Particle-In-Cell method [START_REF] Birdsall | Plasma physics via computer simulation[END_REF][START_REF] Fehske | Computational Many-Particle Physics[END_REF]). This procedure consists in assigning each pedestrian to the two neighboring nodes in proportion to the length enclosing the opposite node (see Fig. 1c). The density ρn k is obtained by combining the contributions of all pedestrians i belonging to the two cells sharing the node k, according to the formula

S ρn k = i n k (i) ∆θ ( ρn k in m -2 ), (1)
where the sum extends over pedestrians i belonging to one of the two cells sharing node k. The quantity S is the area of the cross section

S = ∆θ • r=R out r=R in r dr = ∆θ • 8.125. ( 2
)
By linear interpolation, this procedure gives rise to a continuous piecewise linear reconstructed density ρn (θ) at time t n . We can verify that the total number of pedestrian N is preserved in this interpolation procedure, i.e. k S ρn k = N . To estimate the flux, we compute a finite-difference approximation of the azimuthal component of the velocity v n i of each pedestrian i at time t n :

v n i = r n i θn i ≈ R med θ n+1 i -θ n i ∆t . (3)
The densities ρn +,k , ρn -,k and fluxes f n +,k , f n -,k of the clockwise and anti-clockwise pedestrians respectively are estimated at time t n on the polar grid θ k = k∆θ by means of the area-weighting assignment procedure described in Fig. 1c. The procedure for estimating the densities ρn +,k , ρn -,k uses Eq. 1 where the sum is restricted to pedestrians moving in the considered direction. For the estimation of the fluxes, we use the following formula

S f n +,k = i n k (i) ∆θ v n i ( f n +,k in (ms) -1 ), (4)
where again the sum extends over pedestrians i belonging to one of the two cells sharing node k (and moving in the considered direction).

Model.

To investigate the flow of the pedestrians and make prediction, we consider a bidirectional extension of the traffic model [START_REF] Lighthill | On kinematic waves. II. A theory of traffic flow on long crowded roads[END_REF][START_REF] Appert-Rolland | Two-way multi-lane traffic model for pedestrians in corridors[END_REF]. Let ρ ± (x, t) be the densities at position x (along the median circle) and time t. The Bi-directional Macroscopic (BM) is written:

∂ t ρ + + ∂ x f (ρ + , ρ -) = 0, (5)
∂ t ρ --∂ x f (ρ -, ρ + ) = 0, (6)
where f (ρ + , ρ -) is the "Bi-directional Fundamental Diagram" (BFD) (see Fig. 2a). Both Eq. 5 and Eq. 6 have the form of a continuity equation for the associated pedestrian density. It expresses that the only cause of a time variation of any of these densities in a corridor stretch [x, x + dx] is due to the flux of pedestrians entering this stretch at x and leaving it at x + dx (or vice versa according to the direction of motion). Because x corresponds to the angular coordinate θ, ρ ± are assumed periodic with period 2πR med . Since the model is a system of conservation laws, we use a finite volume method to estimate numerically its solutions [START_REF] Leveque | Finite Volume Methods for Hyperbolic Problems[END_REF][START_REF] Leveque | Numerical Methods for Conservation Laws[END_REF]. More specifically, we use a central scheme method [START_REF] Appert-Rolland | Two-way multi-lane traffic model for pedestrians in corridors[END_REF][START_REF] Kurganov | New high-resolution central schemes for nonlinear conservation laws and convection-diffusion equations[END_REF]. By analogy with the one-directional traffic model, we introduce characteristic speeds of the models (see Fig. 2b):

u + = f + ρ + , u -= f - ρ - , (7)
λ + = ∂f ∂ρ + (ρ+,ρ-) , λ -= - ∂f ∂ρ + (ρ-,ρ+) . ( 8
)
Strictly speaking, the quantities λ ± are the velocities at which level curves of the densities ρ ± are convected. It corresponds to the velocity of waves that arise from a perturbation of a uniform solution given by ρ ± . Since the model is actually bidirectional, the expression of λ ± in Eq. 8 is actually an approximation (see appendix A).

0 1 2 3 1 2 3 0 1 f (ρ + , ρ -) ρ + ρ - a b
(ρ n +,k , ρn -,k , f n +,k ) and (ρ n -,k , ρn +,k , f n -,k
). Thus, this provides us a sampling of f + and f -. To estimate the relation between densities and fluxes, we partition the (ρ + , ρ -) space into squared sampling cells of size ∆ρ = 0.1 m -2 . For each of these cells, we compute the average of the samples f n ±,k conditioned by the fact that (ρ n ±,k , ρn ∓,k ) lies in the chosen cell. As a result, we obtain an estimated f (ρ + , ρ -) relationship. We then seek for a parametric estimation of the fundamental diagram f (ρ + , ρ -). The procedure consists in finding the best fit of the samples (ρ n +,k , ρn -,k , f n k ) to a prescribed analytic formula. After several trials, it appears that the best fit consists in taking the velocity u + = f + /ρ + equal to an affine function of (ρ + , ρ -) leading to the formula [START_REF] Birdsall | Plasma physics via computer simulation[END_REF]. Different parametric estimations of the fundamental diagram are then performed according to the experimental conditions. This is needed because the subjects themselves or their physical or psychological conditions differ from one experimental trial to another one. We gather replications corresponding to the same flux balance and realize three different estimations for the 50%-50% balanced fluxes case, the 75%-25% flux balance case and the mono-directional (100%-0% flux balance) case. The result of the parametric estimation is given in Table 1 and the flux for the balanced case is represented in Fig. 2a.

In Fig. 3a, we plot the BFD for the experimental data corresponding to balanced fluxes (50%-50% balance). The grey area corresponds to the absence of data, since the observed maximum pedestrian density achieved in our experiments is about 2 m -2 . It appears that the BFD is increasing in ρ + and decreasing in ρ -and reaches its maximum at the total density of 1.7 m -2 . The estimation of the decay of the BFD as a function of ρ -is one of the key results of this work. As ρ -increases, the 1. Parametric estimation of the bi-directional fundamental diagram. The coefficients a, b and c refer to Eq. 9. To measure the accuracy of each regression, we estimate the coefficient of determination R 2 in the last column (the closer R 2 is to 1, the better the estimation is). density of obstacles impeding the motion of the pedestrians intensifies, resulting in an increased 'friction' [START_REF] Kirchner | Friction effects and clogging in a cellular automaton model for pedestrian dynamics[END_REF]. We parametrize the flux f using a quadratic function of the form:

f (ρ + , ρ -) = a ρ + (1 -b ρ + -cρ -) , (9)
with densities expressed in (pedestrians) m -2 and flux expressed in (ms) -1 . This parametric BFD is the key input in the Bi-directional Macroscopic model (5) [START_REF] Bellomo | Modeling crowd dynamics from a complex system viewpoint[END_REF]. Despite its simplicity, the formula is able to capture several key features of the pedestrian dynamics as we will see below. Coefficients a, b and c are easily interpreted and thus their estimation gives insights into the pedestrian dynamics. For instance, coefficient a corresponds to the free average velocity of the pedestrians. Coefficients b and c correspond to 'friction' with respectively co-and counter-moving pedestrians. Using linear regression, we obtain the estimated values given in table 1. As an example, the estimated flux for the experiments with 50% -50% balance is plotted in Fig. 3b. Notice that the flux is always non-negative for the density ranges observed in the experiments.

3.2. Data-model comparison: Cluster dynamics. In order to test the model, we envision a crowd forecasting system where sensors are placed at two distant

Comparison of the model's predictions with experimental data.

To compare quantitatively the model with experimental data, we estimate the average and cluster velocities (resp. u and λ) defined in Eqs. 7 and 8. We detail in appendix B the numerical estimations of these curves. On Fig. 6, the difference uλ between the average and cluster velocities is roughly linearly increasing. Using the expression of the flux (Eq. 1) together with the characteristics speeds (Eqs. 7 and 8), the theoretical prediction gives u + -λ + ≈ 0.33 ρ + ms -1 for small ρ -. According to this prediction, this offset should increase linearly with ρ + and reach the value 0.4 ms -1 for ρ + ≈ 1.2 m -2 . This theoretical estimate provides the right order of magnitude of the experimentally observed value of u + -λ + .

3.4. Segregation strategy efficiency. We now exploit the BM model to estimate the efficiency of a flow segregation strategy in which the two pedestrian types circulate preferably on one side of the corridor, with half the width of the corridor devoted to each type. In practice, this strategy can be achieved by suitable signaling. On the one hand segregation reduces the influence of counter-moving pedestrians, but on the other hand the available corridor width is smaller and the density of co-moving pedestrians increases.

To measure the efficiency of the strategy, we test the model in the two situations. Let (dN/dt) S and (dN/dt) N S be the number of pedestrians per unit time that the corridor is able to accommodate in the segregated and non-segregated cases respectively, and G the gain in using the segregated strategy, i.e. the ratio of these two quantities minus one (see appendix C). The gain as a function of the densities of the two pedestrian types is plotted in Fig. 7. It appears that the segregation strategy improves significantly the efficiency of the system when the densities of the two types are both large and of the same order. However, the strategy is inefficient when one type outnumbers the other one. In this case, it is more efficient to use the un-segregated strategy. This analysis demonstrates the benefits of a strategy optimization scheme in which the decision of implementing segregation or not could be taken in real-time. Indeed, segregation offers benefits only in some regions of the (ρ + , ρ -) plane. Since setting up a segregation strategy implies additional costs, the gain in traffic efficiency has to overtake the expense. The diagram presented in Fig. 7 helps finding which regimes of densities provide an overall benefit in separating the two inflows of pedestrians. 4. Discussion. In this work, we have set the objective to build simulation tools to assist the management of pedestrian traffic. Our attention was focused on the case of bidirectional flows because, on the one hand, it captures many common situations to be found in corridors or sidewalks, and on the other hand, it received Figure 7. Efficiency segregation strategy. Estimation of the relative gain using the segregation strategy (in %) as a function of the densities ρ + , ρ -(in m -2 ) of the two types of pedestrians (level curve representation). The strategy is efficient when both densities ρ + and ρ -are roughly balanced and large. relatively poor attention in the literature. One of our work hypothesis is that two main factors influence conditions in bidirectional traffic: density, and proportion of each directional flow.

In the first part of this work, we empirically analyze bidirectional traffic. Our main result is captured by Figure 3: we show an evidence of the influence of the density of each directional flow on the flux. To perform this empirical observation, we chose laboratory conditions. Choosing laboratory conditions allowed us controlling the goals and motivations of walkers, and limiting the effect of the other many factors which influence pedestrian behaviors, such as physiological (e.g., aging) or social ones (e.g., walking together in groups). We clearly isolate the role of the density factors we considered on the resulting traffic conditions. This however limited the amount of observation data due to the required effort to gather them (subjects recruitment, data reconstruction and processing efforts, etc.). Nevertheless, the presented method applies to any new data. As, for instance, the fundamental diagram may depend on the nature of the subjects that are using the walkway [START_REF] Henderson | The statistics of crowd fluids[END_REF] (children, adults, aging people, etc.), it would be interesting to update the BFD from dataset with controlled population.

In the second part of this work, we introduce a first order model to estimate the bidirectional fundamental diagram. In spite of the relative simplicity of this model, we demonstrate the ability to adhere to observation data, as illustrated by our results reported in Table 1. We observe that the estimated average velocity a consistently takes similar values throughout the 3 sets of experiments. Friction with the co-moving pedestrians b is surprisingly larger in the experiments with a 50%-50% balance. It exceeds the friction with counter-moving pedestrians (i.e. b > c). One explanation of this result is the emergence of lanes. In the experiments with 50%-50% balance, lane formation is very strong whereas it is scarcely observed in the experiments with 75%-25% or 100%-0% balance. On the one hand, lane formation reduces the interactions with counter-moving pedestrians and thus decreases the friction coefficient c. But on the other hand, it enhances clustering with co-moving pedestrians and thus increases the friction coefficients b. Without lane formation, pedestrians need to maneuver to avoid counter-moving pedestrians resulting in a reduction of the fluxes. Thus, counter-moving pedestrians are more disruptive to the flow in this case which is why c > b in the experiments with 75%-25% balance.

As a result, the friction coefficients b and c are associated with complex pattern formation in the longitudinal direction such as clustering as well as in the lateral direction such as lane formation. They provide a simple yet effective characterization of various flow regimes. The Bi-directional Macroscopic (BM) model critically depends on the three parameters a, b and c. By varying them, we can span various types of pedestrian behavior. As such, the BM model is capable of describing complex pedestrian behavior while having the efficiency of a one-dimensional model. Of course, one can make the flux expression f more complex to include all possible scenarios in a single expression. But this is at the cost of introducing new parameters which need to be estimated and this decreases the efficiency of the model in real-time crowd control situation. Therefore we prefer to use a greedy modeling approach with a simple (but not simplistic) model. The accuracy of the model can however be discussed with respect to the employed data-set. We have limited the role of secondary factors, we may expect to have a lower adherence using real, non-controlled, kinematics data (e.g., outdoor video tracking). This possible loss of accuracy need to be evaluated, nevertheless, we can expect that our results still hold in many cases, such as metro corridor traffic at rush, where most of the traffic is composed of pedestrian moving individually.

In the last part of this work, we have chosen to evaluate our model based on an analysis of cluster dynamics. The emergence of clusters as a consequence of density fluctuations is a classical example of spatio-temporal patterns in traffic flow phenomena [START_REF] Helbing | Traffic and related self-driven many-particle systems[END_REF][START_REF] Kerner | The physics of traffic: Empirical freeway pattern features, engineering applications, and theory[END_REF], also known as Kinematic Waves [START_REF] Lighthill | On kinematic waves. II. A theory of traffic flow on long crowded roads[END_REF][START_REF] Lemercier | Realistic following behaviors for crowd simulation[END_REF]. Comparing the largescale dynamical features of the clusters in the simulation and the data provides a practical way to assess the validity of the BM model. For a given type of pedestrians (clockwise or anti-clockwise), clusters are defined as regions of space where the density of this type of pedestrian exceeds a certain threshold value (see appendix B). Fig. 6 gives the estimated average pedestrian velocity u (in red) and cluster velocity λ (in green) as functions of the density of pedestrians for the experiments (circles) and the simulations (solid lines) in the balanced flux case (50%-50%). We notice an excellent agreement between experiments and simulations despite some discrepancies at low density (i.e. ρ + < .4m -2 ). Those discrepancies could be explained by the fluctuations in the experiments at low density which perturb the estimation of u and λ. Fig. 4 has already provided a qualitative comparison between traveling waves in the experiments and in the model, Fig. 6 provides a quantitative estimate of the resemblance. We notice that pedestrian velocity u is always faster than the cluster velocity λ. This indicates that the information is propagating upstream. Moreover, when the density increases, we observe a faster decay of the cluster velocity λ compared to the average velocity u (i.e. u-λ is increasing with ρ). This implies that perturbations propagate faster at large density as it is predicted by the BM model (see Fig. 6).

Conclusion and future work.

We have presented a study on bidirectional flows of pedestrian. We have first presented an experimental measurement of the bidirectional fundamental diagram, with changing conditions of flow proportions. We have then introduced a bidirectional traffic model, directly based on this diagram (a.k.a. "first order models") for efficiency reasons. Finally, we demonstrate a relevant application of our model in the frame of automated traffic management systems, allowing users to estimate the benefit to flow segregation strategy to improve traffic.

The power of our approach is to capture complex phenomenon with a simple framework involving only three parameters. Moreover, one can easily extend the model to encompass more advanced features. As a first research direction, we would like to use real-time estimation of crowd parameters as it has been developed in several studies [START_REF] Marana | Real-time crowd density estimation using images[END_REF][START_REF] Zhou | Higher-order SVD analysis for crowd density estimation[END_REF][START_REF] Yaseen | Real-time crowd density mapping using a novel sensory fusion model of infrared and visual systems[END_REF][START_REF] Johansson | From crowd dynamics to crowd safety: A video-based analysis[END_REF][START_REF] Helbing | Dynamics of crowd disasters: An empirical study[END_REF][START_REF] Wirz | Probing crowd density through smartphones in city-scale mass gatherings[END_REF][START_REF] Feliciani | Empirical analysis of the lane formation process in bidirectional pedestrian flow[END_REF] to update the BFD diagram. The data assimilation strategy outlined above will be able to adapt the BM model quickly to changes in the nature and composition of the crowd.

Another possible extension would be to use models involving a differential relation between the flux and the local densities [START_REF] Aw | Resurrection of "second order" models of traffic flow[END_REF][START_REF] Payne | FREFLO: A macroscopic simulation model of freeway traffic[END_REF] (a.k.a. "second order models"). Those models could generate metastable equilibria and phase transitions, which play an important role in traffic [START_REF] Klar | Multivalued fundamental diagrams and stop and go waves for continuum traffic flow equations[END_REF][START_REF] Kerner | The physics of traffic: Empirical freeway pattern features, engineering applications, and theory[END_REF]. Still, our first exploration of the data does not indicate that metastability plays an important role in pedestrian traffic.

To extend our work in two-dimensions (i.e. take into account the radial component), one has to consider the direction of the flow of pedestrians. Several macroscopic models have been proposed [START_REF] Hughes | A continuum theory for the flow of pedestrians[END_REF][START_REF] Hoogendoorn | Pedestrian route-choice and activity scheduling theory and models[END_REF][START_REF] Bellomo | Modeling crowd dynamics from a complex system viewpoint[END_REF] with the introduction of a minimization principle to select the best route. Since most of bidirectional pedestrian flow have been studied at the microscopic level with Cellular Automata models [START_REF] Blue | Cellular automata microsimulation of bidirectional pedestrian flows[END_REF][START_REF] Jian | Simulation of bi-direction pedestrian movement in corridor[END_REF][START_REF] Weng | A behavior-based model for pedestrian counter flow[END_REF][START_REF] Fltterd | Bidirectional pedestrian fundamental diagram[END_REF], it will be compelling to compare the two approaches.

Finally, it would be interesting to test the framework in a more complex environment such as a network of corridors. Several strategies could be tested to decongest traffic such as indicating which corridor to use depending on its occupancy. Hence, the efficiency of a network could be measured allowing to improve its design for safer evacuation.

Appendix A. Analytic estimation of the cluster velocity λ. In a one-way traffic, there is only one type of density ρ and the flux is simply given by f (ρ). The characteristic velocities are then defined as (see Fig. 6b):

u = f (ρ) ρ , λ = f (ρ).
In a bi-directional traffic, there are two values for the cluster velocities, denoted by λ ± (ρ + , ρ -). Indeed, the flux function f (ρ) must be replaced by the BFD f (ρ + , ρ -) and the quantity f (ρ) must be replaced by the matrix

A(ρ + , ρ -) = c ++ c +- -c -+ -c -- ,
where

c ++ = ∂ ρ+ f (ρ + , ρ -) , c +-= ∂ ρ-f (ρ + , ρ -) , c -+ = ∂ ρ+ f (ρ -, ρ + ) , c --= ∂ ρ-f (ρ -, ρ + ) .
Cluster velocities λ ± (ρ + , ρ -) are the eigenvalues of this matrix. They have been computed in [START_REF] Appert-Rolland | Two-way multi-lane traffic model for pedestrians in corridors[END_REF] and are equal to

λ ± = 1 2 (c ++ -c --± √ ∆), with ∆ = (c ++ + c --) 2 -4c +-c -+ .
The eigenvalues λ ± are real (i.e. the BM model is hyperbolic [START_REF] Leveque | Numerical Methods for Conservation Laws[END_REF]) if and only if ∆ > 0. This is the case in the situation (met in our experiments) where

ε = max{|c +-|, |c -+ |} max{|c ++ |, |c --|} 1. (10)
In general, it is not possible to associate one of these eigenvalues to either one or the other pedestrian species ρ + and ρ -. For instance, if we denote ρ 1+ and ρ 1-the perturbations of ρ + and ρ -, there are not convected by λ + and λ -. Instead, λ + and λ -are convecting the following linear combinations:

α + = Eρ 1+ -c +-ρ 1- E 2 -c +-c -+ , α -= Eρ 1--c -+ ρ 1+ E 2 -c +-c -+ , with E = 1 2 [ √ ∆ -(c ++ + c --)].
This means that the densities ρ ± are not purely convected. However, in the regime characterized by ε 1 (Eq. 10), we find that

α + ≈ ρ 1+ , α -≈ ρ 1-.
In this approximation, the densities ρ ± are purely convected with velocities λ ± , which means that we can associate λ + and λ -to the velocities of clusters of the clockwise and anti-clockwise moving pedestrians respectively. In this approximation, to the first order in ε, we find:

λ + = c ++ , λ -= -c --, (11)
which gives a situation similar to car traffic.

Appendix B. Identification and quantification of clusters.

Cluster analysis provides a lens to analyze emergence of macroscopic structures in pedestrians dynamics. From a macroscopic viewpoint, a cluster at a given time t is a connected set of points x where the density ρ(x, t) is larger than a given threshold h (see Fig. 8a).

Obviously, there are different clusters for the clockwise (ρ = ρ + ) and anticlockwise (ρ = ρ -) pedestrians. As clusters move in time, they are bounded by level curves X(t) of ρ defined by: ρ(X(t), t) = h. (12) To determine a cluster, we first need to construct the cluster boundaries, i.e. the curves X(t) defined by [START_REF] Fehske | Computational Many-Particle Physics[END_REF], from the pointwise estimation of ρ ± .

To construct such curves X(t), we consider ρ n (x) the continuous piecewise linear function of x which interpolates the estimated density ρ n k at a given time t n (here, we indifferently use the notation ρ for ρ + and ρ -; the ± indices will be used below to designate the start and end points of the clusters). For a given threshold h, we determine two sets of points X ± j , j = 1, . . . , J such that ρ n (X ± j ) = h and ±(dρ n /dx)(X ± j ) > 0. The number of points in each set is the same, J, due to the periodicity of ρ n . It is finite unless ρ n (x) has constant value h on a whole interval, a non generic situation that we discard.

The j-th cluster is defined as the interval [X + j , X - j ], because, due to the conditions on the derivatives, we have ρ n (x) ≥ h for all x belonging to this interval (see Fig. 8). We now consider two consecutive time intervals t n and t n+1 . We connect X - j (t n ) to X - j (t n+1 ) and X + j (t n ) to X + j (t n+1 ), if the two consecutive points are closer than a threshold value set to λ 0 ∆t, with λ 0 = 3.3 ms -1 . The temporal sequences of connected points X ± j (t n ) define, after time-interpolation between the discrete time values, some level curves X ± j (t). When the matching procedure defined above finds no solution, the corresponding level curve is ended.

This procedure can be repeated for different levels h, and yields different families of level curves X(t) (see Fig. 9a). When the time interval of existence of a level curve (or lifetime) is too short, that level curve is considered as irrelevant and is removed. Minimal existence time of 1, 2 and 3 seconds have been retained (see Fig. 9b for the example of a cutoff at 3 seconds). In order to remove further oscillations of the level curves (which are associated to the spatial discretization of ∆x = 0.6 m), we filter them by convolution in time with a truncated Gaussian function with a support larger than ∆x, adapting the normalization of the Gaussian to accommodate for the beginning and the end of the level curve (see Fig. 9c).

From the level curves X(t), we can then deduce the cluster velocity λ, that is the velocity at which the level curves are transported (see Fig. 8b). One should rather speak of 'cluster edge velocity' since clusters have two boundaries, each of them having its own speed, but as they are of the same order, we will use the term 'cluster velocity' for short. To estimate the cluster velocity λ on each level curve of density level h, we compute its average slope. The slopes of the different connected components of a given level curve are computed independently and later on averaged. A weighted average with weights equal to the lifetime of the corresponding connected component is applied. This procedure leads to an estimate of λ as a function of the specific density level h. Thus, if we restore the indication ρ for the density level h, we obtain λ as a function of ρ.

Appendix C. Estimation efficiency of segregation strategy. To estimate the efficiency of the segregation strategy, we compare the total flux of pedestrians when the two species of pedestrians ρ + and ρ -are mixed or segregated in a corridor. Without a segregation strategy, we suppose that the densities ρ + and ρ -are uniformly spread on the corridor. We assume here that the estimation of the flux f is independent as the corridor width. That will be more likely to be true for large corridor since the boundary effects would be less important. Thus, the number of pedestrians passing through a cross section per unit time is given by: dN dt N S = f (ρ + , ρ -) + f (ρ -, ρ + ) L

where L is the size of the corridor. The flux f + is estimated from an interpolation of the three flux functions obtained in Table 1. More precisely, we use a quadratic regression to estimate each coefficient a * , b * and c * at the ratio ρ+ ρ++ρ-using the data of Tab. 1. Then, we use those coefficients to estimate f + (ρ + , ρ -) (see Eq. 9).

If the species ρ + and ρ -are segregated on each side of the corridor, the size of the corridor is divided by 2 and the density of co-moving pedestrian is multiplied by 2. Thus, we obtain: dN dt S = f (2ρ + , 0) + f (2ρ -, 0) L.

Then, the relative gain of the segregation strategy G is estimated through the following formula: (a) Illustration of a cluster defined from a density distribution ρ(x, t n ) for a given threshold h. The edges of the cluster (i.e. X + and X -) described the level curves of ρ(x, t). (b) Graphical representation of the cluster velocity using the level curves of ρ. The picture depicts the edges (in yellow) of the cluster (in red). The cluster edge velocity i.e. the slope of the cluster edge in the position-time plane is given by f (h) and is illustrated by the green segment. . Level curves of the density. Level curves X(t) for various levels h for the replication displayed in Fig. 4 and clockwise pedestrian density ρ + . Horizontal axis is space and vertical axis is time, running downwards. The color code corresponds to the level height h, from blue (lower levels) to red (higher levels). (a): with no cutoff and no filtering. (b): after cutoff (only level curves with life-time greater than 3 seconds are kept) but before filtering. (c): after cutoff and filtering.

Figure 1 .

 1 Figure 1. Experiments and data acquisition. (a) A typical experiment where bi-directional circulation is analyzed. (b) Participants equipped with reflexive markers were tracked by means of an optoelectronic motion capture system (VICON MX-40, Oxford Metrics, UK). (c) The area-weighting assignment procedure: The particle i (red dot) is located in the cell C n(i) = [θ k , θ k+1 ]and is assigned to the two nodes θ k and θ k+1 in proportion to the area enclosing the opposite node. For instance, on the picture, the assignment to the node θ k is in proportion to the ratio of the shaded area to the area of C n (i).

Figure 2 . 3 . 1 .

 231 Figure 2. Characteristic speeds in the BM model. (a) Perspective view of the BFD f (ρ + , ρ -) as a function of ρ + and ρ -. (b) Sketchy fundamental diagram (in red) of a one-way flow f (ρ) as a function of the single density ρ. The function f (ρ) has the same monotony as cuts of the BFD f (ρ + , ρ -) along lines ρ -= Constant. The average velocity u(ρ) = f (ρ)/ρ and the cluster velocity λ(ρ) = f (ρ) are respectively the slopes of the secant (in red) and tangent (in green) lines to this curve.

Figure 3 .

 3 Figure 3. Bi-directional Fundamental Diagram (BFD). (a) Estimated BFD expressing the flux f in one direction as a function of the density of pedestrians moving in the same direction ρ + and in the opposite direction ρ -. (b) Parametrized BFD used in the model. The values of f , in (m.s) -1 , are color coded according to the color bar. Sample set a b c R 2 50% -50% 1.218 0.273 0.181 0.944 75% -25% 1.216 0.087 0.203 0.972 100% -0% 1.269 0.077 0 0.982 Table1. Parametric estimation of the bi-directional fundamental diagram. The coefficients a, b and c refer to Eq. 9. To measure the accuracy of each regression, we estimate the coefficient of determination R 2 in the last column (the closer R 2 is to 1, the better the estimation is).

Figure 4 .

 4 Figure 4. Model results and comparisons with experimental data. (a) Setting for the model: the density at the entry of the corridor (x = 0) is taken from the experiment and the model is used to predict the occupancy inside the corridor. (b-c) Clockwise and anti-clockwise (resp. b and c) pedestrian densities as functions of position (horizontal axis) and time (vertical axis running downwards), for one of the replications with 60 pedestrians corresponding to balanced fluxes (50% of pedestrians walking in each direction). Left picture of each panel: experiment ; right picture: BM model, run with initial and boundary data and BFD estimated from the experimental data. The density is color-coded according to the lateral scale (in m -2 ).

Figure 5 .

 5 Figure 5. Model results and comparisons with experiment data with the 75%-25% flux balance: %75 are moving to the left (ρ -) and %25 are moving to the right (ρ + ). See Fig. 4b,c for balanced flux.

Figure 6 .

 6 Figure 6. Pedestrian and cluster velocities. Comparison between the pedestrian velocity u (red curve) and cluster velocity λ (green curve) as functions of the local density of co-moving pedestrians ρ from the experiments (circles) and from the BM model (solid line) with balanced flux (50%-50%) on the left figure and with 75% -25% flux balance on the right figure. Since λ < u, information is propagating upstream as predicted by the BM model.

  G = (dN/dt) S -(dN/dt) N S (dN/dt) N S = (dN/dt) S (dN/dt) N S -1.

Figure 8 .

 8 Figure 8. Cluster and cluster velocity. (a) Illustration of a cluster defined from a density distribution ρ(x, t n ) for a given threshold h. The edges of the cluster (i.e. X + and X -) described the level curves of ρ(x, t). (b) Graphical representation of the cluster velocity using the level curves of ρ. The picture depicts the edges (in yellow) of the cluster (in red). The cluster edge velocity i.e. the slope of the cluster edge in the position-time plane is given by f (h) and is illustrated by the green segment.

Figure 9

 9 Figure 9. Level curves of the density. Level curves X(t) for various levels h for the replication displayed in Fig.4and clockwise pedestrian density ρ + . Horizontal axis is space and vertical axis is time, running downwards. The color code corresponds to the level height h, from blue (lower levels) to red (higher levels). (a): with no cutoff and no filtering. (b): after cutoff (only level curves with life-time greater than 3 seconds are kept) but before filtering. (c): after cutoff and filtering.

Acknowledgment. This work has been supported by the French 'Agence Nationale pour la Recherche (ANR)' in the frame of the contracts 'Pedigree' (ANR-08-SYSC-015-01) and 'CBDif-Fr' (ANR-08-BLAN-0333-01). PD acknowledges support by the Engineering and Physical Sciences Research Council (EPSRC) under grant no. EP/M006883/1, by the Royal Society and the Wolfson Foundation through a Royal Society Wolfson Research Merit Award no. WM130048 and by the National Science Foundation (NSF) under grant no. RNMS11-07444 (KI-Net). PD is on leave from CNRS, Institut de Mathématiques de Toulouse, France. SM was supported in part by NSF grants #1107444 (KI-Net) and #1515592.

Data accessibility. Data supporting this work are available on the website figshare at the following address:

• Data-set: https://figshare.com/s/a5aa17b81e7167a710bf

• Readme file: https://figshare.com/s/63edf4bd35458d30e31b