Bertrand Maury

AND Aude Roudneff-Chupin

Filippo Santambrogio

A MACROSCOPIC CROWD MOTION MODEL OF GRADIENT FLOW TYPE

A simple model to handle the flow of people in emergency evacuation situations is considered: at every point x, the velocity U(x) that individuals at x would like to realize is given. Yet, the incompressibility constraint prevents this velocity field to be realized and the actual velocity is the projection of the desired one onto the set of admissible velocities. Instead of looking at a microscopic setting (where individuals are represented by rigid discs), here the macroscopic approach is investigated, where the unknown is a density ρ(t, x). If a gradient structure is given, say U = -∇D where D is, for instance, the distance to the exit door, the problem is presented as a Gradient Flow in the Wasserstein space of probability measures. The functional which gives the Gradient Flow is neither finitely valued (since it takes into account the constraints on the density), nor geodesically convex, which requires for an ad-hoc study of the convergence of a discrete scheme.

Crowd motion; Gradient Flow; Wasserstein distance; Continuity equation.

Introduction

In the last two decades, several strategies have been proposed to model the motion of pedestrians. Most of them rely on a microscopic approach: the degrees of freedom are the positions of individuals, and their evolution depends on a balance between selfish behaviour, congestion constraints, and possibily social factors (politeness, gregariousness). Among those microscopic models, some are based on a stochastic description of the individual behaviour (see e.g. [START_REF] Henderson | The statistics of crowd fluids[END_REF]), whereas others are purely deterministic (see [START_REF] Helbing | Social force model for pedestrian dynamics[END_REF][START_REF] Hoogendoorn | Dynamic user-optimal assignment in continuous time and space[END_REF][START_REF] Hoogendoorn | Pedestrian route-choice and activity scheduling theory and models[END_REF]).

An essential ingredient in those models lies in the way interactions between individuals are handled, in particular in the case of high density (congestion phenomena). Following the classification which holds in the modelling of granular flows, one can differentiate the Molecular Dynamics (MD) approach (the non overlapping constraint between rigid grains is relaxed, and handled by a short range repulsive force) and the Contact Dynamics (CD) one (the collisions are explicitely taken into account). In the context of pedestrians, MD strategy has proved to be quite efficient to model congestion. In particular Helbing [START_REF] Helbing | A fluid dynamic model for the movement of pedestrians[END_REF][START_REF] Helbing | Social force model for pedestrian dynamics[END_REF][START_REF] Helbing | Simulating dynamical features of escape panic[END_REF] introduced the concept of social forces, which are designed in such a way that individuals tend to repel each other when their distance drops below a certain value. The model proposed in [START_REF] Maury | Handling of contacts in crowd motion simulations, Traffic and Granular Flow[END_REF] relies on the alternative strategy: individuals do not interact with each other as soon as they are not in contact, and the non overlapping constraint is treated in a strong (non relaxed) way. Although it is natural to expect some link between the two approaches (MD models are likely to converge in some way to their CD counterparts as the repulsive force stiffness goes to infinity), it is to be noticed that the mathematical structures of the two classes of models are quite different. In the first case, Cauchy-Lipschitz theory for ODE's applies, whereas CD models present some analogies with the so-called sweeping process introduced by Moreau [START_REF] Moreau | Evolution problem associated with a moving convex set in a Hilbert space[END_REF] in the 70', for which a dedicated framework has been developped (see [START_REF] Edmond | Relaxation of an optimal control problem involving a perturbed sweeping process[END_REF], [START_REF] Edmond | BV solutions of nonconvex sweeping process differential inclusion with perturbation[END_REF], [START_REF] Maury | A mathematical framework for a crowd motion model[END_REF]).

In the case of macroscopic models, the first strategy (congestion is treated in a relaxed way) is favoured, as it allows to use classical methods for studying PDE. For example, crowd motion models inspired from traffic flow models have been developped (see Refs. [START_REF] Colombo | Pedestrian flows and non-classical shocks[END_REF][START_REF] Chalons | Numerical approximation of a macroscopic model of pedestrian flows[END_REF][START_REF] Chalons | Transport-equilibrium schemes for pedestrian flows with nonclassical shocks[END_REF]). They take the form of hyperbolic conservation laws, and they are essentially monodimensional in space. In higher dimension, Bellomo and Dogbe [START_REF] Bellomo | On the modelling crowd dynamics from scalling to hyperbolic macroscopic models[END_REF][START_REF] Dogbe | On the numerical solutions of second order macroscopic models of pedestrian flows[END_REF] proposed second order models, where a phenomenological relation describes how the crowd modifies its own speed:

∂ t ρ + ∇ x • (ρv) = 0 ∂ t v + (v • ∇ x )v = F(ρ, v).
Typically, the motion is governed by F, which has two parts: a relaxation term toward a definite speed, and a repulsive term to take into account that pedestrians tend to avoid high density areas. Degond [START_REF] Degond | Congestion in a macroscopic model of self-driven particles modeling gregariousness[END_REF] uses the same approach to model sheep herds. In this model, the term F depends on a pressure which blows up when the density approaches a given congestion density (barrier method). There also exist first order models, where the velocity field is directly defined as a function of the density (see e.g. [START_REF] Hughes | A continuum theory for the flow of pedestrian[END_REF][START_REF] Hughes | The flow of human crowds[END_REF][START_REF] Coscia | First-order macroscopic modelling of human crowd dynamics[END_REF]). Another class of models is described by Piccoli and Tosin in Refs. [START_REF] Piccoli | Time-evolving measures and macroscopic modeling of pedestrian flow[END_REF], [START_REF] Piccoli | Pedestrian flows in bounded domains with obstacles[END_REF]. They propose a time-evolving measures framework, where the velocity of the pedestrian is composed by two terms: a desired velocity and an interaction velocity. The last one models the reaction of the pedestrian to the other surrounding pedestrians (namely, people can deviate from their preferred path if they enter a crowded area).

To our knowledge, as the ones presented above, all macroscopic models rely on a relaxed expression of the congestion. Let us mention however the work of Buttazzo, Jimenez and Oudet in [START_REF] Buttazzo | An optimization problem for mass transportation with congested dynamics[END_REF], where the optimal transportation between two given densities is computed under constraints (obstacles, congestion, ...) which can be strongly expressed. Yet, this approach is very different from the model we describe later, since its goal is to find an optimal transport between densities as in the work of Benamou and Brenier [START_REF] Benamou | A computational fluid mechanics solution to the Monge-Kantorovich mass transfer problem[END_REF] (which is the classical reference for dynamical formulations of transport problems), whereas optimal transportation is in our case a very suitable tool. Moreover, we will mainly make use of the distance that optimal transport induces on probability measures rather than looking at the optimal maps themselves, as we will see after a brief description of the model we consider.

The macroscopic model we present here is based on a strong expression of the congestion constraint. It is a natural extension of the microscopic approach proposed in Refs. [START_REF] Maury | Handling of contacts in crowd motion simulations, Traffic and Granular Flow[END_REF][START_REF] Maury | A mathematical framework for a crowd motion model[END_REF][START_REF] Venel | Integrating strategies in numerical modelling of crowd motion, Pedestrian and Evacuation Dynamics[END_REF], which we describe here in its simpler form. The crowd configuration is represented by the position vector q = (q 1 , . . . , q N ). Each of the N individuals whishes to have a velocity U i which depends on its position only: U i = U(q i ), where U(•) is some given velocity field over R 2 (typically U = -∇D, where D is the geodesic distance to the exit). To account for nonoverlapping, it is assumed that the actual velocity u = (u 1 , . . . , u N ) is the ℓ 2 -projection of Ũ = (U 1 , . . . , U N ) = (U(q 1 ), . . . , U(q N )) onto the cone of feasible velocities C q (i.e. the set of velocities which do not lead to a violation of the non-overlapping constraint). The model takes the form (1)

   dq dt = u u = P Cq Ũ.
In the spirit of this microscopic approach, the model we propose here rests on the two following principles (1) the pedestrian population is described by a density ρ which is subject to remain below a certain maximal value (equal to 1 in what follows), this density follows an advection equation, (2) the advecting field u is the closest, among admissible fields (i.e. which do not lead to a violation of the constraint), to some spontaneous field U, which corresponds to the strategy people would follow in the absence of others.

If we denote by C ρ the cone of admissible velocities (i.e. set of velocities which do not increase density in already saturated zones, see next section for a proper definition), the model takes the following form (2)

∂ t ρ + ∇ • ρu = 0 u = P Cρ U,
where the projection is meant in the L 2 sense. As a matter of fact, in the same way as Cauchy-Lipschitz theory for ODE's no longer applies for CD in the microscopic case, we cannot use classical methods to study Equation ( 2), as well as most of the PDE's we could encounter in the CD macroscopic models. This is due in particular to the lack of regularity of the velocity u (whose natural regularity is L 2 ), which prevents us to apply the characteristic method or even DiPerna-Lions theory. The non-continuous dependence of the operator P Cρ with respect to ρ is another source of problems. Instead, we will see that this PDE corresponds to a Gradient Flow in the Wasserstein space (i.e. the space of probability measures endowed with the distance W 2 induced by the optimal transport under quadratric cost), provided that the spontaneous velocity field has a gradient structure: U = -∇D. This means that we consider the functional

Φ(ρ) =    Ω D(x)ρ(x)dx if ρ ≤ 1 +∞ otherwise
and we look for the curve of measures ρ(t, .) which follows the steepest descent direction of Φ starting from a given datum ρ 0 . This curve will happen to solve equation ( 2). This is a general and very efficient method to find solutions to certain evolution PDE's which been made possible by the theory of optimal transportation. This theory owes its origin to Kantorovich [START_REF] Kantorovich | On the transfer of masses[END_REF], but has been widely developped thereafter (see the books by Villani [START_REF] Villani | Topics in optimal transportation[END_REF][START_REF] Villani | Optimal transport, old and new[END_REF]). Several equations have been approached by this method, for instance the classical heat equation, as well as the Fokker-Planck or the porous media equations (see Refs. [START_REF] Jordan | The variational formulation of the Fokker-Planck equation[END_REF][START_REF] Otto | The geometry of dissipative evolution equations: the porous medium equation[END_REF][START_REF] Carrillo | Finite speed of propagation in porous media by mass transportation methods[END_REF]). Notice that, as the functional which is used to produce the porous media equation as a Gradient Flow is

