Traffic-light junction timing: experiment bench
Traffic-light junction timing
Share green time between two roads and a pedestrian crossing, keep every phase safe, and watch the queues.
- 1. Ask
- 2. Hypothesise
- 3. Set up
- 4. Run
- 5. Record
- 6. Change one variable
- 7. Compare
- 8. Interpret
- 9. Limitations & save
If I change …, then … will …, because …
3 · Set up the parameters
Time the busier road gets to discharge its queue.
Green time for the cross road.
How busy the main road is.
How busy the cross road is.
Below 3 s the safety audit flags it.
Every light red while the junction clears.
Time pedestrians may start crossing.
Time to finish crossing 12 m at 1.2 m/s.
How often someone arrives at the crossing.
1 more control appear at higher levels; until then it stays at the default value.
The seed fixes any random noise. Same parameters + same seed = exactly the same result, every time, on every computer.
6 · Change one variable
Your first run is the baseline. After it, change one thing at a time.
7 · Compare on a graph
5 · Run log
No runs yet.
Equations
Cars leave one every 2 s after a 2 s start-up delay, so one approach discharges ⌊(g − 3)/2⌋ + 1 cars in a green of g seconds.
Assumptions (always true in this model)
- One lane per approach, no turning traffic, no pre-emption in this bench.
- Fixed 2 s headway and 2 s start-up lost time; nobody leaves on amber.
- 15-minute run; arrivals from a seeded random generator.
Text description of what the chart shows
A line chart of queue length against time over 15 minutes. The north–south and east–west queues rise during their red phases and fall during green, forming a saw-tooth pattern; a third series shows pedestrians waiting for the walk phase.
Did the result support your hypothesis? Use the numbers from the comparison table and link them to an equation.
Which assumptions could change your answer in the real world? For example: Real junctions have turning movements, platoons from neighbouring lights and driver variation.
Export and save
Exports use the ticked runs (or every run if none are ticked). Your draft saves automatically in this browser only. The Journal is private to you.
Valid parameter ranges
| Parameter | Range | Default |
|---|---|---|
| North–south green | 5 to 90 s | 25 |
| East–west green | 5 to 90 s | 25 |
| North–south arrivals (each approach) | 0 to 30 cars/min | 10 |
| East–west arrivals (each approach) | 0 to 30 cars/min | 5 |
| Amber | 2 to 6 s | 3 |
| All-red clearance | 0 to 4 s | 2 |
| Pedestrian walk | 3 to 20 s | 7 |
| Flashing don't walk | 4 to 20 s | 10 |
| Pedestrian arrivals | 0 to 6 people/min | 0.5 |
| Pedestrian phase (0 every cycle, 1 on demand) | 0 to 1 | 0 |
Independent reference checks
Default plan cycle
Hand sum: 25 + 25 + 2×3 + 2×2 + 7 + 10 + 2 = 79 s.
Empty roads
With arrival probability 0 nobody arrives, so nobody waits or departs.
Checked automatically on every change to the code. Educational model, not engineering-grade.
Where this model stops being right
- Real junctions have turning movements, platoons from neighbouring lights and driver variation.