Manh-Khang Dao
email: mkdao@kth.se

Boualem Djehiche
email: boualem@kth.se

Hamilton-Jacobi equations for optimal control on multidimensional junctions with entry costs *

Keywords: Optimal control, multidimensional junctions, Hamilton-Jacobi equation, viscosity solutions, switching cost AMS subject classification: 34H05, 35F21, 49L25, 49J15, 49L20, 93C30

We consider an infinite horizon control problem for dynamics constrained to remain on a multidimensional junction with entry costs. We derive the associated system of Hamilton-Jacobi equations (HJ), prove the comparison principle and that the value function of the optimal control problem is the unique viscosity solution of the HJ system. This is done under the usual strong controllability assumption and also under a weaker condition, coined 'moderate controllability assumption'.

Introduction

In this paper, we consider an infinite horizon control problem for the dynamics of an agent constrained to remain on a multidimensional junction on R 3 , i.e. a union of N ≥ 2 half-planes P i which share a straight line Γ, see Figure 2. The controlled dynamics are given by a system of ordinary differential equations, where in each P i it is given by a drift f i (•, •) and to which is associated a running cost i (•, •). Moreover, the agent pays a cost c i (•) each time it enters the half-plane P i from Γ. The goal of this work is to study the properties of the value function of this control problem and derive the associated Hamilton-Jacobi equation (HJ) under some regularity conditions on the involved dynamics, running and entry cost functions. Although we will not discuss it in this paper, the optimal control problem with exit costs, i.e. instead of paying an entry cost each time the agent enters the half-plane, it pays a cost each time it exits it, can be solved similarly. Oudet [25] considers a similar optimal control problem but without entry or exit costs from the interface to the half-planes.

When the interface Γ is reduced to a point, the junction becomes a simple network with one vertex, i.e. a 1-dimensional junction. Optimal control problems (without entry costs) in which the set of admissible states are networks attracted a lot of interest in recent years. Being among the first papers discussing this topic, Achdou, Camilli, Cutrì & Tchou [START_REF] Achdou | Hamilton-Jacobi equations constrained on networks[END_REF], derived an HJ equation associated to an infinite horizon optimal control on networks and proposed a suitable notion of viscosity solutions, where the admissible test-functions whose restriction to each edge are C 1 are applied. Independently and at the same time, Imbert, Monneau & Zidani [START_REF] Imbert | A Hamilton-Jacobi approach to junction problems and application to traffic flows[END_REF] proposed an equivalent notion of viscosity solution for studying an HJ approach to junction problems and traffic flows. Both [START_REF] Achdou | Hamilton-Jacobi equations constrained on networks[END_REF] and [START_REF] Imbert | A Hamilton-Jacobi approach to junction problems and application to traffic flows[END_REF] contain first results on the comparison principle. In the particular case of eikonal equations on networks, Schieborn & Camilli [START_REF] Schieborn | Viscosity solutions of Eikonal equations on topological networks[END_REF] considered a less general notion of viscosity solution. For that later case, Camilli & Marchi [START_REF] Camilli | A comparison among various notions of viscosity solution for Hamilton-Jacobi equations on networks[END_REF] showed the equivalence between the definitions notion of viscosity solution given in [START_REF] Achdou | Hamilton-Jacobi equations constrained on networks[END_REF][START_REF] Imbert | A Hamilton-Jacobi approach to junction problems and application to traffic flows[END_REF] and [START_REF] Schieborn | Viscosity solutions of Eikonal equations on topological networks[END_REF]. Optimal control on networks with entry costs (and exit costs) has recently been considered by the first author [START_REF] Dao | Hamilton-Jacobi equations for optimal control on networks with entry or exit costs[END_REF].

An important feature of the effect of the entry costs is a possible discontinuity of the value function. Discontinuous solutions of HJ equations have been studied by various authors, see for example Barles [5] for general open domains in R d , Frankowska & Mazzola [START_REF] Frankowska | Discontinuous solutions of Hamilton-Jacobi-Bellman equation under state constraints[END_REF] for state constraint problems, and in particular Graber, Hermosilla & Zidani [START_REF] Graber | Discontinuous solutions of Hamilton-Jacobi equations on networks[END_REF] for a class of HJ equations on networks.

In the case considered in the present work, the effect of entry costs induces a discontinuity of the value function V at the interface Γ, while it is still continuous on each P i \Γ. This allows us to adopt the techniques which apply to the continuous solution case in the works of Barles, Briani & Chasseigne [START_REF] Barles | A Bellman approach for two-domains optimal control problems in R N[END_REF] and Oudet [START_REF] Oudet | Hamilton-Jacobi equations on networks or heterogeneous structures[END_REF], where we split the value function V into the collection {v 1 , . . . , v N } of functions, where each v i is continuous function defined on P i and satisfies

v i (x) =      V(x) if x ∈ P i \Γ, lim
(P i \Γ) z→x V(z) if x ∈ Γ.
We note that the existence of the limit in the above formula comes from the fact that the value functions is Lipschitz continuous on the neighborhood of Γ (see Lemma 3.3), thanks to the 'strong controllability assumption', which is introduced below. The first main result of the present work is to show that (v 1 , . . . , v N , V| Γ ) is a viscosity solution of the following system

λv i (x) + H i (x, ∂v i (x)) = 0, if x ∈ P i \Γ, (1.1
)

λv i (x) + max H + i (x, ∂v i (x)) , -λV| Γ (x) = 0, if x ∈ Γ, (1.2)
λV| Γ (x) + max -λ min i=1,...,N

{v i (x) + c i (x)}, H Γ x, ∂V| Γ ∂e 0 (x) = 0, if x ∈ Γ, (1.3)
where H i is the Hamiltonian corresponding to the half-plane P i , V| Γ is the restriction of our value function on the interface and H Γ is the Hamiltonian defined on Γ. At x ∈ Γ, the definition of the Hamiltonian has to be particular, in order to consider all the possibilities when x is in the neighborhood of Γ. More specifically,

• the term H + i (x, ∂u i (x)) accounts for the situation in which the trajectory does not leave P i ,

• the term min i=1,...,N {v i (x) + c i (x)} accounts for situations in which the trajectory enters P k where v k (x) + c k (x) = min i=1,...,N {v i (x) + c i (x)},

• the term H Γ (x, ∂V| Γ ∂e 0 (x)) accounts for situations in which the trajectory remains on Γ. This feature is quite different from the one induced by the effect of entry costs in a network (i.e. when Γ is reduced to a point) considered in [START_REF] Dao | Hamilton-Jacobi equations for optimal control on networks with entry or exit costs[END_REF], where the value function at the junction point is a constant which is the minimum of the cost when the trajectory stays at the junction point forever and the cost when the trajectory enters immediately the edge that has the lowest possible cost.

The paper is organized as follows. In Section 2, we formulate the optimal control problem on a multidimensional junction on R 3 with entry cost. In Section 3, we study the control problem under the strong controllability condition, where we derive the system of HJ equations associated with the optimal control problem, propose a comparison principle, which leads to the well-posedness of (1.1)- (1.3), and prove that the value function of the optimal control problem is the unique discontinuous solution of the HJ system. We suggest two different proofs of the comparison principle. The first one is inspired from the work by Lions & Souganidis [START_REF] Lions | Viscosity solutions for junctions: well posedness and stability[END_REF] and uses arguments from the theory of PDEs, and the second one uses a blend of arguments from optimal control theory and PDE techniques suggested in [START_REF] Barles | A Bellman approach for two-domains optimal control problems in R N[END_REF][START_REF] Barles | A Bellman approach for regional optimal control problems in R N[END_REF][START_REF] Achdou | Hamilton-Jacobi equations for optimal control on junctions and networks[END_REF] and [START_REF] Oudet | Hamilton-Jacobi equations on networks or heterogeneous structures[END_REF]. Finally, in Section 4, the same program is carried out when the strong controllability is replaced by the weaker one that we coin 'moderate controllability near the interface'. The proof of the comparison principle under the moderate controllability condition is carried on by only using the PDE techniques provided in Lions & Souganidis [START_REF] Lions | Viscosity solutions for junctions: well posedness and stability[END_REF].

The results obtained in the present work extend easily to multidimensional junction on R d , i.e. a union of N ≥ 2 half-hyperplanes P i which share an affine space Γ of dimension d -2, and to the more general class of ramified sets, i.e. closed and connected subsets of R d obtained as the union of embedded manifolds with dimension strictly less than d, for which the interfaces are non-intersecting manifolds of dimension d -2, see Figure 1a for example. We do not know whether these results apply to the ramified sets for which interfaces of dimension d -2 cross each other (see Figure 1b). Recent results on optimal control and HJ equations on ramified sets include Bressan & Hong [START_REF] Bressan | Optimal control problems on stratified domains[END_REF], Camilli, Schieborn & Marchi [START_REF] Camilli | Eikonal equations on ramified spaces[END_REF], Nakayasu [START_REF] Nakayasu | Metric viscosity solutions for Hamilton-Jacobi equations of evolution type[END_REF] and Hermosilla & Zidani [START_REF] Hermosilla | Infinite horizon problems on stratifiable state-constraints sets[END_REF] and the book of Barles & Chasseigne [START_REF] Barles | An illustrated guide of the modern approaches of Hamilton-Jacobi equations and control problems with discontinuities[END_REF].

Formulation of the control problem on a junction

The geometry of the state of the system

Let {e i } 0≤i≤N be distinct unit vectors in R 3 such that e i • e 0 = 0 for all i ∈ {1, . . . , N }. The state of the system is given by the junction S which is the union of N closed half-planes

P i = Re 0 × R + e i .
The half-planes P i are glued at the straight line Γ := Re 0 (see Figure 2). If x ∈ S\Γ, there exist unique i ∈ {1, . . . , N }, x i > 0 and x 0 ∈ R such that x = x 0 e 0 + x i e i =: (x i , x 0 ). Let x = (x i , x 0 ) ∈ P i and y = (y j , y 0 ) ∈ P j , the geodesic distance d(x, y) between two points x, y ∈ S is

d(x, y) =        |x -y| = x 0 -y 0 2 + x i -y i 2 1 2 , if x, y ∈ P i , inf z∈Γ {|x -z| + |z -y|} = x 0 -y 0 2 + x i + y j 2 1 2
, if x ∈ P i and y ∈ P j .

The optimal control problem

We consider an infinite horizon optimal control problem which has different dynamics and running costs for each half-plane. For i = 1, . . . , N ,

• the set of controls (action set) on P i is denoted by A i ,

• on P i the dynamics of the system is deterministic with associated dynamic f i ,

• the agent has to pay the running cost i while (s)he is on P i .

The following conditions, referred to as [A] hereafter, are our standing assumptions throughout the paper.

[A0] Control sets. Let A be a metric space (for example A = R d ). For i = 1, . . . , N , A i is a nonempty compact subset of A and the sets A i are disjoint.

[A1] Dynamics and running costs. For i = 1, . . . , N , the functions i : P i × A i → R and f i : P i × A i → R 3 are continuous and bounded by M . Moreover, there exists L > 0 such that

|f i (x, a) -f i (y, a)| , | i (x, a) -i (y, a)| ≤ L |x -y| , for all x, y ∈ P i , a ∈ A i .
Hereafter, we will use the notation

F i (x) := {f i (x, a) : a ∈ A i } .
Entry costs. {c 1 , . . . , c N } is a set of entry cost functions, where c i : Γ → R + is Lipschitz continuous and bounded from below by some positive constant C.

[A2] Convexity of dynamics and costs. For x ∈ P i , the following set

FL i (x) := {(f i (x, a) , i (x, a)) : a ∈ A i }
is non empty, closed and convex.

Remark 2.1. In [A0], the assumption that the set A i are disjoint is not restrictive since we can always replace A i by Ãi = A i × {i}. Assumption [A2] is made to avoid the use of relaxed control (see the definition for relaxed control in [START_REF] Bardi | Optimal control and viscosity solutions of Hamilton-Jacobi-Bellman equations[END_REF]). Many of these conditions can be weakened at the cost of keeping the presentation of the results easy to follow.

Controlled dynamics

Let M be the closed set given by

M := (x, a) : x ∈ P i , a ∈ A i if x ∈ P i \Γ, and a ∈ ∪ N i=1 A i if x ∈ Γ and define the function f on M by f (x, a) =    f i (x, a) , if x ∈ P i \Γ and a ∈ A i , f i (x, a) , if x ∈ Γ and a ∈ A i .
The function f is continuous on M since the sets A i are disjoint. Consider the set F (x) which contains all the 'possible speeds' at x defined by

F (x) =    F i (x) if x ∈ P i \Γ, N i=1 F i (x) if x ∈ Γ.
For x ∈ S, the set of admissible trajectories starting from x is