ρ → ρ(x) m dx,
our case can be considered as its formal limit when m tends to infinity. All the theory of Gradient Flow in Wasserstein Spaces is treated in the reference book by Ambrosio-Gigli-Savaré [START_REF] Ambrosio | Gradient flows in metric spaces and in the space of probability measures[END_REF] and one of the key assumptions is the λ-convexity of the functional, which ensures better estimates. On the other hand, some existence results can be obtained without this assumption, but they have to be treated carefully by hand, as it happens in Ref. [START_REF] Blanchet | Convergence of the mass-transport steepest descent scheme for the sub-critical Patlak-Keller-Segel model[END_REF]. In our case, even if we suppose D to be λ-convex, we face the same kind of difficulties if we want to add the presence of an exit door on the boundary of Ω where the measure can concentrate (see Section 2). The paper is organized as follows: In Section 2 we present the model in the Eulerian setting and a related discrete minimizing movement scheme (MMS). We explain how a straightforward use of a convergence theorem in [START_REF] Ambrosio | Gradient flows in metric spaces and in the space of probability measures[END_REF] asserts a convergence of the trajectories for the discrete MMS to some continuous pathline. Identification of this limit with a solution to the initial problem can be done unformally. Yet some technical obstacles (in particular the handling of walls) prevent us from obtaining a fully rigorous proof based on this approach. The actual proof of convergence to a solution of the crowd motion model is based on alternative arguments. The end of this section describes this convergence results. As the presence of an exit raises some very specific technical difficulties, we propose in Section 3 a proof in the case there is no exit. The proof in the general case in given in Section 4. To illustrate the convergence theorem, we present in Section 5 an idealized (yet non trivial) situation where both eulerian solutions and discrete MMS trajectories can be described with accuracy. Finally, we discuss in Section 6 the limitations of this model and its possible extensions to other fields of natural sciences. In particular, we explain why we developped the theory in any dimension although dimensions greater than two do not make clear sense as far as crowd motion is concerned.

2. The eulerian model and its gradient flow formulation 2.1. Eulerian model. The model we propose is designed to handle emergency evacuation situations : the behaviour of individuals is based on optimizing their very own trajectory, regardless of others, but the fulfillment of individual strategies is made impossible because of congestion.

The model takes the following form: given a domain Ω (the building), whose boundary Γ is composed of Γ out (the exit) and Γ w (the walls), we describe the current distribution of people by a measure ρ of given mass (say 1 without loss of generality) supported within Ω. To model the fact that people getting through the door are out of danger, yet keeping a constant total mass without having to model the exterior of the building, we shall assume that ρ may concentrate on Γ out . In this spirit, we denote by K the set of all those probablity measures over R 2 that are supported in Ω, and that are the sum of a diffuse part, with density between 0 and 1, in Ω, and a singular part carried by Γ out .

Ω Γ out Γ w Figure 1. Geometry.
We shall denote by U the spontaneous velocity field: U(x) represents the velocity that an individual at x would have if he were alone. It is taken equal to 0 outside Ω. The set C ρ of feasible velocities corresponds to all those fields which do not increase ρ on the saturated zone (unformally, ∇ • u ≥ 0 in [ρ = 1]), and which account for walls (people do not walk through them). As we plan to define C ρ as a closed convex set in L 2 (Ω), those constraints do not make sense as they are, and we shall favor a dual definition of this set. Let us introduce the "pressure" space

H 1 ρ = {q ∈ H 1 (Ω) , q ≥ 0 a.e. in Ω , q(x) = 0 a.e. on [ρ < 1] , q |Γout = 0}. The proper definition of C ρ reads (3) C ρ = {v ∈ L 2 (Ω) 2 , Ω v • ∇q ≤ 0 ∀q ∈ H 1 ρ }.
The model is based on the assumption that the actual instantaneous velocity field is the feasible field which is the closest to U in the least-square sense, i.e. it is defined as the L 2projection of U onto the closed convex cone C ρ . Finally the problem consists in finding a trajectory t → ρ(t) ∈ K which is advected by u, i.e. such that (ρ, u) is a (weak) solution of the transport equation in R 2 (4)

∂ t ρ + ∇ • (ρu) = 0,
where u verifies, for almost every t,

(5) u = P Cρ U.

Remark 2.1. The fact that Γ out is likely to carry some mass calls for some proper definition of the velocity on this zero-measure set. As the exit plays the role of a reservoir in our model, we shall actually consider that all feasible fields vanish on Γ out , so that velocity u given by (5) will be considered as defined Lebesgue-a.e. in Ω and vanishing on Γ out .

Remark 2.2. Boundary conditions (walls and exit).

The unilateral divergence constraint and the behaviour at walls and exit are implicitly contained in the dual expression of C ρ , as illustrated by the following considerations. We assume in this remark that [ρ = 1] = ω where ω ⊂ Ω is a smooth subdomain, and that all fields are smooth. First of all, by taking tests pressures which are smooth and compactly supported in ω, we obtain ∇ • u ≥ 0 in the saturated zone. As the pressure vanishes on Γ out , the velocity is free on that part of the boundary (free outlet condition, as in Darcy flows). Consider now a situation where the saturated zone covers the wall Γ w . For any smooth function ϕ defined on Γ w consider a sequence of extensions ϕ ε supported within ω ∪ Γ w , which converges to 0 in L 2 (Ω). Then

Ω u • ∇ϕ ε ≤ 0 ∀ε > 0 implies - Ω ϕ ε ∇ • u + Γw ϕ ε u • n ≤ 0 ∀ε > 0.
As the first term goes to 0 with ε we obtain that the velocity necessarily enters the domain on the saturated wall (what we adressed before as "people do not walk through walls").

Gradient flow formulation.

In this section we introduce a discrete evolution problem in the Wasserstein space, whose limit will be the gradient flow of a suitable functional, and we establish unformally the link between this new problem and the crowd motion model. The formal equivalence, which will be proved rigorously in the following sections, will be satisfied in the case where U = -∇D is the opposite of a gradient.

Let us denote by P 2 the set of probablity measures over R 2 endowed with the Wasserstein distance, and by

(6) K = {ρ ∈ P 2 , supp(ρ) ⊂ Ω , ρ = ρ out + ρ Ω , ρ Ω (x) ≤ 1 a.e., supp(ρ out ) ⊂ Γ out }
the set of feasible densities. Let an initial density ρ 0 be given, and τ > 0 a time step. We build ρ 0 τ = ρ 0 , ρ 1 τ , . . . as follows (7)

ρ k τ = argmin P 2 (R d ) J(ρ) + I K (ρ) + 1 2τ W 2 2 (ρ, ρ k-1 τ ) ,
where W 2 is the Wasserstein distance, J is the dissatisfaction functional defined as

(8) J(ρ) := Ω D(x)ρ(x) dx,
and I K is the indicatrix of K :

I K (ρ) = 0 if ρ ∈ K +∞ if ρ / ∈ K.
The function D is typically the distance to the door Γ out , and to D we associate a vector field U = -∇D. It is important in order to have vanishing velocities on the door that D is minimal and constant on Γ out .

We admit here that under reasonable assumptions this process is indeed an algorithm (i.e. ρ k+1 τ is uniquely defined as the minimizer of the function above), and we denote by ρ τ the piecewise constant interpolate of ρ 0 τ , ρ 1 τ , . . . . As τ goes to 0, by Prop. 2.2.3, Th. 2.3.1, and Th. 11.1.3 in [START_REF] Ambrosio | Gradient flows in metric spaces and in the space of probability measures[END_REF], ρ τ converges to some trajectory t → ρ in K, which is a (weak) solution to

∂ t ρ + ∇ • (ρu) = 0,
where u is such that, for almost every t,

u ∈ -∂ (J + I K ) (ρ),
where ∂Ψ denotes the strong subdifferential of Ψ. Furthermore u minimizes the L 2 norm among all those fields in the subdifferential above.

Let us now prove unformally that this characterizes the instantaneous velocity as the projection of U = -∇D onto C ρ . The subdifferential of a function Ψ at ρ in the Wasserstein setting is defined as the set of fields u such that

