Optimality conditions for a controlled sweeping process with applications to the crowd motion model

The paper concerns the study and applications of a new class of optimal control problems governed by a perturbed sweeping process of the hysteresis type with control functions acting in both play-and-stop operator and additive perturbations. Such control problems can be reduced to optimization of discontinuous and unbounded differential inclusions with pointwise state constraints, which are immensely challenging in control theory and prevent employing conventional variation techniques to derive necessary optimality conditions. We develop the method of discrete approximations married with appropriate generalized differential tools of modern variational analysis to overcome principal difficulties in passing to the limit from optimality conditions for finite-difference systems. This approach leads us to nondegenerate necessary conditions for local minimizers of the controlled sweeping process expressed entirely via the problem data. Besides illustrative examples, we apply the obtained results to an optimal control problem associated with of the crowd motion model of traffic flow in a corridor, which is formulated in this paper. The derived optimality conditions allow us to develop an effective procedure to solve this problem in a general setting and completely calculate optimal solutions in particular situations.


Introduction and Initial Discussions
This paper can be considered as a continuation of our work [5], where we formulated a new class of optimal control problems for a perturbed controlled sweeping process, justified the existence of optimal solutions therein, established the strong W 1,2 -convergence of well-posed discrete approximations, and derive necessary optimality conditions for discrete optimal solutions. After summarizing the main constructions and results of [5] in the preliminary Section 2, this paper is self-contained and may be read independently of [5] with no additional knowledge required.
The major goal of this paper is to derive nondegenerate necessary optimality conditions for the so-called intermediate (including strong) local minimizers of the sweeping control problems under consideration by passing to the limit from the necessary optimality conditions for their discrete approximations obtained in [5] and presented in Section 2. The class of parametric optimal control problems (P τ ) with τ ≥ 0 are formulated in [5] in the following form: minimize the cost functional J[x, u, a] := ϕ x(T ) + T 0 ℓ t, x(t), u(t), a(t),ẋ(t),u(t),ȧ(t) dt (1.1) where the initial triple z(0) = (x 0 , u(0), a(0)) satisfies the condition x 0 − u(0) ∈ C via the convex polyhedron C defined in (1.3). Then the sweeping optimal control problem (P τ ) amounts to minimizing the cost functional J[z] = J[x, u, a] in (1.1) over W 1,2 -solutions to the differential inclusion (1.7) subject to the pointwise state constraints of the equality and inequality types in (1.5) and (1.6), where the latter ones are implicit from (1.7). Although problem (P τ ) is now written in the usual form of the theory of differential inclusions, it is far removed from satisfying the assumptions under which necessary optimality conditions have been developed in this theory. First of all, the right-hand side of (1.7) is intrinsically unbounded, discontinuous, and highly non-Lipschitzian in any generalized sense treated by the developed approaches of optimal control theory for differential inclusions. Furthermore, besides the inequality state constraints in (1.6), problem (P τ ) contains the unconventional equality ones as in (1.5). Such constraints have just recently started to be considered in control theory for smooth ordinary differential equations [3], where necessary optimality conditions are obtained under strong regularity assumptions including full rank of the smooth constraint Jacobians, which is not the case in (1.5).
In this paper we develop the method of discrete approximations to derive necessary optimality conditions for control problems governed by differential inclusions following the scheme of [18,19], where the discrete approximation approach is realized for Lipschitzian differential inclusions without state constraints, and then its recent significant modification given in [8] in the case of the sweeping process with general polyhedral controlled sets but without control actions in additive perturbations. Note that our developments in this paper result in new optimality conditions that have important advantages in comparison with those in [8] even in the case of no controls in perturbations; see Remark 3.4(iv).
The rest of the paper is organized as follows. Section 2 summarizes some preliminary material from our preceding paper [5] related to the strong W 1,2 -convergence of discrete approximations and necessary conditions for discrete optimal solutions, which are the basic for developing here the limiting procedure to derive necessary optimality conditions in the original sweeping control problem(s) (P τ ) with the parameter τ specified above. In the main Section 3 we establish in this way, by using appropriate tools of generalized differentiation in variational analysis, necessary optimality conditions for each problem (P τ ) with 0 ≤ τ ≤ τ entirely in terms of its initial data. Furthermore, we arrive at enhanced nontriviality conditions that surely exclude the appearance of the degeneracy phenomenon; cf. [2,25]. In Section 4 we present several numerical examples, which illustrate various specific features of the obtained optimality conditions for (P τ ) and their usage in calculating optimal solutions. Section 5 addresses a version of the crowd motion model in a corridor that is interesting theoretically and of practical importance. We discuss this model and formulate an optimal control problem for it, which can be written in the form of the sweeping control problem studied in this paper with control functions appearing in additive perturbations. Applying necessary optimality conditions established above allows us to develop an effective procedure for calculating optimal solutions in a general setting with finitely many participants and then fully implement it in special situations of their own interest.
Throughout the paper we use standard notation; cf. [19,22]. Recall that IN := {1, 2, . . .} and that B(x, ε) stands for the closed ball of the space in question centered at x with radius ε > 0.

