Greenshields Model Traffic Flow Calculator
Compute speed, density, and flow using the Greenshields traffic flow model, find capacity and critical density, and visualize the fundamental diagrams for a highway or arterial.
Greenshields Model Calculator
Fundamental Diagrams
These plots are generated from your chosen free-flow speed and jam density. Capacity and critical density are highlighted.
Speed–Density diagram \(v(k)\)
Flow–Density diagram \(q(k)\)
Speed–Flow diagram \(v(q)\)
Greenshields traffic flow model – theory and formulas
The Greenshields model is one of the earliest and simplest macroscopic traffic flow models. It assumes a linear relationship between speed and density on an uninterrupted facility such as a freeway:
Speed–density relationship:
\[ v(k) = v_f \left(1 - \frac{k}{k_j}\right) \]
- \(v\) – mean speed (km/h or mph)
- \(k\) – density (veh/km/lane or veh/mi/lane)
- \(v_f\) – free-flow speed
- \(k_j\) – jam density
Flow \(q\) is defined as the product of density and speed:
Flow–density relationship:
\[ q(k) = k \cdot v(k) = v_f k \left(1 - \frac{k}{k_j}\right) \]
Critical density and capacity
The critical density \(k_c\) is the density at which flow is maximized (capacity). To find it, differentiate \(q(k)\) with respect to \(k\) and set the derivative to zero:
\[ q(k) = v_f k \left(1 - \frac{k}{k_j}\right) \]
\[ \frac{dq}{dk} = v_f \left(1 - 2\frac{k}{k_j}\right) = 0 \quad\Rightarrow\quad k_c = \frac{k_j}{2} \]
The corresponding speed at capacity is:
\[ v_c = v(k_c) = v_f \left(1 - \frac{k_c}{k_j}\right) = v_f \left(1 - \frac{1}{2}\right) = \frac{v_f}{2} \]
The maximum flow (capacity) is then:
\[ q_{\max} = q(k_c) = v_f \cdot \frac{k_j}{2} \left(1 - \frac{1}{2}\right) = \frac{v_f k_j}{4} \]
Headway and spacing
Density is the inverse of average spacing between vehicles. If \(k\) is in veh/km/lane, the average spacing \(s\) in meters is:
\[ s = \frac{1000}{k} \quad [\text{m/veh}] \]
The space mean headway (time between vehicles at a point) is:
\[ h = \frac{1}{q} \quad [\text{h/veh}] \quad\Rightarrow\quad h_s = \frac{3600}{q} \quad [\text{s/veh}] \]
How to interpret the diagrams
Speed–density diagram
The speed–density line starts at \((k=0, v=v_f)\) and decreases linearly to \((k=k_j, v=0)\). At low densities, vehicles travel close to free-flow speed. As density increases, interactions grow and speed drops.
Flow–density diagram
The flow–density curve is a concave parabola opening downward. It:
- Starts at \(q=0\) when \(k=0\) (no vehicles, no flow).
- Reaches a maximum at \(k_c = k_j/2\) (capacity).
- Returns to \(q=0\) at \(k=k_j\) (jammed traffic, zero speed).
Densities below \(k_c\) correspond to under-saturated conditions (stable flow), while densities above \(k_c\) indicate congested conditions.
Speed–flow diagram
The speed–flow diagram shows two possible speeds for a given flow (except at capacity):
- A higher speed, lower density operating point (stable, free-flow regime).
- A lower speed, higher density operating point (congested regime).
In practice, traffic tends to operate on the stable branch until disturbances push it into congestion.
Typical parameter values
- Free-flow speed \(v_f\): 90–120 km/h (55–75 mph) on freeways; 60–80 km/h (35–50 mph) on arterials.
- Jam density \(k_j\): 120–180 veh/km/lane (190–290 veh/mi/lane), depending on lane width and vehicle mix.
- Capacity \(q_{\max}\): often 1800–2400 veh/h/lane for freeways, which you can check with \(q_{\max} = v_f k_j / 4\).
Limitations of the Greenshields model
While the Greenshields model is widely used for teaching and quick estimates, it has several limitations:
- The linear speed–density assumption may not fit real data well, especially near jam density.
- It is a macroscopic model and does not capture individual vehicle behavior or lane-changing.
- It assumes homogeneous traffic and roadway conditions (no bottlenecks, signals, or ramps).
For detailed design or operational analysis, engineers often calibrate more flexible models (e.g., Greenberg, Underwood, Drake) or use microscopic simulation tools.
Greenshields model – frequently asked questions
Is the Greenshields model realistic enough for design?
It is adequate for conceptual design, teaching, and quick checks, but not for final design of critical facilities. For design-level work, you should calibrate the model with local data or use more advanced models and simulation that reflect driver behavior, lane distribution, and control devices.
How do I choose jam density \(k_j\)?
Jam density depends on lane width, vehicle size, and driver behavior. A common rule of thumb is:
- Passenger-car only freeway: 140–180 veh/km/lane (225–290 veh/mi/lane).
- Mixed traffic or narrow lanes: slightly lower values.
If you have field data, you can estimate \(k_j\) from observed maximum densities during severe congestion.
Can this calculator handle multiple lanes?
Yes. All calculations are done per lane. To get total flow for a multi-lane facility, multiply the per-lane flow \(q\) or capacity \(q_{\max}\) by the number of lanes, assuming lanes are used evenly.
What is the difference between time mean speed and space mean speed?
The Greenshields model uses space mean speed, which is the harmonic mean of individual speeds over a road segment. Time mean speed is the arithmetic mean of speeds observed at a point. In uncongested conditions they are similar, but they diverge as variability increases.