Comparing first order microscopic and macroscopic crowd models for an increasing number of massive agents

In this paper a comparison between first order microscopic and macroscopic differential models of crowd dynamics is established for an increasing number $N$ of pedestrians. The novelty is the fact of considering massive agents, namely particles whose individual mass does not become infinitesimal when $N$ grows. This implies that the total mass of the system is not constant but grows with $N$. The main result is that the two types of models approach one another in the limit $N\to\infty$, provided the strength and/or the domain of pedestrian interactions are properly modulated by $N$ at either scale. This is consistent with the idea that pedestrians may adapt their interpersonal attitudes according to the overall level of congestion.


Introduction
In recent years the literature about crowd dynamics modeling has constantly grown, offering many contributions from several different fields such as, among others, Physics, Engineering, Applied Mathematics. A large variety of modeling approaches has already been proposed: cellular automata, agent-based models, differential models at various scales, up to models resting on game theory, see [2] for a comprehensive review. Typically models get common inspiration from basic features of pedestrian behavior, such as destination-oriented walk and crowding avoidance, but formalize them mathematically in greatly heterogeneous ways, as also the previous short list demonstrates. This is probably an inevitable consequence of the lack, to date, of consolidated background field theories for non-classical (more specifically, living complex) systems of agents such as human crowds. As a side effect, critical comparisons aimed at elucidating the source of quantitative differences possibly observed in the results of the models are hardly successful, especially when models do not share the same mathematical structure. Consequently, performance assessments are at present mainly limited to qualitative aspects, chiefly the ability of models to reproduce self-organized patterns empirically observed in real crowds (such as e.g., lane formation in counter-flows or arching and traffic light effects at bottlenecks), see e.g., [12,13,19].
Restricting in particular the attention to the class of differential models, i.e., models formalized by differential equations, it is possible to identify in the current literature two main methodological lines, corresponding to as many scales of observation of the spatiotemporal evolution of a crowd.
Macroscopic models take a large scale point of view, markedly analogous to the fluid dynamic one, and represent the crowd by means of a space and time-dependent mass density of pedestrians, say ρ = ρ(t, x), which is locally conserved. This basic fact implies that ρ satisfies the continuity equation: written here in one space dimension for simplicity and also in view of the next purposes. In principle, Eq. (1) can describe a large variety of different macroscopic systems, because it actually only states that the mass is conserved but says nothing about the way in which it evolves in space and time. On the other hand, it cannot provide alone this information because it involves the two unknown quantities ρ and q. A widely adopted strategy for closing Eq. (1), originally inspired by the mathematical theory of vehicular traffic, see again [2], consists in appealing to fundamental diagrams, namely analytical relations q = q(ρ) linking the admissible crowd flux to the crowd density. This way Eq. (1) becomes a self-consistent dynamical model in the variable ρ, see e.g., [4,8] and also [10] for examples of two-dimensional models. Since, by definition, it results q = ρu, where u is the mean macroscopic velocity (or speed in the one-dimensional setting), prescribing the flux-density relation amounts to prescribing a speed-density relation u = u(ρ) and vice versa. The fundamental relations q = q(ρ), u = u(ρ) try to summarize pedestrian behavior in terms of their collectively observable dynamical outcomes. In other words, they assume that the average behavior of subgroups of pedestrians (corresponding to fluid particles in the fluid dynamic analogy) is sufficient to capture the dynamics of the crowd as a whole. In this respect, they are the counterpart of the constitutive relationships in Continuum Mechanics. Consequently, they can at most put in evidence gross trends, for instance the fact that the average speed is a non-increasing function of the density, often linear but sometimes also nonlinear, see Fig. 1 and [22] for a more detailed review.  [17,23].
Generally, fundamental relations are suggested by empirical observations performed in presumably average and spatially homogeneous flow conditions. In fact, a macroscopic relationship between the density and the flux, or the mean speed, is conceptually valid in principle only at equilibrium, when the crowd is uniformly distributed in space and moves as a whole. Despite this, fundamental relations serve as closures of Eq. (1), which is expected to describe more general dynamical scenarios also far from equilibrium. This however requires a further conceptual step, namely accepting the idea that equilibrium conditions always hold also locally in space and time, so that also q(t, x) = q(ρ(t, x)) can be reasonably valid.
Microscopic models take instead a small scale point of view. Pedestrians are represented individually as point particles individuated by their positions in space X 1 t , X 2 t , . . . , X N t (N being the total number of pedestrians composing the crowd), whose trajectories t → X i t , i = 1, . . . , N , typically obey second order dynamical systems of the form: Here V i t is the velocity of the i-th pedestrian and F is a function, to be modeled, which accounts for the way in which she walks, including especially her interactions with other people. See e.g., [14,15,24].
Microscopic models are naturally focused on single individuals, who react to the pointwise distribution of other nearby walkers. Since their number N often can not be approximated with infinity, as it happens for gas or fluid molecules, it is not always obvious how to define a posteriori average macroscopic quantities charged to illustrate collective trends synthetically. Various averaging techniques of the trajectories in time and space can be adopted. However, fluctuations in the results provided by different techniques applied to different realizations of the same microscopic dynamical system cannot in principle be ruled out. As a consequence, there is a certain conceptual difficulty in extracting fundamental-relation-type information from microscopic models, although in the simulated dynamics often qualitative behaviors analogous to the trends of empirical fundamental diagrams emerge, see e.g., [7]. A possibility may be to perform kinetic mean-field limits in the spirit of gas-dynamics: the number N of particles is sent to infinity while the total mass of the system is kept finite. Nevertheless actual crowds, no matter how large they are, never encompass as many pedestrians as the number of molecules in an even small portion of gas. Therefore, the approximation N → ∞ may not be always physically coherent and the continuous dynamics thus recovered may, in certain situations, lose too much of the intrinsic granularity of real crowds.
Bearing in mind the arguments above, which depict a quite varied framework of modeling approaches to crowd dynamics, this work analyzes a multiscale method recently introduced in [12], then further developed in [9], which makes it possible to understand the microscopic and macroscopic dynamical systems (1), (2) as special cases of a more abstract representation of a finite crowd (i.e., a crowd with a finite number of pedestrians). The ultimate goal is to contribute to bridging heterogeneous differential models in an attempt to critically compare them using fundamental relations as a minimal common background. To this aim, the paper is structured in four more sections. Section 2 summarizes the hallmarks of the multiscale method leading to an abstract formulation in terms of measure-valued equations, which are essentially scale free in space. Section 3 then details the continuous-in-space instances of these equations, showing that, unlike more standard approaches to continuous representations, they allow one to compute a posteriori analytical fundamental relations which still retain some meaningful details of the underlying physical particle system. The section ends with a computational study comparing such a continuous model with other macroscopic models from literature genuinely grounded on fundamental diagrams, in the test case of the emptying of a crowded domain. The main goal is to investigate analogies and differences observed in some significant quantitative predictions, such as e.g., the average total time needed for the full crowd event, in the light of the modeling synthesis provided by the respective fundamental relations. Section 4 is instead devoted to the discrete-in-space counterpart of the multiscale approach. Resting on the general measure-valued formulation, a fundamental relation linking the mean speed of pedestrians in stationary conditions to their total number is defined and analytically computed also in this case. Then it is used as a basis for comparing the continuous and discrete sides of the multiscale approach. Finally, Section 5 offers a critical revisiting of the findings of the preceding sections.
2 Across the scales: micro-meso interaction models