Y x = y x ∈ Lip R + ; S ẏx (t) ∈ F (y x (t)) for a.e. t > 0 y x (0) = x. .
Thanks to the Filippov implicit function lemma (see [START_REF] Mcshane | On Filippov's implicit functions lemma[END_REF]), it is shown in [25, Theorems 3.2.2 and 3.3.1] that under the respective assumptions [A3] and [ Ã3] below, the set Y x is not empty. We introduce the set of admissible controlled trajectories starting from x

T x = (y x , α) ∈ L ∞ loc R + ; M : y x ∈ Lip R + ; S and y x (t) = x + t 0 f (y x (s) , α (s)) ds , where (y x , α) ∈ L ∞ loc R + ; M means t → (y x (t), α(t)) ∈ L ∞ loc R + ; M .
We note that if (y x , α) ∈ T x then y x ∈ Y x . Thus, from now on, we will denote y x by y x,α if (y x , α) ∈ T x . By continuity of the trajectory y x,α , the set T Γ

x,α := t ∈ R + : y x,α (t) ∈ Γ containing all the times at which the trajectory stays on Γ is closed and therefore, the set

T i x,α := t ∈ R + : y x,α (t) ∈ P i \Γ is open. Consequently, T i x,α is a countable union of disjoint open intervals T i x,α =    [0, η i0 ) ∪ k∈K i ⊂N (t ik , η ik ) , if x ∈ P i \Γ, k∈K i ⊂N (t ik , η ik ) , if x / ∈ P i \Γ,
where K i = {1, . . . , n} if the trajectory y x,α enters P i n times, K i = N if the trajectory y x,α enters P i infinite times and K i = ∅ if the trajectory never enters P i .

Remark 2.2. From the previous definition, we see that t ik is an entry time in P i \Γ and η ik is an exit time from P i \Γ. Hence

x ik := y x,α (t ik ) ∈ Γ, z ik := y x,α (η ik ) ∈ Γ.
We now define a cost functional and a value function corresponding to the optimal problem.

Cost functional and value function

Definition 2.3. The cost functional associated to the trajectory (y x , α) ∈ T x is defined by

J(x, α) = ∞ 0 (y x (t), α(t))e -λt dt + N i=1 k∈K i c i (x ik )e -λt ik ,
where λ > 0 and the running cost :

M → R is (x, a) =    i (x, a) if x ∈ P i \Γ and a ∈ A i , i (x, a) if x ∈ Γ and a ∈ A i .
(2.1)

The value function of the infinite horizon optimal control problem is defined by

V(x) = inf (yx,α)∈Tx J(x, α). (2.2)
Remark 2.4. By the definition of the value function, we are mainly interested in admissible control laws α for which J(x, α) < +∞. In such a case, even if the set K i may be infinite, it is possible to reorder {t ik , η ik : k ∈ N} such that

t i1 < η i1 < t i2 < η i2 < . . . < t ik < η ik < . . . ,
and lim

k→∞ t ik = lim k→∞ η ik = +∞.
Indeed, because of the positivity of the entry cost functions, if there exists a cluster point, J(x, α) has to be infinite which leads to a contradiction, since we assumed that J(x, α) < +∞. This means that the state cannot switch half-planes infinitely many times in finite time, otherwise the cost functional becomes obviously infinite.

The following example shows that the value function with entry costs can possibly be discontinuous at the interface Γ.

Example 2.5. Consider a simple junction S with two half-planes P 1 and P 2 . To simplify, we may identify S ≡ R 2 and

P 1 = R + e 1 × Re 0 ≡ (-∞, 0] × R, P 2 = R + e 2 × Re 0 ≡ [0, +∞) × R and Γ = Re 0 ≡ {0} × R. The control sets are A i = (a i , a 0 ) ∈ R 2 : a 2 0 + a 2 i ≤ 1 with i ∈ {1, 2}. Set (f (x, a), (x, a)) =    ((a 1 , a 0 ), 1) if x ∈ P 1 and a = (a 1 , a 0 ) ∈ A 1 , ((a 2 , a 0 ), 1 -a 2 ) if x ∈ P 2 and a = (a 2 , a 0 ) ∈ A 2 ,
and entry costs functions c 1 ≡ C 1 , where C 1 is a positive constant and

c 2 (ζ) =    3 -|ζ|, if ζ ≤ 1, 2, if ζ ≥ 1.
For x ∈ P 2 \Γ, then V(x) = v 2 (x) = 0 with optimal strategy which consists of choosing α ≡ (a 2 = 1, a 0 = 0). For x ∈ P 1 , we can check that

• If 2 ≥ 1/λ, then V(x) = 1/
λ with optimal control law α ≡ (a 1 = 0, a 0 = 1).

• If 2 < 1/λ, we consider x = (x 1 , x 0 ) ∈ P i in two cases:

Case 1: If |x 1 | ≥ 1, then the optimal control law α(t) = (a 1 = -1, a 0 = 0) if t ≤ |x 1 | and α(t) = (a 2 = 1, a 0 = 0) if t ≥ |x 1 | and V(x) = |x 1 | 0 1dt + c 2 ((0, x 1 ))e -λ|x 1 | + 0 = 1 -e -λ|x 1 | λ + 2e -λ|x 1 | .
The optimal trajectory starting from x = (x 1 , x 0 ) ∈ P 1 in case |x 1 | ≥ 1 is plotted in red in Figure 3.

Case 2: If |x 1 | ≤ 1, let τ (x) = |x 1 | 2 + |x 0 -1| 2 1/2 and s : [-1, 1] → R where s(ζ) = 1 if ζ ≥ 0 and s(ζ) = -1 if ζ < 0.
We have the optimal control law

α(t) =      a 1 = - x 1 τ (x) , a 0 = 1 -x 0 τ (x) , t ≤ τ (x), (a 2 = 1, a 0 = 0), t ≥ τ (x).
and the value function

V(x) = τ (x) 0 1dt + c 2 ((0, s(x 1 )))e -λ + 0 = 1 -e -λτ (x) λ + 2e -λτ (x) .
The optimal trajectory starting from x = (x 1 , x 0 ) ∈ P 1 in case |x 1 | < 1 is plotted in blue in Figure 3.

To sum up, there are two cases

1. If inf x∈Γ c 2 (x) = 2 ≥ 1/λ, then V(x) =      0 if x ∈ P 2 \Γ, 1 λ if x ∈ P 1 .
The graph of the value function with entry costs satisfying inf x∈Γ c 2 (x) ≥ 1/λ is plotted in Figure 4a. Γ 1

P 2 P 1 -1 0 A B Figure 3: The trajectories in case 2 < 1/λ. -4 -2 0 2 -2 0 2 0 2 4 (a) c2 ≥ 1/λ -4 -2 0 2 -2 0 2 0 2 (b) c2(ζ) = 3 -|ζ| if ζ ≤ 1 and c2(ζ) = 2 if ζ ≥ 1 Figure 4: The value function V in two cases 2. If inf x∈Γ c 2 (x) = 2 < 1/λ, then V(x) =                0 if x ∈ P 2 \Γ, 1 -e -λ|x 1 | λ + 2e -λ|x 1 | if x ∈ P 1 and |x 1 | ≥ 1, 1 -e -λ(|x 1 | 2 +|x 0 -1| 2 ) 1/2 λ + 2e -λ(|x 1 | 2 +|x 0 -1| 2 ) 1/2 if x ∈ P 1 and |x 1 | ≤ 1.
The graph of the value function in the case inf c 2 < 1/λ is plotted in Figure 4b.

Hamilton-Jacobi system under strong controllability condition near the interface

In this section we derive the Hamilton-Jacobi system (HJ) associated with the above optimal control problem and prove that the value function given by (2.2) is the unique viscosity solution of that (HJ) system, under the following condition:

[A3] (Strong controllability) There exists a real number δ > 0 such that for any i = 1, . . . , N and for all x ∈ Γ, B(0, δ) ∩ (Re 0 × Re i ) ⊂ F i (x) .

Remark 3.1. If x is close to Γ, we can use [A3] to obtain the coercivity of the Hamiltonian which will be needed in Lemma 3.17 below to prove the Lipschitz continuity of the viscosity subsolution of the HJ system.

Hereafter we will denote by B(Γ, ρ), ρ > 0, the set

B(Γ, ρ) := x : inf z∈Γ |x -z| < ρ .
Lemma 3.2. Under Assumptions [A1] and [A3], there exist two positive numbers r 0 and C such that for all x 1 , x 2 ∈ B(Γ, r 0 ), there exist (y

x 1 , α x 1 ,x 2 ) ∈ T x 1 and τ x 1 ,x 2 < Cd(x 1 , x 2 ) such that y x 1 (τ x 1 ,x 2 ) = x 2 .
Proof. The proof is classical and similar to the one in [START_REF] Dao | Hamilton-Jacobi equations for optimal control on networks with entry or exit costs[END_REF], so we skip it.

Value function on the interface

v i (x) =      V| P i (x), if x ∈ P i \Γ, lim (P i \Γ) z→x V| P i (z), if x ∈ Γ. (3.1)
Proof. This lemma is a consequence of Lemma 3.2, see [START_REF] Achdou | Hamilton-Jacobi equations on networks[END_REF] and [START_REF] Dao | Hamilton-Jacobi equations for optimal control on networks with entry or exit costs[END_REF] for more details.

For x ∈ Γ, we set

FL Γ (x) := N i=1 (FL i (x) ∩ (Re 0 × R)) (3.2)
and

A Γ i (x) = {a ∈ A i : f i (x, a) • e i = 0} , i = 1, . . . N, ( 3.3)
where FL i (x) is defined in Assumption [A2]. Let us define a viscosity solution of the switching Hamilton-Jacobi equation on the interface Γ:

λu Γ (x) + max -λ min i=1,...,N {v i (x) + c i (x)}, H Γ x, ∂u Γ ∂e 0 (x) = 0, x ∈ Γ, (3.4)
where H Γ is the Hamiltonian on Γ defined by

H Γ (x, p) = max i=1,...,N max a∈A Γ i (x) {-(f i (x, a) • e 0 )p -i (x, a)} = max (ζ,ξ)∈FL Γ (x) {-(ζ • e 0 )p -ξ} . (3.5) Definition 3.4. An upper (resp. lower) semi-continuous u Γ : Γ → R is a viscosity subsolution (resp. supersolution) of (3.4) if for any x ∈ Γ, any ϕ ∈ C 1 (Γ) such that u Γ -ϕ has a local maximum (resp. minimum) point at x, then λu Γ (x) + max -λ min i=1,...,N {v i (x) + c i (x)}, H Γ x, ∂ϕ ∂e 0 (x) ≤ 0 (resp. ≥ 0).
The continuous function u Γ : Γ → R is called viscosity solution of (3.4) if it is both viscosity sub and supersolution of (3.4).

We have the following characterization of the value function V on the interface.

Theorem 3.5. Under Assumptions [A] and [A3]

, the restriction of value function V on the interface Γ, V| Γ , is a viscosity solution of (3.4).

The proof of Theorem 3.5 is made in several steps. The first step is to prove that V| Γ is a viscosity solution of an HJ equation with an extended definition of the Hamiltonian on Γ. For that, we consider the following larger relaxed vector field: for x ∈ Γ,

f Γ (x) =            (η, µ) ∈ Re 0 × R : ∃{y x,n , α n } n∈N (y x,n , α n ) ∈ T x ∃{t n } n∈N t n → 0 + , y x,n (t) ∈ Γ for all t ∈ [0, t n ] η = lim n→+∞ t -1 n tn 0 f (y x,n (t), α n (t))dt µ = lim n→+∞ t -1 n tn 0 (y x,n (t), α n (t))dt            . We have Lemma 3.6. For any function ϕ ∈ C 1 (Γ) and x ∈ Γ, sup (ζ,ξ)∈f Γ (x) -(ζ • e 0 ) ∂ϕ ∂e 0 (x) -ξ = sup (ζ,ξ)∈FL Γ (x) (-ζ • e 0 ) ∂ϕ ∂e 0 (x) -ξ .
Proof. See Appendix.

The second step consists of proving the following lemma.

Lemma 3.7. The restriction of the value function V on the interface Γ, V| Γ satisfies

λV| Γ (x) + H Γ x, ∂V| Γ ∂e 0 (x) ≤ 0, x ∈ Γ, (3.6)
in the viscosity sense.

Proof. Let x ∈ Γ and ϕ ∈ C 1 (Γ) such that V| Γ -ϕ has a maximum at x, i.e.

ϕ(x) -ϕ(z) ≤ V| Γ (x) -V| Γ (z), for all z ∈ Γ. ( 3.7)
From Lemma 3.6, it suffices to prove that

λV | Γ (x) + sup (ζ,ξ)∈f Γ (x) (-ζ • e 0 ) ∂ϕ ∂e 0 (x) -ξ ≤ 0. (3.8) Let (ζ, ξ) ∈ f Γ (x), there exist (y x,n , α n ) ∈ T x and t n → 0 + such that y x,n (t) ∈ Γ for all t ≤ t n and ζ = lim n→+∞ 1 t n tn 0 f (y x,n (t) , α n (t)) dt = lim n→∞ y x,n (t n ) -x t n , ξ = lim n→+∞ 1 t n tn 0 (y x,n (t) , α n (t)) dt.
According to (3.7) and the dynamic programming principle, for all n ∈ N,

ϕ (x) -ϕ (y x,n (t n )) ≤ V| Γ (x) -V| Γ (y x,n (t n )) ≤ tn 0 (y x,n (t) , α n (t)) e -λt dt + V| Γ (y x,n (t n )) (e -λtn -1).
Dividing both sides by t n , the goal is to take the limit as n tends to ∞. On the one hand, we have

lim n→+∞ 1 t n tn 0 (y x,n (t), α n (t)) e -λt dt + V| Γ (y x,n (t n ))(e -λtn -1) t n = ξ -λV | Γ (x). (3.9)
On the other hand, since

y x,n (t n ) = x + t n (ζ + o(1)e 0 ), we obtain lim n→+∞ ϕ(x) -ϕ(y x,n (t n )) t n = -(ζ • e 0 ) ∂ϕ ∂e 0 (x). (3.10)
Hence, in view of (3.9) and (3.10), we have

λV| Γ (x) -(ζ • e 0 ) ∂ϕ ∂e 0 (x) -ξ ≤ 0. ( 3
{v i (x)} ≤ V| Γ (x) ≤ min i=1,...,N {v i (x) + c i (x)}. Proof. Let i ∈ {1, . . . , N }, x ∈ Γ and z ∈ P i \Γ such that |x -z| is small. It suffices to prove (a) v i (x) ≤ V| Γ (x) and (b) V| Γ (x) ≤ v i (x) + c i (x).
(a) Consider any control law α such that (y x , α) ∈ T x . Let α z,x be a control law which connects z to x (which exists thanks to Lemma 3.2) and consider the control law

α(x) =    α z,x (s) if s ≤ τ z,x , α(s -τ z,x ) if s > τ z,x .
This means that the trajectory goes from z to x with the control law α z,x and then proceeds with the control law α. Therefore,

V(z) = v i (z) ≤ J(z, α) = τz,x 0 i (y z, α(s), α(s)) e -λs ds + e -λτz,x J(x, α).
Since α is chosen arbitrarily and i is bounded by M , we obtain

v i (z) ≤ M τ z,x + e -λτz,x V(x).
Let z tend to x (then τ z,x tends to 0 by Lemma 3.2), we conclude v i (x) ≤ V(x).

(b) Consider any control law α z such that (y z , α z ) ∈ T z and use Lemma 3.2 to pick a control law α x,z connecting x to z. Consider the control law

α(x) =    α x,z (s) if s ≤ τ x,z , α z (s -τ x,z ) if s > τ x,z ,
for which the trajectory y x, α goes from x to z using the control law α x,z and then proceeds with the control law α z . Therefore,

V(x) ≤ J(x, α) = c i (x) + τx,z 0 i (y x, α(s), α(s)) e -λs ds + e -λτx,z J(z, α z ).
Since α z is chosen arbitrarily and i is bounded by M , we obtain

V(x) ≤ c i (x) + M τ x,z + e -λτx,z v i (z).
Let z tend x (then τ x,z tends to 0, by Lemma 3.2), we conclude

V(x) ≤ c i (x) + v i (x).
From Lemma 3.7 and Lemma 3.8, we conclude that V| Γ is a viscosity subsolution of (3.4). The last step of of the proof of Theorem 3.5 is to prove that V| Γ is a viscosity supersolution of (3.4). Lemma 3.9. The restriction of the value function V on the interface Γ, V| Γ satisfies

λV| Γ (x) + max -λ min i=1,...,N {v i (x) + c i (x)}, H Γ x, ∂V| Γ ∂e 0 (x) ≥ 0, x ∈ Γ,
in the viscosity sense.

Proof. Let x ∈ Γ and assume that

V(x) < min i=1,...,N {v i (x) + c i (x)}, for all n ∈ N, (3.12)
it suffices to prove that V(x) satisfies

λV| Γ (x) + H Γ x, ∂V| Γ ∂e 0 (x) ≥ 0,
in the viscosity sense. Let {ε n } be a sequence which tends to 0. For any n, let α n be an ε noptimal control, i.e. V(x) + ε n > J(x, α n ), and τ n be the first time the trajectory y x,αn leaves Γ, i.e.

τ n := inf i=1,...,N T i x,αn , where T i x,αn := {t ∈ R + : y x,αn (t) ∈ P i \Γ}.
We note that τ n is possibly +∞, in which case the trajectory y x,αn stays on Γ for all s ∈ [0, +∞). We consider the two following cases:

Case 1: There exists a subsequence of {τ n } (which is still denoted {τ n }) such that τ n → 0 as n → +∞ and at time τ n the trajectory enters P i 0 , for some i 0 ∈ {1, . . . , N }. This implies

V(x) + ε n > J(x, α n ) = τn 0 (y x,αn (s), α n (s)) e -λs ds + c i 0 (y x,αn (τ n ))e -λτn + v i 0 (y x,αn (τ n ))e -λτn .
Since is bounded by M , sending n to +∞, yields

V(x) ≥ c i 0 (x) + v i 0 (x),
which leads to a contradiction to (3.12).

Case 2: There exist a subsequence of {τ n } (which is still denoted {τ n }) and a positive constant C such that τ n > C. This means that from 0 to C, the trajectory y x,αn still remains in Γ. Thus, for all τ ∈ [0, C],

V| Γ (x) + ε n ≥ τ 0 (y x,n (t) , α n (t)) e -λt dt + V| Γ (y x,n (τ )) e -λτ ≥ τ 0 (y x,n (t) , α n (t)) dt + V| Γ (y x,n (τ )) e -λτ + o(τ ), (3.13)
where o(τ )/τ → 0 as τ → 0 and the last inequality is obtained by using the boundedness of . Let ϕ ∈ C 1 (Γ) such that V| Γ -ϕ has a minimum on Γ at x, i.e.

ϕ(x) -ϕ(z) ≥ V| Γ (x) -V| Γ (z), for all z ∈ Γ. (3.14)
From Lemma 3.6, it suffices to prove that

λV| Γ (x) + max (ζ,ξ)∈f Γ (x) -(ζ • e 0 ) ∂ϕ ∂e 0 (x) -ξ ≥ 0. (3.15)
Since lim n→∞ ε n = 0, it is possible to choose a sequence {t n } such that 0 < t n < C and ε n /t n → 0 as n → ∞. Thus from (3.13) and (3.14), we obtain

ϕ(x) -ϕ(y x,n (t n )) t n - 1 t n tn 0 (y x,n (t), α n (t))dt + 1 -e -λtn t n V| Γ (y x,n (t n )) ≥ - ε n t n + o(1

The Hamilton-Jacobi system and viscosity solutions

Admissible test-functions

Definition 3.10. A function ϕ :

P 1 × . . . × P N × Γ → R N is an admissible test-function if there exist (ϕ 1 , . . . , ϕ N , ϕ Γ ), ϕ i ∈ C 1 (P i ) and ϕ Γ ∈ C 1 (Γ), such that ϕ(x 1 , . . . , x N , x Γ ) = (ϕ 1 (x 1 ), . . . , ϕ N (x N ), ϕ Γ (x Γ )
). The set of admissible test-function is denoted by R(S).

Hamilton-Jacobi system

Define the Hamiltonian H i :

P i × (Re 0 × Re i ) → R by H i (x, p) = max a∈A i {-f i (x, a) • p -i (x, a)} and the Hamiltonian H + i : Γ × (Re 0 × Re i ) → R by H + i (x, p) = max a∈A + i (x) {-f i (x, a) • p -i (x, a)} ,
where

A + i (x) = {a ∈ A i : f i (x, a) • e i ≥ 0}
and consider the following Hamilton-Jacobi system

               λu i (x) + H i (x, ∂u i (x)) = 0, if x ∈ P i \Γ, λu i (x) + max H + i (x, ∂u i (x)) , -λu Γ (x) = 0, if x ∈ Γ, λu Γ (x) + max -λ min i=1,...,N {u i (x) + c i (x)}, H Γ x, ∂u Γ ∂e 0 (x) = 0, i ∈ {1, . . . , N }, (3.17)
and its viscosity solution U := (u 1 , . . . , u N , u Γ ).

Definition 3.11 (Viscosity solution with entry costs).

• A function U := (u 1 , . . . , u N , u Γ ) where u i ∈ U SC (P i ; R) for all i ∈ {1, . . . , N } and u Γ ∈ C(Γ, R), is called a viscosity subsolution of (3.17) if for any (ϕ 1 , . . . , ϕ N , ϕ Γ ) ∈ R(S), any i ∈ {1, . . . , N } and any x i ∈ P i , x ∈ Γ such that u i -ϕ i has a local maximum point on P i at x i and u Γ -ϕ Γ has a local maximum point on Γ at x, then

λu i (x i ) + H i (x i , ∂ϕ i (x i )) ≤ 0, if x i ∈ P i \Γ, λu i (x i ) + max H + i (x i , ∂ϕ i (x i )) , -λu Γ (x i ) ≤ 0, if x i ∈ Γ, λu Γ (x) + max -λ min i=1,...,N {u i (x) + c i (x)}, H Γ x, ∂ϕ Γ ∂e 0 (x) ≤ 0, • A function U := (u 1 , . . . , u N , u Γ ) where u i ∈ LSC (P i ; R) for all i ∈ {1, . . . , N } and u Γ ∈ C(Γ; R),
λu i (x i ) + H i (x i , ∂ϕ i (x i )) ≥ 0 if x i ∈ P i \Γ, λu i (x i ) + max H + i (x i , ∂ϕ i (x i )) , -λu Γ (x i ) ≥ 0 if x i ∈ Γ, λu Γ (x) + max -λ min i=1,...,N {u i (x) + c i (x)}, H Γ x, ∂ϕ Γ ∂e 0 (x) ≥ 0, • A functions U := (u 1 , . . . , u N , u Γ ) where u i ∈ C (P i ; R) for all i ∈ {1, . . . , N } and u Γ ∈ C(Γ; R)
, is called a viscosity solution of (3.17) if it is both a viscosity subsolution and a viscosity supersolution of (3.17).

Relations between the value function and the HJ system

In this section, we wish to prove that Theorem 3.12. Under Assumptions [A] and [A3], V := (v 1 , . . . , v N , V| Γ ) is a viscosity solution of (3.17), where the functions v i are defined in (3.1).

Proof. By Theorem 3.5, V| Γ is a viscosity solution of (3.4). Furthermore, if x ∈ P i \Γ , for any i ∈ {1, . . . , N } and (y x , α) ∈ T x , there exists a time τ small enough so that y x,α (t) ∈ P i \Γ for 0 ≤ t ≤ τ . Thus, the proof in this case is classical by using dynamic programming principle (see [START_REF] Bardi | Optimal control and viscosity solutions of Hamilton-Jacobi-Bellman equations[END_REF][START_REF] Barles | Solutions de viscosité des équations de Hamilton-Jacobi[END_REF]) and we do not detail it. Now assume x ∈ Γ, we shall prove that for all i ∈ {1, . . . , N }, the function v i satisfies

λv i (x) + max H + i (x, ∂v i (x)) , -λV| Γ (x) = 0, on Γ, (3.18)
in the viscosity sense. The proof of this case is a consequence of Lemma 3.13 and Lemma 3.15 below.

Lemma 3.13. For i ∈ {1, . . . N }, the function v i satisfies

λv i (x) + max H + i (x, ∂v i (x)) , -λV| Γ (x) ≤ 0, on Γ,
in the viscosity sense.

Proof. Let x ∈ Γ. From Lemma 3.8 we have v i (x) ≤ V| Γ (x). Hence, it suffices to prove that

λv i (x) + H + i (x, ∂v i (x)) ≤ 0,
in the viscosity sense. Let a i ∈ A i be such that f i (x, a i ) • e i > 0. By the Lipschitz continuity of f i (•, a i ), there exist r > 0 such that f i (z, a i ) • e i > 0 for all z ∈ B(x, r) ∩ (P i \Γ). Thus, there exists τ > 0 such that for all z ∈ B(x, r) ∩ (P i \Γ), there exists (y z , α z ) ∈ T z for which

α z (t) =    a i 0 ≤ t ≤ τ, α(t -τ ) t ≥ τ,
where α is chosen arbitrarily. It follows that y z (t) ∈ P i \Γ for all t ≤ τ . In other words, the trajectory y z cannot approach Γ since the speed pushes it away from Γ, for y z (t)

∈ P i ∩ B (Γ, r).
Note that it is not sufficient to choose a i ∈ A i such that f i (x, a i ) • e i = 0 since it may lead to f (z, a i ) • e i < 0 for all z ∈ P i \Γ. Next, since y z (t) ∈ P i \Γ for all t ≤ τ , we have

v i (z) ≤ J (z, α z ) = τ 0 i (y z (s) , a i ) e -λs ds + e -λτ J (y z (τ ) , α) .
This inequality holds for any α, thus

v i (z) ≤ τ 0 i (y z (s) , a i ) e -λs ds + e -λτ v i (y z (τ )) . (3.19) Furthermore, since f i (•, a) is Lipschitz continuous by [A1], for all t ∈ [0, τ ], |y z (t) -y x (t)| = z + t 0 f i (y z (s) , a i ) ds -x - t 0 f i (y x (s) , a i ) ds ≤ |z -x| + L t 0 |y z (s) -y x (s)| ds,
and by Grönwall's inequality,

|y z (t) -y x (t)| ≤ |z -x| e Lt , for all t ∈ [0, τ ],
yielding that y z (s) tends to y x (s) and τ 0 i (y z (s), α z (s))ds tends to τ 0 i (y x (s), α x (s))ds when z tends to x. Hence, from (3.19), by letting z → x, we obtain

v i (x) ≤ τ 0 i (y x (s) , a i ) e -λs ds + e -λτ v i (y x (τ )) . Let ϕ be a function in C 1 (P i ) such that 0 = v i (x) -ϕ (x) = max P i (v i -ϕ). This yields ϕ (x) -ϕ (y x (τ )) τ ≤ 1 τ τ 0 i (y x (s) , a i ) e -λs ds + (e -λτ -1)v i (y x (τ )) τ .
By letting τ tend to 0, we obtain that -f i (x, a i ) • ∂ϕ(x) ≤ i (x, a i ) -λv i (x). Hence,

λv i (x) + sup a∈A i :f i (x,a)•e i >0 {-f i (x, a i ) • ∂ϕ(x) -i (x, a i )} ≤ 0.
Finally, by [A], it is easy to check that sup

a∈A i :f i (x,a)•e i >0 {-f i (x, a i ) • ∂ϕ(x) -i (x, a i )} = max a∈A i :f i (x,a)•e i ≥0 {-f i (x, a i ) • ∂ϕ(x) -i (x, a i )} .
The proof is complete.

Before we give a proof of the fact that v i is a viscosity supersolution of (3.18), we prove the following useful lemma. Lemma 3.14. Let x ∈ Γ and assume that

v i (x) < V| Γ (x).
(3.20)

Then, there exist τ > 0 and r > 0 such that for any z ∈ (P i \Γ) ∩ B(x, r), any ε sufficiently small and any ε-optimal control law α ε z for z,

y z,α ε z (s) ∈ P i \Γ, for all s ∈ [0, τ ].
This lemma means that if (3.20) holds, then any trajectories starting from z ∈ (P i \Γ) ∩ B(x, ε) still remains on P i \Γ for a fixed amount of time. Hence, this lemma takes into account the situation that the trajectory does not leave P i \Γ.

Proof of Lemma 3.14. We proceed by contradiction. Suppose that there exist sequences of positive numbers {ε n }, {τ n } and {x n } ⊂ P i \Γ such that ε → 0 + , x n → x, τ n → 0 + and (y xn , α n ) ∈ T xn where α n , ε n -optimal control law, satisfies y xn (τ n ) ∈ Γ. This implies that

v i (x n ) + ε n > J(x n , α n ) = τn 0 (y xn (s), α n (s))e -λs ds + e -λτn J(y xn (τ n ), α n (• + τ n )). Since is bounded by M by [A1], then v i (x n ) + ε n ≥ -τ n M + e -λτn V| Γ (y xn (τ n )). Take a limit at infinity as n → ∞, we get v i (x) ≥ V| Γ (x) which contradicts (3.20).
Lemma 3.15. The function v i is a viscosity supersolution of (3.18).

Proof. Let x ∈ Γ. From Lemma 3.8, we have v j (x) ≤ V| Γ (x) for all j. This yields that if the inequality (3.20) does not hold then v i (x) = V| Γ (x) and therefore v i satisfies

λv i (x) + max H + i (x, ∂v i (x)) , -λV| Γ (x) ≥ λv i (x) -λV| Γ (x) = 0.
Hence, in the rest of the proof, we assume that the inequality (3.20) holds and we aim to prove that

λv i (x) + H + i (x, ∂v i (x)) ≥ 0, in the viscosity sense. Let ϕ ∈ C 1 (P i ) be such that 0 = v i (x) -ϕ (x) ≤ v i (z) -ϕ (z) , for all z ∈ P i , ( 3.21)
and {x ε } ⊂ P i \Γ be any sequence such that x ε tends to x when ε tends to 0. From the dynamic programming principle and Lemma 3.14, there exists τ such that for any ε > 0, there exists (y ε , α ε ) := (y xε , α ε ) ∈ T xε such that y ε (τ ) ∈ P i \Γ for all τ ∈ [0, τ ] and

v i (x ε ) + ε ≥ τ 0 i (y ε (s) , α ε (s)) e -λs ds + e -λτ v i (y ε (τ )) .
Then, according to (3.21),

v i (x ε ) -v i (x) + ε ≥ τ 0 i (y ε (s) , α ε (s)) e -λs ds + e -λτ [ϕ (y ε (τ )) -ϕ (x)] -v i (x) (1 -e -λτ ). (3.22)
Next, one has

   τ 0 i (y ε (s) , α ε (s)) e -λs ds = τ 0 i (y ε (s) , α ε (s)) ds + o (τ ) , [ϕ (y ε (τ )) -ϕ (x)] e -λτ = ϕ (y ε (τ )) -ϕ (x) + τ o ε (1) + o (τ ) ,
and v i (x ε ) -v i (x) = o ε (1) , v i (x) (1 -e -λτ ) = o (τ ) + τ λv i (x) ,
where the notation o ε (1) is used for a quantity which is independent on τ and tends to 0 as ε tends to 0. For a positive integer k, the notation o(τ k ) is used for a quantity that is independent on ε and such that o(τ k )/τ k → 0 as τ → 0. Finally, O(τ k ) stands for a quantity independent on ε such that O(τ k )/τ k remains bounded as τ → 0. From (3.22), we obtain that

τ λv i (x) ≥ τ 0 i (y ε (s) , α ε (s)) ds + ϕ (y ε (τ )) -ϕ (x) + τ o ε (1) + o (τ ) + o ε (1) . (3.23)
Since y ε (τ ) ∈ P i for all ε, we have

ϕ (y ε (τ )) -ϕ (x ε ) = τ 0 ∂ϕ (y ε (s)) • ẏε (s) ds = τ 0 ∂ϕ (y ε (s)) • f i (y ε (s) , α ε (s)) ds.
Hence, from (3.23) [START_REF] Achdou | Hamilton-Jacobi equations on networks[END_REF] and that ∂ϕ (y ε (s)) = ∂ϕ (x) + o ε (1) + O (s). Thus

τ λv i (x) - τ 0 [ i (y ε (s) , α ε (s)) + ∂ϕ (y ε (s)) • f i (y ε (s) , α ε (s))] ds ≥ τ o ε (1) + o (τ ) + o ε (1) . (3.24) Moreover, ϕ (x ε ) -ϕ (x) = o ε
λv i (x) - 1 τ τ 0 [ i (y ε (s) , α ε (s)) + ∂ϕ (x) • f i (y ε (s) , α ε (s))] ds ≥ o ε (1) + o (τ ) τ + o ε (1) τ . (3.25) Let ε n → 0 as n → ∞ and τ m → 0 as m → ∞ such that (a mn , b mn ) := 1 τ m τm 0 f i (y εn (s) , α εn (s)) ds, 1 τ m τm 0 i (y εn (s) , α εn (s)) ds -→ (a, b)
as n, m → ∞. In view of [A1] and [A2], we have

max{|f i (y εn (s), α εn (s)) -f i (x, α εn (s))|, | i (y εn (s), α εn (s)) -i (x, α εn (s))|} ≤ L|y εn (s) -x| ≤ L|y εn (s) -x εn | + L|x εn -x| ≤ LM τ m + L|x εn -x|.
Therefore, Since y εn (τ m ) • e i > 0, then

   f i (y εn (s) , α εn (s)) • e i = f i (x, α εn (s)) • e i + o n (1) + o m (1) , i (y εn (s) , α εn (s)) = i (x, α εn (s)) + o n (1) + o m (1) . Hence, (a mn , b mn ) = 1 τ m τm 0 f i (x, α εn (s)) ds, 1 τ m τm 0 i (x, α εn (s)) ds + o n (1) + o m (1)
∈ FL i (x) + o n (1) + o m (1) , since FL i (x)
1 τ m τm 0 f i (y εn (s) , α εn (s)) ds • e i ≥ - x εn • e i τ m ≥ - |x εn | τ m .
Let ε n → 0 then let τ m → 0, to obtain f i (x, a) • e i ≥ 0, thus a ∈ A + i (x). Hence, from (3.25) and (3.26), replacing ε by ε n and τ by τ m , let ε n → 0, then let τ m → 0, we finally obtain

λv i (x) + max a∈A + i (x) {-f i (x, a) • ∂ϕ (x) -i (x, a)} ≥ λv i (x) + [-f i (x, a) • ∂ϕ (x) -i (x, a)] ≥ 0.

A Comparison Principle and Uniqueness

In this section we establish a comparison principle for the Hamilton-Jacobi system (3.17). From the comparison principle, it easily follows that V := (v 1 , . . . , v N , V| Γ ) is the unique viscosity solution of (3.17).

Theorem 3.16 (Comparison Principle). Under Assumptions [A] and [A3]

, let U and W be respectively bounded continuous viscosity sub and supersolution of (3.17). Then U ≤ W componentwise.

We are going to give two proofs of Theorem 3.16. The first one, given below, is inspired by Lions & Souganidis [START_REF] Lions | Viscosity solutions for junctions: well posedness and stability[END_REF][START_REF] Lions | Well-posedness for multi-dimensional junction problems with Kirchoff-type conditions[END_REF] by using arguments from the theory of PDE. The second one (displayed in the appendix) is inspired by the works of Achdou, Oudet & Tchou [START_REF] Achdou | Hamilton-Jacobi equations for optimal control on junctions and networks[END_REF] and Barles, Briani & Chasseigne [START_REF] Barles | A Bellman approach for two-domains optimal control problems in R N[END_REF][START_REF] Barles | A Bellman approach for regional optimal control problems in R N[END_REF] by using arguments from the theory of optimal control and PDE techniques. Both proofs make use of the following important properties of viscosity subsolutions displayed in the next lemma.

Lemma 3.17. Under Assumptions [A] and [A3]

, let U = (u 1 , . . . , u N , u Γ ) be a bounded continuous viscosity subsolution of (3.17), for any i ∈ {1, . . . , N } and x ∈ Γ, the function u i is Lipschitz continuous in B(Γ, r) ∩ P i . Therefore, there exists a test-function ϕ i ∈ C 1 (P i ) touching u i from above at x.

Proof. The proof of Lemma 3.17 is based on the fact that if U = (u 1 , . . . , u N , u Γ ) is a viscosity subsolution of (3.17), then for any i ∈ {1, . . . , N }, u i is a viscosity subsolution of

   λu i (x) + H i (x, ∂u i (x)) = 0, if x ∈ P i \Γ, λu i (x) + H + i (x, ∂u i (x)) = 0, if x ∈ Γ. (3.27)
Therefore, the proof is complete by applying the result in [25, Section 3.2.3] (which is based on the proof of Ishii [START_REF] Ishii | A short introduction to viscosity solutions and the large time behavior of solutions of Hamilton-Jacobi equations[END_REF]).

A first proof of Theorem 3. [START_REF] Graber | Discontinuous solutions of Hamilton-Jacobi equations on networks[END_REF]. First of all, we claim that there exists a positive constant M such that (φ 1 , . . . φ N , φ Γ ), where φ j :

P j → R, φ j (x) = -|x| 2 -M and φ Γ : Γ → R, φ Γ (z) = -|z| 2 -M ,
is a viscosity subsolution of (3.17). Indeed, for any j ∈ {1, . . . , N }, since f j and j are bounded by M , one has H j (x, p) = max

a∈A j {-f j (x, a) • p -j (x, a)} ≤ M (|p| + 1).
Thus, using Cauchy-Schwarz inequality, there exists M > 0 such that λ(-|x| 2 -M ) + M (2|x| + 1) < 0, for all x ∈ P j .

The claim for φ j is proved and we can prove similarly the one for φ Γ . Next, for 0

< µ < 1, µ close to 1, setting u µ j = µu j + (1 -µ)φ j and u µ Γ = µu Γ + (1 -µ)φ Γ , then (u µ 1 , . . . , u µ N , u µ Γ )
is a viscosity subsolution of (3.17). Moreover, since u µ j and u µ Γ tend to -∞ as |x| and |z| tend to +∞ respectively, the functions u µ j -w j and u µ Γ -w Γ have maximum values M µ j and M µ Γ which are reached at some points xj and xΓ respectively. We argue by contradiction, through considering the two following cases:

Case A Assume that M µ i > M µ Γ and M µ i > 0. Since (u µ 1 , . . . , u µ N , u µ Γ )
is a viscosity subsolution of (3.17), by Lemma 3.17, there exists a positive number L such that u µ i is Lipschitz continuous with Lipschitz constant L in P i ∩ B(x i , r). We consider the function Ψ i,ε :

P i × P i → R which is defined by Ψ i,ε (x, y) := u µ i (x) -w i (y) - 1 2ε (-x 0 + y 0 + δ (ε)) 2 + (-x i + y i + δ (ε)) 2 -|x -xi | 2 ,
(3.28) where ε > 0, δ(ε) := (L + 1) ε and x = (x i , x 0 ), y = (y i , y 0 ) ∈ Re i × Re 0 . It is clear that Ψ i,ε attains its maximum M ε,γ at (x ε , y ε ) ∈ P i × P i . We claim that

       M ε → max P i {u µ i -w i } = u µ i (x i ) -w i (x i ), x ε , y ε → xi and (x ε -y ε ) 2 ε → 0, as ε → 0. (3.29)
Indeed, we have

M ε = u µ i (x ε ) -w i (y ε ) - -x 0 ε + y 0 ε + δ (ε) 2 + -x i ε + y i ε + δ (ε) 2 2ε -|x ε -xi | 2 ≥ u µ i (x i ) -w i (x i ) - (L + 1) 2 2 ε. (3.30) Since M µ i = u µ i (x i ) -v i (x i ) > 0, M ε
is positive when ε is small enough. Furthermore, since w i is bounded and u µ i is bounded from above, we have |x ε -xi | 2 is bounded and x ε -y ε → 0 as ε → 0. Hence, after extraction of a subsequence, x ε , y ε → x ∈ P i as ε → 0, for some x ∈ P i . Thus, from (3.30) we obtain

M µ i ≥ u i (x) -w i (x) -|x -xi | 2 ≥ lim sup ε→0 M ε ≥ lim inf ε→0 M ε ≥ M µ i .
This implies that M ε → M µ i , (x ε -y ε ) 2 /ε → 0 as ε → 0 and x = xi . The claim is proved. From now on in this proof we only consider the case when xi ∈ Γ, since otherwise, the proof follows by applying the classical theory (see [START_REF] Bardi | Optimal control and viscosity solutions of Hamilton-Jacobi-Bellman equations[END_REF][START_REF] Barles | Solutions de viscosité des équations de Hamilton-Jacobi[END_REF]). We claim that x ε / ∈ Γ for ε small enough. Indeed, assume by contradiction that x ε ∈ Γ, i.e. x i ε = 0, we have (a) If y ε / ∈ Γ, then let z ε = (y i ε , x 0 ε ), we have

M ε = u µ i (x ε ) -w i (y ε ) - -|x 0 ε | + |y 0 ε | + δ (ε) 2 + |y i ε | + δ (ε) 2 2ε -|x ε -xi | 2 ≥ u µ i (z ε ) -w i (y ε ) - -|x 0 ε | + |y 0 ε | + δ (ε) 2 + -|y i ε | + |y i ε | + δ (ε) 2 2ε -|z ε -xi | 2 .
Since u µ i is Lipschitz continuous in B (x i , r) ∩ P i , we see that for ε small enough

L|y i ε | ≥ u i (x ε ) -u i (z ε ) ≥ |y i ε | 2 2ε + |y i ε |δ (ε) ε + |x ε -xi | 2 -|z ε -xi | 2 ≥ |y i ε |δ (ε) ε -|y i ε ||x ε + z ε -2x i |. Therefore, if y i ε,γ = 0, then L ≥ L + 1 -|x ε + z ε -2x i |, which leads to a contradiction, since x ε , z ε tend to xi as ε → 0. (b) If y ε ∈ Γ, i.e. y i ε = 0, then let z ε = (ε, x 0 ε ), we have M ε = u i (x ε ) -w i (y ε ) - -|x 0 ε | + |y 0 ε | + δ (ε) 2 + δ (ε) 2 2ε -|x ε -xi | 2 ≥ u i (z ε ) -w i (y ε ) - -|x 0 ε | + |y 0 ε | + δ (ε) 2 + (-|ε| + δ (ε)) 2 2ε -|z ε -xi | 2 .
Since

u µ i is Lipschitz continuous in B (x i , r) ∩ P i , we obtain Lε ≥ u µ i (x ε ) -u µ i (z ε ) ≥ - ε 2 + δ(ε) -ε|x ε + z ε -2x i |.
This implies that L ≥ L + 1/2 -|x ε + z ε -2x i |, which yields a contradiction since x ε , z ε tend to xi as ε → 0.

The second claim is proved. We consider the following three possible cases Case A.1 There exists a subsequence of {y ε } (still denoted by {y ε }) such that y ε ∈ Γ and w i (y ε ) ≥ w Γ (y ε ). Since x ε , y ε → xi as ε → 0 and u µ i is continuous, for ε small enough, we have

w Γ (y ε ) ≤ w i (y ε ) < u µ i (y ε ) = u µ i (x ε ) + o ε (1) ≤ u µ Γ (y ε ). (3.31)
Recall that the second inequality of (3.31) holds since M µ i > 0 and the last inequality of (3.31) holds since u µ i and u µ Γ satisfy

λu µ i (x) + max H + i (x, ∂u µ i (x)) , -λu µ Γ (x) ≤ 0, (3.32)
in the viscosity sense. From (3.31),

u µ i (x ε ) -w i (y ε ) + o ε (1) ≤ u µ Γ (y ε ) -w Γ (y ε ) ≤ M µ Γ .
Let ε → 0, thanks to (3.29), sup{u µ i -w i } = M µ i ≤ M µ Γ , which leads us to a contradiction since we assume that M µ i > M µ Γ in Case A.

Case A.2 There exists a subsequence of {y ε } such that y ε ∈ Γ and

λw i (y ε ) + H + i y ε , -x ε + y ε + δ(ε) ε ≥ 0.
On the one hand, since H + i (x, p) ≤ H i (x, p) for all x ∈ Γ and p ∈ Re i × Re 0 , we have

λw i (y ε ) + H i y ε , -x ε + y ε + δ (ε) ε ≥ 0. (3.33)
On the other hand, we have a viscosity inequality for u µ i at x ε ∈ P i \Γ:

λu µ i (x ε ) + H i x ε , -x ε + y ε + δ (ε) ε + 2(x ε -xi ) ≤ 0. ( 3
λ(u µ i (x ε ) -w i (y ε )) ≤ H i y ε , -x ε + y ε + δ (ε) ε -H i x ε , -x ε + y ε + δ (ε) ε + 2(x ε -xi ) .
In view of [A1] and [A2], there exists C i > 0 such that for any x, y ∈ P i and p, q ∈ R

|H i (x, p) -H i (y, q)| ≤ |H i (x, p) -H i (y, p)| + |H i (y, p) -H i (y, q)| ≤ C i |x -y| (1 + |p|) + C i |p -q| .
This, in turn, yields

λ(u µ i (x ε ) -w i (y ε )) ≤ C i |x ε -y ε | (1 + |-x ε + y ε + δ(ε)| ε + 2|x ε -xi |) + 2|x ε -xi | .
Letting ε to ∞ and applying (3.29), we obtain that max P i {u µ i -w i } = M µ i ≤ 0, which leads to a contradiction. Case A.3 There exists a subsequence of {y ε } such that y ε ∈ P i \Γ. Since the inequalities (3.33) and (3.34) still hold, a contradiction is obtained by using the similar arguments as in the previous case.

Case B Assume that

M µ Γ ≥ max j {M µ j } and M µ Γ > 0. (3.35)
We consider the function

Φ ε : Γ × Γ -→ R (ζ, ξ) -→ u µ Γ (ζ) -w Γ (ξ) - |ζ -ξ| 2 2ε -|ζ -xΓ | 2 .
By classical arguments, Φ ε attains its maximum

K ε at (ζ ε , ξ ε ) ∈ Γ × Γ and        K ε → M µ Γ = max Γ {u µ Γ -w Γ } = u µ Γ (x Γ ) -w Γ (x Γ ), ζ ε , ξ ε → xΓ and (ζ ε -ξ ε ) 2 ε → 0, as ε → 0. (3.36)
We consider the following two cases:

Case B.1 There exists a subsequence {ξ ε } (still denoted by {ξ ε }) such that

λw Γ (ξ ε ) + H Γ ξ ε , ζ ε -ξ ε 2ε ≥ 0.
We also have a viscosity inequality for

u µ Γ at ζ ε λu µ Γ (ζ ε ) + H Γ ζ ε , ζ ε -ξ ε 2ε + 2(ζ ε -xΓ ) ≤ 0.
By applying the classical arguments, one has (ζ ε -ξ ε ) 2 /ε → 0 and ζ ε , ξ ε → xΓ as ε → 0. Subtracting the two above inequalities and sending ε to 0, we obtain that

u µ Γ (x Γ ) -w Γ (x Γ ) = M µ Γ ≤ 0,
w Γ (ξ ε ) ≥ min j {w j (ξ ε ) + c j (ξ ε )} = w k (ξ ε ) + c k (ξ ε ).
(3.37)

Since ζ ε , ξ ε → xΓ as ε → 0 (by (3.36)) and u µ Γ is continuous, for ε small enough, we have

w k (ξ ε ) + c k (ξ ε ) ≤ w Γ (ξ ε ) < u µ Γ (ξ ε ) = u µ Γ (ζ ε ) + o ε (1) ≤ u µ k (ξ ε ) + c k (ξ ε ).
Recall that the second inequality holds since M µ Γ > 0 and the last one comes from the fact that u µ Γ satisfies

λu µ Γ (x) + max -λ min i=1,...,N {u µ i (x) + c i (x)}, H Γ x, ∂u µ Γ ∂e 0 (x) ≥ 0,
in the viscosity sense. This implies that

u µ Γ (ζ ε ) -w Γ (ξ ε ) + o ε (1) ≤ u µ k (ξ ε ) -w k (ξ ε ) ≤ M µ k . (3.38)
Letting ε → 0 and applying (3.36), we get

M µ Γ ≤ u µ k (x Γ ) -w k (x Γ ) ≤ M µ k . This implies from (3.35) that M µ Γ = M µ k = u µ k (x Γ ) -w k (x Γ ) > 0. ( 3
}) such that w k (y ε ) ≥ w Γ (y ε ). Letting ε → 0, one gets w k (x Γ ) ≥ w Γ (x Γ ).
In the other hands, letting ε → 0 in (3.37), one also gets

w Γ (x Γ ) ≥ w k (x Γ ) + c k (x Γ ) > w k (x Γ )
which leads to a contradiction. Finally, the two last cases are proved by using the same arguments as in the proofs of Case A.2 and Case A.3.

Finally, we get M µ

Γ ≤ 0 and M µ i ≤ 0 for all i ∈ {1, . . . , N } and µ ∈ (0, 1), µ close to 1. We conclude by letting µ tend to 1.

Corollary 3.18. The value function V has the property that the vector V = (v 1 , . . . , v N , V| Γ ) is the unique viscosity solution of (3.17).

Hamilton-Jacobi system under a moderate controllability condition near the interface

In this section we derive the Hamilton-Jacobi system (HJ) associated with the above optimal control problem and prove that the value function given by (2.2) is the unique viscosity solution of that (HJ) system, under the condition [ Ã3] below, which is weaker that the strong controllability condition [A3] used above.

[ Ã3] (Moderate controllability) There exist positive numbers δ and R such that

• for any i = 1, . . . , N and for x ∈ Γ [-δ, δ] ⊂ {f i (x, a) • e i : a ∈ A i }. (4.1)
• for any x ∈ Γ, there exists j ∈ {1, . . . , N } such that

[-δ, δ] ⊂ {f j (x, a) • e 0 : a ∈ A Γ j }. (4.2)
Remark 4.1.

1.

[ Ã3] allows us to construct an admissible control law and a corresponding trajectory that goes from one point on B(Γ, R) ∩ P i to another one on Γ, see Lemma 4.4 below.

Assumption [ Ã3

] is rather stronger than the assumption (4.1) called "normal controllability" (and denoted [ H3]) which is used in [START_REF] Oudet | Hamilton-Jacobi equations on networks or heterogeneous structures[END_REF] related to the case without entry costs. With only [ H3] and the effect of the entry costs, we could not prove that our value function is continuous on Γ and establish a corresponding Hamilton-Jacobi system. The moderate assumption [ Ã3] allows us to overcome the difficulties induced by the entry costs.

Remark 4.2. Since for any i ∈ {1, . . . , N }, f i is Lipschitz continuous with respect to the state variable (from Assumption [A1]), it is easy to check that there exists a positive number R such that for all i ∈ {1, . . . , N } and x ∈ B(Γ, R)

∩ P i [- δ 2 , δ 2 ] ⊂ {f i (x, a) • e i : a ∈ A i }.
Under Assumptions [A] and [ Ã3], following the arguments used in [25, Theorem 3.3.1], it holds that for any x ∈ S, the set Y x is not empty. Hence, we can define the set of admissible controlled trajectories starting from the initial datum x to be

T x = (y x , α) ∈ L ∞ loc R + ; M : y x ∈ Lip R + ; S and y x (t) = x + t 0 f (y x (s) , α (s)) ds .
The cost functional J associated to the trajectory (y x , α) ∈ T x is defined by

J (x, α) = ∞ 0 (y x (t), α(t))e -λt dt + N i=1 k∈K i c i (x ik )e -λt ik , and V (x) = inf (yx,α)∈Tx J (x, α).
Compared to the proof of Lemma 3.3, we cannot use the classical control theory arguments to prove that the value function V is continuous on P i \Γ for all i ∈ {1, . . . , N }. The main problem is that, unlike under Assumption [A3], with the new assumption [ Ã3], for x, z close to Γ, there is possibly no admissible trajectory y x ∈ T x from x to z. We will later prove that V is continuous on P i \Γ for any i by using the comparison principle, but for the moment, V | P i \Γ is a priori a discontinuous function. In order to deal with such a discontinuity, we use the following notions Definition 4.3. Let i ∈ {1, . . . , N } and u i : P i \Γ → R be a bounded function.

• The upper semi-continuous envelope of u is defined by

u i (x) = lim sup z→x u i (z).
• The lower semi-continuous envelope of u i is defined by

u i (x) = lim inf z→x u(z).
Notice that both functions u i and u i are defined on P i instead of P i \Γ.

Lemma 4.4. Under Assumptions [A] and [ Ã3],

(a) there exists a positive constant C such that for all z ∈ Γ and x ∈ S ∩ B(Γ, R), there exist (y x , α x,z ) ∈ T x and τ x,z such that z = y x (τ x,z ) and τ x,z ≤ C|x -z|,

(b) V | Γ is Lipschitz continuous on Γ.
Proof. We first note that by applying the classical arguments, (b) is a direct consequence of (a) (see [START_REF] Bardi | Optimal control and viscosity solutions of Hamilton-Jacobi-Bellman equations[END_REF]). To prove (a), we consider the two following cases.

Case 1 x, z ∈ Γ. From (4.2), we can find (y x , α x,z ) ∈ T x for which α x,z satisfies

f x + z -x |z -x| δt, α x,z (t) = δ z -x |z -x| , for all t ≤ |z -x| δ .
It is easy to check that y x (|z -x|/δ) = z, i.e. τ x,z = |z -x|/δ.

Case 2 x = (x i , x 0 ) ∈ P i \Γ and z = (0, z 0 ) ∈ Γ. One the one hand, from (4.1) and (4.2), we can pick (y x , α x,z ) ∈ T x for which α x,z satisfies

       f (y x (t), α x,z (t)) • e i = - δ 2 , t ≤ 2x i δ , f (y x (t), α x,z (t)) = δ z -y x (2x i /δ) |z -y x (2x i /δ)| , 2x i δ ≤ t ≤ 2x i δ + |z -y x (2x i /δ)| δ .
This simply means that 2x i /δ is the exit time of y x from P i \Γ and τ

x,z = 2x i δ + |z-yx(2x i /δ)| δ . On the other hand, let x = (0, x 0 ) ∈ Γ, since f is bounded by M , it holds that |z -y x (2x i /δ)| ≤ |z -x| + |x -y x (2x i /δ)| ≤ |z -x| + x i (4M 2 δ 2 -1) 1/2 δ .
Since x i ≤ |z -x|, we finally obtain

τ x,z = 2x i δ + |z -y x (2x i /δ)| δ ≤ |z -x| δ 3 + (4M 2 δ 2 -1) 1/2 δ .

Value function on the interface

Theorem 4.5. Under Assumptions [A] and [ Ã3], the restriction of the value function V to Γ, V | Γ , is a unique viscosity solution of the equation

λu Γ (x) + max -λ min{v i (x) + c i (x)}, H Γ x, ∂u Γ ∂e 0 (x) = 0, x ∈ Γ. (4.3)
Here a function u Γ : Γ → R is called a viscosity solution of (4.3) if it satisfies

λu Γ (x) + max -λ min{v i (x) + c i (x)}, H Γ x, ∂u Γ ∂e 0 (x) ≤ 0, in the viscosity sense (4.4) λu Γ (x) + max -λ min{v i (x) + c i (x)}, H Γ x, ∂u Γ ∂e 0 (x) ≥ 0, in the viscosity sense (4.5)
The proof of Theorem 4.5 is a consequence of the next three lemmas which are similar to Lemma 3.7, Lemma 3.8 and Lemma 3.9, respectively.

Lemma 4.6. The restriction of the value function

V on the interface Γ, V | Γ satisfies λV | Γ (x) + H Γ x, ∂V | Γ ∂e 0 (x) ≤ 0, x ∈ Γ,
in the viscosity sense.

Proof. The proof of this lemma is similar to the proof of Lemma 3.7.

Lemma 4.7. For all x ∈ Γ max i=1,...,N

{v i (x)} ≤ V | Γ (x) ≤ min i=1,...,N {v i (x) + c i (x)}.
Proof. Let i ∈ {1, . . . , N }, it suffices to prove (a)

v i (x) ≤ V | Γ (x) and (b) V | Γ (x) ≤ v i (x) + c i (x) below.
(a) There exists a sequence

{x n } n∈N ⊂ (P i \Γ) ∩ B(Γ, R) such that x n → x and v i (x n ) → v i (x)
as n → ∞. From Lemma 4.4, there exists a positive constant C such that there exist (y xn , α n ) ∈ T xn and τ n such that y xn (τ n ) = x and τ n ≤ |x n -x| for all n. This implies

v i (x n ) = V (x n ) ≤ τn 0 (y xn (s), α n (s))e -λs ds + V (x)e -λτn ≤ M C|x n -x| + V (x)e -λτn .
Letting n → ∞, one gets v i (x) ≤ V (x).

(b) From Assumption [ Ã3], it allows to pick (y n , α n ) ∈ T x and τ n → 0 where α n satisfies

f (y n (t), α n (t)) • e i = δ 2 > 0, for all t ≤ τ n . Let x n := y n (τ n ) then x n ∈ P i \Γ and x n → x as n → ∞. This implies V (x) ≤ τn 0 (y n (s), α n (s))e -λs ds + c i (x) + V (x n )e -λτn ≤ M Cτ n + c i (x) + v i (x n )e -λτn .
Taking limsup of both sides as n → ∞, one gets

V (x) ≤ c i (x) + v i (x). Lemma 4.8. Let x ∈ Γ and assume that V | Γ (x) < min{v i (x) + c i (x)}, then V | Γ satisfies λV | Γ (x) + H Γ x, ∂V | Γ ∂e 0 (x) ≥ 0.
in the viscosity sense.

Proof. The proof of this lemma is similar to the proof of Lemma 3.9. The proof of viscosity subsolution follows from that of Lemma 3.13 where instead of using an arbitrary sequence which tends to x ∈ Γ as n → ∞, we work with a sequence {x n } n∈N ⊂ P i \Γ which satisfies

Hamilton-Jacobi system and viscosity solution

   x n → x, v i (x n ) → v i (x), as n → ∞.
The first difference between the proof of viscosity supersolution with the one of Lemma 3.15 is the following lemma, which has a similar proof as Lemma 3.14. Lemma 4.11. Let x ∈ Γ and assume that

v i (x) < V | Γ (x). (4.6)
Then, for any sequence {z n } n∈N ⊂ P i \Γ such that

   z n → x, v i (z n ) → v i (x), as n → ∞, (4.7)
there exist τ > 0 and r > 0 such that, for any ε sufficiently small and any ε-optimal control law α ε zn for z n , y zn,α ε zn (s) ∈ P i \Γ, for all s ∈ [0, τ ]. The last difference between the proof of viscosity supersolution with the one of Lemma 3.15 is that instead of using an arbitrary sequence which tends to x ∈ Γ as n → ∞, we work with a sequence {z n } n∈N ⊂ P i \Γ satisfying (4.7).

Comparison Principle and Uniqueness

In the proof of the Comparison Principle under the strong controllability assumption [A3], the key argument is that the restrictions of the viscosity subsolutions of (3.17) to P i \Γ are Lipschitz continuous in a neighborhood of Γ. This property is not obtained directly in the current framework, under the moderate controllability assumption [ Ã3]. We rather proceed as follows. First, we regularize a restriction of viscosity subsolution to P i \Γ using sup-convolution to obtain a family of Lipschitz continuous functions. Then we use this family of regularized functions to prove a local comparison principle which we finally extend to a global comparison principle by applying similar arguments as the ones in the proof of [START_REF] Oudet | Hamilton-Jacobi equations on networks or heterogeneous structures[END_REF]Theorem 3.3.4].

We begin the first step with sup-convolution definition.

Definition 4.12. Let u i : P i → R be a bounded, USC function and α, p be positive numbers.

Then sup-convolution of u i with respect to the x 0 -variable is defined by

u α i (x) := sup z 0 ∈R    u(z 0 e 0 + x i e i ) - |z 0 -x 0 | 2 α 2 + α p 2    , if x = x 0 e 0 + x i e i .
We borrow the following useful lemmas from [25, Lemma 3.3.7 to 3.3.10].

Lemma 4.13. Let u i : P i → R be a bounded function and α, p be positive numbers. Then, for any x ∈ P i , the supremum which defines u α i is achieved at a point z 0 ∈ R such that

|z 0 -x 0 | 2 α 2 + α p 2 ≤ 2||u i || L ∞ (P i ) + α p 2 . ( 4.8)
Lemma 4.14. Let u i : P i → R be a bounded function. Then for any α, p > 0, the supconvolution u α is locally Lipschitz continuous with respect to x 0 , i.e. for any compact subset K in R 3 , there exists C K > 0 such that for all x = x 0 e 0 + x i e i , y = y 0 e 0 + x i e i ∈ K ∩ P i

|u α i (x) -u α i (y)| ≤ C K |x 0 -y 0 |.
Lemma 4.15. Under Assumptions [A] and [ Ã3], let R > 0 be a positive number as in Remark 4.2. Let u : P i → R be a bounded, USC subsolution of (3.17) and α, p be some positive numbers. Then for all M > 0, We denote by Q i the set P i ∩ B(ȳ, R). Let u i : P i → R be a bounded, USC viscosity subsolution of (3.17) in Q i . Then for all α, p > 0 sufficient small, if we set

u α i is Lipschitz continuous in B M (Γ, R) ∩ P i , where B M (Γ, R) := {x ∈ B(Γ, R) : |x 0 | ≤ M }.
Q α i = x ∈ Q i : dist(x, ∂Q i ) > α 4 1/p ||u i || 2/p L ∞ (P i ) -α 1/2 , ( 4.9)
the function u α i defined in Definition 4.12 is Lipschitz continuous in Q α i . Moreover, there exists m : (0, ∞) → (0, ∞) such that lim α→0 m(α) = 0 and (u α 1 -m(α), . . . , u α N -m(α), u Γ ) is a viscosity subsolution of (3.17) in Q α := ∪ i Q α i . Lemma 4.13 and Lemma 4.14 on sup-convolution are well known result, but we give a short proof for completeness. First of all, it is easy to see that the supremum in Definition 4.12 is achieved at some point z 0 ∈ R. We have

u α i (x) = u(z 0 e 0 + x i e i ) - |z 0 -x 0 | 2 α 2 + α 2 p 2 ≥ u(x 0 e 0 + x i e i ) + α p 2 ,
and because of the boundedness of u, we get (4.8). Next, let K be a compact subset of P i , for x, y ∈ K, from the definition of sup-convolution, we have

u α i (x) -u α i (y) ≤ sup z 0 ∈R    - |z 0 -x 0 | 2 α 2 + α p 2 + |z 0 -y 0 | 2 α 2 + α p 2    .
By the mean-value theorem and the fact that |z 0 -x 0 |/α 2 , |z 0 -y 0 |/α 2 are bounded, there exists a constant C K > 0 such that |u α i (x) -u α i (y)| ≤ C K |x 0 -y 0 |. The proof of Lemma 4.14 is complete.

Finally, if u i is a viscosity subsolution of (3.17), then it is also a viscosity subsolution of the following equation

   λu i (x) + H i (x, ∂u i (x)) ≤ 0 if x ∈ P i \Γ, λu i (x) + H + i (x, ∂u i (x)) ≤ 0 if x ∈ Γ. ( 4
Q i = B(ȳ, R) ∩ P i , we have ||(u i -w i ) + || L ∞ (Q i ) ≤ ||(u i -w i ) + || L ∞ (∂Q i ) , (4.11)
||(u Γ -w Γ ) + || L ∞ (Q i ∩Γ) ≤ ||(u Γ -w Γ ) + || L ∞ (∂(Q i ∩Γ)) . ( 4

.12)

Proof. Take α, p > 0 sufficient small so that Lemma 4.16 can be applied. From Lemma 4.16, we know the fact that u α i is Lipschitz continuous in Q α with a Lipschitz constant L α and that there exists m : (0, ∞) → (0, ∞) such that lim α→0 m(α) = 0 and (u α 1 -m, . . . , u α N -m, u Γ ) is a viscosity subsolution of (3.17). Set u j := u α j -m for all j ∈ {1, . . . , N }. Let us prove that

||(u i -w i ) + || L ∞ (Qα) ≤ ||(u i -w i ) + || L ∞ (∂Qα) , for all i ∈ {1, . . . , N } (4.13) ||(u Γ -w Γ ) + || L ∞ (Q α ∩Γ) ≤ ||(u Γ -w Γ ) + || L ∞ (∂(Q α ∩Γ)) . ( 4.14)
We argue by contradiction by considering the two following cases Case A If there exist i ∈ {1, . . . , N } and xi ∈ Q α i \∂Q α i such that

M i := max Q α i {u i -w i } = u i (x i ) -w i (x i ) > max{M Γ , 0},
where M Γ := max Q α i ∩Γ {u Γ -w Γ }. Now we can apply the similar arguments as in Case A in the proof of Theorem 3.16 to obtain that either M i ≤ 0 or M i ≤ M Γ , which leads us to a contradiction.

Case B If there exists xΓ

∈ (Q α i \∂Q α i ) ∩ Γ such that M Γ = max Q α i ∩Γ {u Γ -w Γ } = u Γ (x Γ ) -w i (x Γ ) ≥ max j∈{1,...,N } M j and M Γ > 0.
Apply the similar arguments as in Case B in the proof of Theorem 3.16 to obtain that either M Γ ≤ 0 (which leads to a contradiction) or there exists k ∈ {1, . . . , N } such that

w Γ (x Γ ) ≥ min j {w j (x Γ ) + c j (x Γ )} = w k (x Γ ) + c k (x Γ ), (4.15)
which leads to

M k = u k (x Γ ) -w k (x Γ ) = M Γ > 0.
We now repeat Case A and note that thanks to (4.15), the case w k (x Γ ) ≥ u k (x Γ ) does not occur, we finally obtain that M k ≤ 0 which contradicts (4.15).

We finish the proof of (4.13) and (4.14). In order to prove (4.11) and (4.12), we have to pass to the limit as α tends to 0 in (4.13) and (4.14), respectively. Let α 0 > 0 and y ∈ Q α 0 be fixed. For all 0 < α ≤ α 0 , one has

(u α i (y) -m(α) -w i (y)) + ≤ ||(u α i -m(α) -w i ) + || L ∞ (∂Qα) . (4.16) We claim that lim sup α→0 ||(u α i -m(α) -w i ) + || L ∞ (∂Qα) ≤ ||(u α i -m(α) -w i ) + || L ∞ (∂Q) . Indeed, there exists x α ∈ ∂Q α such that (u α i (x α ) -m(α) -w i (x α )) + = ||(u α i -m(α) -w i ) + || L ∞ (∂Qα)
. Thus, for any subsequence such that ||(u α i -m(α)-w i ) + || L ∞ (∂Qα) converges to a limit as α → 0, we can assume that x α → x as α → 0. Hence, from the properties of the sup-convolution, the fact that u i is USC and w i is LSC, we can check that ≤ (u

i (x) -w i (x)) + ≤ ||(u i -w i ) + || L ∞ (∂Q i ) .
The claim is proved and therefore, by the pointwise convergence of u α i to u i , passing to the lim sup as α → 0 in (4.16), we have

(u i (y) -w i (y)) + ≤ ||(u i -w i ) + || L ∞ (∂Q i ) , for all y ∈ Q α 0 .
The above inequality holds for any y ∈ Q α 0 with α 0 arbitrarily chosen, then we obtain (4.11). Finally, (4.12) is obtained by using the similarly arguments, the proof is complete.

Thanks to the local comparison principle, apply the similar arguments in [25, Theorem 3.3.4], we now have the global comparison principle which leads us to the uniqueness of (3.17).

Theorem 4.18. Under Assumptions [A] and [ Ã3]

, let U = (u 1 , . . . , u N , u Γ ) be a bounded,USC viscosity subsolution of (3.17) and W = (w 1 , . . . , w N , w Γ ) be a bounded,USC viscosity supersolution of (3.17). Then u i ≤ w i on P i for all i ∈ {1, . . . , N } and u Γ ≤ w Γ on Γ.

Corollary 4.19. The value function V satisfies (v 1 , . . . , v N , V | Γ ) is a unique viscosity solution of (3.17) and v i is continuous on P i for all i ∈ {1, . . . , N }. repeat Case B.3 as in in the proof of Theorem 3.16, implies that there exists k > m such that

M µ k = u µ k (x c ) -w k (x c ) = u µ c (x c ) -w c (x c ) = M µ c .
Repeat Case A and note that thanks to (5.1), the case w k (x c ) ≥ w c (x c ) does not occur, we finally obtain that M µ k ≤ 0, the desired contradiction.

Finally, we get M µ c ≤ 0 and M µ i ≤ 0 for all i ∈ {1, . . . , N } and 0 < µ < 1, µ close to 1. We conclude by letting µ to 1.

Appendix

Proof of Lemma 3.6

By the piecewise linearity of the function (ζ, ξ) → -(ζ • e 0 ) ∂ϕ ∂e 0 (x) -ξ, we can obviously see that Lemma 3.6 is a directly consequence of the following lemma.

Lemma 6.1. Under Assumption

[A], for x ∈ Γ, then FL Γ (x) ⊂ f Γ (x) ⊂ co (FL Γ (x)) , where FL Γ (x) is defined in (3.2).
Proof. In this case the proof is standard (see [START_REF] Bardi | Optimal control and viscosity solutions of Hamilton-Jacobi-Bellman equations[END_REF]), but we prove it for completeness.

The inclusion FL Γ (x) ⊂ f Γ (x) is obtained by explicitly constructing trajectories which still remain on the interface Γ for a short time. More specifically, let i ∈ {1, . . . , N } and a ∈ A i such that (f i (x, a), i (x, a)) ∈ FL i ∩ (Re 0 × R). Then from the strong controllability condition [A3] or the moderate controllability [ Ã3], there exists (y α , α) ∈ T x such that y x remains on Γ at least for a while and satisfies ẏx (0) = f (y x,α (0), α(0)) = f i (x, a).

Thus, there exists a sequence of times t n → 0 + such that y x (t) ∈ Γ for all t ∈ [0, t n ] and

f i (x, a) = lim n→0 1 t n tn 0 f (y x (t), α(t))dt.
Similarly, we get ], we get the distance of (ζ n , ξ n ) to the set co (FL Γ (x)) tends to 0 as n → ∞. Hence, we obtain the second inclusion f Γ (x) ⊂ co (FL Γ (x)).

i (x, a) = lim n→0 1 t n tn 0 (y x (t), α(t))dt. Hence (f i (x, a), i (x, a)) ∈ f Γ (x)

A second proof of Theorem 3.16

First of all, from Definition 3.11, we see that if U = {u 1 , . . . , u N , u Γ } is a viscosity subsolution of (3.17), then for any i ∈ {1, . . . , N }, u i is a viscosity subsolution of (3.27) and u i (x) ≤ u Γ (x) for any x ∈ Γ. Therefore, we have the following properties for U (see [START_REF] Oudet | Hamilton-Jacobi equations on networks or heterogeneous structures[END_REF] for detailed proofs) Lemma 6.2. Under Assumptions [A] and [A3], let i ∈ {1, . . . , N } and x ∈ (B(Γ, r) ∩ P i ) \Γ and α i ∈ L ∞ (0, ∞; A i ). Let η > 0 be such that y x (t) = x + t 0 f i (y x (s), α i (s)ds belongs to B(Γ, r) ∩ P i for any t ∈ [0, η]. Assume that u i is a C 1 function on Γ. Then we have We consider the function u ε i defined on P i by

u ε i = u i ρ ε (x) = R u i (
x i e i + (x 0 -t)e 0 )p ε (t)dt, where x = (x i , x 0 ).

Then u ε converges uniformly to u in L ∞ (P i , R) and there exists a function m : (0, +∞) → (0, +∞) such that lim ε→0 m(ε) = 0 and the function u ε -m(ε) is a viscosity subsolution of (3.27) on a neighborhood of Γ.

Remark 6.4. For a proof of Lemma 6.2 and Lemma 6.3 see [25, Section 3.2.3 and Section 3.2.4]. The proof in Achdou, Oudet & Tchou [3] is adopted to prove Lemma 6.2 and finally, the existence of a function m : (0, +∞) → (0, +∞) with m(0 + ) = 0 such that u ε i -m(ε) is a subsolution of (3.27) on a neighborhood of Γ was proved by Lions [START_REF] Lions | Generalized solutions of Hamilton-Jacobi equations[END_REF] or Barles & Jakobsen [START_REF] Barles | On the convergence rate of approximation schemes for Hamilton-Jacobi-Bellman equations[END_REF].

Next, we have the important property of viscosity supersolution. Proof. Since w i and w Γ are continuous on Γ, from (6.2), there exists ε > 0 such that λw i (x) < u Γ (x) for all x ∈ Γ and |x -x| < ε. From the definition of supersolution, we get λw i (x) + H + i (x, ∂w i (x)) ≥ 0, for all x ∈ Γ ∩ B(x, ε), in the viscosity sense. Hence, from [25, Theorem 3.2.4], the proof is complete.

We are ready to give the second proof of Theorem 3.16.

A second proof of Theorem 3.16. Let u ε i be the approximation of u i given by Lemma 6.3. Similarly to the first step of the proof of Theorem 3.16 (Section 3.4), we set u ε,µ i := µ(u ε i -m(ε)) + (1 -µ)ψ i for all i ∈ {1, . . . , N } and u µ Γ := µu Γ + (1 -µ)ψ Γ , µ → 1 -then (u ε,µ 1 , . . . , u ε,µ N , u µ Γ ) is a viscosity subsolution of (3.17). Let M ε,µ i and M µ Γ be respectively the maximal value of u ε,µ i -w i and u µ Γ -w Γ which are reached at some point xε,µ i ∈ P i and xµ Γ ∈ Γ. We argue by contradiction, through considering the two following cases: Case A Assume that M ε,µ i > M µ Γ and M ε,µ i > 0. If xε,µ i , the proof is done by using the classical techniques. Therefore, we only focus on the case when xε,µ i ∈ Γ. From Lemma 3.17, u ε,µ i is Lipschitz in a neighborhood of Γ. Moreover, from Lemma 6.3, u ε,µ i | Γ ∈ C 1 (Γ). Then, we can construct two test-function ψ, ϕ ∈ C 1 (P i ) such that ψ(x) = u ε,µ i (0, x 0 ) + Cx i , ϕ(x) = u ε,µ i (0, x 0 ) -Cx i , where x = (x i , x 0 ) and C is a positive constant which is large enough. This implies that ψ| Γ = ϕ| Γ = u ε,µ i | Γ , ψ remains above and ϕ remains below u ε,µ i on a neighborhood of Γ. Since M ε,µ i > 0, it is easy to see that w i -ϕ has a local minimum at xε,µ i . Next, we claim that w i (x ε,µ i ) < w Γ (x ε,µ i ). Indeed, if it does not hold, then we have

w Γ (x ε,µ i ) ≤ w i (x ε,µ i ) < u ε,µ i (x ε,µ i ) ≤ u µ Γ (x ε,µ i ),
and this implies M ε,µ i ≤ M µ Γ , the desired contradiction. Hence, from Lemma 6.5, we have the two following cases: (H1) λw i (x ε,µ i ) + max a∈A Γ i {-f i (x ε,µ i , a) • ∂ϕ(x ε,µ i )i (x ε,µ i , a)} ≥ 0. Moreover, since u ε,µ i is a subsolution of (4.10), u ε,µ i -ψ has a local maximum point at xε,µ i , ψ| Γ = u ε,µ i | Γ and H i (x ε,µ i , p) ≥ max a∈A Γ i {-f i (x ε,µ i , a) • pi (x ε,µ i , a)}, we get λu ε,µ i (x ε,µ i ) + max

a∈A Γ i {-f i (x ε,µ i , a) • ∂ϕ(x ε,µ i ) -i (x ε,µ i , a)} ≤ 0.
Hence, u ε,µ i (x ε,µ i ) ≤ w i (x ε,µ i ) and thus M ε,µ i ≤ 0, which leads to a contradiction. This implies u ε,µ i (x k ) -w i (x k ) ≤ (u ε,µ i (η k ) -w i (η k ))e -λη k . Letting k → ∞, one gets M ε,µ

Figure 1 :

 1 Figure 1: Example of remafied sets

Figure 2 :

 2 Figure 2: The junction S in R 3 .

Lemma 4 . 16 .

 416 Under Assumptions [A] and [ Ã3], let ȳ ∈ Γ and R > 0 be as in Remark 4.2.

u i (x) ≤ η 0 i. 1 ) 6 . 3 .

 0163 (y x (s), α i (s)e -λs ds + u i (y x (η))e -λη . (6Lemma Assume [A] and [A3] and that u i ∈ C(P i ) is bounded for all i ∈ {1, . . . , N }. Let {ρ ε } ε be a sequence of mollifiers defined on R as followsρ ε (xρ ∈ C ∞ (R, R + ),R ρ(x)dx = 1 and supp(ρ) ⊂ [-1, 1].

Lemma 6 . 5 .

 65 Let assumptions [A] and [A3] hold and let i ∈ {1, . . . , N } and x ∈ Γ. Let ϕ ∈ C 1 (P i ) be such that w i -ϕ has a local maximum point at x. If the function w i satisfiesw i (x) < w Γ (x),(6.2) then either (H1) or (H2) below is true:(H1) There exists a sequence {η k } of positive real numbers such that lim k→+∞ η k = η > 0 and a sequence {x k } ⊂ P i \Γ such that lim k→∞ x k = x and for each k, there exists a control law α k i such that the corresponding trajectory y x k (s) ∈ P i for all s ∈ [0, η k ] andw i (x k ) ≥ η k 0 i y x k (s), α k i (s) e -λs ds + w i (y x k (η k ))e -λη k . (H2) λw i (x) + max a∈A Γ i {-f i (x, a)• ∂ϕ(x)i (x, a)} ≥ 0.

( H2 )

 H2 With the notation in Lemma 6.5, we havew i (x k ) ≥ η k 0 i y x k (s), α k i (s) e -λs ds + w i (y x k (η k ))e -λη k .On the other hand, from Lemma 6.2u ε,µ i (x k ) ≤ η k 0 i y x k (s), α k i (s) e -λs ds + u ε,µ i (y x k (η k ))e -λη k .

Lemma 3.3. Under

  Assumptions [A] and [A3], for all i ∈ {1, . . . , N }, V| P i \Γ is continuous. Moreover, there exists ε > 0 such that V| P i \Γ is Lipschitz continuous in B(Γ, ε)∩P i \Γ. Therefore, it is possible to extend V| P i \Γ to the interface Γ and from now on, we use the following notation

  ). (t), α n (t))dt is bounded in Γ×R. Therefore, we can extract a subsequence of this sequence which converges to ( ζ, ξ) as n → +∞. Obviously, we have ζ, ξ ∈ f Γ (x). Hence, sending n to ∞ in (3.16), we obtain λV|

					(3.16)
	Since f and are bounded, then the sequence	yx,n(tn)-x tn	, 1 tn	tn 0	(y x,n

Γ (x) -( ζ • e 0 ) ∂ϕ ∂e 0 (x) -ξ ≥ 0,

and thus (3.15) holds.

  is called a viscosity supersolution of (3.17) if for any (ϕ 1 , . . . , ϕ N , ϕ Γ ) ∈ R(S), any i ∈ {1, . . . , N } and any x i ∈ P i and x ∈ Γ such that u i -ϕ i has a local minimum point on P

i at x i and u Γ -ϕ Γ has a local minimum point on Γ at x, then

  is closed and convex. Let n, m → ∞, then (a, b) ∈ FL i (x) and therefore there exists a ∈ A i such that lim

	m,n→∞	1 τ m	0	τm	f i (y εn (s) , α εn (s)) ds,	1 τ m	0	τm	i (y (3.26)
	On the other hand, by Lemma 3.14, y

εn (s) , α εn (s)) ds = (f i (x, a) , i (x, a)) . εn (s) ∈ P i \Γ for all s ∈ [0, τ m ]. This yields y εn (τ m ) = x εn + τm 0 f i (y εn (s) , α εn (s)) ds.

  which contradicts (3.35). Case B.2 There exist a subsequence {ξ ε } and k ∈ {1, . . . , N } such that

  .39) Now we apply similar arguments as in the proof of Case A by considering the function Ψ k,ε :P k × P k → R which is defined in (3.28) with the index i replacing the index k. Remark that we may assume xk = xΓ since xΓ is a maximum point of u µ k -w k by (3.39). It follows that the three cases B.2.1, B.2.2 and B.2.3 which are similar to A.1, A.2 and A.3, respectively. If Case B.2.1 occurs, i.e. there exists a subsequence of {y ε } (still denoted by {y ε

  Definition 4.9. A function U := (u 1 , . . . , u N , u Γ ), where each u i : P i → R is a bounded function and u Γ : Γ → R is a bounded continuous function, is called a discontinuous viscosity solution of (3.17) if U = (u 1 , . . . u N , u Γ ) is a viscosity subsolution of (3.17) and U = (u 1 , . . . u N , u Γ ) is a viscosity supersolution of (3.17). Under Assumptions [A] and [ Ã3], V := (v 1 , . . . , v N , V | Γ ) is a viscosity solution of (3.17).

	Theorem 4.10.

  .10) We may now apply the proofs of[START_REF] Oudet | Hamilton-Jacobi equations on networks or heterogeneous structures[END_REF] Lemmas 3.3.9 and 3.3.10] to conclude Lemmas 4.15 and 4.16. We are ready to prove a local comparison principle. Under Assumptions [A] and [ Ã3], let U = (u 1 , . . . , u N , u

	Theorem 4.17.

Γ ) be a bounded, USC viscosity subsolution of (3.17) and W = (w 1 , . . . , w N , w Γ ) be a bounded, LSC viscosity supersolution of

(3.17)

. Let R > 0 as in Remark 4.2, i ∈ {1, . . . , N } and ȳ ∈ Γ be fixed. Then, if we set

  and the first inclusion is proved. We now consider (ζ, ξ) ∈ f Γ (x), there exists a sequence of admissible trajectories (y n , α n ) ∈ T x which remain on Γ at least for a while and a sequence of times t n → 0 + such that (t))1 {yn(t)∈Γ} dt + o[START_REF] Achdou | Hamilton-Jacobi equations on networks[END_REF], where o(1) is a vector tending to 0 as n → ∞. Therefore, the distance of1 |{t ≤ t n : y n (t) ∈ Γ}| tn 0 f (x, α n (t))1 {yn(t)∈Γ} dt, tn 0 (x, α n (t))1 {yn(t)∈Γ} dt to the set co ∪ N i=1 FL i (x) tends to 0 as n → ∞. Additionally, since f (y n (t), α n (t)) ∈ Γ for a.e. t ∈ [0, t n

		lim n→0	1 t n	0	tn	f (y n (t), α n (t))dt = ζ, lim n→0	1 t n	0	tn	(y n (t), α n (t))dt = ξ.
	On the other hand
	(ζ n , ξ n ) :=	1 t n	0	tn	f (y

n (t), α n (t))dt, tn 0 (y n (t), α n (t))dt = 1 |{t ≤ t n : y n (t) ∈ Γ}| tn 0 f (x, α n (t))1 {yn(t)∈Γ} dt, tn 0 (x, α n

i ≤ M ε,µ i e -λη and thus M ε,µ i < 0, which is a contradiction.Case B Assume that M µ Γ ≥ max j {M ε,µ j } and M µ Γ > 0. If the case w Γ (x µ Γ ) < min j {w j (x µ Γ )+c j (x µ Γ )} occurs, we can apply the similar arguments as in Case B.1 of the first proof of Theorem 3.16 to obtain M µ Γ ≤ 0, the desired contradiction. Otherwise, if the following case holds:w Γ (x µ Γ ) ≥ min j {w j (x µ Γ ) + c j (x µ Γ )} = w k (x µ Γ ) + c k (x µ Γ ),(6.3)for some k ∈ {1, . . . , N } and by the fact thatmin j {u ε,µ j (x µ Γ ) + c j (x µ Γ )} ≥ u µ Γ (x µ Γ ) > w Γ (x µ Γ ), we obtain M µ Γ = M ε,µ k = w k (x µ Γ ) -u ε,µ k (x µ Γ). Now we repeat Case A with the index i replacing k, xε,µ i replacing xµ Γ and note that w k (x µ Γ ) < w Γ (x µ Γ ) because of(6.3). This implies M ε,µ k = M µ Γ ≤ 0, which leads to a contradiction.Finally, we conclude by letting ε → 0 and µ → 1.

* Acknowledgements. This research was supported by the Swedish Research Council grant (2016-04086).

A more general optimal control problem

In this section, we generalize the control problem studied in Section 3 by allowing some of the entry costs functions to be zero. The situation can be seen as intermediary between the one studied in [START_REF] Oudet | Hamilton-Jacobi equations on networks or heterogeneous structures[END_REF] when all the entry costs are zero, and that studied previously under the strong controllability condition [A3], in this work when all the entry costs function are positive. This generalization holds under the moderate controllability condition [ Ã3], but we omit the details. Accordingly, every results presented below will mainly be obtained by combining the arguments proposed above with those used in [START_REF] Oudet | Hamilton-Jacobi equations on networks or heterogeneous structures[END_REF]. Hence, we will present the results without the proofs.

Specifically, we consider the optimal control problems with non-negative entry cost C = {c 1 , . . . , c m , c m+1 , . . . c N }, where c i ≡ 0 if i ≤ m and c i (x) > 0 for all x ∈ Γ if i > m, keeping all the assumptions and definitions of Section 2 unchanged. The value function associated to C is denoted by V . Similarly to Lemma 3.3, V | P i \Γ is continuous and Lipschitz continuous in the neighborhood of Γ. Hence, we can define v i as follows

Additionally, it is clear that for all i, j ≤ m, v i (x) = v j (x) for all x ∈ Γ, i.e. V | ∪ i≤m P i is a continuous function which will be noted V c from now on. Combining the arguments in [START_REF] Oudet | Hamilton-Jacobi equations on networks or heterogeneous structures[END_REF] and in Section 3.1 leads us to the following lemma.

Lemma 5.1. The value function V satisfies

We now define a set of admissible test-function and the Hamilton-Jacobi system that will characterize V .

Definition 5.2. A function

is an admissible test-function if

• the space of admissible test-function is denoted by R (S).

We ready to define a viscosity sub and supersolution of the Hamilton-Jacobi system related to C .

, is called a viscosity subsolution of the Hamilton-Jacobi system if for any testfunction ϕ ∈ R (S):

1. if u c -ϕ c has a local maximum at x c ∈ ∪ m j=1 P j and if

• x c ∈ P j \Γ for some j ≤ m, then

2. if u i -ϕ i has a local maximum point at x i ∈ P i for i > m, and if

A function U = (u c , u m+1 , . . . , u N ) where u c ∈ LSC ∪ m j=1 P j ; R , u i ∈ LSC (P i ; R) is called a viscosity supersolution of the Hamilton-Jacobi system if for any test-function ϕ ∈ R (S):

1. if u c -ϕ c has a local minimum at x c ∈ ∪ m j=1 P j and if

• x c ∈ P j \Γ for some j ≤ m, then

2. if u i -ϕ i has a local minimum point at x i ∈ P i for i > m, and if

A function U = (u c , u m+1 , . . . , u N ) where u c ∈ C (∪ j≤m P j ; R) and u i ∈ C (P i ; R) for all i > m is called a viscosity solution of the Hamilton-Jacobi system if it is both a viscosity subsolution and a viscosity supersolution of the Hamilton-Jacobi system.

Similarly to the previous sections, we have the relation between the value function V and the Hamilton-Jacobi system. Theorem 5.4. Let V be the value function corresponding to C , then (v c , v m+1 , . . . v N ) is a viscosity solution of the Hamilton-Jacobi system.

We now state and prove the comparison principle for the Hamilton-Jacobi system which is the main result of this section Theorem 5.5. Let U = (u c , u m+1 , . . . , u N ) and W = (w c , w m+1 , . . . , w N ) be respectively a bounded viscosity sub and supersolution of the Hamilton-Jacobi system. Then U ≤ W , i.e. u c ≤ w c on ∪ j≤m P j and u i ≤ w i on P i for all i > m.

Proof. First of all, similarly to the first step of the proof of Theorem 3.16 (Section 3.4) we can check that there exists (φ c , φ m+1 , . . . , φ N ) such that for all 0 < µ < 1 and µ close to 1, u µ c := µu + (1 -µ)φ c and u µ j := µu + (1 -µ)φ j for all i ∈ {m + 1, . . . , N } then (u c , u m+1 , . . . , u N ) is a viscosity subsolution of HJ system related to C . We also have the function u µ c -w c and u µ i -w i have maximum value M µ c and M µ j which are reached at some points xc and xj . We argue by contradiction, through considering the two following cases: