🚦 The Classical 4-Step Transportation Planning Model — Virtual Lab

📸 Timeline: No snapshots yet — click 📸 Snapshot to record the current scenario. Load the Preset example, edit the inputs, and watch how one step's output becomes the next step's input, and iterate to convergence. Each step is a small model with its own data, assumptions and results.

Step 1 — Trip Generation HOW MANY trips?

Question: For each traffic zone, how many trips start there (productions Pi) and how many trips end there (attractions Aj)? This is the total demand — no information yet about where the trips go.

Input

  • Zone system (TAZ) with socio-economic data
  • Households by car ownership (0 / 1 / 2+ cars)
  • Employment by type: retail & non-retail jobs
  • Trip rates (trips per household / per job, per day)
  • Purpose rates (cross-class)
  • Regression β coefficients (regression)

Output

  • Pi — trips produced in zone i
  • Aj — trips attracted to zone j
  • Balanced so that ΣP = ΣA (a key consistency rule)

Method selector

Switch method — the panel and the results update. Compare them side-by-side at the bottom.

Method inputs

Trip rates (the model coefficients)

Rate matrix: Every household category has an average number of daily trips. Change a rate and watch all productions change.

$$ P_i = \sum_{c} \text{HH}_{i,c} \cdot r_c $$ $$ A_j = \sum_{e} \text{Emp}_{j,e} \cdot a_e $$ $$ A_j^* = A_j \cdot \left( \frac{\sum P_i}{\sum A_j} \right) \quad \text{(balancing)} $$

Zone data (the input table)

Edit any cell. Total households is computed for you.

ZoneHH 0 carsHH 1 carHH 2+ cars Retail jobsNon-retail jobsTotal HH
Σ households in the example: 5 500 · Σ jobs: 10 000

Results — Trip Rate Pi and Aj

These are the numbers that will be handed to Step 2.

Productions Pi Attractions Aj (balanced)
ZonePiAj rawAj balanced

Method comparison

Same zone data, three different generation models.

Balancing control

The 4-step model requires $$ \sum P = \sum A $$
Attractions are usually scaled up/down to match productions.

Uncheck it to see what happens when the two totals disagree — the Trip Distribution model in Step 2 will not be able to satisfy both row and column totals.

➡ Hand-off to Step 2 (Trip Distribution)

ZonePi (trips/day)Aj (trips/day)

Step 2 — Trip Distribution WHERE do trips go?

Question: Of the Pi trips produced in zone i, how many go to each zone j? The answer is to build an origin-destination O-D matrix Tij, solved with a gravity model.

Input

  • Pi and Aj from Step 1
  • An impedance / skim matrix cij — travel time (or cost) between every zone pair
  • A deterrence function f(c) — e.g. exp(−βc) or c−n

Output

  • O-D matrix Tij (trips/day from i to j) with one, both, or no exact constraints
  • Row sums ≈ Pi, column sums ≈ Aj
  • Average trip time — a key validation statistic

Method

1 · Inputs from Step 1 FIXED

These are read-only here — go back to Step 1 to change them.

ZonePi (prod.)Aj (attr.)

2 · Deterrence & skim function f(cij)

Controls how strongly travel time discourages trips. Higher β (or n) → shorter trips.

$$ T_{ij} = a_i P_i \cdot b_j A_j \cdot f(c_{ij}) $$ $$ \text{where } a_i, b_j \text{ are balanced via Furness (Iterative Proportional Fitting).} $$

3 · Impedance (skim) matrix cij — minutes

Symmetric travel time between every zone pair. The diagonal is the intrazonal time.

Tip: increase the diagonal (intrazonal time) to see how the model treats very short trips within the same zone.

Constraint check

Cells show (achieved / target). A true doubly-constrained model hits both 100% everywhere; the singly-constrained variants only match one dimension.

Results — O-D matrix Tij (trips/day)

Darker blue = more trips. Row sums should recover Pi; column sums should recover Aj.

low high

Convergence & validation statistics

➡ Hand-off to Step 3 (Mode Choice)

Each cell Tij of the matrix above will now be split into transport modes (car / bus / rail / …) using a logit model. Before trusting the matrix, a planner checks:
• do row sums equal Pi and column sums equal Aj?
• is the average trip time plausible for this city?
• does the trip-length distribution look sensible?

Step 3 — Mode Choice WHICH transport mode?

Question: For each O-D pair, how many travellers use car, bus, rail, bike, walk…?

Input

  • O-D matrix Tij from Step 2
  • Level-of-service per mode: in-vehicle time, wait, walk, cost
  • Traveller characteristics (income, car ownership)
  • Behavioural coefficients βtime, βcost (from surveys)

Output

  • Mode-specific O-D matrices: Tijcar, Tijbus
  • Modal split shares (% car / % bus)
  • Average level-of-service per mode

1 · Level-of-service per mode

These define how attractive each mode is. Time scales with the skim matrix; cost has a flat component plus a distance-based one.