First order model
In [9] we proposed a model for pedestrian traffic based on the idea that microscopic pedestrians interact with the mesoscopic distribution of other nearby walkers. Such a model actually stems from the measure-theoretic multiscale method introduced in [12], which allows one to take into account the intrinsic microscopic granularity of individual pedestrians within a continuous description of the crowd as a whole.
L B x B b Figure 2: With respect to her characteristic size, a walking pedestrian needs a lateral space b a bit larger comprised between around 45 cm and 75 cm, see [21]. Hence a good choice for the width of the domain, such that one-dimensional dynamics actually dominate, appears to be B = 1 m.
For one-dimensional dynamics, the model is inspired by the following first order dynamical system: which describes the motion of the i-th pedestrian in a crowd of N individuals represented by their spatial positions X 1 t , X 2 t , . . . , X N t at time t. We consider a bounded domain of length L > 0 and width B > 0, however with B L so that one-dimensional dynamics are a truthful approximation, see Fig. 2. Moreover, in order to get rid of boundary conditions at the endpoints x = 0 and x = L, which would prevent one from studying spatially homogeneous flows, we assume periodic boundary conditions. Hence when the trajectory t → X i t reaches the point x = L it restarts from x = 0. In practice we can imagine that the N pedestrians of Eq. (3) actually move in the unbounded domain R, as long as we let the index j in the sum at the right-hand side run from 1 to 2N with the convention that: Walkers follow a desired velocity field v d : [0, L] → R (possibly extended Lperiodically on the whole R) while interacting with other people ahead within a certain maximum distance R ∈ (0, L), usually R L. Interactions are expressed by the interaction kernel K I : [0, R] → R and are such that pedestrians try to avoid crowding. Therefore, the prototypical trend of K I is a repulsion (K I ≤ 0) increasing with the proximity to other people.
If an ensemble representation of the crowd is desired while still preserving some microscopic characteristics of pedestrians, such as their finite total number N and interaction radius R, then one can imagine to implement the dynamics expressed by Eq. (3) in a framework in which pedestrians interact with the Figure 3: The pedestrian in X i t facing walkers ahead, who can be represented as either discrete point particles or a "smeared" continuous density. The best way to account for both options in a unified manner is by means of a measure-valued mesoscopic distribution.
aggregate distribution of people ahead, cf. Fig. 3. Formally: where ν j = ν j t (·) is, for each j = 1, . . . , N , a real-valued finite positive measure defined on the Borel σ-algebra B([0, L]), which expresses the mesoscopic distribution of the microscopic state (position) of the j-th pedestrian at time t > 0. In practice, Bν j t is at each time a probability measure on [0, L], the coefficient B accounting dimensionally for the depth of the domain (see also Eq. (6) below). Equation (4) generalizes Eq. (3) by replacing X j t -pedestrians by their mesoscopic distribution. Notice indeed that choosing ν j t = 1 B δ X j t returns precisely the original microscopic dynamical system. If, in order to reduce the technical complexity of the problem, we make the further assumption of anonymous, viz. identical, pedestrians then Eq. (4) simplifies aṡ i.e., we can drop the indexes i, j because neither microscopic pedestrians nor their mesoscopic distributions need to be labeled precisely anymore. The coefficient N − 1 in front of the interaction integral rules out self-interactions of the pedestrian in X t , considering that within the interaction distance R there can be at most N − 1 other walkers. Due to the conservation of the total number of pedestrians, ν can be normalized to a probability measure in space: T > 0 being some final time, thus the macroscopic pedestrian mass can be defined proportionally as the new measure µ := N ν, In practice, for every measurable set E ∈ B([0, L]), Bµ t (E) is the average number of pedestrians occupying the spatial area E at time t. Model (5) assumes mean-field-type interactions between a generic representative individual and the collectivity ahead. It is worth pointing out that Eq. (5) treats both the microscopic and the mesoscopic scales as genuinely primitive. Namely, unlike more usual approaches, the latter is not derived from the former through limit procedures such as e.g., N → ∞. For this reason, Eq. (5) alone does not define a self-consistent model and has to be complemented with a suitable relationship between X t and ν formalizing the idea that they actually represent the same particle system. The appropriate one turns out to be: ν 0 being the initial distribution, which states that the mesoscopic distribution ν is transported in time by the microscopic flow map X t , hence that it is a material quantity for pedestrians. The symbol # in Eq. (8) denotes the so-called push forward operator.
Equations (5) and (8) can be duly combined via a procedure very much inspired by Reynolds transport theorem. Picking a test function ϕ ∈ C ∞ c ([0, L]) and computing the time derivative of ν t in the sense of distributions yields: Scaling then ν to the mass µ via Eq. (7) and substituting the definition of u[ν t ], we finally recognize that this equation is a weak form of: namely a conservation law whose flux is however not obtained by appealing heuristically to fundamental diagrams but stems from a modeling of pedestrian interactions at a lower scale. This, along with the fact that the unknown is a mathematical object as general as a measure, makes it suitable for bridging continuous and discrete representations of a crowd, cf. the next Sections 3 and 4, respectively, thereby providing a concrete ground for meaningful comparisons of heterogeneous models.
Interested readers are referred to [11,16,20] for a qualitative analysis of this equation, including aspects of its numerical approximation.