Ψ(ρ) + Ω u, t(x) -x dρ(x) ≤ Ψ(t # ρ) + o(||t -i||),
where t denotes a transport map acting on ρ. Note that the previous inequality does not provide any information as soon as t # ρ is not feasible (in that case the right-hand side is +∞). Let us consider a feasible field v ∈ C ρ , and let us assume that, for ε small enough, t ε = i + εv pushes forward ρ onto a measure in K (this is not true in general, see Remark 2.3). Note that t ε is defined ρ-almost everywhere, with Γ out carrying some mass, but as it vanishes on Γ out (see Remark 2.1), the singular part of ρ remains unchanged. Having ε go to 0 in the subdifferential inequality, we obtain

∇D • v dρ(x) + u • v dρ(x) ≤ 0, so that u + ∇D = u -U belongs to C •
ρ , the polar cone to C ρ . As u minimizes the L 2 norm over U + C ρ , u identifies with the projection of U onto C ρ , which ends this unformal proof.

Remark 2.3. In general, there exist feasible densities ρ ∈ K (defined by [START_REF] Berthelin | Existence and weak stability for a pressureless model with unilateral constraint[END_REF]) and fields v ∈ C ρ (defined by (3)) such that (i + εv) # ρ exits K for any ε > 0, this is why the considerations above do not make a rigorous proof. Consider for example ω a dense open subset in Ω, with a small measure, and define ρ as 1 ω c . The pressure space is {0}, and C ρ is L 2 (Ω): any field is feasible. If one considers now a strictly contractant field (with negative divergence), it is clear that (i + εv) # ρ / ∈ K for any ε > 0. Notice also that this kind of paradox does not depend on the fact that we chose a "linear" perturbation (i + εv), since the same would happen if one, instead, perturbs the identity by following the flow of the vector field v for a time ε (which is classically a better choice in order to satisfy the density constraint).

As explained in the previous remark, the approach carried out in this section is not a rigorous proof that the advecting field is actually the projection of U onto C ρ . We conjecture that projecting (i + εv) # ρ onto K (for the Wasserstein distance) introduces a perturbation which is negligible compared to ε, so that v may actually be used as a test-function, but this conjecture raises some technical issues which we were not able to solve. In what follows we give an alternate proof which circumvents the necessity to characterize ∂(J + I K ).

2.3.

Notations and statement of the main result. We first recall some results on the continuity equation: let (ρ(t, .)) t>0 be a family of density measures on R d , and v :

(t, x) ∈ R + × R d → v(t, x) ∈ R d be a Borel velocity field such that (9) T 0 R d |v(t, x)|ρ(t, x) dx < +∞.
We say that (ρ, v) satisfies the continuity equation with initial condition ρ 0 (10)

∂ t ρ + ∇ • (ρv) = 0 ρ(0, .) = ρ 0 if for all ϕ ∈ C ∞ c ([0, T [×R d ) we have (11) T 0 R d (∂ t ϕ(t, x) + ∇ϕ(t, x) • v(t, x)) ρ(t, x) dx + R d ϕ(0, x)ρ 0 (x) dx = 0.
Let us recall that if ρ(t, .) is a solution of the continuity equation, there exists a narrowly continuous curve ρ(t, .) such that ρ(t, .) = ρ(t, .) for a.e. t. In general, we will always focus on this continuous representation.

We now detail the construction of a discrete family of densities (ρ k τ ) that approches in a sense we will precise later the solution of the continuity equation we are interested with. For a fixed time step τ > 0, we define the sequence (ρ k τ ) of density measures on Ω using the recursive scheme:

(12)    ρ 0 τ = ρ 0 ρ k τ ∈ argmin P 2 (R d ) J(ρ) + I K (ρ) + 1 2τ W 2 2 (ρ, ρ k-1 τ ) ,
where W 2 is the Wasserstein distance, and J is the dissatisfaction functional defined in [START_REF] Bouchut | A hierarchy of models for two-phase flows[END_REF]. This construction is a minimizing movement scheme as described by DeGiorgi and Ambrosio in [START_REF] Giorgi | New problems on minimizing movements, Boundary Value Problems for PDE and Applications[END_REF][START_REF] Ambrosio | Movimenti minimizzanti[END_REF] and then -in the framework of probability measures -in [START_REF] Ambrosio | Gradient flows in metric spaces and in the space of probability measures[END_REF][START_REF] Ambrosio | Gradient flows of probability measures, Handbook of differential equations[END_REF]

with functional Φ(ρ) = J(ρ) + I K (ρ).
We define on Ω the discrete velocities:

v k τ = i -t k τ τ
, where t k τ is the unique optimal transport function from

ρ k τ to ρ k-1 τ
, which is well defined on Ω (but not necessarely on Γ out , due to the singular part of ρ k τ ). We also define E k τ = ρ k τ v k τ on Ω (by abuse of notation, we will write Ω instead of Ω when we want to stress that we are not considering the boundary). We can interpolate these discrete values (ρ k τ , v k τ , E k τ ) k≥0 by the piecewise constant functions defined by: (

   ρ τ (t, .) = ρ k τ v τ (t, .) = v k τ E τ (t, .) = E k τ if t ∈ ](k -1)τ, kτ ]. 13)
Our goal is to prove that ρ τ converges when τ → 0 to a solution of the continuity equation [START_REF] Buttazzo | A model for the optimal planning of an urban area[END_REF].

Here is our main result:

Theorem 2.4. Let Ω be a convex bounded set of R d , D : R d → R a continuous λ-convex
function, ρ 0 a probability density, and (ρ k τ ) constructed following the recursive scheme [START_REF] Chalons | Numerical approximation of a macroscopic model of pedestrian flows[END_REF]. Then there exists a family of probability densities (ρ(t, .)) t>0 , and a family of velocities (u(t, .)) t>0 such that (ρ τ (t, .), E τ (t, .)) narrowly converges to (ρ(t, .), ρ(t, .) u(t, .)) for a.e. t. Moreover, (ρ, u) satisfies the continuity equation:

(14)    ∂ t ρ + ∇.(ρu) = 0 u(t, .) = P C ρ(t,.) U for a.e. t ρ(0, .) = ρ 0
where U = -∇D, and C ρ(t,.) is defined in [START_REF] Ambrosio | Gradient flows of probability measures, Handbook of differential equations[END_REF].

We will first prove this theorem in the particular case where there is no exit. In the following section, we thus assume that Γ out = ∅, which will imply that all the measures are absolutely continuous with respect to the Lebesgue measure. Then we will extend the proof to the general case.

Remark 2.5. We chose to assume here a λ-convexity hypothesis on D both in order to clarify some statements, which are easier to state and prove under this assumption (see for instance Lemma 3.1 and the subsequent Remark 3.2) and because the typical case we think of is D = d(•, Γ out ), where Γ out is a flat part of the boundary of the convex set Ω. This implies that D is convex as well. It would be interesting to study the case of non-convex domains Ω (for instance with obstacles), and use the geodesic distance for computing D, which would lead to a non-λ-convex function, but this is not yet possible by means of our techniques, since one should work with the Wasserstein distance W 2 computed w.r.t. the geodesic distance itself, which is not much studied. Anyway, it can be checked that the only point throughout the paper where λ-convexity is used is the proof of Lemma 3.1, but Remark 3.2 explains how to get rid of this assumption: this means that, for existence purposes, this assumption may be withdrawn. On the other hand, the λ-convexity assumption is typical in this gradient flow problems, because it allows for uniqueness and stability results, and we think that similar results could be achieved in our case as well.

3. Existence result in a domain with no exit 3.1. Technical lemmas. Since we will make a strong use of optimality conditions in terms of the dual problem in Monge-Kantorovitch theory, let us briefly recall what we need.

Given the two probabilities µ and ν on Ω we always have

1 2 W 2 2 (µ, ν) = max Ω ϕ dµ + Ω ψ dν, φ, ψ ∈ C 0 (Ω) : φ(x) + ψ(y) ≤ 1 2 |x -y| 2 ,
the maximum being always realized by a pair of c-concave conjugate functions (ϕ, ψ) with ϕ = ψ c and ψ = ϕ c , where the c-transform of a function χ is defined through

χ c (y) = inf x∈Ω 1 2 |x -y| 2 -χ(x)
(with generalizations to other costs c rather than the square of the distance). We will call Kantorovitch potential from µ to ν (resp., from ν to µ) any c-concave function ϕ (resp., ψ) such that (ϕ, ϕ c ) (resp., (ψ c , ψ)) realizes such a maximum. We have uniqueness of the optimal pair as soon as one of the support of one of the two measures is the whole domain Ω.

Lemma 3.1. Let D : R d → R λ-convex, and ρ ∈ K. Then, there exists τ * such that for all τ < τ * :

(i) The functional φ(ρ) = Φ(ρ) + 1 2τ W 2 2 (ρ, ρ
) admits a unique minimizer ρ m . (ii) There exists a Kantorovitch potential φ from ρ m to ρ, such that:

(15) Ω D + φ τ ρ ≥ Ω D + φ τ ρ m for all ρ ≤ 1 a.e.. Proof. (i)
The existence of a minimizer can easily be proved using a minimizing sequence of φ(ρ). Let ρ 1 , ρ 2 be two different minimizers, and r i the optimal transport between ρ and ρ i . We define

r t := (1 -t)r 1 + t r 2 and ρ t := r t# ρ 1 , for t ∈ ]0, 1[. We know that ρ t = ρ | det ∇r t | • (r t ) -1 .
As M → (det M ) -1 is convex on the set of positive definite matrices S ++ d , and ∇r i ∈ S ++ d , we have :

ρ t (x) ≤ 1 -t det ∇r 1 + t det ∇r 2 ρ • (r t ) -1 (x).
We also know that ρ 1 and ρ 2 are admissible, therefore: ρ det ∇r i ≤ 1 a.e., and we obtain: ρ t ≤ 1.

We have then

φ(ρ t ) = Ω D((1 -t)r 1 (x) + t r 2 (x))ρ(x) dx + 1 2τ W 2 2 (ρ t , ρ). Since D is λ-convex D((1 -t)r 1 (x) + t r 2 (x)) ≤ (1 -t)D(r 1 (x)) + tD(r 2 (x)) - λ 2 t(1 -t)|r 1 (x) -r 2 (x)| 2 .
Moreover, W 2 2 (., ρ) is 1-convex along the interpolation ρ t (see lemma 9.2.1 p. 206 in Ref [START_REF] Ambrosio | Gradient flows in metric spaces and in the space of probability measures[END_REF]), therefore, for τ small enough, we have

φ(ρ t ) < (1 -t)φ(ρ 1 ) + tφ(ρ 2 ) = inf K φ(ρ),
which is absurd. (ii) We first assume that ρ > 0 a.e., which implies that the Kantorovich potential φ from ρ m to ρ, satisfying φ(x 0 ) = 0 (with x 0 any fixed point in Ω), is unique. Let us define a small perturbation of ρ m : let ρ ≤ 1 be a probability density, ε > 0 and ρ ε := ρ m + ε(ρρ m ). As ρ m minimizes φ(ρ), we have:

(16) J(ρ ε ) -J(ρ m ) + 1 2τ (W 2 2 (ρ ε , ρ) -W 2 2 (ρ m , ρ)) ≥ 0.
The first part of the left side of the inequality can easily be calculated:

J(ρ ε ) -J(ρ m ) = Ω D(x)(ρ ε -ρ m )(x) dx = ε Ω D(x)(ρ -ρ m )(x) dx.
Let us estimate the second part: we denote by (ϕ ε , ψ ε ) some Kantorovich potentials associated to ρ and ρ ε . We have

     1 2 W 2 2 (ρ ε , ρ) = Ω ϕ ε (x)ρ ε (x) dx + Ω ψ ε (y)ρ(y) dy 1 2 W 2 2 (ρ m , ρ) ≥ Ω ϕ ε (x)ρ m (x) dx + Ω ψ ε (y)ρ(y) dy,
where φ ε is a Kantorovitch potential from ρ ε to ρ. Thus:

1 2 (W 2 2 (ρ ε , ρ) -W 2 2 (ρ m , ρ)) ≤ Ω ϕ ε (x)(ρ ε -ρ m )(x) dx = ε Ω ϕ ε (x)(ρ -ρ m )(x) dx,
and we can deduce from inequality (16) that:

Ω D(x)(ρ -ρ m )(x) dx + 1 τ Ω ϕ ε (x)(ρ -ρ m )(x) dx ≥ 0 for all admissible ρ.
Let ε tend to 0: ϕ ε converges to the unique Kantorovich potential φ from ρ m to ρ. This gives

Ω D(x)(ρ -ρ m )(x) dx + 1 τ Ω ψ c (x)(ρ -ρ m )(x) dx ≥ 0 for all admissible ρ.
We now prove the general case: let ρδ > 0 a.e., ρδ ≤ 1 a.e., such that ρδ converges to ρ when δ tends to 0. Using (i), there exists a unique minimizer ρ m,δ of φ δ (ρ) :=

Ω Dρ+I K + 1 2τ W 2
2 (ρ, ρδ ), and it converges to ρ m as δ tends to 0. Moreover, we have proved that:

Ω D(x)(ρ -ρ m,δ )(x) dx + 1 τ Ω φδ (x)(ρ -ρ m,δ )(x) dx ≥ 0 for all admissible ρ,
with φδ that converges to a Kantorovitch potential φ. Taking the limit δ → 0, we obtain the desired inequality. For this kind of arguments concerning optimality for transport costs and other functionals, see for instance Ref. [START_REF] Buttazzo | A model for the optimal planning of an urban area[END_REF].

Remark 3.2. if D is not λ-convex, we cannot prove uniqueness of the minimizer of φ. However, if ρ m is a minimizer, it still satisfies inequality (ii). Indeed, in the second part of the proof of (ii), we can define ρ m,δ as a minimizer of φ δ (ρ) + c δ W 2 2 (ρ, ρ m ), where c δ → 0 (so that the optimality condition that we see at the limit δ → 0 disregards this term), but slowly (so that it makes ρ m,δ converge to ρ m ). Obviously this kind of argument was not necessary if one only wanted to prove this optimality condition for one minimizer ρ m , and not for every minimizer.

Lemma 3.3. (Decomposition of the spontaneous velocity):

The spontaneous velocity U = -∇D can be written as follows:

(17) U = v k τ + ∇p k τ with p k τ ∈ H 1 ρ k τ .
Proof. Using the previous lemma, we know that there exists a Kantorovich potential φ from ρ k τ to ρ k-1 τ such that ρ k τ is a solution of the minimizing problem:

ρ k τ ∈ argmin ρ∈K Ω D(x)ρ(x) dx + 1 τ Ω φ(x)ρ(x) dx , which imposes:    ρ k τ = 1 on [F < l] ρ k τ ≤ 1 on [F = l] ρ k τ = 0 on [F > l],
with

F : Ω → R x → D(x) + φ(x) τ ,
and l ∈ R chosen such that ρ k τ satisfies:

Ω ρ k τ dx = 1.
We can then define a pressure like function:

(18) p k τ (x) := (l -F (x)) + = l -D(x) - φ(x) τ + which satisfies: p k τ ≥ 0, and p k τ = 0 on [ρ k τ < 1], therefore p k τ ∈ H 1 ρ k τ .
Moreover, on [ρ k τ > 0], we have:

∇p k τ = -∇D - ∇ φ τ
(where the density vanishes v k τ may be modified at will, so that we can keep the same formula). Since we have

v k τ = i -t k τ τ = ∇ φ τ ,
we get the desired decomposition for the spontaneous velocity :

U = v k τ + ∇p k τ .
Let us now define the densities ρτ (t) that interpolate the discrete values (ρ k τ ) along geodesics:

(19) ρτ (t) = t -(k -1)τ τ (id -t k τ ) + t k τ # ρ k τ .
We also define ṽτ (t, .) as the unique velocity field such that ṽτ (t, .) ∈ Tan ρt P 2 (R d ) and (ρ τ , ṽτ ) satisfy the continuity equation. As before, we define: Ẽτ = ρτ ṽτ . After these definitions we will give some a priori bounds on the curves, the pressures and the velocities that we defined. In order to get these bounds, we need to start from some estimates which are standard in the framework of Minimizing Movements. The sequence (ρ k τ ) k satisfies an estimate on its variation which gives a Hölder and H 1 behavior. From the minimality of ρ k τ , compared to ρ k-1 τ , one gets

W 2 2 (ρ k τ , ρ k-1 τ ) ≤ 2τ (Φ(ρ k τ ) -Φ(ρ k-1 τ )).
Since Φ coincides with J, which is bounded, on the sequence (ρ k τ ) k , then we have

W 2 2 (ρ k τ , ρ k-1 τ
) ≤ Cτ (discrete Hölder behavior), but we also have, if we sum up over k

(20) k τ W 2 (ρ k τ , ρ k-1 τ ) τ 2 ≤ 2Φ(ρ 0 ),
which is the discrete version of an H 1 estimate. As for ρτ (t), it is an absolutely continuous curve in the Wasserstein space and its velocity on the time interval [(k -1)τ, kτ ] is given by the ratio W 2 (ρ k-1 τ , ρ k τ )/τ . Hence, the L 2 norm of its velocity on [0, T ] is given by ( 21)

T 0 |ρ ′ τ | 2 W 2 (t)dt = k W 2 2 (ρ k τ , ρ k-1 τ ) τ ,
and, thanks to [START_REF] Edmond | Relaxation of an optimal control problem involving a perturbed sweeping process[END_REF], it admits a uniform bound independent of τ (here we use the notation |σ ′ |(t) for the metric derivative of a curve σ and |σ ′ | W 2 (t) means that this metric derivative is computed according to the distance W 2 ). This gives compactness of the curves ρτ , as well as an Hölder estimate on their variations (since H 1 ⊂ C 0,1/2 ).

Lemma 3.4. (A priori estimates):

We have the following a priori estimates:

(i) v τ is τ -uniformly bounded in L 2 ((0, T ), L 2 ρτ (Ω)). (ii) p τ is τ -uniformly bounded in L 2 ((0, T ), H 1 (Ω)).
(iii) E τ and Ẽτ are τ -uniformly bounded measures.

Proof. (i) We have the following equalities:

T 0 Ω ρ τ |v τ | 2 = k kτ (k-1)τ Ω ρ k τ |v k τ | 2 = k kτ (k-1)τ dt Ω ρ k τ (x) |x -t k τ (x)| 2 τ 2 dx = k τ W 2 2 (ρ k-1 τ , ρ k τ ) τ 2 = 1 τ k W 2 2 (ρ k-1 τ , ρ k τ ).
Thanks to the general estimate (20) we get

T 0 Ω ρ τ |v τ | 2 ≤ 2Φ(ρ 0 ).
(ii) Since we have shown the following decomposition: ∇p τ = -∇Dv τ , we have:

T 0 Ω ρ τ |∇p τ | 2 ≤ 2 T 0 Ω ρ τ |v τ | 2 + 2 T 0 Ω ρ τ |∇D| 2 ≤ C. But p τ = 0 on [ρ τ < 1], therefore T 0 Ω |∇p τ | 2 = T 0 Ω ρ τ |∇p τ | 2 ≤ C.
(iii) We look at Ẽτ and we use the estimates [START_REF] Edmond | Relaxation of an optimal control problem involving a perturbed sweeping process[END_REF] and [START_REF] Edmond | BV solutions of nonconvex sweeping process differential inclusion with perturbation[END_REF].

T 0 Ω | Ẽτ | = T 0 Ω ρτ |ṽ τ | ≤ T 0 Ω ρτ |ṽ τ | 2 1 2 Ω ρ τ 1 2 =1 ≤ T 0 Ω ρτ |ṽ τ | 2 1 2 ≤ √ T T 0 Ω ρ τ |v τ | 2 1 2 ≤ C.
Therefore, Ẽτ is a τ -uniformly bounded measure. The proof for E τ is almost the same, estimating L 1 norms with L 2 norms by Cauchy-Schwartz.

Lemma 3.5. Assume that µ and ν are absolutely continuous measures, whose densities are bounded by a same constant C. Then, for all function f ∈ H 1 (Ω), we have the following inequality:

(22) Ω f d(µ -ν) ≤ √ C ||∇f || L 2 (Ω) W 2 (µ, ν).
Proof. Let µ t be the constant speed geodesic between µ and ν, and w t the velocity field such that (µ, w) satisfies the continuity equation, and

||w t || L 2 (µt) = W 2 (µ, ν)
. For all t, µ t is absolutely continuous, and its density is bounded by the same constant C a.e.. Therefore:

Ω f d(µ -ν) = 1 0 d dt Ω f (x)dµ t (x) dt = 1 0 Ω ∇f • w t dµ t dt ≤ 1 0 Ω |∇f | 2 dµ t dt 1/2 1 0 Ω |w t | 2 dµ t dt 1/2 ≤ √ C ||∇f || L 2 (Ω) W 2 (µ, ν).
Remark: With the same method, we can also prove:

Ω f d(µ -ν) ≤ C 1 p ||∇f || L p (Ω) W q (µ, ν)
for all f ∈ W 1,p and q such that 1 p + 1 q = 1. More generally, if µ, ν ∈ L r (Ω) and ||µ|| L r , ||ν|| L r ≤ C, one has

Ω f d(µ -ν) ≤ C 1 q ′ ||∇f || L p (Ω) W q (µ, ν), provided 1 p + 1 q + 1 r = 1 + 1 qr .
3.2. Proof of the theorem in a domain with no exit.

Step 1: convergence of (ρ τ , Ẽτ ) and (ρ τ , E τ ). We have proved that ρτ and Ẽτ are τ -uniformly bounded measures, thus there exists (ρ, E) such that (ρ τ , Ẽτ ) converges narrowly to (ρ, E). Let us prove that (ρ τ , E τ ) converges to the same limit as (ρ τ , Ẽτ ). We start from the ρ-part. The curves ρτ actually converge uniformly in [0, T ] with respect to the W 2 -distance. The curves ρ τ and ρτ coincide on every time of the form kτ . The former is constant on every interval ](k -1)τ, kτ ], whereas the latter is uniformly Hölder continuous of exponent 1/2, which implies W 2 (ρ τ (t), ρ τ (t)) ≤ Cτ 1 2 . This proves that ρ τ converges uniformly to the same limit as ρτ .