Discrete Approximations in Sweeping Optimal Control
The goal of this section is to summarize those results from our preceding paper [5], which make it possible to derive necessary optimality conditions for (P τ ) by passing to the limit from discrete approximations. The main assumptions made in [5] that are standing in this paper are: (H1) The mapping f : R n ×R d → R n in (1.2) is continuous on R n ×R d and locally Lipschitz continuous in the first argument, i.e., for every ε > 0 there is a constant K > 0 such that where the constant M > 0 is taken from (2.1). Furthermore, it is shown in [5,Theorem 4.1] that if in addition to (H1) and (H2) we assume that the running cost ℓ in (1.1) is convex with respect to the velocity variables (ẋ,u,ȧ) and that {u k (·)} is bounded in L 2 ([0, T ]; R n ) while {a k (·)} is bounded in W 1,2 ([0, T ]; R d ) along a minimizing sequence of z k (·) = (x k (·), u k (·), a k (·)) in (P τ ), then each problem (P τ ) as τ ∈ [0, τ ] admits an optimal solution in the class of W 1,2 [0, T ] functions. It has been realized in the conventional theory of optimal control for Lipschitzian differential inclusions (following the Bogolyubov-Young-Warga relaxation procedure in the calculus of variations and optimal control for ODEs) that the original variational problem can be replaced by its convexification with respect to velocities in such a way that the original and relaxed/convexified problems have the same values of the cost functionals and, moreover, the existing optimal solution to the relaxed problem can be approximated (in a reasonable sense) by a minimizing sequence of feasible solutions to the original one. Unfortunately, the strongest result known in this direction for non-Lipschitzian differential inclusions [10] is not applicable to our setting in (1.7) when controls enter the sweeping set. A relaxation stability result for the perturbed sweeping process with controls acting only in perturbation is given in [11].
Mentioning this, denote by ℓ F (t, x, u, a,ẋ,u,ȧ) the convexification of the integrand in (1.1) on the set F (x, u, a) from (1.7) with respect to (ẋ,u,ȧ), i.e., the largest convex and l.s.c. function majorized by ℓ(t, x, u, a, ·, ·, ·) on this set for all t, x, u, a with putting ℓ := ∞ at points out of the set F (x, u, a), and define the variational relaxation of (P τ ) as follows: over all z(·) = (x(·), u(·), a(·)) ∈ W 1,2 [0, T ] satisfying (1.5). Similarly to [18], we say thatz(·) is a relaxed intermediate local minimizer (r.i.l.m) for (P τ ) if it is feasible to this problem with J[z] = J[z] and if there are numbers α ≥ 0 and ǫ > 0 such that J[z] ≤ J[z] for any feasible solution z(·) to (P τ ) with 3) The word "relaxed" can be skipped here if the the running cost ℓ is convex in (ẋ,u,ȧ), or-more generallyunder the local relaxation stability of (P τ ). The intermediate local minimum defined is obviously situated between the classical notions of weak and strong minima. Furthermore, we do not restrict the generality by putting α = 1 in (2.3) while deriving necessary optimality conditions.
The main goal of this paper is to establish necessary optimality conditions for the given r.i.l.m. z(·) = (x(·),ū(·),ā(·)) of problem (P τ ). To accomplish it, we use the method of discrete approximations. Proceeding as in [5], for all k ∈ IN consider the discrete mesh on [0, T ], denote by j τ (k) := [kτ /T ] the smallest index j with t k j ≥ τ and by j τ (k) := [k(T − τ )/T ] − 1 the largest j with t k j ≤ T − τ . Then we construct the discrete-time optimization problems (P τ k ) as follows. Given ε > 0 from (2.3) together with the numbers µ > 0 and ε k ↓ 0 as k → ∞ explicitly defined in [5, Theorem 3.1] viaz(·) and the data of (P τ ), each discrete problem (P τ k ) consists of minimizing the cost Denote further the collection of active constraint indices of polyhedron (1.3) atx ∈ C by and recall the explicit representation of the set F (z) in (1.7) that follows from [12, Proposition 3.1]: We also need to recall the featured subsets of the active constraint indices (2.6) defined by Now we are ready to summarize the main results of [5] (cf. Theorems 4.1, 5.2, and 7.2) in one theorem used in what follows. Note that although (P τ k ) is intrinsically nonsmooth (primarily because of the discrete dynamics (2.5), even in the case of smooth cost functions ϕ and ℓ that is not assumed here), the necessary conditions for discrete optimal solutions presented below do not contain any generalized normals and derivatives associated with F . This is due to the explicit calculation of the employed construction in terms of the initial sweeping data, which is given in [5,Theorem 6.1] on the basic of [12] and calculus rules. The only construction of generalized differentiation needed in the following theorem and also employed below is the subdifferential of a function ψ : R n → R := (−∞, ∞] finite ats that is defined by where the symbol s k ψ →s indicates that s k →s and ψ(s k ) → ψ(s). It reduces to the classical derivative for smooth functions to the subdifferential of convex analysis if ψ is convex. For the general class of l.s.c. functions, the subdifferential (2.9) enjoys comprehensive calculus rules based of variational/extremal principles of variational analysis; see [19,22] for more details and references. The local smoothness of the perturbation function f is imposed below for simplicity.