Second order model
In the same spirit as Section 2.1 we consider now a microscopic dynamical system in which inertial effects come explicitly into play: Here the main dynamics take place at the level of the acceleration and include a relaxation toward a (positional) desired velocity, with relaxation time τ > 0, along with superimposed one-to-one interactions expressed by a new repulsive interaction kernel K II : [0, R] → R, K II ≤ 0, which still depends on the relative position of the interacting pedestrians only (cf. e.g., [14]). Similarly to Eq. (4), we recast (10) in the frame of a micro-meso description of the interactions among anonymous walkers by setting: being again the measure-valued mesoscopic distribution of pedestrian microscopic states, which now are the pairs position-speed in the admissible space state [0, L] × R with periodic boundary conditions on the space variable. Also in this case ν can be normalized to a probability measure on the space of microscopic states: By letting ν be transported in time by the vector-valued flow map t → (X t , V t ), that is ν = (X t , V t )#ν 0 , and invoking again Reynolds transport theorem we finally obtain from (10) and (11) the following mean-field kinetic equation for the mesoscopic distribution: where a[µ] is the pedestrian acceleration and µ(·) := N ν(· × R) is the N -scaled marginal of ν with respect to the variable v, representing the pedestrian mass. Again, Eq. (12) has to be properly understood in the weak sense of measures as: for all test functions ϕ ∈ C ∞ c ([0, L] × R) and a.e. t > 0.

