Physics of Traffic Jams
Traffic jams are sudden changes in the rate at which cars move down a road. In the picture to the right, cars are moving at one velocity, then run into a "kink" where they start moving at a different velocity. This kink is the jam, and it moves backwards at a certain velocity. Using physical reasoning similar to the kinds used for fluid dynamics, it is possible to find how a given jam will move through a line of cars.
Mathematical models of traffic jams are both conceptually interesting and economically important. In the US, traffic jams cause an estimated $160 billion in wasted money and time ^{[1]}. Today, companies like Microsoft can use real time data from traffic to predict jams up to an hour in advance ^{[2]}.
Contents
Conservation of Cars
Cars don't spontaneously appear or disappear from the road. In the language of physics, they are conserved. For any section of road, if the density of cars in that space remains the same, then the flow of cars into the space equals the flow of cars out of the space. If the flow of cars is not balanced, the rate at which the density increases must depend on the difference between the rate that cars flow in and the rate they flow out. The velocity \(v\) of the cars is how fast they are moving, and the density \(k\) is how many there are per unit length. The overall flow of cars that pass through a point at any time is the product \(q = vk\), which has units of cars per time.
Consider a line drawn across a one dimensional road. The number of cars passing through one side of the line equals the number of cars passing through the other side of the line, since the line is infinitely thin. This law also holds if the line is moving. To see this, note that cars moving at velocity \(v\) over a still line is the same as cars standing still with the line moving backwards at velocity \(-v\).
This fact can be used to determine the speed of a shock wave, or a line where the flow rate changes suddenly. Let the speed of the wave be \(v_{w}\). Relative to the ground, the velocity of cars to the left of (before) the wave is \(v_L\) and the speed to the right is \(v_R\). From the perspective of the shock wave, the cars on the left hand side move at velocity \(v_{L} - v_{w}\) and the cars on the right hand side move at velocity \(v_{R} - v_w\). Equating the flow rates on either side from the shock-wave frame:
\[k_{L} (v_{L} - v_w) = k_R (v_R - v_w)\] \[q_L - k_L v_w = q_R - k_R v_w\] \[v_w = \frac{q_R - q_L}{k_R - k_L}\]
On a highway, there are 100 cars per kilometer and the cars are all moving at \(100 \text{ km/hr}\). One car notices something and slams on its breaks, slowing down to \(50 \text{ km/hr}\) and halving the distance between itself and the car behind it.
How quickly does the shock wave generated move relative to the ground (in\( \text{ km/hr}\))?
Give your answer to 3 decimal places.
To figure out \(v_w\) from the density, there needs to be a way to express the flow rate as a function of density, \(q(k)\). The simplest model is linear: \(q(k) = v_{max} (k_{max} - k)\). If there are no other cars on the road (\(k = 0)\), a car will drive at the speed limit. As the density increases, the velocity decreases until they cannot move at all because there are too many cars.
\[q(k) = v_{max} k (k_{max} - k)\]
This is a quadratic function of \(k\). Each new car added will increase the net flow up to a maximum point, and then the total flow drops until no cars are moving at all. This happens because each new car added decreases the velocity of all the other cars, so there is a tradeoff. For this reason, traffic jams can be considered a form of the tragedy of the commons. If all the drivers agreed to keep a reasonable distance between themselves and the car in front of them, the density could stay at the optimal level and they could all get to their destinations faster. But if every car greedily tries to get as far ahead as it can before stopping, everyone goes slower.
If the flow rate of traffic \(q\) as a function of density \(k\) is given by
\[q(k) = v_{\text{max}} k (k_{\text{max}} - k)\],
what is the maximum flow rate possible (in cars/hr)?
Assume that \(v_{\text{max}}\) is \(100 \text{ km/hr}\) and \(k_{max}\) is \(200 \text{ cars/km}\).
Note: \(100 \text{ km/hr} = 60\text{ mi/hr}\), which is a typical speed limit for a US highway, and midsize cars are approximately 5 m long, corresponding to \(200\text{ cars/km}\) in bumper-to-bumper traffic.
Fundamental Diagram of Traffic Flow
The plot of \(q(k)\) is called the fundamental diagram of traffic flow, since the speed of the cars and the shock wave can be read off of it.
Since \(v = \frac{q}{k}\), the velocity of the cars is given by the slope of the line starting at the origin and ending at the point \((k, q(k))\). The velocity of a shock wave is given by the slope of the line connecting \((k_L, q_L)\) and \((k_R, q_R)\), since that is precisely the equation given above for \(v_{w}\). This geometric representation proves that the speed of the shock wave must always be less than or equal to the speed of the cars. A line between a point and another point on the curve will always have a slope less than a line from the origin to that point.
One can verify this fact experimentally when sitting in a traffic jam. Since the wave speed is always less than the traffic speed, from a driver's perspective the waves will always come towards the car. This can be seen as a cascade of brake lights heading towards the car.
Relative to the ground, shock waves can have either positive or negative velocity. If the density is greater than the density of maximal flow, then any increase in density will make a wave that goes backwards (since \(q_R - q_L\) is negative and \(k_R - k_L\) is positive). However, if the density is low and a small shock is applied, the shock will move forward relative to the ground, since the forward flow of traffic is greater than the backward flow of the shock relative to the traffic.
Differential Equations
The conservation argument above leads to a differential equation, sometimes called the conservation equation. This differential equation also governs the flow of charges in circuits and energy in electromagnetic waves, among other phenomena where some quantity is conserved:
\[\frac{\partial q}{\partial x} + \frac{\partial k}{\partial t} = 0\]
In words, it says that the change in flow rate between two sides of a small box (\(\frac{\partial q}{\partial x}\)) is exactly balanced by the change in density inside the small box (\(\frac{\partial k}{\partial t}\)). Given the flow rate and density over the entire road at one point in time, this equation gives the behavior at all future points. It is an analog to the wave equation, but it is first-order instead of second order.
More Problems
Note: this problem is not original. And sorry for the bad drawing.
Imagine a road with two cars, each of length \(L\). Car 1 gets on the road at \(t = 0\) moving at \(v_{1}\), and car 2 gets on the road at \(t = t_{2}\), moving at \(v_{2} > v_{1}\).
At what time does the front of car 2 to get in contact with the back of car 1?
Solve for the case where
\(v_{1} = 20\text{ m/s}, v_{2} = 25 \text{ m/s}, t_{2} = 100 \text{ s}\), and \(L = 5 \text{ m}\).
Express your answer in seconds.
References
- Forsyth, J. (2015). US commuters spend about 42 hours a year stuck in traffic. Reuters.
- Sawers, P. (2015). How-Microsoft's-Using-Big-Data-To-Predict-Traffic-Jams-Up-To-An-Hour-In-Advance. Venture-Beat.