Necessary Conditions for Sweeping Optimal Solutions
In this section we derive necessary optimality conditions for relaxed intermediate local minimizers of the sweeping control problem (P τ ) under consideration in the general case of 0 ≤ τ ≤ τ = min{r, T } with some specifications and improvements in the case where τ is not an endpoint. For convenience in the formulation of some conditions in the next theorem, the symbol N (x; Ω) is used therein for the normal cone to the convex set in question at x ∈ Ω instead of its explicit description given in (1.4). For the same reason, the symbol D * G is used to indicate the coderivative of the sweeping set-valued mapping appeared in the theorem despite its explicit calculation in terms of the initial sweeping data presented below.
To specify this issue, recall that the coderivative of an arbitrary set-valued mapping G : R n ⇒ R m at the point of the graph (x,ȳ) ∈ gph G := {(x, y) ∈ R n × R m | y ∈ G(x)} can be defined by via the subdifferential (2.9) of the indicator function δ(·; gph G) of the graphical set gph G that equals to 0 on gph G and to ∞ otherwise. Recall also that dom G := {x ∈ R n | G(x) = ∅}. If G is single-valued and smooth aroundx, this construction reduces to {∇G(x) * u} via the adjoint/transpose Jacobian matrix ∇G(x) of G atx, while in general it is set-valued, nonconvex, and enjoys full calculus; see [19]. The set-valued mapping G : R n ⇒ R n of our main interest here, which appears in Theorem 3.2 and other results below, is the normal cone mapping G(x) := N (x; C) generated by the underlying convex polyhedron C from (1.3). The coderivative of this mapping is known as the second-order subdifferential of δ(·; C) in the sense of [19] while being precisely calculated in terms of the initial data of C in the following proposition, which is taken from [12,Theorem 4.6].
(b) If in addition 0 < τ < r, the we have the following enhanced nontriviality conditions while imposing the corresponding endpoint interiority assumptions: Proof. The derivation of the necessary optimality conditions for the given r.i.l.m.z(·) in problem (P τ ) is based on passing the limit as k → ∞ from the optimality conditions for the strongly convergent sequencē z k (·) →z(·) of optimal solutions to the discrete problems (P τ k ) obtained in Theorem 2.1. The proof is rather involved, and for the reader's convenience we split it into several steps.
Step 1: Subdifferential inclusion. Let us first justify (3.4). For each k ∈ IN define the functions w k , v k : [0, T ] → R 2n+d as piecewise constant extensions to [0, T ] of the vectors w k j and v k j that are defined on the mesh ∆ k and satisfy the subdifferential inclusion (2.13) therein. The assumptions made and the structure of ℓ in (3.2), (3.3) ensure that the subgradient sets ∂ℓ(t, ·) are uniformly bounded nearz(·) by the L 2 -Lipschitz constant of ℓ, and thus the sequence . This allows us to select a subsequence (no relabeling hereafter) converging Furthermore, the local Lipschitz continuity of ℓ(0, ·, ·) yields by (2.13) for j = 0 that the sequence {(w k 0 , v k 0 )} is bounded and hence converges as k → ∞ to a pair (w 0 , v 0 ) =: (w(0), v(0)) along a subsequence. It follows from the aforementioned Mazur weak closure theorem that there are convex combinations of (w k (·), v k (·)), which converge to (w(·), v(·)) in the L 2 -norm and hence a.e. on [0, T ] for some subsequence. Then passing to the limit in (2.13) along the latter subsequence and taking into account the assumed a.e. continuity of the running cost ℓ in t and robustness of its subdifferential in (z,ż) with respect to all the variables, we arrive at the convexified inclusion (3.4).
Step 2: Passing to the limit in the primal equation. Our next aim is to arrive at the primal equation (3.5) and the first implication in (3.9) with the corresponding functions η i (·) by passing to the limit in (2.15) and (2.19). We start with considering the functions on [0, T ] with θ k j taken from (2.11). It follows from the convergencez k (·) →z(·) in Theorem 2.1 that Note that the first condition in (3.13) implies the second one for τ = 0, while in general they are independent.
and similarly for θ uk (·) and θ ak (·). This yields the a.e. convergence of these functions to zero on [0, T ].
Moreover, the construction above shows that we can always have θ k 0 → 0 =: θ(0). Further, it is easy to see that the assumed linear independence of {x * i | i ∈ I(x(·) −ū(·))} ensures the one for {x * i | i ∈ I(x k j −ū k j )} by definition (2.6) and the strong convergence of Theorem 2.1. This allows us to take the vectors η k j ∈ R m + from Theorem 2.1 and construct the piecewise constant functions η k (·) via the corresponding components of η k (t). On the other hand, the feasibility ofz(·) to (P τ ) yields (3.20) Passing to the limit in (3.19) with replacing t k j by ν(t) and taking into account the strong convergencē z k (·) →z(·) together with the continuity of f on the left-hand side of (3.19), we get Then the assumed linear independence of the generating vectors x * i with i ∈ I(x(t) −ū(t)) ensures the a.e. convergence η k (t) → η(t) on [0, T ] as k → ∞. Furthermore, we can always get that η k k converge to the well-defined vector (η 1 (T ), . . . , η m (T )). Proceeding similarly to the proof of [8, Theorem 6.1], we can justify the extra regularity η(·) ∈ L 2 ([0, T ]; R m + ), which however is not used in what follows.
Step 3: Extensions of approximating dual elements. Here we extend discrete dual elements from The- Using the function ν k (t) given in (3.20), we deduce respectively from (2.16), (2.17), and (2.18) thaṫ for t ∈ (t k j , t k j+1 ) and j = 0, . . . , k − 1. Next we define p k (t) = (p xk (t), p uk (t), p ak (t)) on [0, T ] by setting for all t ∈ [0, T ]. This gives us p k (T ) = q k (T ) and the differential relatioṅ It follows from (3.25), (3.21)-(3.23), and the definition of I 0 (·) and I > (·) in (2.8) thaṫ with dropping further the symbol "mes" for simplicity. By taking into account the preservation of all the relationships in Theorem 2.1 by normalization and the above constructions of the extended functions on [0, T ], we can rewrite the nontriviality condition (2.14) as Step 4: Passing to the limit in dual dynamic relationships. Using (3.30) allows us to suppose without loss of generality that λ k → λ as k → ∞ for some λ ≥ 0. Let us next verify that the sequence {(p xk 0 , . . . , p xk k )} k∈I N is bounded in R (k+1)n . Indeed, we have by (2.16) that for j = 0, . . . , k − 1. It follows from (3.17) and (3.30) that the quantities ∇ x f (x k j ,ā k j ), λ k θ xk j , and h k m i=1 γ k ji x * i are uniformly bounded for j = 0, . . . , k − 1 while χ k j → 0 as k → ∞ due to definition (2.12) and the first condition in (2.10). Furthermore, the imposed structure (3.2) of ℓ and the assumptions on the Lipschitz constant L(t) of the running cost in (1.1), which are equivalent to the Riemann integrability of L(·) on [0, T ], yield by (3.4) the relationships and ensure similarly that h k v xk j < L. Thus we get from (3.31) that the boundedness of {p xk j } k∈I N follows from the boundedness of {p xk j+1 } k∈I N . Since the sequence of p k k = p k (T ) is bounded by (3.30), we therefore justify the claim on the boundedness of {(p xk 0 , . . . , p xk k )} k∈I N . To deal with the functions q xk (·), we derive from their construction and the equations in (2.16) that (3.33) It comes from (3.32) that the first term on the right-hand side of (3.33) is bounded by λ k L. We also have which ensures the boundedness of the second term on the right-hand side of (3.33) by the boundedness of {p xk j } k∈I N . Similarly we get the boundedness of the third term on the right-hand side of (3.33), while this property of the forth term therein follows from (3.30). This shows by estimate (3.33) and the construction of q xk (t) on [0, T ] that the functions q xk (·) are of uniformly bounded variation on this interval. In the same way we verify that q uk (·) and q ak (·) are of uniformly bounded variation on [0, T ] and arrive therefore at this conclusion for the whole triple q k (·). It clearly implies that which justifies the uniform boundedness of q k (·) on [0, T ] is since both sequences {q k (0)} and {q k (T )} are bounded by (3.30). Then the classical Helly selection theorem allows us to find a function of bounded variation q(·) such that q k (t) → q(t) as k → ∞ pointwise on [0, T ]. Employing further (3.30) and the measure construction in (3.29) tell us that the measure sequences {γ k } and {ξ k } are bounded in C * ([0, T ]; R n ) and C * ([0, T ]; R) respectively. It follows from the weak * sequential compactness of the unit balls in these spaces that there are measures γ ∈ C * ([0, T ]; R n ) and ξ ∈ C * ([0, T ]; R) such that the pair (γ k , ξ k ) weak * converges to (γ, ξ) along some subsequence.
Remembering the construction of q k (·) in Step 3 allows us to rewrite (2.17) and (2.18) as, respectively, for t ∈ (t k j , t k j+1 ) and j = 0, . . . , k − 1. Passing to the limit in (3.34) with taking into account (3.4) and the assumptions on ℓ 2 , ℓ 3 in (3.2), we arrive at both equations in (3.7). Observe further that To obtain (3.8) by passing to the limit in (3.25), consider next the estimate and observe that the first summand in the rightmost part of (3.36) disappears as k → ∞ due to the uniform convergenceū k (·) →ū(·) on [0, T ] and the uniform boundedness of T 0 |ξ k (t)|dt by (3.30). The second summand therein also converges to zero for all t ∈ [0, T ] except some countable subset by the and thus arrive at (3.8) by passing to the limit in (3.25). Finally at this step, observe that the implications is (3.9) follow directly by passing to the limit in their discrete counterparts (2.19) and (2.24).
Step 5: Transversality conditions. Let us first verify the right endpoint one (3.10). For all k ∈ IN we have by the second condition in (2.23) and the normal cone representation from (2.7) that (3.38) Passing now to the limit as k → ∞ in (3.37), (3.38), inclusion (2.22) for ξ k k , and the second condition in (2.23) with taking into account the robustness of the subdifferential in (3.38), we arrive at the relationships . This clearly verifies the transversality conditions at the right endpoint in (3.10) supplemented by (3.12).
To justify the left endpoint transversality (3.11), we deduce from (2.17) and (2.18) for j = 0 as well as the conditions on γ k 0 in Theorem 2.1 and the coderivative definition (3.1) that . Now we can pass to the limit as k → ∞ in these relationships by taking into account (2.22) for j = 0, the first condition in (2.10), the construction of q k (t k j ) = p k j , the convergence statements for w k 0 , v k 0 , θ k 0 established above as well as robustness of the normal cone and coderivative. This readily gives us (3.11).
Step 6: Measure nonatomicity conditions. To verify condition (a) therein without any restriction on . . , m and by continuity of (x(·),ū(·)) find a neighborhood V t of t such that x * i ,x(s) −ū(s) < 0 whenever s ∈ V t and i = 1, . . . , m. This shows by the established convergence of the discrete optimal solutions that x . . , m for all k ∈ IN sufficiently large. Then it follows from (2.19) that γ k (t) = 0 on any Borel subset V of V t , and therefore γ k (V ) = V d γ k = V γ k (t) dt = 0 by the construction of the measure γ k in (3.29). Passing now to limit as k → ∞ and taking into account the measure convergence obtained in Step 3, we arrive at γ (V ) = 0 and thus justify the first measure nonatomicity condition. The proof of the nonatomicity condition (b) for the measure ξ is similar provided the choice of τ ∈ (0, τ ).
Step 7: General nontriviality condition. Let us justify the nontriviality condition (3.14) for any τ ∈ [0, τ ] under the assumptions made therein. Suppose on the contrary to (3.14) that λ = 0, q u (0) = 0, and p(T ) = 0, which yields λ k → 0, q uk (0) → 0, and p k (T ) → 0 as k → ∞. It follows from (3.8) that q a (·) = p a (·) is absolutely continuous on [0, T ], which allows us to deduce from (3.7) and the established convergence of adjoint trajectories that p ak 0 = q ak (0) → 0 as k → ∞. Furthermore, we have by the construction of ξ k (·) on [0, T ] in Step 3 the equalities Taking into account that Using now the first condition in (3.13) imposed on the initial data of (P τ ) and that ū k j = r for all j = j τ (k), . . . , k while r − τ − ε k ≤ ū k j ≤ r + τ + ε k for j = 0, . . . , j τ (k) − 1 and small ε k < τ , we get which immediately implies the validity of the estimate whenever k is sufficiently large. On the other hand, (3.40) follows directly from the alternative assumption in (3.13) imposed on the optimal solution to (P τ ). Employing (3.40) and the equalities in (3.36) gives us The obvious boundedness of allows us to assume without loss of generality that ≤ 1 for j = 0, . . . , k − 1, and then we get from (3.41) that The second sum in (3.42) disappears as k → ∞ due to the assumptions on ℓ 1 ; see (3.32) in Step 4. To proceed with the first sum in (3.42), we have the estimates where µ is defined in Theorem 2.1. The running cost structure (3.2) and differentiability of ℓ 2 inu yield Then the third estimate in (3.3) ensures that Deduce further from the definition of θ uk in (2.11) the representation due to (2.10) and the second estimate in (3.3). This shows therefore that as k → ∞ by the relationships in (3.32) and (3.44).
To get a contradiction with our assumption on the violation of (3.14), it remains by (3.30) to verify that ξ k k → 0 as k → ∞. To see this, observe that the convergence p k (T ) → 0, λ k → 0 implies by the first condition in (2.23) that p xk k → 0, p uk k → 0, and m i=1 η k ki x * i → 0 as k → ∞. Then it follows from the second condition in (2.23) that ξ k kū k k → 0, which yields ξ k k → 0 sinceū k k = 0 for large k ∈ N due tō u k k →ū(T ) and the assumptions on eitherū(T ) = 0 or τ < r that exclude vanishingū k k by the constraints in (1.5). Thus we arrive at a contradiction with (3.30) and so justify the nontriviality condition (3.14).
Step 8: Enhanced nontriviality conditions. Our final step is to justify the stronger/enhanced nontriviality conditions in (3.15) and (3.16) under the interiority assumptions imposed therein provided that 0 < τ < r.
Let us now specify the general necessary optimality conditions of Theorem 3.2 to the important novel case of our consideration in this paper, where we have controls only in perturbations while u-controls in (P τ ) are fixed. Such a setting is used in Section 5 for applications to the controlled crowd motion model. In this case each problem (P ) reduces to the following form ( P ): minimize J[x, a] := ϕ(x(T )) + T 0 ℓ t, x(t), a(t),ẋ(t),ȧ(t) dt subject to the sweeping differential inclusion with the convex polyhedron C in (1.3) and the implicit state constraints which follow from (3.45). As above, we study problem ( P ) in the class of (x(·), a(·)) ∈ W 1,2 ([0, T ]; R n+d ). Observe that we do not need to consider in this case the τ -parametric version of ( P ). The next result follows from the specification of Theorem 3.2 and its proof in the case of ( P ) by taking into account the structures of the sweeping set C(t) and the running cost ℓ therein.
(i) As has been well recognized in standard optimal control theory for differential equations and Lipschitzian differential inclusions with state constraints, necessary optimality conditions for such problems may exhibit the degeneration phenomenon when they hold for every feasible solution with some nontrivial collection of dual variables. In particular, this could happen if the initial vector at t = 0 belongs to the boundary of state constraints; see [2,25] for more discussions and references. It may also be the case for our problem (P τ ) under the general nontriviality condition (3.14) when, e.g., τ = 0 and the vector x 0 −ū(0) lays on the boundary of the polyhedral set C. However, the degeneration phenomenon is surely excluded in (P τ ) by the enhanced nontriviality in (3.15), (3.16) .11) and (3.49) may look surprising at the first glance since the initial vector x 0 of the feasible sweeping trajectories x(·) is fixed. However, it is not the case for control functions u(·) and a(·), which are incorporated into the differential inclusion (1.7) and the cost functional (1.1) with their initial points being reflected in (3.11). The usage of the left transversality condition (3.11) allows us to exclude in Example 4.1 the potential degeneration term q u (0) from the general nontriviality condition (3.14) and then to calculate an optimal solution to the sweeping control problem under consideration. Observe that we get the two types of the transversality conditions for p(T ) at the right endpoint in (3.10) and (3.49): one expressed directly via η i (T ) and other given via the normal cone N (x(T )−ū(T ); C) due to (3.12). While the second type of transversality is more expected, the first type is essentially more precise. Indeed, the normal cone transversality may potentially lead us to degeneration whenx(T )−ū(T ) lays at the boundary of C. On the other hand, degeneration is completely excluded in this case if we have η i (T ) = 0 as i ∈ I(x(T ) −ū(T )) for the endpoint vectors η i (T ), which may occur independently of their a priori location at N (x(T ) −ū(T ); C) due to the fact that the vectors η i (T ) are uniquely determined by representation (3.5) of the term −ẋ(T )) − f (x(t),ā(t)) via the linearly independent generating vectors x * i . This is explicitly illustrated by Example 4.1. (iii) It has been largely understood in optimal control of differential equations and Lipschitzian differential inclusions that necessary optimality conditions for problems with inequality state constraints are described via nonnegative Borel measures. In the case of (P τ ) we have both inequality and equality state constraints on z(·) given by (1.5) and (1.6) that are reflected in Theorem 3.2 by the measure ξ ∈ C * ([0, T ]; R) and γ ∈ C * ([0, T ]; R m ), respectively. In problem ( P ) we do not have state constraints for the u-components, and so only the measure γ appears in the optimality conditions of Corollary 3.3. But even in the latter case we do not ensure the nonnegativity of γ (see Examples 5.1 and 5.2 for the controlled crowd motion model), which once more reveals a significant difference between the sweeping control problems governed in fact by evolution/differential variational inequalities from the conventional state-constrained control problem considered in the literature. On the other hand, all the examples presented in Sections 4 and 5 show that our results agree with those known for conventional models while indicating that the corresponding measures become nonzero at the points where optimal trajectories hit the boundaries of state constraints and stay such on these boundaries; see Examples 5.1 and 5.2 to illustrate the latter phenomenon. We can see that problem (P τ ) is different from (P τ ) by the absence of controlled perturbations (which is of course the underlying feature of our problem (P τ ) and its applications to the crowd motion model), the choice of τ , and a bit different class of feasible solutions. On the other hand, while ignoring these differences, problem (P τ ) can be reduced to (P τ ) with no u-controls (they are replaced by the generating vectors x * i of the polyhedron C) and with b-controls given in the form for all t ∈ [0, T ] and i = 1, . . . , m via the u-controls in (P τ ). However, problem (P τ ) obtained in this way from (P τ ) in the absence of perturbations is not considered in [8], since we do have the pointwise constraints on u i (t) in (1.5), which are in fact a part of the state constraints on z(t) in the setting of (1.7) under investigation, while there are no any constraints on b i (t) in [8]. Necessary optimality conditions for problems (P τ ) of this type (where τ does not play any role since the u-controls are fixed) are specified in [8,Theorem 6.3]. It is not hard to check that the results obtained therein are included in those established in Theorem 3.2 for (P τ ) in the case where both problems are the same. However, even in this (not so broad) case we obtain additional information in Theorem 3.2 and Corollary 3.3 in comparison with [8]. Let us list the main new ingredients of our results for (P τ ) in the common setting with [8, Theorem 6.3] and also in a similar (while different) setting of [8, Theorem 6.1] for (P τ ) with u-control components, which can be incorporated therein by using the more precise discrete approximation technique developed in this paper: • The new transversality conditions at the left endpoint; see remark (ii) above.
• Both types of transversality at the right endpoint discussed in remark (ii) are different and more convenient for applications in comparison with (6.10)-(6.12) in [8]. Observe that the latter ones are given implicitly as equations for p x , p u , p b at the local optimal solutionz(T ).
• Our results are applied to the general case of the parameter τ and its interrelation with another parameter r in the u-control bounds in contrast to only the interior case of τ ∈ (0, T ) with r = 1 in [8].
• Our general nontriviality condition (3.14) contains only the u-component q u (0) in contrast to all the components of q(0) in the corresponding condition λ + p(T ) + q(0) = 0 of [8].
• Theorem 3.2 and Corollary 3.3 present more conditions that surely rule out the degeneracy phenomenon in comparison with the corresponding results of [8, Theorems 6.1, 6.3]; see the discussion in remark (i). Note that the appearance of degeneracy is also excluded by the new transversality conditions as discussed in remark (ii) and illustrated by the examples below.
• The presence of controlled perturbations in (P τ ) and ( P ) allows us to reveal new behavior phenomena for the measure γ responsible for the state constraints (1.6) in comparison with the settings of [8], even in the absence of the measure ξ responsible for the u-constraints in (1.5); see remark (iii). In particular, Examples 5.1 and 5.2 illustrate behavior of the measure γ in keeping the optimal trajectory on the boundary of state constraints in the crowd motion model.