We now consider a function f ∈ C ∞ c ([0, T ] × Ω), and prove that

T 0 Ω f Ẽτ -E τ converges
to 0 as τ tends to 0. We have: ρτ (t, .) = T t# ρ k τ where

T t = (t -(k -1)τ )v k τ + t k τ . Therefore ρτ (t + h, .) = (T t + hv k τ ) # ρ k τ = ((id + hv k τ • T t -1 ) • T t ) # ρ k τ = (id + hv k τ • T t -1 ) # ρ τ (t, .),
which implies that: t ρτ (t+h,.) ρτ (t,.)

= id + hv k τ • T t -1
. We can then express ṽτ explicitely :

ṽτ (t, .) = lim h→0 t ρτ (t+h,.) ρτ (t,.) -id h = lim h→0 h v k τ • T t -1 h = v k τ • T t -1 ,
and obtain

Ω f (t, x) ρτ (t, x) ṽτ (t, x) dx = Ω f (t, T t (x)) ρ k τ (x) ṽτ (t, T t (x)) dx = Ω f (t, T t (x)) ρ k τ (x) v k τ (x) dx. Hence T 0 Ω f Ẽτ -E τ ≤ k τ k+1 τ k Ω |f (t, x) -f (t, T t (x))| |v k τ (x)| ρ k τ (x) dx dt ≤ k τ k+1 τ k Ω Lipf |x -T t (x)||v k τ (x)| ρ k τ (x) dx dt ≤ k τ k+1 τ k Ω Lipf τ |v k τ (x)| 2 ρ k τ (x) dx dt ≤ C Lipf τ.
Step 2: existence of the limit velocity. Let us prove that E is absolutely continuous with respect to ρ. Let θ be a scalar measure, and F a vectorial measure: the function

