HomeTransport & UrbanismTraffic Intersection — Signal Timing & Queue Theory

🚦 Traffic Intersection — Signal Timing & Queue Theory

Optimise traffic signal timing at a 4-way intersection. Vehicles arrive via Poisson process; Webster's formula gives the optimal cycle. Watch queues form, dissipate, and measure level of service.

Transport & Urbanism3DEasy60 FPS
traffic-intersection ↗ Open standalone
🚦
Signal Optimization

Webster's 1958 formula computes the optimal cycle length that minimises average intersection delay across all approaches.

📊
Queue Theory

Vehicles arrive via a Poisson process and queue as a D/D/1 model per approach. Watch queues grow during red and drain at saturation flow during green.

📈
Level of Service

Highway Capacity Manual grades A–F reflect average control delay per vehicle, from under 10 s (LOS A) to over 80 s (LOS F) for saturated conditions.

About the Traffic Intersection Simulation

This simulation models a four-way signalised intersection using principles from traffic engineering and queueing theory. Vehicles arrive at each of the four approaches (North, South, East, West) following a Poisson process — a statistically accurate model of random but steady traffic streams. Arrivals join a queue and wait for their signal phase to turn green, after which vehicles depart at the saturation flow rate of 1800 vehicles per hour per approach (30 veh/min), consistent with the Highway Capacity Manual. Webster's 1958 formula computes the theoretically optimal cycle length C₀ = (1.5L + 5) / (1 − Y) where L is total lost time and Y is the sum of flow ratios for each phase. Enable the "Auto (Webster)" checkbox to let the simulation recalculate signal timing dynamically as you adjust arrival rates.

The statistics panel tracks average control delay per vehicle and assigns a Level of Service grade from A (under 10 s/veh) to F (over 80 s/veh) using HCM thresholds. Try the Saturated preset to observe LOS F conditions where queues grow unboundedly and throughput collapses. The Heavy N-S preset shows how unbalanced demand rewards longer green time on the dominant approach while penalising the minor road. The colour-coded queue bars and animated departing vehicles give immediate visual feedback on how signal timing decisions propagate through the system — a core skill in traffic engineering design.

Frequently Asked Questions

What is Webster's formula for signal timing?

Webster's 1958 formula gives the optimal cycle length as C₀ = (1.5L + 5) / (1 − Y), where L is total lost time per cycle (typically 4–6 s) and Y is the sum of critical flow ratios (volume divided by saturation flow) for each phase. It minimises average intersection delay across all approaches for given traffic demands.

What is the Level of Service (LOS) grade?

Level of Service grades A through F describe driver experience at a signalised intersection based on average control delay per vehicle. LOS A is under 10 s/veh (free-flow), B under 20 s, C under 35 s, D under 55 s, E under 80 s, and F at 80 s or more, indicating severe congestion where demand approaches or exceeds capacity.

How do vehicles arrive in the simulation?

Arrivals follow a Poisson process, meaning each vehicle arrives independently with a constant average rate set by the sliders (0–30 veh/min per direction pair). Poisson arrivals are the standard assumption in traffic engineering because real traffic streams at isolated intersections exhibit memoryless inter-arrival times at moderate densities.

What is saturation flow rate?

Saturation flow rate is the maximum rate at which queued vehicles can depart through a green signal, measured in vehicles per hour of green per lane. This simulation uses 1800 veh/hr (30 veh/min), typical for a single through lane. The ratio of demand to saturation flow (the flow ratio) determines how much green time each phase needs.

What happens when the intersection is over-saturated?

When the sum of critical flow ratios Y exceeds 1, demand exceeds capacity regardless of how signal timing is optimised. Webster's formula is no longer valid and queues grow without bound. The simulation shows this by locking the cycle at 120 s and using equal green splits, but LOS F and growing queues indicate that geometric improvements (extra lanes, turn restrictions) are needed rather than timing changes alone.

Why does the N-S green split slider matter?

Green split determines what fraction of each cycle is allocated to each phase. Moving it toward N-S reduces waiting time on those approaches but increases it on E-W. With balanced demand the optimal split is 50/50; with unbalanced demand (e.g., heavy N-S) the optimal split weights toward the heavier direction proportionally to its flow ratio, exactly as Webster's formula prescribes.

What is lost time in signal timing?

Lost time accounts for the seconds at the start of each green phase (start-up lost time, about 2 s) when queued vehicles are reacting and accelerating, plus the clearance interval at the end. These seconds provide no effective capacity. Total lost time L is typically 3–5 s per phase, summed across all phases in one cycle, and directly increases the optimal cycle length.

How is average delay calculated?

The simulation records the arrival time and departure time of every vehicle. Average delay is the mean of all (departure − arrival) values over a rolling window of the last 500 departed vehicles. The theoretical Webster uniform delay formula d = C(1 − g/C)² / [2(1 − ρ)] gives a closed-form estimate, where g is effective green and ρ is the degree of saturation (v/c ratio).

What does throughput mean in this context?

Throughput is the number of vehicles successfully passing through the intersection per hour, calculated over rolling 60-second simulation windows and scaled to an hourly rate. It differs from demand (arrival rate) because queued vehicles depart only during green phases at the saturation flow rate. Under congestion, throughput saturates at the intersection capacity and additional arrivals simply extend queues.

Can this model handle more than two phases?

This simulation uses a two-phase cycle (N-S green then E-W green) for clarity. Real-world intersections often use four or more phases to handle dedicated left-turn movements, pedestrian crossings, or complex geometry. The underlying Webster framework extends to multiple phases by summing flow ratios across all critical movements, with proportionally longer cycles for more phases.

⚙ Under the hood

Set green splits and cycle length against Poisson arrivals, then use Webster's formula to see queues and average delay grow or clear.

traffic lightssignal timingWebster formulaqueue theoryPoissonlevel of service

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)