$$ \text{Car}: \quad \text{time}_{car} = \color{c}{c_{ij} \;\cdot\; \text{cost}_{car}} = \color{k}{P} + \color{k}{k_{c}} \cdot c_{ij} $$ $$ \text{Bus}: \quad \text{time}_{bus} = \color{c}{s \cdot c_{ij} + \color{c}{w} \;\cdot\; \text{cost}_{bus}} = \color{k}{F} + \color{k}{k_{b}} \cdot c_{ij} $$

2 · Behavioural coefficients β

Negative β means "more of this = less utility". Ratio of the two gives the value of time.

24.0 $/hr

Multinomial Logit Model

$$ V_m = \beta_{\text{time}} \cdot \text{time}_m + \beta_{\text{cost}} \cdot \text{cost}_m $$ $$ \text{Pr}(m) = \frac{\exp(V_m)}{\sum_{k} \exp(V_k)} $$ $$ T_{ij}^m = T_{ij} \cdot \text{Pr}(m) $$

Utility $V$ dictates choice. It is what the traveller "likes". Higher utility $\rightarrow$ higher probability.

Results — modal split

Mode-specific O-D matrices

Click any cell to inspect the LOS / utility / probability for that O-D pair.

O-D pair inspector

Click a cell in the matrix above to see the LOS breakdown for that pair.

➡ Hand-off to Step 4 (Network Assignment)

Only the O-D matrix of the modes with the "Add vehicles to Traffic Assignment" checkbox ticked (in their respective mode configurations above) will be passed to Step 4. Person-trips for these modes are divided by their Occupancy (pax/veh) and multiplied by their PCU equivalent. These PCUs are summed into a single demand matrix to calculate physical road congestion.

Step 4 — Multimodal Network Assignment WHICH route?

Question: Which links of the road network carry the people trips, and how congested do the vehicles make it?

Input

  • Car O-D matrix from Step 3
  • Network topology: nodes, links, free-flow time t0, capacity
  • Volume-Travel time function (e.g. BPR, Greenshields) parameters
  • Assignment Algorithm & objective (All-or-Nothing / User Equilibrium/ System Optimal)

Output

  • Link flows va (veh/day or veh/h)
  • Congested travel times ta, v/c ratios
  • Network performance metric: total vehicle-hours, average speed
  • Price of Anarchy (UE vs SO)

Network links

Edit mode on. Click a link row to delete · drag nodes to reposition · change direction per link · click × on junctions to remove them. t₀ is free-flow travel time · C is capacity · Network auto-adapts to the number of zones.

Time of day

Assignment uses the demand of the selected period. Peak-hour profiles are the standard for congestion analysis.

Assignment controls

$$ t_{a}(v) = t_{0} \cdot \Big[ 1 + \alpha \cdot \left(\tfrac{v}{C}\right)^{\beta} \Big] $$ $$ \text{Marginal cost for SO:} \quad MC_{a}(v) = t_{a}(v) + v \cdot \frac{dt_{a}}{dv} $$

BPR Volume-Delay & User Equilibrium

$$ t_a(v_a) = t_{0,a} \left[ 1 + \alpha \left(\frac{v_a}{C_a}\right)^\beta \right] $$
All-or-nothing → MSA / Frank-Wolfe → User Equilibrium
$$ \text{MSA:} \quad x^{n+1} = \left(1 - \tfrac{1}{n}\right) \cdot x^{n} + \tfrac{1}{n} \cdot y^{n} $$
$$ y^{n} = \text{all-or-nothing on current times } \; t(x^{n}) $$

Equilibrium (Wardrop's First Principle): No traveller can unilaterally reduce their travel time by changing routes.

Assignment is where the network's capacity finally matters — the same demand produces very different flows on a sparse vs. dense network.

🔀 Advanced: MSA vs Frank-Wolfe Convergence

Compare algorithmic efficiency. Frank-Wolfe uses mathematical line-search, while MSA blindly averages sequential loads.

📈 Advanced: Price of Anarchy (PoA) Sweep

Test how selfish routing (UE) degrades the system compared to social optimum (SO) as overall traffic demand scales up from 40% to 200%.

🏘 Advanced: Induced Demand & Land-Use

"Build it and they will come." Simulates how improving road capacity induces new trips and shifts demographics.

🔄 Advanced: Full 4-Step Feedback Loop

When enabled, congested link times are fed back as the new skim, and Steps 2-4 are re-run iteratively until the skim stabilises. This is how real-world master plans are resolved.

Network map

Visualise:
v/C = 0
≥ 1.0 thickness ∝ flow · ▶ one-way

Emissions summary

Emissions computed per link from flow × length × speed-dependent rate (g CO₂/km). Congested links emit more per vehicle-km.

Link results

Performance

➡ End of the 4-step model

The multimodal network flows and congestion metrics above represent the final baseline product of the classical 4-step process. From here, a planner can:
• Environmental Impact: Check total system $CO_2$ emissions and localized congestion hotspots.
• Infrastructure Evaluation: Propose a scheme (e.g., convert a car lane to a dedicated bus lane) and observe the modal shift.
• Advanced Feedback: Expand the collapsibles above to run Induced Demand loops or assess the Price of Anarchy.