Macroscopic ODE Models of Traffic Flow Zhengyi Zhou 04/01/2010 Introduction Traffic Flow Models Microscopic – ODE Macroscopic – PDE Macroscopic ODE Models? Basics Total Link Volume = y Inflow,u dy uv dt Outflow, v dy Red light: dt u dy Green light: u v dt Goal: find y(t) MATLAB ODE numerical solver “ode15s” Outline Constant Model McCartney & Carey’s Model Case-by-Case Model Density-Dependent Model Applied to a sequence of lights Applied to a traffic junction Constant Model dy u0 dt Green Light: dy u 0 v0 dt Red Light: u0 > u0 - v0: linear growth RL = GL = 20; u0 =1 u0 = u0 - v 0 : equilibrium u0 < u0 - v 0 : linear decay v0 =2 v0 =1 v0 =3 Outline Constant Model McCartney & Carey’s Model Case-by-Case Model Density-Dependent Model Applied to a sequence of lights Applied to a traffic junction McCartney & Carey’s Model: Intro McCartney & Carey (1999) Logistic outflow v y y (1 ) J v = 0, , when y J when y > J v = outflow; y = link vol J = jam vol; tau = trip time M-C Model Red: dy u0 dt Green: dy y y u0 (1 ) dt J dy u0 dt J = 800 J = 900 u0 = 10, τ = 10 RL = GL = 25 y>J yJ M-C Model: Equilibrium Green Light equilibrium: Or: J J 2 4u0 J y 2 dy y y u0 (1 ) 0 dt J Green Light equilibrium exists when J 4u0 System equilibrium Equilibrium range Exists when J 4u0 eg: does not exist when J = 800, u0 = τ = 10 (J/4u0τ = 2) exists when J = 900, u0 = τ =10 (J/4u0τ = 2.25) M-C Model: Features Predict congestion If congested: onset time of congestion If not: equilibrium range of link volume No mechanism to un-jam Outline Constant Model McCartney & Carey’s Model Case-by-Case Model Density-Dependent Model Applied to a sequence of lights Applied to a traffic junction Case-by-Case Model l u0 L Cruising speed = c Max outflow vmax = (1 vehicle)/ (time for it to exit) = 1 l/c =c/l Case-by-Case Model: Three cases 1. No waiting line J When 0 y L u0 Max waiting line c Call N = Lu0 (no waiting line volume) Some waiting line c 2. Maximum waiting line 3. L When y l Call J = L (jam volume) l N No waiting line Some waiting line 0 When N < y < J y Case-by-Case Model: u & v Inflow Outflow u=0 J u = min (u0, vmax) Max waiting line Some waiting line v = vmax v = vmax N No waiting line u = u0 0 y v = min (u0, vmax) Case-by-Case Model: Equations Red Light: dy u0 dt if y N dy min (u 0 ,vmax ) dt dy 0 dt if N < y < J if y = J Green Light: dy u0 min (u0 ,vmax ) if y N dt dy min (u 0 ,vmax ) vmax dt dy vmax dt if y = J if N < y < J Case-by-Case Model: Plot RL = GL = 20; L = 600; l = 6; c = 30 J = 100; vmax = 5 u0 = 2 u0 = 4 u0 = 6 Case-by-Case Model: Analysis Constant Congestion/ “Crawling” Cyclical Congestion No Congestion u0 = 2 u0 = 4 u0 = 6 Case-by-Case Model: Features All features of M-C Model 3 congestion levels Specific time periods of congestion No permanent congestion Disadvantage: discrete cases Critical link vol (N or J) for behavioral changes Outline Constant Model McCartney & Carey’s Model Case-by-Case Model Density-Dependent Model Applied to a sequence of lights Applied to a traffic junction Density-Dependent Model: Intro Drivers continuously & spontaneously adjust to existing traffic on link Inflow and outflow are both densitydependent DD Model: u & v Inflow: ↓ linearly as link volume ↑ Outflow: ↑ linearly as link volume ↑ u u0( 1 y/J) v (vmax /J)y DD Model: Equations Red Light: dy u0( 1 y/J) dt dy 0 if y dt Green Light: if y < J J dy u0( 1 y/J) vmax (y/J) dt dy vmax dt if yJ if y < J DD Model: Plot RL = GL = 20; J = 50; vmax = 5 u0 = 5 u0 = 20 DD Model vs. Case-by-Case Model DD Model Superior: model driver’s behaviors better Constant adjustment less likely to jam Fewer cars get through Same parameter values: J = 100; u0 = 4 vmax = 5 RL = GL = 20 Case-by-Case Model Density-Dependent Model DD Model: Analysis Equilibrium range of link volume Independent of initial volume on link J = 100; u0 = 4; vmax = 5; RL=GL=20 y0 = 100 y0 = 50 y0 = 0 DD Model: Analysis dy dy 0 if y J u0( 1 y/J) if y < J; dt dt dy dy Green: u0( 1 y/J) vmax (y/J) if y < J; dt vmax if dt Red: yJ Non-dimensionalization ~ y y/J t u0 / J Equilibria: d~ y y 1 ~ dτ ~ Red: Green: dy ~ 1 ~ y r y dτ where r = vmax u0 d~ y Red: dτ 0 ~y 1 d ~ ( 1 y ) 1 0 stable d~ y Green: 1 ~ y 1 r stable DD Model: Rate of approach Switch to approach 2 stable equilibria stable equilibrium range Approach at the same rate? If yes, center of equilibrium range = weighted average of 2 equilibrium points Numerical simulations: DD Model: Rate of Approach 1.000 0.900 link vol (dimensionless) 0.800 0.700 0.600 0.500 0.400 RL=GL=1 • Center lower; approach to 0.300 RL=GL=2 green equilibrium is faster 0.200 predicted Weighted average of equilibriums • RL/GL ↑, center↓ 0.100 0.000 0.200 0.400 0.600 0.800 1.000 r 1.200 1.400 1.600 1.800 2.000 DD Model: Solutions Solve ODEs by discretization Red: UB d~ y 1 ~ y dτ ~ y (0) LB LB ~ y ( RL ) UB UB 1 (1 LB)e RL ……………………………(1) d~ y 1 ~ y r~ y dτ Green: ~ y (0) UB ~ y (GL) LB 1 LB {[(1 r )UB 1]e GL(1 r ) 1} 1 r ……………….(2) DD Model: Solutions LB (1 e RL 1 1 GL (1 r ) )e 1 r 1 r 1 e RLGL(1 r ) r RL 1 RLGL(1 r ) 1 e e 1 r 1 r UB 1 e RLGL(1 r ) Outline Constant Model McCartney & Carey’s Model Case-by-Case Model Density-Dependent Model Applied to a sequence of lights Applied to a traffic junction DD Model Application: Light Synchronization Light 1 Link 1 Light 2 Link 2 Outflow of Link 1 = Inflow of Link 2 Optimal synchronization for smoothest flow Light 1: red if sin(t) > 0; green if sin(t) < 0 Light 2: red if sin(t+φ) > 0; green if sin(t+φ) <0 φ : phase difference, 0 ≤ φ < 2π Two Lights: Equations L1 & L2 are red: dy 1 dt u0( 1 L1 is red & L2 is green: L1 is green & L2 is red: L1 & L2 are green: y1 ) J1 dy2 0 dt dy2 y2 dy1 y1 v u0( 1 ) max dt J2 dt J1 dy1 y y u0( 1 1 )-v max 1 dt J1 J1 dy2 y vmax 1 dt J1 dy1 y y u0( 1 1 )-v max 1 dt J1 J1 dy2 y y vmax 1 vmax 2 dt J1 J2 φ=0 Two Lights: Plot φ=π φ = π/2 φ = 3π/2 u0 = 5 J1 = J2 = 100 Three Lights in Phase All dy1 y1 u ( 1 red: dt 0 J1 ) All green: ; dy2 0 dt ; dy1 y y u0( 1 1 ) vmax 1 dt J1 J1 dy2 y y vmax 1 vmax 2 dt J1 J2 dy3 y y vmax 2 vmax 3 dt J2 J3 dy3 0 dt Three Lights: Plot u0 = 6, vmax = 5, J1 = J2 = J3 = 100 and RL = GL = 20 Link 1 (RL/GL) Link 2 (RL/GL) Link 3 (RL/GL) Three Lights in Phase Delay Effect Smoothing Effect Nested equilibrium ranges Three Lights in Phase Independent of initial link volumes Link 1 (RL/GL) Link 2 (RL/GL) Link 3 (RL/GL) Three Lights in Phase Independent of jam vol (link length) on different links Link 1 (RL/GL) Link 2 (RL/GL) Link 3 (RL/GL) Three Lights in Phase Non-Dimensionalization d~ y1 1 ~ y1 dτ Red: Green: d~ y1 1 ~ y1 r~ y1 dτ d~ y2 r~ y1 r~ y2 dτ d~ y3 0 dτ d~ y2 0 dτ d~ y2 r~ y1 r~ y2 dτ d~ y3 r~ y2 r~ y3 dτ d~ y2 ~ ry2 r~ y1 d Integrating Factor = e r d r ~ (e y2 ) e r ~ y1 d ~ y 2 e r e r ~ y1d Later link’s y = integral of previous link’s y Smoothing Outline Constant Model McCartney & Carey’s Model Case-by-Case Model Density-Dependent Model Applied to a sequence of lights Applied to a traffic junction DD Application 2: Traffic Junction Traffic Junction: Equations Light12 is green, Light34 is red: dy1 y y u0( 1 1 ) vmax 1 dt J J dy3 y u0( 1 3 ) dt J dy2 y y αv max 1 vmax 2 dt J J dy4 y y ( 1 α)v max 1 vmax 4 dt J J Light12 is red, Light34 is green: dy1 y u0( 1 1 ) dt J y dy 2 y ( 1-)v max 3 vmax 2 dt J J dy3 y y u0( 1 3 )-v max 3 dt J J y dy4 y βvmax 3 vmax 4 dt J J Traffic Junction: Plot1 α = β = 0.9 Link 1 Link 3 Link 2 Link 4 u0 = 6, vmax = 5, J = 100, RL = GL = 20 Traffic Junction: Plot2 α = β = 0.6 Link 1 Link 3 Link 2 Link 4 Conclusions & Further Research Summary Case-by-Case Model Density-Dependent Model Applied to a sequence of lights and a junction Further Research Different RL/GL in DD equilibrium range analysis Traffic junction with fewer simplifying assumptions Compare with macroscopic PDE models Delay differential equations References & Acknowledgements McCartney, M. and Carey, M. “Modeling Traffic Flow: Solving and Interpreting Differential Equations”, Teaching Mathematics and Its Applications 18, no. 3 (1999): 118-119. MATLAB Professor Gallegos, Buckmire, Cowieson & Lawrence Math Department Friends