Shock Wave Builder

Pick two traffic states and watch the queue boundary move

Light traffic (upstream) runs into heavy traffic (downstream). The boundary between them is a shock wave. Its speed is the slope of the chord joining the two states on the fundamental diagram:

w = \frac{q_D - q_U}{k_D - k_U}.

Drag the sliders. When the shock speed is negative, the queue grows backward, against the traffic.

Things to try

  1. With k_U = 20, slowly lower k_D from 140. At what downstream density does the shock stop moving backward? Why there?
  2. Make k_U and k_D lie on opposite sides of the critical density k_c = 75 but at the same flow. What is the shock speed? Why?
  3. Swap the two states so that k_U > k_D. What changes, and why is there no single shock line?

This demo uses Greenshields’ model with v_f = 100 km/h and k_j = 150 veh/km. Grey lines are vehicle trajectories; the violet line is the shock.