Numerical Examples
In this section we present three academic examples illustrating some characteristic features of the obtained necessary optimality conditions for problems (P τ ) and ( P ) and their usefulness to determine optimal solutions and exclude nonoptimal ones in rather simple settings. More involved examples with our major applications to the crowd motion model in a corridor are given in Section 5. In this case we have C = R − . The structure of the cost functional in (4.1) allows us to assume without loss of generality that a-controls are uniformly bounded, and thus (P τ ) admits an optimal solution (x(·),ū(·),ā(·)) ∈ W 1,2 ([0, 1]; R 3 ) by [5,Theorem 4.1]. It is also easy to see that all the assumptions of Theorem 3.2 are satisfied. Furthermore, it follows from the structure of (P τ ) with r = 1/2 in (1.5) that Figure 1. Supposing further thatx(t) ∈ int(C +ū(t)) for any t ∈ [0, 1) and that −ẋ(1) = f (x(1),ā(1)), we see that these assumptions are realized for the optimal solution found via the necessary optimality conditions of Theorem 3.2.

(4.2)
It follows from (5)-(7) that p x (·) is a constant function on [0, 1] and that The next assertion that holds in any finite-dimensional space is a consequence of the measure nonatomicity condition (a) of Theorem 3.2, which is essential in this and other examples.