Comparative study of continuous models
This section is devoted to the continuous instances of Eqs. (9) and (12). We use them for assessing quantitative analogies and differences with other continuous crowd models from literature, which rest instead directly on fundamental diagrams (Section 3.3). To prepare the ground, we preliminarily derive the explicit expressions of the continuous models (see below) and study the underlying fundamental diagrams they imply at equilibrium (Sections 3.1, 3.2).
Generally speaking, the continuous version of the micro-meso model is obtained by assuming that the mesoscopic distribution ν is absolutely continuous with respect to the Lebesgue measure on [0, L].
In the first order case, this means that a mesoscopic distribution function Owing to Eq. (6), this can be interpreted by saying that Bf (t, x) dx is the (infinitesimal) probability that a pedestrian be in [x, x + dx] at time t. Consequently, also the mass µ turns out to be absolutely continuous with respect to Lebesgue, its density being the function which can be assimilated to the usual mass density dealt with in Continuum Mechanics. Plugging dµ t = ρ(t, ·) dx into Eq. (9) finally yields: Likewise, in the second order case the assumption of absolute continuity implies that a mesoscopic distribution function f : (12) gives: where the mass density ρ of pedestrians is defined here as the N -scaled zerothorder moment of f with respect to v:

Fundamental diagram for first order models
From Eq. (14) it is possible to extract a posteriori analytical fundamental relations induced by the micro-meso dynamics (5). For this, let us assume that a spatially homogeneous asymptotic density ρ (i.e., such that ∂ρ ∂t = ∂ρ ∂x = 0) exists. In view of Eqs. (6), (13) it results then N = BLρ. Plugging into Eq. (14) yields: whence we recognize that v d must in turn be homogeneous in space for consistency and that, in such a case, the equilibrium speed is indeed a function of the density: In these formulas ρ 1 is the density corresponding to one pedestrian. The related equilibrium speed is u(ρ 1 ) = v d , namely the free flow speed at which a single pedestrian walks in the absence of interactions. Furthermore, ρ * is the critical density at which pedestrians stop, i.e., u(ρ * ) = 0. The fundamental diagram corresponding to such a speed-density relation is the parabolic one: Example 3.1. Consider the following interaction kernel, cf. Fig. 4: where the constraints on the exponent γ guarantee the integrability of K I in [0, R] along with an increasing repulsiveness of the interactions at short distances. Then it results whence: These formulas establish a direct link between the macroscopic information provided by the fundamental relations and the parameters characterizing the interaction dynamics of pedestrians at the microscopic scale. Figure 4 shows some prototypes of the interaction kernel (17) over a typical interaction length R = 2 m (cf. Table 1) as the exponent γ varies from low to high values in the admissible range (0, 1). Low values of γ, such as e.g., γ = 0.3, imply a repulsion quite active up to the more advanced front of the interaction length, however with a moderate strength at the core denoting pedestrian inclination to tolerate proximity to one another. This can model the behavior of walkers used to crowded environments, for instance commuters in rush hours. Conversely, high values of γ, such as e.g., γ = 0.9, imply a repulsion concentrated especially in the core of the interaction interval, i.e., at short distance from each individual. This can correspond to the behavior of people in more relaxed walking contexts, for instance shopping or leisure, who mainly do not tolerate an excessive proximity to other people. Hence the parameter γ can be referred to the travel purpose of pedestrians, which, as also discussed in [21], can affect considerably the speed-density and flux-density diagrams.
Remark 3.2. The fundamental relations (16a), (16b) are valid for ρ 1 ≤ ρ ≤ ρ * . In particular, the lower bound ρ 1 = 1 BL > 0 on the density is a physically meaningful consequence of the fact that model (14) still contains information about the microscopic granularity of the crowd. This is further demonstrated

Fundamental diagram for second order models
Also from Eq. (15) it is possible to extract a posteriori analytical fundamental relations induced by the micro-meso second order dynamics (11). Specifically, let us assume that an asymptotic space homogeneous distribution function f ∞ = f ∞ (v) exists, with corresponding asymptotic constant density ρ, satisfying: Again, we set v d homogeneous in space for consistency. Solutions to (19) may be sought among those f ∞ such that f ∞ (v)a[ρ](v) is constant in v. However, this idea yields: it is immediate to check that the following ansatz: defines instead an acceptable measure-valued distribution function. Herev plays the role of a "flocking" speed of pedestrians (which conjecturably exists when the crowd moves homogeneously as a whole), however generally different from the desired speed v d because of interactions. The important fact is that f ∞ in Eq. (21) is the only equilibrium distribution that the spatially homogeneous distribution function f = f (t, v) converges to in time, no matter what the initial distribution f 0 is (cf. Fig. 6). As such, it is indeed the only asymptotic distribution we are interested in for our purposes. The precise statement of this property is as follows. ) be a measure solution to the spatially homogeneous problem: where f 0 has finite zeroth and first order moments. Then f converges to f ∞ , cf. Eq. (21), as t → +∞ in the sense that: where f (t) denotes the mapping t → f (t, ·) and W 1 is the Wasserstein distance in the space of probability distributions with finite first order moment.
Proof. We preliminarily note that the solution to problem (22) can be represented as: where η(t) = η(t, v) is the flow map defined by: In this specific case, since a[ρ](t, v) = (v − v)/τ , we compute explicitly: The Wasserstein distance W 1 between f (t) and f ∞ is: Lip 1 (R) being the space of Lipschitz continuous functions on R with at most unit Lipschitz constant. Using Eqs. (21), (23) we discover: where we have used that zeroth and first order moments of f 0 are finite. The arbitrariness of ϕ ∈ Lip 1 (R) finally implies the thesis.
Remark 3.4. Existence and uniqueness of a measure solution to problem (22), in the special case of the acceleration considered here, can be deduced from the more general results presented in [11,20].
Trivially,v is also the mean pedestrian speed at equilibrium, implying a critical stopping density Thus the speed and fundamental diagrams of the second order model finally read: Remarkably, they are completely analogous to those found for the first order model. Also the expression of the critical density ρ * is actually the same, up to identifying the coefficient τ k II appearing here with the coefficient k I in the corresponding formula of Section 3.1. Hence we will henceforth refer to the first order model (14), which contains the same amount of macroscopic information at equilibrium while being more practical to handle as far as both its numerical implementation and its actual use for real world applications are concerned.

