Classical mechanics · Lab

Traffic

Watch traffic jams form, including the ones with no cause at all. A car-by-car model next to the fluid model.

Cars drive clockwise. Add a slow zone or a traffic light from the obstacle menu.

stopped vmax
Automaton, last 720 steps. Position across, time down, newest at the bottom. Colour is speed.
LWR continuum. Colour is its speed vf (1 - rho); blank where the road is empty.

Automaton, last 600 steps

Experiments

Fundamental diagram

0 km/h 47 km/h Cars drive clockwise.
Position on the circuit across, one row every half second down, the last four minutes. Compare figure 4 of the paper.

The Sugiyama circuit

Cars on a circular track, each following the one ahead by a car-following law. There's no bottleneck anywhere.

Drivers
22
230
2.5
0.30
0.10
Time, s
n/a
Mean speed, km/h
n/a
Fastest, km/h
n/a
Slowest, km/h
n/a
Cars stopped
n/a
Jam wave, km/h
n/a
Density, cars/km
n/a
Flow, cars/h
n/a
Headway spread, m
n/a
Sources
  1. Y. Sugiyama et al., Traffic jams without bottlenecks: experimental evidence for the physical mechanism of the formation of a jam, New J. Phys. 10, 033001 (2008)
  2. M. Bando, K. Hasebe, A. Nakayama, A. Shibata and Y. Sugiyama, Dynamical model of traffic congestion and numerical simulation, Phys. Rev. E 51, 1035 (1995)
  3. M. Treiber, A. Hennecke and D. Helbing, Congested traffic states in empirical observations and microscopic simulations, Phys. Rev. E 62, 1805 (2000)
  4. M. Treiber and A. Kesting, Traffic Flow Dynamics, Springer (2013), ch. 10, 11 and 15

Experiments

stopped vmax Clockwise. The right lane is the inner one.
Left lane, last 600 steps. Colour is speed.
Right lane, last 600 steps. Colour is speed.

Experiments

Fundamental diagram

stopped vmax Zoomed on the ramps; the strip below is the whole road. Dots mark cars heading for the exit.
Main road, all 400 sites across, last 600 steps down. The off-ramp leaves at sites 190 to 220, the on-ramp joins at 250 to 290.

Experiments

Experiments

eastbound northbound The edges wrap around.

Experiments

The jamming transition

stopped vmax Lit top lamp: stop. Lit bottom lamp: go.
The avenue, 160 sites across with lights at 40, 80 and 120, last 600 steps down. Platoons are the diagonal bands; queues at red are the purple wedges.

Traffic lights on an avenue

An eastbound avenue crossed by northbound streets. Each light gives the avenue a share of the cycle, then two all-red steps, then the cross street, then two more.

30
0.50
0
0.15
0.08
0.10
Intersections
Avenue flow
n/a
Cross street flow
n/a
Avenue travel time
n/a
Stops per trip
n/a
Waiting on avenue
n/a
Waiting on cross streets
n/a
Green wave offset
n/a
Sources
  1. O. Biham, A. A. Middleton and D. Levine, Self-organization and a dynamical transition in traffic-flow models, Phys. Rev. A 46, R6124 (1992)
  2. E. Brockfeld, R. Barlovic, A. Schadschneider and M. Schreckenberg, Optimizing traffic lights in a cellular automaton model for city traffic, Phys. Rev. E 64, 056132 (2001)
  3. M. E. Fouladvand, Z. Sadjadi and M. R. Shaebani, Characteristics of vehicular traffic flow at a roundabout, Phys. Rev. E 70, 046132 (2004)
  4. K. Nagel and M. Schreckenberg, A cellular automaton model for freeway traffic, J. Phys. I France 2, 2221 (1992)

Experiments

stopped 5 sites / step The ring is limited to 2 sites per step.

A single-lane roundabout

Four two-way arms around a 32-site ring that turns anticlockwise. An arriving car waits until the quarter of the ring upstream of its entry is empty, then enters and leaves at a random other arm.

0.10
0.10
Throughput, per step
n/a
Demand, per step
n/a
Queue per arm
n/a
Travel time, steps
n/a
On the ring
n/a
Sources
  1. O. Biham, A. A. Middleton and D. Levine, Self-organization and a dynamical transition in traffic-flow models, Phys. Rev. A 46, R6124 (1992)
  2. E. Brockfeld, R. Barlovic, A. Schadschneider and M. Schreckenberg, Optimizing traffic lights in a cellular automaton model for city traffic, Phys. Rev. E 64, 056132 (2001)
  3. M. E. Fouladvand, Z. Sadjadi and M. R. Shaebani, Characteristics of vehicular traffic flow at a roundabout, Phys. Rev. E 70, 046132 (2004)
  4. K. Nagel and M. Schreckenberg, A cellular automaton model for freeway traffic, J. Phys. I France 2, 2221 (1992)

Experiments

Learn Traffic jams as waves, from Lighthill and Whitham to city grids and roundabouts

Traffic as a fluid

Seen from above, a motorway looks like a fluid. Lighthill and Whitham [1] and, independently, Richards [2] took that view literally. Replace the cars by a density \rho(x,t), in cars per unit length, and a flow q(x,t), in cars per unit time passing a point. If cars are neither created nor destroyed between two points, the number between them changes only by what flows in minus what flows out:

\frac{\partial \rho}{\partial t} + \frac{\partial q}{\partial x} = 0 .

That's a conservation law, but on its own it's one equation for two unknowns. To close it, the theory assumes that on a long, uniform road the flow depends only on the local density, q = Q(\rho). Lighthill and Whitham note that such a flow and concentration relation had already been postulated for crowded roads and had experimental backing [1]. The graph of Q is the fundamental diagram, and it carries almost all of the physics.

Kinematic waves and characteristics

With q = Q(\rho) the conservation law becomes

\rho_t + c(\rho)\, \rho_x = 0, \qquad c(\rho) = Q'(\rho) .

This says \rho is constant along the lines dx/dt = c(\rho), the characteristics. A given density therefore travels at speed c(\rho), which Lighthill and Whitham called a kinematic wave [1]. It is not the speed of the cars. The car speed is v = Q/\rho, and for a concave diagram c = Q' \le Q/\rho = v: information always moves slower than the traffic, so drivers keep running into the news from ahead [3, ch. 11].

The simplest concave diagram takes the speed to fall linearly with density, v(\rho) = v_f (1 - \rho/\rho_j), with free speed v_f and jam density \rho_j. Then

Q(\rho) = v_f\, \rho \left(1 - \frac{\rho}{\rho_j}\right), \qquad c(\rho) = v_f \left(1 - \frac{2\rho}{\rho_j}\right) .