Controlled Crowd Motion Model in a Corridor
This section is devoted to the formulation and solution of an optimal control problem concerning the so-called crowd motion model in a corridor. We refer the reader to [15,16,24] for describing of the dynamics in such and related crowd motion models as a sweeping process with the corresponding mathematical theory, numerical simulations, and various applications. However, neither these papers nor other publications contain, to the best of our knowledge, control and/or optimization versions of crowd motion modeling, which is of our main interest here. We follow the terminology and notation of [15,16,24].
Our main goal is to demonstrate that the necessary optimality conditions obtained in Corollary 3.3 allow us to develop an effective procedure to determine optimal solutions in the general setting under consideration with finitely many participants and then explicitly solve the problem in some particular situations involving two and three participants. Furthermore, in this way we reveal certain specific features of the obtained necessary optimality conditions for problems with state constraints.
The crowd motion model of [15,16,24] is designed to deal with local interactions between participants in order to describe the dynamics of pedestrian traffic. This model rests on the following postulates: • A spontaneous velocity corresponding to the velocity that each participant would like to have in the absence of others is defined first.
• The actual velocity is then calculated as the projection of the spontaneous velocity onto the set of admissible velocities, i.e., such velocities that do not violate certain nonoverlapping constraints.
In what follows we consider n participants (n ≥ 2) identified with rigid disks of the same radius R in a corridor as depicted in Figure 3.