Micro-meso vs. fundamental-diagram-based continuous models
In this section we exemplify a comparative investigation of the micro-meso first order continuous model (14), with interaction kernel (17) and parameters listed in Table 1, with other continuous models from literature explicitly grounded on fundamental diagrams. Specifically, we consider the linear fundamental relation suggested by Polus et al. [17]: with parameters a = 0.27 m 3 /(ped · s), b = 1.31 m/s and the nonlinear one suggested by Weidmann [23]: with parameters a = 1.91 ped/m 2 , b = 1.34 m/s, ρ * = 5.37 ped/m 2 . In Fig. 7 we compare these speed diagrams, and the related fundamental diagrams, with the corresponding fundamental relations generated by the micro-meso model, cf. Eqs. (16a), (16b). In particular, the coefficient c I of the latter has been determined in such a way that the fundamental diagram (16b) coincides with Polus' and Weidmann's ones at their first intersection for low density, i.e., ρ ∼ 1 ped/m 2 . This choice, rather than e.g., the second intersection for high density, is motivated by the consideration that experimental flux measurements are generally more reliable in low density regimes, when the fluctuations of the microscopic speed with respect to its mean value are more limited. We implement Polus' and Weidmann's diagrams in two different types of fluid dynamic model, both based on the continuity equation (1): (i) a local model written as where u(ρ) is either function (24), (25); (ii) a nonlocal model written as  where ρ p → u(ρ p ) is algebraically still either relation (24), (25) but ρ p is a perceived density defined as the average of the actual density over the interaction radius R of the point x, cf. [3].
The comparison of the the aforesaid five models (namely, model (14) plus the four models resulting from all possible combinations of Eqs. (24)-(27)) is performed in the test case of an elongated domain, assimilated to the interval [0, L], containing initially a certain density ρ 0 of people uniformly distributed in the first half [0, L/2], which then flows rightward. This can be regarded as the prototype of a problem of emptying, in which it can be interesting to assess the egress times and the instantaneous density profiles predicted by different crowd models. In particular the former, say T egress , can be evaluated as: where q(t, L) is the flux of people who at time t are leaving the domain through the right boundary x = L. In practice, Eq. (28) defines T egress as the average duration of the egress event weighted by the instantaneous outflow of pedestrian mass. Recalling that from the conservation of pedestrians, and the assumed setting in which nobody leaves or enters the domain from the boundary x = 0, it results: (1) in space), Eq. (28) can be further manipulated by means of integration-by-parts in time yielding finally: which shows that T egress can be also understood as the average time needed for the completion of the crowd egress weighted by the crowd mass which at each time is still inside the domain with respect to the initial total mass. The above definition of the egress time is more robust and consistent, also in view of the evaluation of T egress by means of numerical simulations, than other possible ones such as e.g., the minimum time needed in order for the density ρ to vanish pointwise for all x ∈ [0, L]. In fact this latter definition, which corresponds to the intuitive idea that the egress time is taken when the last pedestrian leaves the domain, is possibly unrealistic in a continuous framework, especially when the remaining density is pointwise so low that it does not even represent, in average, one pedestrian.
In the present case we focus on two representative density regimes: a low density one with ρ 0 = 1 ped/m 2 (which, for the micro-meso model, further corresponds to N = 50 pedestrians initially distributed over the half-length of the domain, see Table 1) and a high density one with ρ 0 = 3 ped/m 2 (which, for the micro-meso model, means N = 150 ped/m 2 ). Looking at the fundamental relations plotted in Fig. 7, we see that in the first regime the equilibrium average trend is very similar for all of the considered models. Therefore, by extrapolating from this synthetic information some clue about model behaviors also in locally non-equilibrium conditions, we can expect similar predictions in all cases. Conversely, in the second regime the fundamental relations show that the equilibrium average trends are quite different for the three classes of considered models. This suggests, again by conceptual extrapolation, that the quantitative outcomes may in turn differ substantially in non-equilibrium conditions, hence that in this case models cannot be regarded as being essentially equivalent to each other in terms of their dynamic predictions.
The outputs of the numerical simulations confirm the intuitive comparison of the considered models as guessed from the inspection of their fundamental diagrams. Figure 8 shows that the predicted average egress times are indeed very similar in the low density regime ρ 0 = 1 ped/m 2 , however with: coherently with the fact that, as it can be checked from Fig. 7, it results: In addition, Fig. 9 shows that the various instantaneous density profiles at about half the average time needed for the complete egress virtually coincide. This is especially true for Polus' and the micro-meso models, particularly (and actually not surprisingly) in the nonlocal case, because their fundamental relations have a common analytical mark (linear speed-density, and thus parabolic flux-density, diagrams) and virtually overlap in the density range [0, 1] ped/m 2 spanned by this simulation. Instead the advancing front of Weidmann's model has a quite different profile, probably due to the nonlinear behavior of the related fundamental relations which, for instance, predict higher speeds than the other two models in the aforesaid density range. Conversely, in the high density regime ρ 0 = 3 ped/m 2 the predicted average egress times are substantially different and in line with the marked differences In addition, we notice that local models always produce higher values of T egress than their nonlocal counterparts. This can be explained by the fact that a high density regime enhances the effect of pedestrian ability to see free room ahead, which on the other hand produces higher speeds than those that would correspond to the local pointwise density. Figure 9 further shows that the density profiles at nearly half the average egress time are, in this case, more staggered than in the low density regime. In particular, the positions of the rear discontinuities, representing the terminal part of the advancing queue, anticipate the differences found in the values of T egress , Weidmann's density being the most rearward one, the micro-meso density the intermediate one, and Polus' density the most forward one. Furthermore, the shape of the profiles displays again the usual similarities between Polus' and the micro-meso models already noticed in the low density regime as opposed to the now even more evident difference of Weidmann's model ultimately ascribable to its nonlinear speeddensity diagram.