Θ : (θ, F) →    T 0 Ω |F| 2 θ if F << θ a.e. t ∈ [0, T ]
+∞ otherwise is l.s.c. for the weak-⋆ convergence of measures. Since we have shown the τ -uniform bound:

T 0 Ω |E τ | 2 ρ τ ≤ C,
we have Θ(ρ, E) < +∞. Therefore E is absolutely continuous with respect ρ, and there exists u(t, .) ∈ L 2 (ρ(t, .)) such that E = ρu. Moreover, (ρ, ρu) satisfies the (linear) continuity equation, as limit of (ρ τ , Ẽτ ).

Let us now prove that u(t) ∈ C ρ(t) . Let t 0 ∈ (0, T ), h > 0, and q ∈ H 1 ρ(t 0 ,.) . By the continuity equation, we have

t 0 +h t 0 Ω ∇q(x) • u t (x)ρ(t, x) dx = Ω [ρ(t 0 , x) -ρ(t 0 + h, x)] q(x) dx.
Since ρ(t 0 , .) = 1 wherever q > 0, and ρ(t 0 + h, .) ≤ 1 a.e.,

Ω

[ρ(t 0 , x)ρ(t 0 + h, x)] q(x) dx ≤ 0, and we have for a.e.

t 0 0 ≥ 1 h t 0 +h t 0 Ω ∇q(x).u t (x)ρ(t, x) dx -→ h→0 Ω ∇q(x) • u(t 0 , x)ρ(t 0 , .)(x) dx = Ω ∇q(x).u(t 0 , x) dx.
Using the same method between t 0h and t 0 , we also obtain the converse inequality. Finally, we have for a.e. t 0

Ω ∇q(x) • u(t 0 , x) dx = 0 for all q ∈ H 1 ρ(t 0 ,.) .

Step 3: the limit velocity satisfies: u = P Cρ U. We first prove the decomposition: U = u(t, .) + ∇p(t, .) for a.e. t. We have

E τ = ρ τ v τ = -ρ τ (∇D + ∇p τ ) = -ρ τ ∇D -∇p τ since p τ = 0 on [ρ τ < 1].
Let us prove that p τ converges to p ∈ H 1 ρ : as p τ ∈ L 2 ([0, T ], H 1 (Ω)), there exists p such that p τ weakly converges to p in L 2 ([0, T ], H 1 (Ω)). We have obviously: p ≥ 0 a.e., but it is more difficult to show that p(t, .) = 0 on [ρ(t) < 1]. We consider the average functions: Since

p a,b τ = 1 b -a
p τ = 0 on [ρ τ < 1], we have 0 = b a Ω p τ (t, x)(1 -ρ τ (t, x)) dx dt = 1 b -a b a Ω p τ (t, x)(1 -ρ τ (a, x)) dx dt + 1 b -a b a Ω p τ (t, x)(ρ τ (a, x) -ρ τ (t, x)) dx dt.
The first integral reads:

Ω p a,b τ (x)(1 -ρ τ (a, x)) dx -→ τ →0 Ω p a,b (x)(1 -ρ(a, x)) dx, as p a,b τ weakly
converges in H 1 (Ω) -therefore strongly in L 2 (Ω) -to p a,b , and ρ τ (a, .) weakly-⋆ converges in L ∞ (Ω) to ρ(a, .). Moreover, for every Lebesgue point a of p(., x), we have: p a,b -→ b→a p(a, .), therefore, for all these a, we have

Ω p a,b (x)(1 -ρ(a, x)) dx dt -→ b→a Ω p(a, x)(1 -ρ(a, x)) dx.
Using lemma 3.5, we obtain for the second integral:

b a Ω p τ (t, x) ρ τ (a, x) -ρ τ (t, x) dx dt ≤ b a ||∇p τ (t, .)|| L 2 (Ω) W 2 (ρ τ (a, .), ρ τ (t, .)) ≤C √ b-a dt ≤ C √ b -a b a ||∇p τ (t, .)|| 2 L 2 (Ω) dt 1 2 b a dt 1 2 ≤ C(b -a) b a ||∇p τ (t, .)|| 2 L 2 (Ω) dt 1 2
.

As T 0 ||∇p τ (t, .)|| 2 L 2 (Ω) dt is τ -uniformly bounded, ||∇p τ (t, .)|| 2 L 2 (Ω)
weakly converges to a measure µ. Therefore, beyond a zero measure set of points a, we have

lim τ →0 1 b -a b a Ω p τ (t, x)(ρ τ (a, x) -ρ τ (t, x)) dx dt ≤ C µ([a, b]) -→ b→a 0.
We finally obtain:

Ω p(a, x)(1ρ(a, x)) dx = 0 for almost every a.

Hence E = -ρ∇D -∇p, with p = 0 on [ρ < 1], so: E = -ρ(∇D + ∇p). Since: E = ρu, we have shown the following decomposition:

u = -∇D -∇p i.e. U = ∇p + u.
Moreover, by Equality [START_REF] Helbing | Computer simulations of pedestrian dynamics and trail formation[END_REF], u and ∇p satisfy the complementarity relation Ω ∇p(t, x) • u(t, x) dx = 0 for a.e. t, which implies that we have exactly: u(t) = P C ρ(t) U.

Proof of the theorem in the general case

We consider here the general case where Γ out = ∅.

4.1.

