Workshop
ANalysis and COntrol on NETworks:
trends and perspectives
Padova, March 9-11, 2016
Optimization based control of networks of discretized
PDEs: application to road traffic management
Associated Team “ORESTE”
ORESTE (Optimal RErouting Strategies for Traffic mangEment) is an associated team between Inria project-team OPALE and the Connected Corridors project at UC Berkeley.
I Paola Goatin (PI)
I Maria Laura Delle Monache I Alexandre Bayen (PI)
I Jack Reilly
I Samitha Samaranayake
I Walid Krichene
ORESTE project goals
I Optimize traffic flow in corridors
I ramp metering
I re-routing strategies
I Modeling approach:
I macroscopic traffic flow models
I discrete adjoint method for gradient computation
SUMMARY
1. Macroscopic models for road traffic
2. Discretized system
3. Quick review of the adjoint method
4. Numerical results
5. Application to optimal re-routing
6. Conclusion and perspectives
1. Macroscopic models for road traffic
Outline of the talk
1. Macroscopic models for road traffic
2. Discretized system
3. Quick review of the adjoint method
4. Numerical results
5. Application to optimal re-routing
1. Macroscopic models for road traffic
LWR model
[Lighthill-Whitham ’55, Richards ’56]Non-linear transport equation: PDE for mass conservation
∂tρ + ∂xf (ρ) = 0 x ∈ R, t > 0
I ρ∈ [0, ρmax] mean traffic density
I f (ρ) = ρv (ρ) flux function
Empirical flux-density relation: fundamental diagram
ρ
ρcr ρmax
fmax f (ρ)
0
Greenshield ’35
ρ
ρcr ρmax
fmax f (ρ)
vf fmax ρmax−ρcr
Newell-Daganzo
1. Macroscopic models for road traffic
Extension to networks
m incoming arcs n outgoing arcs junction
I LWR on networks:
[Holden-Risebro, 1995; Coclite-Garavello-Piccoli, 2005; Garavello-Piccoli, 2006]
I LWR on each road
I Optimization problem at the junction
I Modeling of junctions with a buffer:
[Herty-Lebacque-Moutari, 2009; Garavello-Goatin, 2012; Bressan-Nguyen, 2015]
1. Macroscopic models for road traffic
Extension to networks
m incoming arcs n outgoing arcs junction
I LWR on networks:
[Holden-Risebro, 1995; Coclite-Garavello-Piccoli, 2005; Garavello-Piccoli, 2006]
I LWR on each road
I Optimization problem at the junction
I Modeling of junctions with a buffer:
[Herty-Lebacque-Moutari, 2009; Garavello-Goatin, 2012; Bressan-Nguyen, 2015]
I Junction described with one or more buffers
I Suitable for optimization and Nash equilibrium problems
1. Macroscopic models for road traffic
A model for ramp metering
I Two incoming links:
I Upstream mainline I1=] − ∞, 0[
I Onramp R1
I Two outgoing links:
I Downstream mainline I2=]0, +∞[
I Offramp R2
I1 I2
1. Macroscopic models for road traffic
A model for ramp metering
Coupled PDE-ODE model:
I Classical LWR on each mainline I1, I2
∂tρ + ∂xf (ρ) = 0, (t, x )∈ R+× Ii,
I Dynamics of the onramp described by an ODE (buffer)
dl (t)
dt = Fin(t)− γr1(t), t∈ R+,
I l (t) ∈ [0, +∞[ length of the onramp queue
I Fin(t) flux entering the onramp
I γr1(t) flux leaving the onramp (through the junction)
I Coupled at junctionwith an LP-optimization problem
1. Macroscopic models for road traffic
A model for ramp metering
Coupled PDE-ODE model:
I Classical LWR on each mainline I1, I2
∂tρ + ∂xf (ρ) = 0, (t, x )∈ R+× Ii,
I Dynamics of the onramp described by an ODE (buffer) dl (t)
dt = Fin(t)− γr1(t), t∈ R+,
I l (t) ∈ [0, +∞[ length of the onramp queue
I Fin(t) flux entering the onramp
I γr1(t) flux leaving the onramp (through the junction)
1. Macroscopic models for road traffic
A model for ramp metering
Coupled PDE-ODE model:
I Classical LWR on each mainline I1, I2
∂tρ + ∂xf (ρ) = 0, (t, x )∈ R+× Ii,
I Dynamics of the onramp described by an ODE (buffer) dl (t)
dt = Fin(t)− γr1(t), t∈ R+,
I l (t) ∈ [0, +∞[ length of the onramp queue
I Fin(t) flux entering the onramp
I γr1(t) flux leaving the onramp (through the junction)
I Coupled at junctionwith an LP-optimization problem
1. Macroscopic models for road traffic
Junction solver: Demand & Supply
δ(ρ1) =
f (ρ1) if 0≤ ρ1< ρcr, fmax ifρcr≤ ρ1≤ 1,
ρ , f (ρ)
δ(ρ) fmax(ρ)
d (Fin, l) =
θγr1max if l (t)> 0, min (Fin(t),θγmaxr1 ) if l (t) = 0,
θ∈ [0, 1]control parameter
fmax if 0≤ ρ2≤ ρcr,
, f (ρ) σ(ρ)
fmax(ρ)
1. Macroscopic models for road traffic
Junction solver: flux maximization
1. Mass conservation: f (ρ1(t, 0−)) + γr1(t) = f (ρ2(t, 0+)) + γr2(t) 2. f (ρ2(t, 0+)) maximum subject to 1. and
f (ρ2(t, 0+)) = min
(1− β)δ(ρ1(t, 0−)) + d(Fin(t), l(t)), σ(ρ2(t, 0+))
3. Right of way parameter P∈ ]0, 1[ to ensure uniqueness:
f (ρ2(t, 0+)) = P f1(ρ(t, 0−)) + (1 − P) γr 1 4. Offramp treated as a sink (infinite capacity)
5. No flux from the onramp to the offramp is allowed
1. Macroscopic models for road traffic
Riemann solver: feasible set
To find a solution of the problem we solve an LP-optimization problem
Γr1
Γ1
δ(ρ1)
d (Fin,¯l)
Γ1(1− β) + Γr1= Γ2
1. Define the spaces of the incoming fluxes
2. Consider the demands 3. Trace the supply line
4. The feasible set is given by Ω
1. Macroscopic models for road traffic
Riemann solver: feasible set
To find a solution of the problem we solve an LP-optimization problem
Γr1
Γ1
δ(ρ1)
d (Fin,¯l)
Γ1(1− β) + Γr1= Γ2
1. Define the spaces of the incoming fluxes
2. Consider the demands 3. Trace the supply line
4. The feasible set is given by Ω
Different situations can occur:
I Demand limited case
I Supply limited case
1. Macroscopic models for road traffic
Riemann solver: feasible set
To find a solution of the problem we solve an LP-optimization problem
Γr1
Γ1
δ(ρ1)
d (Fin,¯l)
Γ1(1− β) + Γr1= Γ2
1. Define the spaces of the incoming fluxes
2. Consider the demands 3. Trace the supply line
4. The feasible set is given by Ω
1. Macroscopic models for road traffic
Riemann solver: feasible set
To find a solution of the problem we solve an LP-optimization problem
Γr1
Γ1
δ(ρ1)
d (Fin,¯l)
Γ1(1− β) + Γr1= Γ2
Ω
1. Define the spaces of the incoming fluxes
2. Consider the demands 3. Trace the supply line
4. The feasible set is given by Ω
Different situations can occur:
I Demand limited case
I Supply limited case
1. Macroscopic models for road traffic
Riemann solver: feasible set
To find a solution of the problem we solve an LP-optimization problem
Γr1
Γ1
δ(ρ1)
d (Fin,¯l)
Γ1(1− β) + Γr1= Γ2
1. Define the spaces of the incoming fluxes
2. Consider the demands 3. Trace the supply line
4. The feasible set is given by Ω
1. Macroscopic models for road traffic
Riemann solver: feasible set
To find a solution of the problem we solve an LP-optimization problem
Γr1
Γ1
δ(ρ1)
d (Fin,¯l)
Γ1(1− β) + Γr1= Γ2
demand limited
1. Define the spaces of the incoming fluxes
2. Consider the demands 3. Trace the supply line
4. The feasible set is given by Ω
Different situations can occur:
I Demand limited case
I Supply limited case
1. Macroscopic models for road traffic
Riemann solver: feasible set
To find a solution of the problem we solve an LP-optimization problem
Γr1
Γ1
δ(ρ1)
d (Fin,¯l)
Γ1(1− β) + Γr1= Γ2
supply limited
1. Define the spaces of the incoming fluxes
2. Consider the demands 3. Trace the supply line
4. The feasible set is given by Ω
1. Macroscopic models for road traffic
Riemann solver: optimal point
Demand limited case
The optimal point Q is the point of maximal demands
Γr1
Γ1 δ(ρ1)
d (Fin,¯l)
Γ1(1− β) + Γr1= Γ2
Ω Q
1. Macroscopic models for road traffic
Riemann solver: optimal point
Supply limited case
I We introduce the right of way parameter
I We set optimal point Q to be the point of intersection
I Different situations can occur depending on the value of the intersection point
I Q ∈ Ω
I Q /∈ Ω
−→ Optimal point: S
S
Γ1
δ(ρ1) Γ2
1. Macroscopic models for road traffic
Riemann solver: optimal point
Supply limited case
I We introduce the right of way parameter
I We set optimal point Q to be the point of intersection
I Different situations can occur depending on the value of the intersection point
I Q ∈ Ω
I Q /∈ Ω
−→ Optimal point: S
S
Γr1
d (Fin,¯l) Γ1
δ(ρ1) Γ2
Γ1=1−PP Γr1
1. Macroscopic models for road traffic
Riemann solver: optimal point
Supply limited case
I We introduce the right of way parameter
I We set optimal point Q to be the point of intersection
I Different situations can occur depending on the value of the intersection point
I Q ∈ Ω
I Q /∈ Ω
−→ Optimal point: S
S
Γ1
δ(ρ1) Γ2
Γ1= P Γr1
1. Macroscopic models for road traffic
Riemann solver: optimal point
Supply limited case
I We introduce the right of way parameter
I We set optimal point Q to be the point of intersection
I Different situations can occur depending on the value of the intersection point
I Q ∈ Ω
I Q /∈ Ω
−→ Optimal point: S
Q
S
Γr1
d (Fin,¯l) Γ1
δ(ρ1) Γ2
Γ2
Γ1=1−PP Γr1
1. Macroscopic models for road traffic
Riemann solver: optimal point
Supply limited case
I We introduce the right of way parameter
I We set optimal point Q to be the point of intersection
I Different situations can occur depending on the value of the intersection point
I Q ∈ Ω
I Q /∈ Ω
−→ Optimal point: S
S
Γ1
δ(ρ1) Γ2
Γ1= P Γr1
1. Macroscopic models for road traffic
Riemann solver: optimal point
Supply limited case
I We introduce the right of way parameter
I We set optimal point Q to be the point of intersection
I Different situations can occur depending on the value of the intersection point
I Q ∈ Ω
I Q /∈ Ω −→ Optimal point: S
Q S
Γr1
d (Fin,¯l) Γ1
δ(ρ1) Γ2
Γ1=1−PP Γr1
1. Macroscopic models for road traffic
Difference with
[Coclite-Garavello-Piccoli, 2005]model
The traffic distribution across the junction is given by the distribution matrix A:
A =1 − β 1
β 0
Γ1
δ(ρ1,0)
Q
Γ1
δ(ρ1,0) Γ1=1−PP γr 1
Q
1. Macroscopic models for road traffic
Riemann solver: theorem
Theorem
Delle Monache& al., SIAP, 2014Fix P ∈ ]0, 1[. For every ρ1,0,ρ2,0∈ [0, 1] and l0∈ [0, +∞[, there exists a unique admissible solution (ρ1(t, x ), ρ2(t, x ), l(t)) satisfying the priority (possibly in an approximate way). Moreover, for a.e. t> 0, it holds
(ρ1(t, 0−), ρ2(t, 0+)) =Rl (t)(ρ1(t, 0−), ρ2(t, 0+))
¯t t
0 x
ρ1,0 ρ2,0
ρˆ1 ρˆ2
ρ¯2
ρ¯1
1. Macroscopic models for road traffic
Modified Godunov scheme
I At some ∆tn, we might have multiple shocks exiting the junction at ¯t
I We divide the time step ∆tn= (tn, tn+1) into two sub-intervals
∆ta= (tn, ¯t) and ∆tb= (¯t, tn+1)
I We solve in one time step two different Riemann Problems at the junction
I For ∆ta: Classical Godunov flux update
ρn+1J = ρnJ−∆ta
∆x(ˆΓ1− F (ρnJ−1, ρnJ)) ρn+10 = ρn0−∆ta
∆x(F (ρn0, ρn1) − ˆΓ2)
I For ∆tb: Modified flux update
1. Macroscopic models for road traffic
Numerical simulations
2. Discretized system
Outline of the talk
1. Macroscopic models for road traffic
2. Discretized system
3. Quick review of the adjoint method
4. Numerical results
5. Application to optimal re-routing
2. Discretized system
Ramp metering discretized system H(~ ρ, ~u) = 0
i i
on-ramp i
i + 1 fiin(k) fiout(k) fi +1in (k)
ri(k) Di(k)
βi(k) fiout(k)
fi +1out(k) . . .
block i
I Dynamics and junctions solutions based on the model described earlier
I Piecewise affine system
I Control parameter ui is a constraint on the ramp inflow ri(k)
2. Discretized system
Ramp metering discretized system H(~ ρ, ~u) = 0
Lower triangular forward system H(~ρ, ~u) = 0:
I hi ,k=ρi(k)− ρi(k− 1) − {flux update eq. for cell i and time step k}
I H system of concatenated hi ,k
I H lower triangular
I Very efficient to solve HTx = b
2. Discretized system
Lower triangular forward system H(~ ρ, ~u) = 0
Figure: ∂H∂~ρ matrix
3. Quick review of the adjoint method
Outline of the talk
1. Macroscopic models for road traffic
2. Discretized system
3. Quick review of the adjoint method
4. Numerical results
5. Application to optimal re-routing
3. Quick review of the adjoint method
Optimization of a PDE-constrained system
Optimization problem
minimize~u∈U J (~ρ, ~u) subject to H(~ρ, ~u) = 0
I ~ρ∈ X ⊆ RNT: state variables
I ~u ∈ U ⊆ RMT: control variables
Gradient descent: How to compute the gradient ∂J
∂~ρ
∂~ρ
∂~u +∂J
∂~u ? On trajectories, H(~ρ, ~u) = 0 constant, thus
∂H
∂~ρ
∂~ρ
∂~u +∂H
∂~u = 0 O(T2N2M)
3. Quick review of the adjoint method
Discrete adjoint method
Consider the Lagrangian
L(~ρ, ~u, λ) = J(~ρ, ~u) + λTH(~ρ, ~u) thus∇~uL =∇~uJ :
∇uL(~ρ, ~u, λ) = ∂J
∂~u +∂J
∂~ρ
∂~ρ
∂~u +λT ∂H
∂~u +∂H
∂~ρ
∂~ρ
∂~u
= ∂J
∂~u +λT∂H
∂~u + ∂J
∂~ρ+λT∂H
∂~u
∂~ρ
∂~u Compute λs.t.
∂H
∂~ρ
T
λ=−∂J
∂~ρ
T
O(T2N2)
3. Quick review of the adjoint method
Exploiting system structure
The structure of the forward system influences the efficiency adjoint system solving
Solving for λ
∂H
∂~ρ
T
λ=−∂J
∂~ρ
T
Since ∂H∂~ρ is lower triangular, ∂H∂~ρT is an upper triangular matrix
=⇒ The adjoint system can be solved efficiently using backward substitution
Complexity reduction from O(T
2NM) to O(NT + MT )
3. Quick review of the adjoint method
Exploiting system structure
The structure of the forward system influences the efficiency adjoint system solving
Solving for λ
∂H
∂~ρ
T
λ=−∂J
∂~ρ
T
Since ∂H∂~ρ is lower triangular, ∂H∂~ρT is an upper triangular matrix
=⇒ The adjoint system can be solved efficiently using backward substitution
3. Quick review of the adjoint method
Optimization algorithm
Algorithm 1 Gradient descent loop Pick initial control~uinit ∈ Uad while not converged do
~
ρ = forwardSim(~u, IC , BC ) solve for state trajectory (forward system) λ = adjointSln(~ρ, ~u) solve for adjoint parameters (adjoint system)
∇uJ =λT ∂H∂~u +∂J∂~u compute the gradient (search direction)
~u← ~u − α∇uJ ,α∈ (0, 1) s.t. ~u ∈ Uadupdate the control~u (update step) end while
3. Quick review of the adjoint method
Remarks on descrete adjoint
Strengths:
I Requires only one solution of adjoint system, independent of dim(~u) (unlike finite differences or sensitivity analysis).
I Extends existing simulation code
I General technique, can be applied in very different settings
Weaknesses:
I Optimization of the discretized problem, rather than approximation of the optimal solution of the continuous problem
I No proof of convergence
4. Numerical results
Outline of the talk
1. Macroscopic models for road traffic
2. Discretized system
3. Quick review of the adjoint method
4. Numerical results
5. Application to optimal re-routing
6. Conclusion and perspectives
4. Numerical results
Numerical Results: case study
Figure: I15 South, San Diego: 31 km
N = 125 links and M = 9 onramps T = 1800 time-steps
∆t = 4 seconds (120 minutes time interval)
4. Numerical results
Numerical Results
Density and queue lengths without control
Density and queue difference with control
4. Numerical results
Model Predictive Control
Performance undernoisy input data: MPC loop
I initial conditions at time t and boundary fluxes on Th(noisy inputs)
I optimal control policy on Th
I forward simulation on Tu≤ Th using optimal controls and exact initial and boundary data
I t → t + Tu
Comparison with Alinea (local feedback control without boundary conditions)
0.5 1.0 1.5 2.0 2.5 3.0 3.5
ReducedCongestion(%)
0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0
ReducedCongestion(%) Adjoint
Alinea
4. Numerical results
Running time
Convergence
10−1 100 101 102 103
Running time (ms) 226
227 228 229 230 231 232 233 234
Totaltraveltime(veh-s) Finite differences
Adjoint
Simulation time
0 50 100 150 200 250 300 350 400 450 Running time (seconds)
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5
ReducedCongestion(%)
Adjoint Alinea
5. Application to optimal re-routing
Outline of the talk
1. Macroscopic models for road traffic
2. Discretized system
3. Quick review of the adjoint method
4. Numerical results
5. Application to optimal re-routing
5. Application to optimal re-routing
Application to optimal re-routing
System Optimal Dynamic Traffic Assignment problem with Partial Control:
Multi-commodity flow:
ρi(k) =X
c∈C
ρi ,c(k)
accounting for compliant cc ∈ CC and non-compliant cnusers
I full Lagrangian paths known for the controllable agents
I knowledge of the aggregate split ratios for the non-controllable (selfish) agents.
Goal: Control compliant users to optimize traffic flow
5. Application to optimal re-routing
Application to optimal re-routing
System Optimal Dynamic Traffic Assignment problem with Partial Control:
Multi-commodity flow:
ρi(k) =X
c∈C
ρi ,c(k)
accounting for compliant cc ∈ CC and non-compliant cnusers
I full Lagrangian paths known for the controllable agents
I knowledge of the aggregate split ratios for the non-controllable (selfish) agents.
Goal: Control compliant users to optimize traffic flow
5. Application to optimal re-routing
Numerical study: synthetic network
[Ziliaskopoulos, 2001]I Normal conditions: link capacity between cell 3 and cell 4 = 6 Optimal total travel time: 178
I Incident between cell 3 and cell 4: capacity goes to 0 Optimal total travel time: 211 (otherwise 244)
5. Application to optimal re-routing
Synthetic network: partial control
5. Application to optimal re-routing
Numerical study: real case
Figure: I210 with parallel arterial route, Arcadia (13 km)
N = 24 links 1 hour time-horizon
∆t = 30 seconds
5. Application to optimal re-routing
Numerical Results
50% capacity drop between min 10 and min 30
5. Application to optimal re-routing
Numerical Results
Arterial capacity used:
6. Conclusion and perspectives
Outline of the talk
1. Macroscopic models for road traffic
2. Discretized system
3. Quick review of the adjoint method
4. Numerical results
5. Application to optimal re-routing
6. Conclusion and perspectives
In summary
Results:
I Definition of appropriate junction solvers for ramp metering and multi-commodity
I Formulation of the corresponding finite horizon optimal control problems
I Gradient computation with O(NT + MT ) complexity
I Numerical tests showing the benefits on real field applications
Possible extensions:
I Variable speed limit, maximal queue length, ...
I Selfish agents response (Stackelberg games)
6. Conclusion and perspectives
References
I M.L. Delle Monache, J. Reilly, S. Samaranayake, W. Krichene, P.Goatin and A. Bayen. A PDE-ODE model for a junction with ramp buffer, SIAM J. Appl. Math., 74(1) (2014), 22-39.
I J. Reilly, S. Samaranayake, M.L. Delle Monache, W. Krichene, P. Goatin and A. Bayen. Adjoint-based optimization on a network of discretized scalar conservation law PDEs with applications to coordinated ramp metering, J. Optim. Theory Appl., 167(2) (2015), 733-760.
I S. Samaranayake, W. Krichene, J. Reilly, M.L. Delle Monache, P. Goatin and A. Bayen. Discrete-time system optimal dynamic traffic assignment (SO-DTA) with partial control for horizontal queuing networks, in review.