Exit
In that case, since the participants are not likely to leap across each other, it is natural to restrict the set of feasible configurations to one of its connected components (nonoverlapping condition): Assuming that the participants exhibit the same behavior, their spontaneous velocity can be written as where Q 0 is taken from (5.1). Observe that the nonoverlapping constraint in (5.1) does not allow the participants to move with their spontaneous velocity, and the distance between two participants in contact can only increase. To reflect this situation, the set of feasible velocities and then describe the actual velocity field is the feasible field via the Euclidean projection of U (x) to C x : where T > 0 is a fixed duration of the process and x 0 indicates the starting position of the participants. Using the orthogonal decomposition via the sum of mutually polar cone as in [16,24], we get where N x stands for the normal cone to Q 0 at x and can be described in this case as the polar Let us now rewrite this model in the form used in our problem ( P ) without control parameters so far. Given the orths (e 1 , . . . , e n ) ∈ R n , specify the polyhedral set C by Since all the participants exhibit the same behavior and want to reach the exit by the shortest path, their spontaneous velocities can be represented as where D(x) stands for the distance between the position x = (x 1 , . . . , x n ) ∈ Q 0 and the exit, and where the scalar s ≥ 0 denotes the speed. Since x = 0 and hence ∇D(x) = 1, we have s = U 0 (x) . By taking this into account as well as the aforementioned postulate that, in the absence of other participants, each participant tends to remain his/her spontaneous velocity until reaching the exit, the (uncontrolled) perturbations in this model are described by where s i denotes the speed of the participant i = 1, . . . , n. However, if participant i is in contact with participant i + 1 in the sense that x i+1 (t) − x i (t) = 2R, then both of them tend to adjust their velocities in order to keep the distance at least 2R with the participant in contact. To control the actual speed of all the participants in the presence of the nonoverlapping condition (5.1), we suggest to involve control functions a(·) = (a 1 (·), . . . , a n (·)) into perturbations as follows: f x(t), a(t) = s 1 a 1 (t), . . . , s n a n (t) , t ∈ [0, T ]. To optimize dynamics (5.6) by using controls a(·), we introduce the cost functional the meaning of which is to minimize the distance of all the participants to the exit at the origin together with the energy of feasible controls a(·). Having now the formulated optimal control problem for the crowd motion model in the form of ( P ), we can apply to solving this problem the necessary optimality conditions for the sweeping process with controlled perturbations derived in Corollary 3.3.
It is easy to see that all the assumptions of Corollary 3.3 are satisfied for problem (5.6), (5.7). To make sure that the nontriviality condition holds in the enhanced/nondegenerate form (3.50), we select the parameter α in (5.4) so large that where the number l > 0 is calculated in (2.2) for the constant control u(·). As mentioned in (3.13) of Theorem 3.2, this condition with τ = 0 yields the validity of the second condition therein, which ensures in turn the fulfillment of the enhanced nontriviality (3.50) in Corollary 3.3.
As discussed above, the situation wherex i+1 (t 1 )−x i (t 1 ) = 2R for some t 1 ∈ [0, T ] pushes participants i and i + 1 to adjust their speeds in order to keep the distance at least 2R with the one in contact. It is natural to suppose that both participants i and i + 1 maintain their new constant velocities after the time t = t 1 until either reaching someone ahead or the end of the process at time t = T . Hence the velocities of all the participants are piecewise constant on [0, T ] in this setting.
Observe that the differential relation in (2) can be read as for a.e. t ∈ [0, T ]. Next we clarify the sense of the implications in (3). If participant 1 is far away from participant 2 in the sense thatx 2 (t) −x 1 (t) > 2R for some time t ∈ [0, T ], then his/her actual velocity and the spontaneous velocity are the same meaning that −ẋ 1 (t) = s 1ā1 (t). Likewise we have the same situation for the last participant n. However, it is not the case for two adjacent participants between the first and last ones because they must rely on the participants ahead and behind them. Further, it follows from condition (5)  provided that λ > 0 (say λ = 1); otherwise, we do not have enough information to proceed. Since the velocities s i are constant in (5.11), it is to suppose by (5.10) that the functionsā i (·) are constant a i on [0, T ] for all i = 1, . . . , n and thus optimal controls among such functions. Using this and the Newton-Leibniz formula in (5.8) gives us the trajectory representations for all t ∈ [0, T ]: where (x 01 , . . . , x 0n ) are the components of the starting point x 0 ∈ R n in (5.6).
Prior to developing an effective procedure to find optimal solutions to the controlled crowd motion model by using the obtained optimality conditions in the general case above, we consider the following example for two participants that shows how to explicitly solve the problem in such settings.
x 1 x 2 Figure 4: Two participants out of contact for t < t 1 .
x 1 x 2 Figure 5: Two participants in contact for t ≥ t 1 .