Lack of geodesic convexity. The main problem we encounter when we want to generalize the previous proof is the fact that the classical geodesics no longer belong to the admissible space K, which is no more a geodesically convex set. Indeed, if we consider a density ρ 0 which is constant equal to 1 on a subset of Ω, a measure ρ 1 which is concentrated on Γ out , and the geodesic ρ(t, .) between them, the density of ρ(t, .) will be of the order of 1/(1t) where it is positive, and therefore ρ(t, .) ∈ K for all t ∈ ]0, 1[. This is one of the main reasons that prevent from using the standard theory of gradient flow for geodesically convex functionals in the Wasserstein space (see [START_REF] Ambrosio | Gradient flows in metric spaces and in the space of probability measures[END_REF]).

In this section we will investigate the connectedness properties of the set K. For the sake of this work, we will see that we need to estimate the length to connect two measures in K at a very single point of the proof. Yet, we think that these estimates are interesting in themselves and this is why we try to present them so that they will be valid in any dimension d.

We define a new distance, coming from a minimal length approach, on K: Proposition 4.1. (Continuity of the length L) For µ, ν ∈ K, we define the length

(24) L(µ, ν) = inf 1 0 |σ ′ | W 2 (t)dt : σ(t) ∈ K, σ(0) = µ, σ(1) = ν .
This length is finite, and it is a distance on K which is continuous for the narrow convergence: if (µ n ), (ν n ) are sequences that narrowly converge in K to µ and ν, then L(µ n , ν n ) converges to L(µ, ν).

To prove this proposition, we will first analyze the case were the domain Ω is the unit cube and the door is one of the sides. We set

Q = ]0, 1[ d-1 × ] -1, 0[, Q = [0, 1] d-1 × [-1,
0] and S = [0, 1] d-1 × {0}. We will still denote by K the set of admissible measures, i.e. those who are composed by a density less than 1 in Q and by a possibly singular part on S. We will denote by y the last component of a point (x, y) ∈ R d = R d-1 × R. When integrating over S, we write dx instead of H d-1 (dx) or similar expressions.

Let us start from a simpler case.

A first useful lemma is the following: Lemma 4.2. Let ρ 0 , ρ 1 be two probability measures on Q of the form

ρ i = ρ i Q + ρ i S
, where ρ i Q has a density on Q bounded by k and ρ i S is concentrated on S. Set ℓ = W 1 (ρ 0 , ρ 1 ). Then, for any Lipschitz continuous function j we have

S jd(ρ 0 S -ρ 1 S ) ≤ Lip(j)ℓ + c(k)||j|| L ∞ ℓ 1/2 , Q j(ρ 0 Q -ρ 1 Q ) ≤ 2Lip(j)ℓ + c(k)|||j|| L ∞ ℓ 1/2 .
Proof. We start from the first estimate: consider a function χ δ : Q → [0, 1] such that χ δ = 1 on S, χ δ = 0 outside a strip of width δ from S, and |∇χ δ | ≤ δ -1 (as a matter of fact, it defines this function as χ δ (x, y) = (1 + δ -1 y) + ). We may write

S jd(ρ 0 S -ρ 1 S ) = Q jχ δ d(ρ 0 -ρ 1 ) - Q jχ δ d(ρ 0 Q -ρ 1 Q ) ≤ Lip(jχ δ )ℓ + kδ||j|| L ∞ .
Then we use Lip(jχ δ ) ≤ Lip(j) + ||j|| L ∞ δ -1 and we get

S jd(ρ 0 S -ρ 1 S ) ≤ Lip(j) + ||j|| L ∞ δ ℓ + kδ||j|| L ∞ , which implies, by choosing δ = ℓ 1/2 , S jd(ρ 0 S -ρ 1 S ) ≤ Lip(j)ℓ + c(k)||j|| L ∞ ℓ 1/2 .
As far as the second estimate is concerned, just write

Q j(ρ 0 Q -ρ 1 Q ) = Q j(ρ 0 -ρ 1 ) - S jd(ρ 0 S -ρ 1 S )
and use Q j(ρ 0ρ 1 ) ≤ Lip(j)ℓ and the previous inequality.

It is important to notice in the above inequality that, once we fix ρ i Q or ρ i S , the two estimates separately make ℓ appear, where ℓ may be the W 1 distance between any pair of measures, satisfying the constraints, having ρ i Q or ρ i S as an internal or boundary part, respectively. The pair of measures we use need not to be the same in the two estimates. Lemma 4.3. Let ρ 0 , ρ 1 ∈ K be two admissible probability measures on Q and L, M ≥ 1. Suppose that ρ 0 and ρ 1 are of the following form:

ρ i = ρ i Q + ρ i S , ρ i Q ≪ L d , ρ i S = h i • H d-1 , h i ≤ M, Lip(h i ) ≤ L, i = 0, 1.
Then, there exists a curve ρ t from ρ 0 to ρ 1 , contained in K (the set of admissible measures) and such that its W 2 -length does not exceed C(d)M 1/2 Lℓ + M ℓ 1/2 , where we set ℓ := W 1 (ρ 0 , ρ 1 ).

Moreover, the same stays true if ℓ stands for a number such that there exist "extensions" of ρ i Q on S and of ρ i S on Q that belong to K and such that for both extensions the new W 1 -distance is smaller than ℓ (but the two extensions may be different). If instead of staying in K the constraint on the density in Q is relaxed to "being smaller than k" with k > 1, the constant will also depend on k, as in Lemma 4.2.

Proof. It is possible to replace the two probabilities on Q with probabilities ρi on R = [0, 1] d-1 × [-1, M ] so that ρi is absolutely continuous with density less than 1 and (π Q ) # ρi = ρ i (where π Q is the projection on Q). We will take

ρi = ρ i Q + 1 y<h i (x) • L d .
Consider the geodesic ρt from ρ0 to ρ1 . It is a curve of measure whose length is exactly W 2 (ρ 0 , ρ1 ). Moreover, if one projects on Q all the trajectories of the particles of this curve, one gets the curve (π Q ) # ρt , which connects ρ 0 to ρ 1 but stays in K (since the only effect of the projection is to send all the mass on R \ Q on S, while the densities inside Q are not affected. And we know that the densities of ρt will not be larger than 1, since this is the case for a geodesic between two measures with densities bounded by 1.

Hence we only need to estimate W 2 (ρ 0 , ρ1 ). For simplicity, let us estimate W 1 instead of W 2 . We will conclude by the inequality

W 2 ≤ (diam R) 1/2 W 1/2 1 . Notice that the diameter of R is (M + 1) 2 + d -1 ≤ C(d)M .
To estimate W 1 , take a function f ∈ Lip 1 (R). What follows will be easier to justify in case f is regular but everything will work (by density, or instance), for any f whose Lipschitz constant does not exceed 1. Let us define, for x ∈

[0, 1] d-1 and a, b ∈ [0, M ], g(x, a, b) = b a f (x, t)dt b -a .
We denote by g x , g a and g b the partial derivatives of g. We can verify that

|g x (x, a, b)| = b a f x (x, t)dt |b -a| ≤ Lip(f ) = 1,
then we compute g b and we get

|g b (x, a, b)| = f (x, b) b -a - g(x, a, b) b -a ≤ Lip(f ) |b -a| |b -a| = 1,
and, analogously,

|g a | ≤ 1.
In particular, if one takes two Lipschitz functions a(x) and b(x), one has Lip(g(x, a(x

), b(x))) ≤ 1 + Lip(a) + Lip(b). Now we write R f d(ρ 0 -ρ1 ) = Q f d(ρ 0 Q -ρ 1 Q ) + S h 0 (x) 0 f (x, t)dt - h 1 (x) 0 f (x, t)dt dx.
We estimate both terms thanks to the previous lemma. The first term in the right hand side is less than ℓ, while for the second we may write

S h 0 (x) 0 f (x, t)dt - h 1 (x) 0 f (x, t)dt dx = S g(x, h 0 (x), h 1 (x))(h 0 -h 1 )(x)dx.
Hence we are in the case of the previous lemma with j(x) = g(x, h 0 (x), h 1 (x)), and hence Lip(j) ≤ 1 + 2L and ||j|| L ∞ ≤ M + √ d (the first estimate comes from our study of g, for the second just suppose that f vanishes somewhere on S).

Hence we get, using the arbitrariness of the function f

W 1 (ρ 0 , ρ1 ) ≤ ℓ + (1 + 2L)ℓ + 2M ℓ 1/2 .
To simplify the computations we use 1 ≤ M, L and get

W 2 (ρ 0 , ρ1 ) ≤ C(d)M 1/2 W 1 (ρ 0 , ρ1 ) 1/2 ≤ C(d)M 1/2 Lℓ + M ℓ 1/2 .
The last part of the statement is an easy consequence of the technique we used and of Lemma 4.2.

Theorem 4.4. Let µ 0 and µ 1 be two probabilities in K. Then there exists a curve (µ t ) t connecting µ 0 to µ 1 , such that its W 2 -length does not exceed C(d)W 1 (µ 0 , µ 1 ) 1/(4d) and that µ t ∈ K for every t.

Proof. Take ε > 0 and modify µ i into a new measure ρ i ∈ K by regularizing in the direction of x: it is sufficient to take the convolution of µ i S with a kernel of the form C(ε 1-dε -d |x|) + . This ensures that the W 1 distance has not increased and that the new measures on S will have Lipschitz and bounded densities on S, with M ≤ Cε 1-d and L ≤ Cε -d , and on Q the constraint is kept as well. Yet, there is a problem: these measures may exit the domain. There are two possible ways for solving this problem, and both will be useful.

One possibility is rescaling of a factor (1 + 2ε) -1 , so that all the mass is pushed again into the domain. This does not change significantly the values of M and L but the densities inside will be no more bounded by 1. They will be bounded by a constant k close to 1. In this case too the Wasserstein distance has not increased, since the rescaling was a contraction.

The other possibility is composing with a contracting transport T :

Q ε → Q (Q ε being the ε-neighborhood of Q),
which is chosen so that the convolution of the constant function 1 is sent onto the constant function 1 (this is possible thanks to the fact the convolution keeps the mass unchanged). This construction ensures that the constraint inside Q will be satisfied but unluckily, since the inverse of T is not Lipschitz continuous (due to the fact that the densities vanished on the boundary of Q ε ), it is not suitable for S. Anyway, in this case too, the Wasserstein distance was not increased.

Hence we do a mixed procedure: we use the second possibility in Q and the first on S. It is clear that in this way we have good densities both in Q and on S, and we can apply Lemma 4.2 and the last statement of Lemma 4.3. Notice that the W 1 -distance between the two measures ρ i ∈ K that we constructed could be larger than ℓ. It is easily estimated by something like ℓ + ε but this is not sufficient for the following estimates. Now, to connect µ 0 to µ 1 , one can first connect each µ i to ρ i , and the cost is no more than ε, since it is sufficient to spread every particle on a ball of radius ε (i.e. the radius of the support of the previous kernel) when we do convolution, and then to move it no more than ε when we compose with a contraction. After that, one uses the previous Lemma to estimate the length for connecting ρ 0 to ρ 1 and gets

min length ≤ 2ε + C(d)ε (1-d)/2 ε -d ℓ + ε 1-d ℓ 1/2 = 2ε + C(d)ε 3 2 -d ℓ ε 2 + ℓ 1/2 ε ,
where ℓ denotes the W 1 distance between µ 0 and µ 1 . If one supposes that ε is chosen so that ℓε -2 is smaller than 1, one can estimate the last sum in the square root and get

min length ≤ 2ε + C(d)ε 1-d ℓ 1/4 .
Choosing ε = ℓ 1/(4d) gives at the same time that ℓε -2 is small and that the minimal length may be estimated by ℓ 1/(4d) .

To approach the general case one needs to use the following theorem, which has already been used in a transport-related setting with density constraints in the variational theory of incompressible Euler equations by Y. Brenier and provides a useful tool for reducing to the cube (see Refs [START_REF] Dacorogna | On a partial differential equation involving the Jacobian determinant[END_REF] and [START_REF] Roesch | Contribution à la description géométrique des fluides parfaits incompressibles[END_REF] for the applications to fluid mechanics). Theorem 4.5. For any sufficiently good domain Ω ⊂ R d which is homeomorphic to the cube, there exists a bi-lipschitz homeomorphism φ :

Ω → Q such that φ # (L d |Ω ) = cL d |Q .
Moreover, the behavior of φ on the boundary may be prescribed at will.

Generalization of the technical lemmas.

In this section, we briefly explain how to generalize the technical lemmas we used in the first proof (with Γ out = ∅). Conditions on the minimizer for the discrete problem.

• First of all, in lemma 3.1, we can't prove the uniqueness of the minimizer ρ m with the same method. Indeed, exactly as we explained in the previous section for geodesics, the interpolation ρ t between two possible minimizers does not necessarily belong to K. Therefore, we will have to apply the "selection" method explained in Remark 3.2 in order to prove inequality [START_REF] Coscia | First-order macroscopic modelling of human crowd dynamics[END_REF]. More precisely, the case where ρ > 0 remains unchanged, but in the general case, we fix a minimizer ρ m of φ, and we define ρ m,δ as a minimizer of

φ δ (ρ) := Ω Dρ + I K (ρ) + 1 2τ W 2 2 (ρ, ρδ ) + c δ W 2 2 (ρ, ρ m ),
with c δ that converges to 0 slower than W 2 (ρ, ρδ ). Since ρ m and ρ m,δ are minimizers of J and φ δ , we have the following inequalities:

     Ω Dρ m,δ + 1 2τ W 2 2 (ρ m,δ , ρδ ) + c δ W 2 2 (ρ, ρ m ) ≤ Ω Dρ m + 1 2τ W 2 2 (ρ m , ρδ ) Ω Dρ m + 1 2τ W 2 2 (ρ m , ρ) ≤ Ω Dρ m,δ + 1 2τ W 2 2 (ρ m,δ , ρ)
which implies, using the triangular inequality:

W 2 2 (ρ m,δ , ρ m ) ≤ 1 2τ c δ W 2 2 (ρ m,δ , ρ) -W 2 2 (ρ m,δ , ρδ ) + W 2 2 (ρ m , ρδ ) -W 2 2 (ρ m , ρ) ≤ C 2τ c δ W 2 (ρ, ρδ ) -→ δ→0 0.
Therefore, ρ m,δ converges to the fixed minimizer ρ m . We can then pass to the limit δ → 0, and obtain the same inequality for ρ m .

• It is also useful to notice another feature of the problem with an exit Γ out : once some mass arrives to the exit, it does not move anymore. This precisely means the following: if γ k τ is an optimal transport plan from the selected measure ρ k τ to the previous one, ρ k-1 τ , and (x, y) ∈ supp(γ k τ ) with y ∈ Γ out , then y = x. This means that all the mass which was already on the door for ρ k-1 τ will not move. To prove it, it is sufficient to consider the map

F : Ω × Ω → Ω × Ω defined by F (x, y) = (y, y) if y ∈ Γ out and F (x, y) = (x, y) if y / ∈ Γ out . The measure F # γ k τ is a transport plan between a new measure ρ and ρ k-1 τ
, which reduces the transport cost and the functional J (since D is minimal on the exit). Moreover, since ρ is obtained from ρ k τ by moving some mass onto the door, we have ρ ∈ K as well. This would contradict the optimality of ρ k τ unless F # γ k τ = γ k τ , which is the thesis.

This also proves uniqueness of the optimal transport plan between ρ k τ and ρ k-1 τ since, if we look it the other way around (from ρ k-1 τ to ρ k τ ), we can decompose the problem in one part which will not move (corresponding to ρ k-1 τ 1 Γout ) and one part which is the transport of an absolutely continuous density (ρ k-1 τ 1 Ω ). We will also denote by E k τ the excess mass of ρ k τ with respect to ρ k-1 τ on the exit, i.e.

E k τ := ρ k τ (Γ out ) -ρ k-1 τ (Γ out ) ≥ 0.
• In lemma 3.3, the solution of

ρ k τ ∈ argmin ρ∈K Ω D(x)ρ(x) dx + 1 τ Ω φ(x)ρ(x) dx
is not necessarily the same in the general case, as there exists no limit density on Γ out . Let us define: l := inf x∈Γout F (x), and Γ min = {x ∈ Γ out :

F (x) = l}. If |[F < l]| ≥ 1, then
the solution is the same as in the previous proof. However, if |[F < l]| < 1, it costs less to put a part of the density onto Γ out . The solution is therefore given by:

       ρ k τ = 1 on [F < l], ρ k τ > 0 on Γ min , with ρ k τ (Γ min ) = 1 -|[F < l]|, ρ k τ ≤ 1 on [F = l]\Γ min , ρ k τ = 0 on [F > l]. The pressure p k τ defined by p k τ (x) := (l -F (x)) + = l -D(x) - φ(x) τ + then belongs to H 1 ρ k τ
, and we prove the decomposition U = v k τ + ∇p k τ as before.

In order to prove the a priori estimates of lemma 3.4, we have to take into account the singularity part of the densities on Γ out . Notice that, to avoid any ambiguity where the transport does not exist, we only defined a discrete velocity vector field inside Ω. To be clearer, we want to spend some disambiguation words on what Ẽτ and E τ are in this case.

• The measure Ẽτ is as usual defined as the vector measure satisfying the continuity equation with the curve ρτ . We also have an explicit formula in terms of the optimal transport plans γ k τ from ρ k τ to ρ k-1 τ : for any t ∈ [k -1τ, kτ [ take

Ẽτ (t) := π (kτ -t)/τ # x -y τ • γ k τ ,
where π s (x, y) = (1s)x + sy. • The measure E τ is simply defined as the product of ρ τ 1 Ω times the velocity vector field defined in Section 2.3, on the non-singular part only (again we use Ω instead of Ω to stress that the boundary is excluded). As before, the idea is that this vector measure satisfies good properties from optimality conditions, while the previous one satisfies the continuity equation. We need to compare them. • There is also in this case a third vector measure, that we can call Êτ , which is defined exactly as Ẽτ but ignoring the part on Γ out :

Êτ (t) := π (kτ -t)/τ # x -y τ • 1 x∈ Ωγ k τ .
The utility of Êτ is that it is more easily comparable to E τ .

We come back to the proof of lemma 3.4: as a matter of fact, we now have:

W 2 2 (ρ k-1 τ , ρ k τ ) = τ 2 Ω ρ k τ |v k τ | 2 + Γout×Ω |x -y| 2 dγ k τ (x, y),
where γ k τ is the optimal transport plan between ρ k τ and ρ k-1 τ

. Therefore, we have

Ω ρ τ |v τ | 2 ≤ τ -2 W 2 2 (ρ k-1 τ , ρ k τ ),
and the a priori estimates (i) and (ii) are still satisfied. The proof of (iii) is unchanged, but let us remark that we have no longer the equality:

Ω ρk τ |ṽ k τ | 2 = Ω ρ k τ |v k τ | 2 ,
and that the geodesic ρτ does not belong to K.

Lemma 3.5 is no longer true for densities that are not absolutely continuous with respect to the Lebesgue measure. Indeed, as we have seen before, the geodesic between two densities of K does not belong to K. We prove instead the following lemma: Lemma 4.6. Let µ, ν ∈ K. Then, for all function f ∈ H 1 with f = 0 on Γ out , we have the following inequality:

Ω f d(µ -ν) ≤ ||∇f || L 2 (Ω) L(µ, ν)
where L(µ, ν) is the length of the shortest path in K joining µ and ν (see [START_REF] Helbing | Social force model for pedestrian dynamics[END_REF]).

Proof. The proof is an adaptation of the one of Lemma 3.5 : let σ t be a minimal length curve in K joining µ and ν, and let w t such that (σ, w) satisfies the continuity equation and ||w t || L 2 (σt) = L(µ, ν). Since f ∈ H 1 with f = 0 on Γ out , then ∇f does not see the part of σw on the boundary), so that we have:

Ω f d(µ -ν) = 1 0 d dt Ω f dσ t = 1 0 Ω ∇f • w t dσ t dt ≤ 1 0 Ω |∇f | 2 dσ t dt 1/2 1 0 Ω |w t | 2 dσ t dt 1/2 ≤ ||∇f || L 2 (Ω) L(µ, ν) since σ t ≤ 1 in Ω.
4.3. Generalization of the proof. At step 1, we need again to prove that the limits of Ẽτ and E τ are the same. As far as the limits of ρτ et ρ τ are concerned, everything works as in Section 3.2: this also proves that the limit curve ρ belongs to K, since this is the case for ρ τ (but not for ρτ ).

It is easy to check that the comparison we did in Step 1 of Section 3.2 may be performed again so as to obtain that the limit of Êτ and E τ are the same. What we need to do now is proving that the limit of Êτ and Ẽτ are the same. We will prove that the mass of Ẽτ -Êτ is negligible, i.e. that

T 0 dt Ω d Ẽτ (t) -Êτ (t) -→ τ →0 0.
To do this, it is sufficient to estimate Thanks to what we underlined before, namely that the mass which is on Γ out does not move any more, we know that |x -y|1 Γout×Ω dγ k τ = |x -y|1 Γout× Ω dγ k τ and the mass of 1 Γout× Ω dγ k τ is exactly the excess mass E k τ . Thanks to the Lemma 4.7 below, we can go on and obtain

T /τ k=0 Ω×Ω |x -y|1 Γout×Ω dγ k τ = T /τ k=0 Ω×Ω |x -y|1 Γout× Ω dγ k τ ≤ T /τ k=0 Γout× Ω |x -y| 2 dγ k τ 1 2 Γout× Ω dγ k τ 1 2 ≤ T /τ k=0 W 2 (ρ k-1 τ , ρ k τ ) 4/3 ≤   E(T /τ ) k=1 W 2 (ρ k-1 τ , ρ k τ ) 2   2 3   E(T /τ ) k=1 1   1 3 ≤ (Cτ ) 2 3
T τ Proof. Suppose for simplicity ν(Γ out ) ≥ µ(Γ out ). Take an optimal transport plan γ from µ to ν. Consider γ ′ = 1 Ω×Γout γ. The mass of γ ′ is a number E ′ , larger than E. Let µ ′ be the projection of γ ′ on the first variable (x): it is a measure with mass E ′ , dominated by 1 Ωµ (and hence it is absolutely continuous with density smaller than 1). We have

1 3 = C τ 1 3 -→ τ →0 0.
W 2 2 (µ, ν) = |x -y| 2 dγ ≥ |x -y| 2 dγ ′ ≥ d(x, Γ out ) 2 dγ ′ = d(x, Γ out ) 2 dµ ′ .
It is sufficient to prove that this last integral is larger than c(E ′ ) 3 . Set d(x) := d(x, Γ out ): we will use the fact that |[d ≤ t]| ≤ ct. We have

d(x) 2 dµ ′ = ∞ 0 µ ′ [d 2 > t])dt = ∞ 0 E ′ -µ ′ ([d ≤ √ t]) dt ≥ ∞ 0 E ′ -|[d ≤ √ t]| + dt ≥ (E ′ /c) 2 0 E ′ -c √ t + dt = c(E ′ ) 3 .
At step 2, we prove with the same method that E is absolutely continuous with respect to the density ρ := lim τ →0 (ρ τ ) Ω = ρ Ω (the decomposition of the measures into a part on Γ out and a part on Ω passes to the limit, because of the density bound on Ω): there exists u such that E = ρ Ω u. Moreover (ρ, E) satisfies the continuity equation, and we can prove again the equality

Ω ∇q • u dx = 0 ∀ q ∈ H 1 ρ .
At step 3, the first estimates are still true, since we integrate over Ω (p τ = 0 on Γ out ). However, we can't use lemma 3.5 anymore. Instead, we apply lemma 4.6 and get the inequality

a Ω p τ (t, x) ρ τ (a, x) -ρ τ (t, x) dx dt ≤ b a ||∇p τ (t, .)|| L 2 (Ω) L(ρ τ (a, .), ρ τ (t, .)) dt.
Using proposition (4.1) and the same notation as in Section 3.2, step 3, the limit τ → 0 reads:

lim τ →0 1 b -a b a Ω p τ (t, x) ρ τ (a, x) -ρ τ (t, x) dx dt ≤ 1 b -a µ([a, b]) b a L(ρ(a), ρ(t)) 2 dt 1 2
.

Since at the limit, the curve ρ(t) belongs to K for every t, we have also:

L(ρ(a), ρ(t)) dt ≤ t a |ρ ′ | W 2 (s) ds ≤ t a |ρ ′ | 2 W 2 (s) ds 1/2 (t -a) 1/2 ≤ C(b -a) 1/2 .
Therefore, we have the following inequality:

lim τ →0 1 b -a b a Ω p τ (t, x) ρ τ (a, x) -ρ τ (t, x) dx dt ≤ 1 b -a µ([a, b]) b a C(b -a) dt 1 2 = C µ([a, b]) -→ b→a 0 for a.e. a,
and we conclude the proof as in the particular case Γ out = ∅.

Illustration: a convergent corridor

We present here an example where both the transport equation and discrete process of the gradient-flow problem can be solved quasi-explicitely. We also give numerical estimations on the convergence of the discrete scheme to the solution of the continuity equation.

We want to model the displacement of a crowd throught a convergent corridor. We thus take for Ω a portion of a cone, expressed in polar coordinates as r ∈ [a, R], θ ∈ [-α, α] (see fig 2), with a possible "exit" Γ out = {a} × [-α, α], and we take for D the distance to the exit (or to the apex, which is equivalent): D(r) = r. We assume that the initial density is uniform: ρ 0 (r) = ρ 0 < 1. We will consider in this section two examples: the case a = 0 with no exit (so that people will in the end concentrate on the neighborhood of the vertex) and the case a > 0 with exit. Thanks to the symmetry of this problem, the minimizing movement scheme can be written as a minimization problem on the transport function:

     ρ 0 τ = ρ 0 ρ k τ = s k# ρ k-1 τ , s k ∈ argmin t # ρ k-1 τ ∈K R a D(t(r)) + 1 2τ |r -t(r)| 2 ρ k-1 τ (r) r dr .
Let us first consider the case where a = 0 (and Γ out = ∅), where this problem can be explicitely solved: ρ k τ is given by ( 25)

ρ k τ (r) =        1 on [a, b k τ [ ρ 0 1 + kτ r on [b k τ , R -kτ [ 0 on [R -kτ, R],
where b k τ satisfies the recurrence relation

(26) b 0 τ = 0 (b k τ ) 2 -ρ 0 (b k τ + kτ ) 2 = (b k-1 τ ) 2 -ρ 0 (b k-1 τ + (k -1)τ ) 2 ,
and the solution of the continuity equation can be easily calculated:

ρ(t, r) =        1 if r ∈ [a, b(t)[ ρ 0 1 + t r if r ∈ [b(t), R -t] 0 if r ∈ [R -t, R],
where

   b(0) = 0 b ′ (t) = ρ 0 b(t) + t b(t) -ρ 0 (b(t) + t) .
In figure 3, we represent the discrete densities ρ k τ at different times for the numerical values τ = 0.01, a = 0, R = 10, and ρ 0 = 0.4. Let us remark that the recurrence relation that satisfies b k τ is a numerical scheme for the ODE on b(t). Indeed, it writes

b k τ -b k-1 τ τ = F b k τ + b k-1 τ 2 , 2k -1 2 τ , where F (r, t) = ρ 0 b(t) + t b(t) -ρ 0 (b(t) + t) .
Using the conservation of the total amount of people, it is easy to prove that this scheme is exact at every time step kτ , and so is the discrete solution ρ k τ .

Figure 3. Evolution of the solution of the minimizing movement scheme in the case where Γ out = ∅.

We now consider the case a > 0 with exit. The densities have then the same form, except that the evolution of the interface in the continuous case is now given by b

′ (t) = Φ(t, b(t)) b(t 0 ) = a, with : Φ(t, r) =                ρ 0 1 + t r - r -a r ln(r/a) 1 -ρ 0 1 + t r if r ≤ R -t - r -a r ln(r/a) if r > R -t,
whereas in the discrete case, b k τ satisfies now the recurrence relation

(b k τ ) 2 -a 2 -ρ 0 (b k τ + kτ ) 2 = (b k-1 τ ) 2 -r 2 e -ρ 0 (b k-1 τ + (k -1)τ ) 2 if b k-1 τ < R -(k -1)τ , and (b k τ ) 2 -a 2 = (b k-1 τ ) 2 -r 2 e if b k-1 τ ≥ R -(k -1)τ ,
where r e is the (unknown) radius such that people who were between a and r e at step k -1 will exit the corridor (i.e. arrive at a) at step k. This radius is given as the minimum of an integral expression that we will not develop here. In figure 4, we represent the discrete densities for a = 1 and for the same numerical values as before.

It is also interesting to estimate numerically the error between the solution of the continuity equation and the solution of the minimizing movement scheme. In this purpose, we consider the case where the density is initially saturated (ρ 0 = 1), and we compute b and b τ with high accuracy (high order method for the ODE on b, and precise quadrature and optimization methods to estimate r e and b τ ), so that space discretization does not affect error estimation. We obtain numerically that b τ converges to b when τ tends to 0 with an error of order 1 (interpolation polynom of τ → |b(T )b τ (T )| gives order 0.989 for T = 1), which gives also an order 1 error for the Wasserstein distance between ρ and ρ τ .

Modelling issues, extensions

We would like to conclude this paper by some remarks on the limitations of the overall approach in terms of modelling, and on possible extensions to other domains.

With its very macroscopic and eulerian nature, the model is designed to handle large populations as a whole, and does not allow to localize and follow in their path individual pedestrians. As a direct consequence, the spontaneous (or desired) velocity of an individual may depend on its location only, so that differentiated individual strategies (e.g. avoidance of crowded zone, skirting of obstacles) cannot be included straightforwardly. Besides, the macroscopic expression of the non-overlapping constraint is less restrictive than its microcopic counterpart. In the microscopic setting (people are identified with rigid discs), for highly packed situations, the non overlapping constraints induce some kind of non-negative divergence constraint in the directions of contacts. Consider the example of a cartesian distribution of monodisperse discs (see Fig. 5, left), with a uniform spontaneous velocity directed toward a wall. The actual velocity will be 0, whereas in the macroscopic version it is not (see Fig. 5, center). Note that, if the microscopic distribution is modified, while mean density is preserved, the situation is no longer static (see Fig. 5, right). This example illustrates the deep difference between the microscopic approach (for which local structure and orientation of contacts lines play an essential role), and the macroscopic one, which only considers local density.

Figure 5. Differences between micro and macro approaches

As a consequence the model is unlikely to reproduce the formation of blocked archs near an exit, which are observed in practice in highly critical emergency situations, and which can be recovered by the microscopic model, even without friction. Note also that, together with the structural anisotropy we just mentionned, individual anisotropy of pedestrians is not handled (whereas it may be in microscopic models by replacing discs by ellipses, for example).

Yet, despite these limitations in the modelling of crowd motion, we believe that this new type of evolution problem may be fruitful to model phenomena, in particular in the domain of cell dynamics. In this context, the spontaneous velocity would be replaced by some kind of chemotaxis velocity. As an illustration, let us express what could be called a unilateral version of Keller-Segel equation, in the spirit of what has been presented here: ∂ρ ∂t + ∇ • (ρu) = 0 u = P Cρ U , U = ∇c , -∆c = ρ, where c denotes the concentration of some attracting agent, generated by the cells themselves. Notice that the congestion constraint prevents concentration of mass. As a matter of fact, the characteristic function of a single ball is a static solution to this system, in the whole space R 3 , and it can be expected that any solution converges to such a configuration. Note also that bacterial growth could be handled by adding an appropriate term in the right-hand side of the transport equation.

We also believe that it can be fruitful in the modelling of granular media. Bouchut et al. [START_REF] Bouchut | A hierarchy of models for two-phase flows[END_REF] propose a model of pressureless gas for which the density is subject to remain less than 1. This model is essentially mono-dimensionnal (the construction of explicit solutions proposed in [START_REF] Berthelin | Existence and weak stability for a pressureless model with unilateral constraint[END_REF] uses extensively the one-dimensionality). As our model can be seen as a first order (in time) version of this second order pressureless gas model, we believe that the handling of the congestion constraint we propose here, which applies in any dimension, might be used in the future for a macroscopic description of granular flows in higher dimension. The corresponding model, which is a second order version of the model we considered here, could be written as follows where C ρ is the cone of feasible velocities which we introduced, and u -(resp. u + ) is the velocity before (resp. after) the collision (both are equal in case there is no collision). Those extensions are not straightforward. In particular, the "spontaneous" velocity (i.e. chemotactic velocity for cell models, velocity before collision for granular flow models) may not be a gradient, and may furthermore vary in time. It rules out some arguments we used here. The discrete gradient flow construction, which is based on a simultaneous handling of advection and congestion constraint, could be replaced by a prediction-correction strategy: a first step of free advection followed by a projection (for the Wasserstein distance) onto the set of feasible densities. This approach would reproduce in the Wasserstein setting the techniques which proved successful in the context of sweeping processes in Hilbert spaces, which we mentioned in the introduction (see Refs. [START_REF] Moreau | Evolution problem associated with a moving convex set in a Hilbert space[END_REF], [START_REF] Edmond | Relaxation of an optimal control problem involving a perturbed sweeping process[END_REF], [START_REF] Edmond | BV solutions of nonconvex sweeping process differential inclusion with perturbation[END_REF]).

  Γout×Ω dγ k τ .

Lemma 4 . 7 . 3 2

 473 Suppose µ, ν ∈ K and set E := |µ(Γ out )-ν(Γ out )|. Then we have E ≤ CW 2/(µ, ν), where the constant C depends on the geometry of Ω and Γ out .

  b

Figure 2 .

 2 Figure 2. Modeling of the displacement of a crowd throught a convergent corridor.

Figure 4 .

 4 Figure 4. Evolution of the solution of the minimizing movement scheme in the case with exit.

  (ρu ⊗ u) + ∇p = 0, 0 ≤ ρ ≤ 1 , p(1ρ) = 0 , u + = P Cρ u -,

Acknowledgment

We would like to thank Y. Brenier, A. Figalli and N. Gigli for fruitful discussions.