Continuous vs. discrete models
A discrete implementation of the micro-meso approach can provide a precise analytical characterization of fundamental relations also in case of particle-based crowd models. Since the reference abstract mathematical framework (9) is independent of the spatial scale chosen for the representation of the crowd, the resulting discrete fundamental relations are coherent, thus directly comparable, with those obtained in the continuous setting. Therefore, the micro-meso approach can contribute to filling the gap between the mainly qualitative observations of fundamental-diagram-like trends extracted from microscopic simulations, see e.g., [7], and the quantitative information contained in macroscopic models.
Bearing this goal in mind, we now choose being the collection of all and only discrete points where pedestrians are located at time t. Plugging this expression into (the weak form of) Eq. (9) we obtain: where, in order to implement periodic boundary conditions on [0, L], we let again the index j of the sum at the right-hand side go up to 2N with: In this way, for example, for i = N the last pedestrian x N has indeed in front the first one (in fact x N +1 = x 1 + L), the second one (in fact x N +2 = x 2 + L), and so on. The discrete model (29) closely resembles the original inspiring microscopic dynamical system (3) up to the coefficient N −1 N in front of the interaction kernel. This is due ultimately to that, unlike Eq. (3), the micro-meso representation (5) further assumes that microscopic pedestrians are identical.
By generalizing the ideas used in the continuous case of Section 3, we can define a fundamental relation for the abstract model (9) as a diagram relating the speed u of the crowd at equilibrium to the total number N of pedestrians. Notice that, in general, we refer to N because, unlike the density ρ, it is well defined at all scales in our framework. This implies finding, for a given N , (quasi-)stationary solutions µ ∞ (if any) to Eq. (9) such that u[µ ∞ ] is constant.
In the continuous case of Section 3.1, these solutions are the stationary uniform measures dµ ∞ = N BL dx. Conversely, in the discrete case µ ∞ is necessarily quasi-stationary but not stationary, because if the speed of the x i 's is constant then Eq. (29) implies that µ ∞ translates uniformly in space. What is actually stationary in this case are pedestrian headways or, in other words, the spacings ∆x i := x i+1 − x i between two consecutive atoms of µ ∞ . In the vehicular traffic literature such solutions are known as "Ponies-on-a-Merry-Go-Round" (POMs), see e.g., [1,18].
In order for quasi-stationary solutions of model (29) to exist the desired velocity v d has to be constant in space like in the continuous case. Under this assumption, subtracting the equations for x i+1 and x i yields the following evolution equation for the i-th headway ∆x i : where ∆x ij := x j − x i and the upper limitsī,ī of the sums take into account the interaction length R of the i-th and (i + 1)-th pedestrian, respectively: ı := max{j ≥ i + 1 : ∆x ij ≤ R},ī := max{j ≥ i + 2 : ∆x i+1,j ≤ R}.
The most intuitive stationary solution to Eq. (30) is the one with constant headways, that is ∆x i = d > 0 all i. Considering that in such a case it results ∆x ij = (j − i)d, it is not difficult to check that with this choice the righthand side of Eq. (30) indeed vanishes. Moreover, noticing that Hence, recalling Eq. (29) and the periodicity of boundary conditions, the corresponding quasi-stationary distribution µ ∞ reads: where x 0 i ∈ [0, L] is the initial position of the i-th atom and u(N ) := u[µ ∞ t ](x i (t)) is its translational speed, which from Eq. (29) takes the form: Notice that it is actually constant in i, t and, for fixed R, L, depends only on the total number N of atoms. Here · denotes the integer part (floor), and in particular RN L = R d is the maximum number of headways contained in the interaction length R. (ii) stable and attractive if RN L ≥ 1.
Proof. Let , be a small perturbation of the quasistationary solution x ∞ i . Plugging into Eq. (29) and linearizing about x ∞ i we discover:˙ If RN L < 1 then RN L = 0, hence the sum at the right-hand side is empty and the equation for the perturbation reduces to˙ i = 0. This proves (i).
Conversely, if RN L ≥ 1 we make the ansatz: which takes into account the periodicity of i (t) with respect to i. Notice that the expansion above starts from k = 1 because the term for k = 0 is not relevant in the present context. In fact it corresponds to a rigid rotation of the x ∞ i 's, which does not affect their headways ∆x ∞ i = d. It turns out that (34) is indeed a solution to Eq. (33) as long as: Now, the prototype (17) of interaction kernel says that K I is non-positive (so as to be repulsive) and increasing (i.e., repulsion diminishes at increasing distances), thus K I > 0. Since the indexes h, k are such that 0 < h, k < N , we conclude that every term of the sum at the right-hand side of Eq. (35) is negative, hence that e(λ k ) < 0 for all k = 1, . . . , N − 1. This proves (ii). Proposition 4.1 makes the POM solution (31), and especially the u-N relationship (32) which can be computed out of it, a reference point in view of defining a speed diagram for the discrete model, because it asserts that this is a natural configuration that the system possibly tends to. In particular, such a configuration is stable but not attractive if the uniform headway d = L N is larger than the interaction radius R. The reason is that if the number N is low enough (precisely, N < L R ) there are several other ways, besides the uniformly spaced one, of accommodating pedestrians in a domain of length L so that each of them be out of the interaction radius of all other group mates. Any of such configurations is obviously a stable equilibrium, however perfectly equivalent to the uniformly spaced one in terms of pedestrian speed, since every pedestrian walks unperturbed at the desired speed v d . As soon as the number N grows above the threshold L R , there is no longer enough room in the domain for accommodating all pedestrians in such a way that they do not interfere with each other. In this situation the uniformly spaced configuration becomes attractive, i.e., it is the one that the system tends to adopt. Figure 10 illustrates the speed diagrams of the discrete model computed by means of Eq. (32) for three different lengths L of the domain and compares them with the analogous diagrams of the corresponding continuous model. A few remarks are in order.
(i) Jump-type discontinuities featured by the diagrams of the discrete model are a consequence of the microscopic granularity of the crowd, which is fully appreciable in a discrete framework. In more detail, they are due to the fact that the number of other walkers who a given pedestrian interacts with increases suddenly by one when, for increasing N , the headway d = L N shortens enough that one more pedestrian enters the interaction length R.
(ii) The granularity of the discrete model makes it possible to observe the plateau at u = v d = 1.34 m/s for N < L R , i.e., d > R. The continuous model does not catch it, because it "smears" the pedestrian distribution in space thereby missing the precise characterization of the headways, which is instead relevant especially for low N . This basically originates the discrepancy of the two diagrams for larger N , resulting finally in different estimates of the critical congestion number of pedestrians N * at which the mean speed vanishes (i.e., u(N * ) = 0).
(iii) Although they are derived from the very same abstract modeling framework, the continuous and discrete models (14) and (29), respectively, should not be regarded, in general, as a sort of approximation of one another. They are instead, more properly, two different models of the  Table 1. Solid lines: corresponding speed diagram (16a) of the continuous model.
same physical system sharing the same phenomenological description of low scale interactions, cf. Eq. (5). The difference is in the detail of crowd granularity taken into account by either spatial representation, which plays the role of a genuine modeling issue and ultimately produces different outcomes at the aggregate level (cf. Fig. 10). This makes the difference between the proposed approach, which aims at retaining the finiteness of the crowd at all scales, and e.g., mean-field approaches, where the continuous description is purposely derived as an approximation of the discrete one in the limit N → ∞, see e.g., [5,6], and is thus valid in principle only for (very) large numbers of particles.