Exit
Combining this with the the subtraction of the first equation from the second one in (5.12) gives us which in turn implies that 2η(t 1 ) + 6ā 1 − 3ā 2 = 0. Remembering thatā 1 = 2ā 2 , we calculate the value of η(·) at the hitting point t = t 1 by η(t 1 ) = − 9 2ā 2 = − 9 4ā 1 . Note also thatẋ 2 (t 1 ) =ẋ 1 (t 1 ) in our case. Based on these calculations, we can express the value of cost functional (5.7) for this example at (x,ā) as Minimizing this function ofā 2 subject to the constraintā 2 ≤ − 1 9 that comes from the second expression in (5.13) gives us the optimal control valueā 2 = − 4860 4080 ≈ −1.1911. Accordingly the formulas obtained above allows us to calculate all the other ingredients of the optimal solution with the corresponding values of dual variables in the necessary optimality condition. It gives us, in particular, that γ [t, 6] ≈ (−1.56, 3.76) for 0.56 = t 1 ≤ t ≤ 6, which reflects the fact that the optimal sweeping motion hits the boundary of the state constraints at t 1 = 0.56 and stays there till the end of the process at T = 6. It is worth mentioning that the obtained nonzero measure γ has the opposite signs of its components on [t 1 , 6], which is different from the standard optimal control problems with inequality state constraints. Now we come back to the general case of the controlled crowd model in a corridor with n ≥ 3 participants. Following the approach employed in Example 5.1, we develop an effective procedure to determine an optimal control from the obtained necessary optimality conditions and then fully implement by a numerical example for the case where n = 3.
Recall our postulate that any two adjacent participants i and i + 1 that come to be in contact at some point t ∈ [0, T ] (i.e., x i+1 (t) − x i (t) = 2R) have the same velocity therein, change their velocities at the contact point, and maintain their new constant velocities until reaching the participant ahead or until the end of the process at t = T . This yields that the function η(·) in the conditions above is piecewise constant on [0, T ]. Suppose for simplicity that η 0 (t) = η n (t) = 0 on [0, T ] and then rewrite (5.11) as x i (t) = x 0i + t 0 η i−1 (s) − η i (s) ds − ts iāi for i = 1, . . . , n.
x 1 x 2 x 3 Figure 6: Out of contact situation for two adjacent participants when t < t 1