This is the Greenshields model, and it is the model problem LeVeque uses to introduce nonlinear conservation laws [3, ch. 11]. (It is named after B. D. Greenshields' 1935 highway study, a report with no DOI that we have not checked.) The flow peaks at the capacity q_{\max} = v_f \rho_j / 4 at the critical density \rho_j/2. Below it, c > 0 and disturbances drift downstream with the traffic. Above it, c < 0: in dense traffic the waves move backward, against the cars. The lab sets \rho_j = 1 car per site and lets you choose v_f.

Shocks

Characteristics carry faster waves from lighter traffic upstream into slower waves from denser traffic ahead. When they cross, the smooth solution breaks and a jump forms: a shock, the place where drivers brake suddenly. Lighthill and Whitham describe exactly this for a "hump" of dense traffic: cars slow abruptly on entering it and recover only gradually on leaving it [1]. Richards titled his paper Shock Waves on the Highway and found such shocks appearing frequently in his theory [2].

A shock between a left (upstream) density \rho_L and a right density \rho_R cannot move at any speed it likes. Counting cars across the moving jump gives the Rankine-Hugoniot condition

s = \frac{Q(\rho_R) - Q(\rho_L)}{\rho_R - \rho_L},

the slope of the chord between the two states on the fundamental diagram [3, ch. 11]. For Greenshields it is s = v_f (1 - (\rho_L + \rho_R)/\rho_j). Traffic arriving at density \rho_L and stopping in a queue at \rho_R = \rho_j gives s = -v_f \rho_L/\rho_j: the back of the queue grows upstream, faster when more cars arrive. For a concave Q, only jumps from light to heavy traffic (\rho_L < \rho_R) are physical; that is the entropy condition [3, ch. 11].

Rarefactions

The opposite jump, heavy traffic ahead of light, opens into a rarefaction fan instead. A queue at a red light is the classic case: \rho_L = \rho_j behind the stop line and \rho_R = 0 beyond it. When the light turns green the solution depends only on \xi = x/t:

\rho(\xi) = \begin{cases} \rho_L & \xi \le c(\rho_L) \\ \dfrac{\rho_j}{2}\left(1 - \dfrac{\xi}{v_f}\right) & c(\rho_L) < \xi < c(\rho_R) \\ \rho_R & \xi \ge c(\rho_R) \end{cases}

The edge of the fan moves back into the queue at -v_f, the front pushes ahead at +v_f, and at the stop line itself (\xi = 0) the density is \rho_j/2, so the light discharges cars at exactly the capacity. Richards studied this signal problem in his paper [2].

Solving it with Godunov's method

The lab solves the LWR equation on a ring of cells one site wide. Each cell holds an average density and changes only through the fluxes at its two faces:

\rho_i^{n+1} = \rho_i^n - \frac{\Delta t}{\Delta x}\left(F_{i+1/2} - F_{i-1/2}\right) .

Godunov's idea is to take each face flux from the exact solution of the Riemann problem between the two neighbouring cells [3, ch. 12]. For a concave flux this collapses to a neat rule: the flux is the smaller of what the upstream cell can send and what the downstream cell can receive,

F(\rho_L, \rho_R) = \min\big(D(\rho_L),\, S(\rho_R)\big), \quad D(\rho) = Q(\min(\rho, \rho_c)), \quad S(\rho) = Q(\max(\rho, \rho_c)),

with \rho_c = \rho_j/2. This sending and receiving form is the heart of Daganzo's cell transmission model, which he showed is a discretisation consistent with the hydrodynamic theory [4]. It handles a change of road cleanly too: in a slow zone the downstream cell simply has a smaller Q. A red light sets one face flux to zero. Time steps are split so that v_f \Delta t / \Delta x \le 0.9, inside the stability limit.

The lab's tests check the scheme against the exact Riemann solutions above: over 200 steps the mean absolute error stays below 0.005 for shocks and 0.01 for fans, shocks sit within one cell of the Rankine-Hugoniot position and cars are conserved to 10^{-9}.

The Nagel and Schreckenberg automaton

The continuum model is deterministic. Real drivers are not, and Nagel and Schreckenberg built the simplest model that shows what noise does [5]. The road is a ring of L sites, each empty or holding one car with an integer speed v \in \{0, \dots, v_{\max}\}. Every step, all cars apply four rules in parallel:

  1. Accelerate: v \to \min(v + 1, v_{\max}).
  2. Keep your distance: v \to \min(v, g), where g is the number of empty sites to the car ahead.
  3. Randomly brake: with probability p, v \to \max(v - 1, 0).
  4. Move: x \to x + v.

Think of a site as the room one car takes up in a jam and a step as roughly a reaction time. Their simulations show a transition from smooth flow to stop-and-go waves as the density rises, as on real motorways [5].

The deterministic limit. With p = 0 a short argument gives the whole diagram. If every gap is at least v_{\max}, every car drives at v_{\max} and q = \rho v_{\max}. That needs 1/\rho - 1 \ge v_{\max}, so it works only up to \rho = 1/(v_{\max}+1). Above that, the steady state has each car advancing by exactly its gap; the mean gap is (1-\rho)/\rho, so q = \rho \bar v = 1 - \rho. Together,

q = \min\big(\rho\, v_{\max},\; 1 - \rho\big),

a triangle with its peak at \rho = 1/6 for v_{\max} = 5. The lab's tests confirm that simulations from random starts settle on it to within 0.01. On the jammed branch the jams move backward exactly one site per step: one car leaves the front of the jam each step.

One exact noisy case. For v_{\max} = 1 the model is exactly solvable. Schreckenberg, Schadschneider, Nagel and Ito showed that an improved mean-field theory that keeps neighbour correlations gives the exact result for this case [6],

q = \frac{1}{2}\left[1 - \sqrt{1 - 4(1-p)\,\rho(1-\rho)}\right],

which reduces to \min(\rho, 1-\rho) at p = 0. The lab's tests check the automaton against it to within 0.01 at four combinations of \rho and p. The broader statistical physics of these models is reviewed in [7].

Why random braking makes jams

Random braking lowers the speed of free cars to about v_{\max} - p. It also seeds every jam. A car that brakes for no reason forces a close follower to brake harder, the next one harder still, and once someone reaches v = 0 a jam exists. It then grows at the back as long as cars arrive faster than they leave the front. Because leaving takes time (a stopped car first has to accelerate, and may randomly hesitate), the outflow from a jam is lower than the best flow free traffic can carry. In the space-time diagram these jams are the dark purple bands tilted backward, drifting against the traffic at a fraction of a site per step.

Nothing in the road causes them. This is the phantom jam, and it has been staged for real: Sugiyama and colleagues drove cars evenly spaced around a circular track and watched a jam appear from small fluctuations and travel backward like a solitary wave. In their words, "a bottleneck is only a trigger and not the essential origin of a traffic jam" [9].

The deterministic continuum can't do this. A uniform density is an exact steady solution of the LWR equation, and small bumps never grow; they turn into shocks and fans that eventually smooth out. To get spontaneous jams in a continuum or car-following model you need an instability. The optimal velocity model of Bando and colleagues is the classic example and makes good further reading [10]. Each driver relaxes toward a preferred speed set by the headway h to the car ahead, \ddot x_n = a\,[V(h_n) - \dot x_n], and uniform flow becomes unstable where V is steep compared with the driver's sensitivity a, after which stop-and-go waves form on their own.

Capacity drop and slow-to-start

Real motorways show something the plain automaton does not: a range of densities where very fast flow and congested flow can both persist, with sudden breakdowns and hysteresis between them. Barlovic, Santen, Schadschneider and Schreckenberg traced this to how cars leave a jam and added a slow-to-start rule: a car that was stopped brakes with a larger probability p_0 [8]. That lowers the outflow from jams while leaving free flow untouched, and the model develops metastable high-flow states [8]. The lab uses p_0 = 0.75. Started evenly spaced, the road can carry close to \rho v_{\max} for a while; one fluctuation then nucleates a jam that never dissolves and the flow drops to the jam's outflow, a capacity drop.

Jams without a bottleneck: the Sugiyama circuit

Sugiyama and colleagues put 22 cars on a circular track 230 m round, asked the drivers to cruise at about 30 km/h with even spacing and filmed them from the centre [9]. For a while the flow stayed uniform. Then small fluctuations in the headways grew, a few cars had to stop and a cluster of about five stopped cars formed and travelled backward around the circle while the cars outside it moved at about 40 km/h. The authors report that "the cluster itself travels backward with a velocity of roughly 20 km h−1", the same speed as jams on real motorways [9]. With 23 cars the same thing happened.

The Sugiyama circuit road replays this with a continuous car-following model. Each car n has a position x_n and a speed v_n, and the headway h_n = x_{n+1} - x_n is the distance to the front of the car ahead. In the optimal velocity model of Bando and colleagues [10] each driver relaxes toward a speed V(h) that depends only on the headway:

\dot v_n = a\,\big[V(h_n) - v_n\big] .

The sensitivity a is the inverse of the time a driver takes to adjust. A uniform flow with every headway equal to h = L/N and every car at V(h) is always a solution. It is linearly stable only if the driver reacts fast enough compared with how steeply V changes with headway. Bando and colleagues identify V'(h) = a/2 as the critical point for the instability of homogeneous flow [21]: uniform traffic breaks up when

a < 2\,V'(h) .

The lab uses an optimal velocity function of the same tanh shape as Bando's,

V(h) = \frac{V_0}{2}\left[\tanh\frac{h - h_c}{w} + \tanh\frac{h_c - h_s}{w}\right],

which is zero at a standstill headway h_s and rises to a plateau. Here the parameters are our own, not values from the paper. Bando and colleagues also fitted V(h) to Japanese motorway data, V = 16.8\,[\tanh 0.086(h - 25) + 0.913] m/s with a = 2 s^{-1} [21]. That function gives barely 1 m/s at the circuit's 10.5 m headway, because the drivers on the track cruised much closer than motorway drivers do; the paper itself says the velocity "seems to be high considering the average headway distance" [9]. So we chose V_0 = 13 m/s, h_c = 9.2 m, w = 3 m, h_s = 5 m and a = 2.5 s^{-1} to match what the paper reports: about 30 km/h for 22 cars on 230 m, a free speed near 40 km/h and a jam of a handful of cars. At h = 230/22 m this gives 2V'(h) \approx 3.7 s^{-1} > a, so uniform flow is unstable; with 18 cars, 2V' \approx 1.3 s^{-1} < a and it is stable. Small random kicks to the acceleration stand in for the drivers' imperfections.

The lab's tests check that, from evenly spaced cars with 10 cm of random misplacement, a jam forms within five minutes in every seeded run, that it runs backward at between 12 and 28 km/h (the model gives about 23), that the free cars reach 35 to 48 km/h, that 3 to 10 cars are stopped at once and that no two cars ever overlap. With 18 cars the same drivers keep the flow uniform for ten minutes.

The intelligent driver model of Treiber, Hennecke and Helbing [14] is the alternative. Its acceleration combines a free-road term and an interaction term,

\dot v = a\left[1 - \left(\frac{v}{v_0}\right)^{\delta} - \left(\frac{s^*(v, \Delta v)}{s}\right)^2\right], \qquad s^* = s_0 + vT + \frac{v\,\Delta v}{2\sqrt{ab}},

where s is the bumper-to-bumper gap, \Delta v the approach rate to the leader, T a safe time headway, s_0 a jam distance, a a maximum acceleration and b a comfortable deceleration. Setting \dot v = 0 and \Delta v = 0 gives the equilibrium gap s_e(v) = (s_0 + vT)\,[1 - (v/v_0)^\delta]^{-1/2} [14], which the lab's tests confirm the simulation holds when the flow is stable. The motorway parameters of the original paper do not fit a 230 m track, so the circuit uses v_0 = 12 m/s, T = 0.5 s, s_0 = 1.5 m, b = 2 m/s^2, \delta = 4 and cars 4 m long, again chosen by us. With a sluggish a = 0.3 m/s^2 the uniform flow breaks into a wide, slow jam; with a = 1.5 m/s^2 the same density flows smoothly. Car-following models and their stability are treated in Treiber and Kesting's textbook [20, ch. 10, 11 and 15].

Two lanes, overtaking and trucks

With two lanes, cars can pass. Rickert, Nagel, Schreckenberg and Latour built the standard two-lane automaton [11]. Each step has two halves: first every car decides, from the same snapshot, whether to move sideways; then each lane does an ordinary Nagel and Schreckenberg update. A car changes lane if its own gap ahead is short, the other lane offers more room and the gap behind it in the other lane is safe:

\text{gap} < l, \qquad \text{gap}_o > l_o, \qquad \text{gap}_{o,\text{back}} > l_{o,\text{back}},

with l = l_o = v + 1 and l_{o,\text{back}} = v_{\max}, the choices of their symmetric rule [11]. In words: change if the car ahead is too close to reach your desired speed, the other lane has room for it and nobody behind you there would have to brake. The keep right option is the asymmetric variant: cars overtake on the left by the same rule, but return to the right whenever the right lane is safe and clear, without needing an incentive. Rickert and colleagues found that their asymmetric rules change lanes far more often than the symmetric ones [11], and the lab shows the same.

Slow vehicles change the picture. Nagel, Wolf, Wagner and Simon studied lane-changing rules systematically and found that with a fraction of slow vehicles the traffic organises into plugs: two slow vehicles side by side, with faster ones queued behind them [12]. In the lab, trucks have a lower v_{\max} and are drawn as boxier vehicles. With lane changes off, every truck leads a platoon. With symmetric lane changes, cars gain a little, but sooner or later two trucks drive abreast and nobody can pass. If trucks are kept to the right lane, the left lane stays a passing lane and cars recover most of their speed. The lab's tests check that lane changes never put two vehicles in one site, never lose one and that with lane changes off and p = 0 each lane still sits on the single-lane triangle of the fundamental diagram.

Open roads, on-ramps and off-ramps

A real motorway has ends. On an open road, cars are injected at the upstream end and removed at the downstream end. Cheybani, Kertesz and Schreckenberg studied such stochastic boundaries for the Nagel and Schreckenberg model, with cars created at the entrance at a given rate and a blockage at the exit [19]. The lab injects a car into each lane's first site with probability equal to the inflow, if that site is free, and lets cars leave freely at the end. Every vehicle is counted in and out, and the tests check that what enters is either on the road or has left, and that in free flow the long-run flow at the downstream detector equals injections plus ramp entries minus exits to within 2 percent.

Diedrich, Santen, Schadschneider and Zittartz modelled on- and off-ramps in the automaton by inserting cars into a ramp region and removing them from another [17]. They found that an on-ramp acts much like a local slowdown: above some demand a jammed region forms upstream of it while traffic downstream flows freely, and the flow develops a plateau [17]. The lab's on-ramp is an acceleration lane 40 sites long. Ramp cars wait in a queue at its start, enter when the first site is free and must merge into the main lane before the acceleration lane ends, accepting smaller gaps the nearer they get to its end. The off-ramp is a deceleration lane just upstream; cars marked for the exit move into it when they can and leave at its end.

Near an on-ramp, a whole zoo of congested states is possible. Using a macroscopic model, Helbing, Hennecke and Treiber mapped them against main road flow and ramp flow: free traffic, pinned and moving localised clusters, triggered stop-and-go waves, oscillating congested traffic and homogeneous congested traffic [18]. Treiber and Kesting discuss this phase diagram at length [20, ch. 17 and 18]. The automaton in the lab shows the coarse version: free flow at low demand, a queue whose back moves upstream when the merge is overloaded and stop-and-go waves inside the queue. And a road running near saturation can be tipped over by a mere trickle from the ramp.

A lane drop and the capacity drop

Where three lanes become two, the bottleneck can carry at most what two lanes carry. Less obviously, once a queue has formed, the flow leaving it is often lower than the flow that passed just before the queue formed. This is the capacity drop. In the automaton the mechanism is the slow-to-start rule from earlier: cars leaving a jam hesitate, so a jam discharges at a lower rate than free flow can sustain [8]. The lab's tests run the lane drop with slow-to-start drivers and check that the long-run discharge after breakdown is at least 10 percent below the peak flow measured while the road was still free. Without slow-to-start the queue still forms, but the drop is about half as large.

The Biham-Middleton-Levine city

Biham, Middleton and Levine took the simplest possible city: a square lattice wrapped into a torus, with cars of two kinds [13]. In their words, "the right arrows move only in even time steps and the up arrows move in odd time steps" [13]: on its turn, each car moves one site if the site ahead is empty at the start of the step, and otherwise stays put, even if the blocker leaves during that step. The alternation acts like a traffic light at every intersection. There is no randomness after the initial placement.

The model has a sharp transition. At low density the cars organise themselves into diagonal stripes and eventually every car moves on every turn, an average velocity of exactly 1. At high density a global jam forms along the diagonal running from the upper right to the lower left and the velocity is exactly 0 [13]. Biham, Middleton and Levine studied lattices from 16 by 16 to 512 by 512 and found that the critical density decreases with lattice size, without being able to say whether it tends to a finite value or to zero [13]. Close to the transition the outcome depends on the initial placement. The lab's tests check that both kinds of car are conserved, that cars move only on their own turn and only by one site, that densities 0.1 and 0.2 reach velocity 1, and that 0.6 and 0.75 lock up completely.

Signals, green splits and green waves

A signal takes turns. Each light in the lab gives the eastbound avenue a fraction of the cycle, the green split, then two all-red steps to clear the box, then the cross street, then two more all-red steps. A car may not enter the intersection on red or while the other road's car is in it. During green a queue discharges at roughly the outflow of a jam, so an approach can never carry more than its green fraction of one car per step; the tests check exactly this bound.

Brockfeld, Barlovic, Schadschneider and Schreckenberg studied signals in an automaton city and found that coordinating them pays [15]. If all lights switch together, a platoon released by one light can arrive at the next just as it turns red. If instead each light turns green a fixed delay after the previous one, with the delay equal to the time a free car needs for one block, T_{\text{delay}} = D/v_{\text{free}} with v_{\text{free}} = v_{\max} - p, a platoon meets green after green: a green wave [15]. The lab's blocks are D = 40 sites and v_{\text{free}} \approx 4.9, so the wave offset is 8 steps. The tests check that on a 30-step cycle this offset halves the stops per trip compared with synchronised lights and with the opposite, red-wave offset.

Roundabouts and yielding on entry

A roundabout replaces signals with a priority rule: circulating traffic goes first. Fouladvand, Sadjadi and Shaebani built a cellular automaton roundabout in which an approaching vehicle stops until the quarter of the ring upstream of its entry is empty [16]. The lab uses that rule on a ring of 32 sites with a speed limit of 2 sites per step, four two-way arms and destinations drawn at random among the other three arms. Because a car needs a clear quarter of the ring to enter, the entries block each other as the demand rises: queues build on every arm while the ring itself stays nearly empty. The tests check that vehicles are conserved through the arms and the ring, that each leaves at its chosen exit and that a saturated roundabout serves less than the demand.

Things to try

  • Free flow. At \rho = 0.08 every car cruises. The flow reads close to \rho(v_{\max} - p), about 0.39, and the dots of a sweep start on the rising edge of the triangle.
  • Phantom jam. The cars start evenly spaced at full speed, below the critical density. Within a few hundred steps random braking alone has built a jam. Read the jam wave speed: about -0.3 to -0.6 sites per step.
  • Switch off the noise. The same density with p = 0, from a random start. The initial jams melt, every car reaches v_{\max} and the flow settles on exactly 0.75. Now drag p up and watch it break.
  • Capacity drop. Slow-to-start on, \rho = 0.16, evenly spaced. The flow sits near 0.79 until one jam forms, then falls to about 0.2 to 0.25 and stays there. The same density from a random start never recovers.
  • Red turns green. A packed queue at a light that has just turned green. Both space-time diagrams open a fan whose back edge eats into the queue. At the next red, arriving cars pile into a new queue whose back is a shock.
  • Queue behind a slow zone. A tenth of the road is limited to speed 1 (in the continuum, to v_f/v_{\max} of the free speed). Traffic piles up upstream and the back of the queue walks backward as a shock. In the continuum at \rho = 0.18 and v_f = 2, the zone passes at most 0.1 cars per step, the queue holds about 0.95 cars per site, and Rankine-Hugoniot predicts the shock at -0.25 sites per step.
  • Automaton versus continuum. One packed block released in both models with v_f = 1. Both open a fan whose back edge moves into the block at close to one site per step. The automaton's front races ahead at v_{\max} and then keeps making new jams; the continuum spreads into a smooth, uniform road and stays there.
  • Measure the fundamental diagram. Run Sweep density at p = 0.25, then Check the p = 0 limit. The noisy dots sit well below the triangle, with a rounded peak at lower density. Neither matches the Greenshields parabola, whose shape is symmetric and whose peak is at half the jam density. Adjust v_f to fit its capacity and see what remains wrong.

The other roads. Pick a road type above the lab; each keeps its own settings in the link.

  • Sugiyama 2008, 22 cars. Uniform flow at about 30 km/h. Watch the headway spread climb slowly, then the slowest car hit zero within a few minutes. The jam wave readout settles near -23 km/h; the space-time diagram looks like figure 4 of the paper [9].
  • Below the critical density. 18 cars. The spread never grows and nobody stops.
  • Alert drivers. a = 4.5 s^{-1} is above 2V'(h) \approx 3.7 s^{-1}, so 22 cars flow uniformly. Lower a slowly and find where the jam returns.
  • No noise at all. Only 10 cm misplacements seed the instability, and the jam still comes in about the same time: the growth is exponential, so the size of the seed matters little.
  • Release a queue. All 22 cars start bumper to bumper. The queue dissolves from the front and the circuit settles into the same jammed cycle as from a uniform start.
  • Intelligent drivers. The IDM with a = 0.3 m/s^2 makes a much wider jam; IDM with brisk acceleration removes it.
  • Free overtaking and Keep right, pass left. Cars only. With free overtaking lane changes are rare and both lanes carry the same flow. Under the asymmetric rule about two thirds of the cars sit in the right lane at low density, at the price of many more lane changes.
  • Dense two-lane traffic. Three times the density of Free overtaking, yet no more flow per lane: jams sweep backward through both lanes.
  • Trucks form platoons. One vehicle in ten at v_{\max} = 3 and no lane changes: cars behind a truck reads two or three.
  • Lane changes do not help. Turn lane changes on and look for two trucks side by side in the scene: a plug. Then keep trucks right and compare the car speed.
  • On-ramp bottleneck. The queue readout climbs and the space-time diagram grows a purple wedge whose upstream edge walks left from site 250. Off-ramp relief lets half the cars leave first and the wedge shrinks; two lanes absorb the ramp removes it.
  • Free flow past the ramps. Light traffic: ramp cars find gaps at once and every detector agrees with the demand. A trickle tips it over runs the main road near its capacity, and five ramp cars in a hundred steps start a queue behind the merge. Slow-to-start at the merge makes drivers leaving the queue hesitate, so it discharges more slowly and reaches further upstream.
  • Capacity drop. Watch the dashed peak line and the downstream flow: the flow sits near the peak until the queue forms, then settles well below it. Same demand, eager drivers drops much less.
  • Below capacity and Queue at the drop. Three lanes of light traffic squeeze into two without trouble; raise the demand beyond what two lanes carry and a queue forms at the taper and grows upstream.
  • Gridlock and free flow. At density 0.25 the grid sorts into stripes and the moving fraction reaches 1; at 0.5 it falls to 0. Run Sweep density to see the jump.
  • Free flow organises itself, Near the transition and A small city. From a random start at low density the cars sort into diagonal stripes. Close to the critical density, runs from different starts end free, jammed or in between. The small city reruns the 32 by 32 lattice near the density of the jammed example in the paper by Biham, Middleton and Levine.
  • Green wave. Compare stops per trip for synchronised lights, green wave and red wave. In the space-time diagram the green wave lets platoons run straight through all three lights.
  • Green split. At one heavy intersection, move the split and watch the waiting cars move from one street to the other.
  • Long cycles and Short cycles. With sixty steps of red a driver who arrives at red waits up to sixty steps, but the two all-red steps cost almost nothing. With short cycles those two steps take a fifth of every cycle, so the avenue flow drops and its queue grows.
  • Roundabout. Raise the demand per arm from 0.05 to 0.2 and watch the throughput fall away from the dashed demand line while the queues grow.
  • Quiet roundabout, Busy but coping and Saturated. The same steps one experiment at a time: cars rarely meet; entering cars often yield and short queues come and go; demand beyond capacity leaves the ring sparse while every arm queues, because each entry blocks the next.

Reading the lab's instruments

The ring. The outer lane is the automaton: one small vehicle per car, coloured by speed from dark purple (v = 0) to yellow green (v = v_{\max}). Cars drive clockwise. A slow zone is hatched; a traffic light is a signal head beside the road. The inner band is the continuum: its colour is the LWR speed v_f(1 - \rho) on the same scale, and it fades out where the road is nearly empty.

Space-time diagrams. Position runs across, time runs down and the newest step is the bottom row. On the left each car is a dot coloured by speed; on the right the colour is the LWR speed, blank where the density is below 0.02. The window holds the last 720 steps. A car's path is a line sloping down and to the right. A jam that moves backward is a band sloping down and to the left; its slope is the jam wave speed. A fan is a widening wedge, a shock a sharp edge.

Readouts. Mean speed is the average of v over all cars this step. Flow is the sum of speeds divided by L, the cars passing a point per step, equal to density times mean speed. Density is cars per site. Stopped is the fraction of cars with v = 0. Jam wave speed compares where cars were stopped 30 steps ago with where they are stopped now, finds the shift that overlaps them best, divides by 30 and smooths the result; it reads n/a when nothing is stopped. LWR flow is the mean of Q(\rho) over the continuum cells.

Live plots. Mean speed and flow of the automaton over the last 600 steps. A collapse in the capacity drop experiment shows here as a cliff.

Fundamental diagram. The solid line is the automaton's p = 0 triangle for the current v_{\max}; the dashed line is the Greenshields parabola for the current v_f. A sweep rebuilds the road at 28 densities from random starts, discards the first steps of each and plots the average measured flow as a dot.

Road types. Every road draws its vehicles in the same colour scale, from dark purple when stopped to yellow green at top speed. The scale is a slice of viridis, which is perceptually uniform and readable with the common forms of colour blindness; the legend above each scene gives its range. Between steps the lab interpolates each vehicle's position, so slow playback (1/4 or 1/2 step per frame) moves smoothly.

Sugiyama circuit. Cars to scale on a circle of the chosen circumference. The space-time diagram has one row per half second of simulated time, with each car drawn 4 m long. Jam wave compares stopped stretches 5 s apart, like the ring's estimator, and converts to km/h; negative means backward. Headway spread is the standard deviation of the headways, zero for perfectly even spacing. Flow is density times mean speed. Time warp runs the simulation faster than real time.

Two lanes. The right lane is the inner one. One space-time diagram per lane. Cars behind a truck counts, for each truck, the chain of cars following it closely in its lane, averaged over trucks. Changes counts lane changes per 100 vehicle steps over the last 100 steps.

On-ramp and lane drop. The scene is zoomed on the bottleneck; the strip under it shows the whole 400-site road, with the zoomed window boxed. Flows come from detectors averaged over the last 120 steps: upstream at site 40, downstream 30 sites before the end on the ramp road and 60 sites past the drop on the lane drop. Queue is how far upstream of the bottleneck the mean speed stays below half of v_{\max}, smoothed. Travel time averages the last 200 trips that drove the whole road. Peak downstream is the highest downstream flow seen so far.

City grid. Blue cars go east, orange cars go north. Moving fraction is the share of cars that moved on their last turn; the sweep plots its average against density from fresh random starts.

Traffic lights. Each signal head has a stop lamp on top and a go lamp below. Stops per trip counts how often an avenue car came to a halt, averaged over the last 200 trips. Green wave offset is the block length divided by the free speed.

Roundabout. Throughput counts cars leaving by any exit per step; demand is four times the demand per arm. Queue per arm counts stopped cars on the approaches.

References

[1] M. J. Lighthill and G. B. Whitham, "On kinematic waves II. A theory of traffic flow on long crowded roads," Proceedings of the Royal Society of London A 229, 317-345 (1955). DOI: 10.1098/rspa.1955.0089

[2] P. I. Richards, "Shock Waves on the Highway," Operations Research 4, 42-51 (1956). DOI: 10.1287/opre.4.1.42

[3] R. J. LeVeque, Finite Volume Methods for Hyperbolic Problems (Cambridge University Press, 2002). Ch. 11 "Nonlinear Scalar Conservation Laws" and ch. 12 "Finite Volume Methods for Nonlinear Scalar Conservation Laws." DOI: 10.1017/CBO9780511791253

[4] C. F. Daganzo, "The cell transmission model: A dynamic representation of highway traffic consistent with the hydrodynamic theory," Transportation Research Part B 28, 269-287 (1994). DOI: 10.1016/0191-2615(94)90002-7

[5] K. Nagel and M. Schreckenberg, "A cellular automaton model for freeway traffic," Journal de Physique I 2, 2221-2229 (1992). DOI: 10.1051/jp1:1992277

[6] M. Schreckenberg, A. Schadschneider, K. Nagel and N. Ito, "Discrete stochastic models for traffic flow," Physical Review E 51, 2939-2949 (1995). DOI: 10.1103/PhysRevE.51.2939. arXiv: cond-mat/9412045

[7] D. Chowdhury, L. Santen and A. Schadschneider, "Statistical physics of vehicular traffic and some related systems," Physics Reports 329, 199-329 (2000). DOI: 10.1016/S0370-1573(99)00117-9. arXiv: cond-mat/0007053

[8] R. Barlovic, L. Santen, A. Schadschneider and M. Schreckenberg, "Metastable states in cellular automata for traffic flow," European Physical Journal B 5, 793-800 (1998). DOI: 10.1007/s100510050504. arXiv: cond-mat/9804170

[9] Y. Sugiyama, M. Fukui, M. Kikuchi, K. Hasebe, A. Nakayama, K. Nishinari, S. Tadaki and S. Yukawa, "Traffic jams without bottlenecks: experimental evidence for the physical mechanism of the formation of a jam," New Journal of Physics 10, 033001 (2008). DOI: 10.1088/1367-2630/10/3/033001

[10] M. Bando, K. Hasebe, A. Nakayama, A. Shibata and Y. Sugiyama, "Dynamical model of traffic congestion and numerical simulation," Physical Review E 51, 1035-1042 (1995). DOI: 10.1103/PhysRevE.51.1035

[11] M. Rickert, K. Nagel, M. Schreckenberg and A. Latour, "Two lane traffic simulations using cellular automata," Physica A 231, 534-550 (1996). DOI: 10.1016/0378-4371(95)00442-4. arXiv: cond-mat/9512119

[12] K. Nagel, D. E. Wolf, P. Wagner and P. Simon, "Two-lane traffic rules for cellular automata: A systematic approach," Physical Review E 58, 1425-1437 (1998). DOI: 10.1103/PhysRevE.58.1425. arXiv: cond-mat/9712196

[13] O. Biham, A. A. Middleton and D. Levine, "Self-organization and a dynamical transition in traffic-flow models," Physical Review A 46, R6124-R6127 (1992). DOI: 10.1103/PhysRevA.46.R6124. arXiv: cond-mat/9206001

[14] M. Treiber, A. Hennecke and D. Helbing, "Congested traffic states in empirical observations and microscopic simulations," Physical Review E 62, 1805-1824 (2000). DOI: 10.1103/PhysRevE.62.1805. arXiv: cond-mat/0002177

[15] E. Brockfeld, R. Barlovic, A. Schadschneider and M. Schreckenberg, "Optimizing traffic lights in a cellular automaton model for city traffic," Physical Review E 64, 056132 (2001). DOI: 10.1103/PhysRevE.64.056132. arXiv: cond-mat/0107056

[16] M. E. Fouladvand, Z. Sadjadi and M. R. Shaebani, "Characteristics of vehicular traffic flow at a roundabout," Physical Review E 70, 046132 (2004). DOI: 10.1103/PhysRevE.70.046132. arXiv: cond-mat/0309560

[17] G. Diedrich, L. Santen, A. Schadschneider and J. Zittartz, "Effects of on- and off-ramps in cellular automata models for traffic flow," International Journal of Modern Physics C 11, 335-345 (2000). DOI: 10.1142/S0129183100000316. arXiv: cond-mat/0001196

[18] D. Helbing, A. Hennecke and M. Treiber, "Phase diagram of traffic states in the presence of inhomogeneities," Physical Review Letters 82, 4360-4363 (1999). DOI: 10.1103/PhysRevLett.82.4360. arXiv: cond-mat/9809324

[19] S. Cheybani, J. Kertesz and M. Schreckenberg, "Stochastic boundary conditions in the deterministic Nagel-Schreckenberg traffic model," Physical Review E 63, 016107 (2001). DOI: 10.1103/PhysRevE.63.016107. arXiv: cond-mat/0006221

[20] M. Treiber and A. Kesting, Traffic Flow Dynamics: Data, Models and Simulation (Springer, 2013). Ch. 10 "Elementary Car-Following Models", ch. 11 "Car-Following Models Based on Driving Strategies", ch. 15 "Stability Analysis", ch. 17 "The Phase Diagram of Congested Traffic States" and ch. 18 "Traffic Flow Breakdown and Traffic-State Recognition." DOI: 10.1007/978-3-642-32460-4

[21] M. Bando, K. Hasebe, K. Nakanishi and A. Nakayama, "Delay of Vehicle Motion in Traffic Dynamics," Japan Journal of Industrial and Applied Mathematics 17, 275 (2000). DOI: 10.1007/BF03167348, arXiv: patt-sol/9608002. Its realistic optimal velocity function is the one fitted in M. Bando et al., Journal de Physique I 5, 1389 (1995), DOI: 10.1051/jp1:1995206, which we have not read directly.