Discussion
This paper originates from the consideration that nowadays several differential models of crowd dynamics exist, at either the microscopic or the macroscopic scale, which it is often difficult to compare systematically because of their inhomogeneous mathematical formalizations. In particular, despite that models generally take inspiration from the same heuristics, two crucial issues arise when trying to assess more rigorously analogies and differences among them: • Do models implement quantitatively the same dynamics across the various scales?
• How to compare models at different scales or models which, though at the same scale, do not implement the same dynamics?
The first issue implies that a common methodological background, able to explain the genesis of both discrete and continuous models, would be useful. Nevertheless, an immediate difficulty is that in discrete models the number of pedestrians is finite, i.e., pedestrians can be counted one by one, whereas in continuous models it is implicitly taken infinite in view of the underlying assumption of continuity of the matter (no matter how questionable such an assumption, inspired by classical fluid and gas dynamics, can be for crowds). In order to tackle this point, we have proposed a multiscale approach resting on a generalization of particle-based models, which introduces the concept of micro-meso interactions among pedestrians. In practice, microscopic interactions are replaced by multiscale interactions between a single individual and the mesoscopic distribution of other walkers ahead, expressed by means of a (probability) measure on the space of microscopic states of pedestrians. By regarding such a mesoscopic distribution as a material quantity for pedestrians, namely a quantity transported by the flow map of the microscopic dynamical system, a self-consistent measure-valued mesoscopic equation is obtained without sending the number of pedestrians to infinity. This equation can be then specialized to either a continuous-in-space or a discrete-in-space representation of the crowd, depending on the spatial structure chosen for the measure. Therefore we can guarantee that the underlying fundamental dynamics are actually the same at both levels of representation. We stress that the key point, which makes the difference with respect to other approaches usually followed in the literature, such as e.g., mean-field limits, is the fact of understanding the mesoscopic distribution as a descriptor of the crowd phenomenologically complementary to the particle representation rather than analytically derived in the limit from the latter. This way the mesoscopic description, though not necessarily focused on single individuals, can still retain some meaningful low scale details, such as the finiteness of the number of walkers as well as of their range of interaction, which would otherwise be lost when passing to the limit.
The second issue calls instead for a common synthetic quantitative basis that both discrete and continuous models can be traced back to. We have individuated such a basis in the fundamental diagrams, i.e., algebraic relationships linking the flux of the crowd at equilibrium, as well as the mean speed that can be derived out of it, to the number of pedestrians. It is worth pointing out that several fluid dynamic macroscopic models available in the literature are indeed constructed by appealing explicitly to fundamental diagrams for closing the mass conservation equation. On the other hand, several particle-based microscopic models show qualitative trends compatible with fundamental-diagram-type relationships but usually fail to properly formalize this concept and to relate it to the more usual one found in the frame of continuous models. Conversely our approach, which relies on one-to-one interactions formalized via a scale free measure, is not forced to postulate a priori any scale-dependent fundamental relationship and can rather recover a posteriori such an information from the equilibrium mesoscopic distributions in both continuous and discrete cases.
By taking advantage of the aforesaid features of our approach, we have compared the continuous instance of our multiscale model with: i) other macroscopic models from literature, which implement gross scale dynamics through fundamental diagrams; ii) its discrete counterpart obtained from the very same abstract measure-valued setting, which indeed turns out to be representative of a large class of microscopic models available in the literature.
The study of continuous models has put in evidence that analogies and differences in their respective dynamical behaviors are quite well predictable simply out of a comparative inspection of their fundamental diagrams in the neighborhood of the typical working density for the considered crowd event. To some extent, this suggests that continuous dynamics tend roughly to resemble to one another if models exhibit similar trends at equilibrium, regardless of the specific way in which they are technically implemented in the equations.
Conversely, the comparison between the fundamental diagrams of the discrete and continuous instances of our multiscale model has shown relevant quantitative discrepancies, especially when the domain where the crowd is accommodated is large enough to contain up to relatively big numbers of individuals. These discrepancies are basically due to that in the discrete-in-space representation gaps among pedestrians are accurately detected whereas in the continuousin-space representation the crowd distribution is much more "smeared". Consequently, for a given finite number of pedestrians one cannot expect the trends of either model to be quantitatively analogous and neither, more in general, the two types of models to be qualitatively equivalent. As a matter of fact, this is in agreement with the findings in [12], where strongly different group behaviors are shown to emerge by simply varying the relative importance of either contribution in the interplay between the discrete and continuous representations of the same crowd. Therefore, when simulating a real crowd event, the choice of either representation should be made by carefully assessing whether pointwise or aggregate interactions are more suited to the physical situation at hand. This possibly includes also the psychological and emotional state of the individuals, which may affect the way in which they perceive and interact with other group mates.