Exit
For each such index i consider the numbers ϑ i := min t j t j > t i , j = 1, . . . , n − 1 , ϑ i := max t j t j < t i , j = 1, . . . , n − 1 (5.15) and observe the following relationships for the optimal crowd motion on the intervals [0, t i ) and ∈ [t i , ϑ i ): • If t ∈ [0, t i ), we have η i (·) = 0 on this interval by (3). This gives us • If t ∈ [t i , ϑ i ) with ϑ i from (5.15), we have on this interval that       x In what follows we suppose without loss of generality that the functionsẋ(·) are well defined at t i while the functions η(·) are well defined at t i and ϑ i . Since at the contact time t = t i the distance between the two participants i and i + 1 is exactly 2R (see Figure 7), we have the following relationships: x 1 x 2 x 3

Fig 7 All the participants in contact for
where ϑ i is defined in (5.15) being dependent of t i . Then we can find t i ≤ T from the equation provided that x 0(i+1) − x 0i > 2R. In the case where x 0(i+1) − x 0i = 2R we put t i = 0. Our postulate tells us thatẋ i+1 (t i ) =ẋ i (t i ), which implies therefore that If η i (t i ) > 0, we get from the above that (5.10) holds, while the remaining case where η i (t i ) = 0 can be treated via (5.17). The cost functional (5.7) can be expressed in this way as a function of (ā 1 , . . . ,ā n ) and η i (t j ) for i = 0, . . . , n and j = 1, . . . , n−1. Consequently the optimal control problem under consideration reduces to the finite-dimensional optimization of this cost subject to inequality (5.16) and equality (5.17) constraints. To furnish these operations step-by-step, we proceed as follows: Step 1: Determine which participants are in contact at the initial time, i.e., for which i ∈ {1, . . . , n} we have x 0(i+1) − x 0i = 2R. If this occurs only for i = n, there is nothing to do. If it is the case of some i ∈ {0, . . . , n − 1}, we put t i := 0 and observe that participants i and i + 1 have the same velocities while being away by 2R from each other.
Step 3: Find relations between η i andā i from (5.10) and (5.17), respectively, and substitute them into the cost function (5.7) for the subsequent optimization with respect toā i .
We now demonstrate how this procedure work in the case where n = 3 in the crowd motion model. By using the procedure outlined above, we first get x 02 − x 01 = 12 > 6 = 2R and x 03 − x 02 = 6 = 2R.
Hence η 2 (t 1 ) > 0, which implies by (5.10) that 2ā 2 = 3ā 3 and so x = 3 2 y. Combining the latter with the above relation x = 2 3 y tells us that x = y = 0 This contradicts the constraint y < 0 and thus rules out the situation in case. Overall, the calculations in Case 1 completely solve the crowd motion optimal control problem in this example by using the optimality conditions established in Corollary 3.3.