Lesson 5 · Traffic: dead ends, gridlock and zones
Vehicles keep apart on their own, but nobody tells them who should back out of a narrow dead end first. You will add a dead-end spur, provoke the jam it can cause, read the signs in the results and cure it with an exclusive traffic zone.
- Time
- 30 min
- Start from
- the checkpoint of lesson 4
- You will learn
- branch a spur off the loop and understand what a dead end means for traffic
- recognise a gridlock in the results and on the heatmap
- draw and tune an exclusive traffic zone, and know what it does
Open your project from lesson 4, or its checkpoint.
How vehicles keep apart
Every vehicle has a rectangular body with its real size and a margin around it. It reserves the stretch of path ahead of it, and a scanner looking in the direction of travel makes it brake when another vehicle is in the way. Two vehicles therefore never overlap, they wait.
But waiting is not organising. If two vehicles each wait for the other to move, nothing moves: a gridlock. The classic place is a one-lane dead end: a vehicle going in meets one coming out, and a vehicle cannot pass another in a single lane. The loop of lesson 1 cannot jam this way, because everyone drives the same direction. A spur can.
Add a repacking spur
Repack is a workstation reached by a 4 m spur that leaves the top side of the loop and ends in a dead end. The spur is two-way: a vehicle drives in, unloads and has to reverse out.
- Make room. Back in Draw, press Fit and then Zoom out once, so there is room above the loop.
- Draw the spur. Choose Path (4) with Orthogonal on. Click on the top side at (−4 000, 6 000): the start snaps onto the path, which is how a branch joins a path in the middle (a T-junction). Then click (−4 000, 10 000). Leave the direction on Both · A ↔ B.
- Add the station. Choose Station (7) and click near the end of the spur, (−4 000, 9 500). Name it
Repackand tick Drop-off.
- A short vertical branch above the top side with a red drop-off triangle at its end. The Network dot is still green.
Provoke the jam
At a normal order rate you may never see the problem: vehicles rarely arrive at the spur together. To find a weak point, test it harder than reality. This is a stress test: send every order to Repack, and one every 10 seconds.
- Aim everything at Repack. In Simulate, click the header of Pickup and drop-off to open it. Tick
Repackfirst, then untickLine 1andLine 2. The summary reads1 → 1 · 1 pairs. The Network dot turns amber: now that orders go to the spur, the tab warns that it is a single lane driven both ways without an exclusive zone, where two vehicles that meet block each other. That is the weak point you are about to provoke. - Order every 10 seconds. In Orders, set Interval to
10. Keep three vehicles, and run1 hwith Start run. - Read the signs. In Results a Possible gridlock alert appears, and the numbers are dismal: one mission completed in the whole hour, thousands of seconds of traffic waiting and a queue that only grows. In the comparison table the run carries a warning mark.
- See where it jams. Choose the hotspots layer in the toolbar's heatmap list: the points where vehicles waited longest sit on the spur and at its mouth.
What happened: the first vehicle drove to the end of the spur and started unloading; the second followed it into the spur and stopped behind it; the third waited at the mouth. When the first had finished it needed to reverse out, but the second was in the way and could not reverse either, because it was waiting for the same station. Nobody could move.
The run still ends at one hour. The model reports the jam instead of hiding it, and it never frees vehicles by magic.
Cure it with a traffic zone
An exclusive traffic zone is an area that only one vehicle at a time may occupy. A vehicle reserves it when it enters and keeps it until it has physically left; the others wait at its edge, outside, where they do not block the exit. Draw one over the spur.
- Draw the rectangle. In Draw choose Zone (9) and drag from (−5 000, 6 600) to (−3 000, 10 500): just above the loop, to just past the station. The zone should cover the whole spur and start just above the loop. A vehicle bound for the spur asks for the zone shortly before its edge, at its own radius plus a small clearance, which is still on the loop: if the zone is taken it waits there, so for a moment it holds up whatever comes behind it. Vehicles that only drive past on the loop never take the zone. A zone trades a deadlock for short waits.
- Fix the numbers and name it. The zone is selected. In Properties type the four limits exactly (
−5000,−3000,6600,10500) and set Zone name toRepack spur. You can also drag a corner to resize it or its inside to move it; the paths underneath never move. - Run the same stress test. Back in Simulate, change nothing and press Start run again for one hour.
- No gridlock alert. About 70 missions completed in the hour, instead of one, with only a small amount of traffic waiting: now spent at the zone's edge instead of inside the spur. The comparison table shows both runs side by side, and the Network dot is green again.
The zone throttles the spur to one vehicle at a time, so about 70 an hour is its capacity; against 80 orders an hour it would saturate, which is itself a result worth knowing. How a zone behaves:
- The vehicle holds it through stops inside, such as unloading, and releases it only when it has left, not at the end of the mission.
- Only a vehicle that enters it holds it, from just before its edge; vehicles driving past do not take it, and those bound for it wait at that distance.
- Every zone stands on its own: overlapping or nearby zones are never merged. A vehicle crossing several in a row asks for them together and frees each as soon as it has left it.
- A pickup or drop-off inside a zone needs an allowed route out to a charger or parking outside it.
Back to normal orders
- Restore the pairs. Open Pickup and drop-off and, with
Repackstill ticked, tickLine 1andLine 2too. The summary reads1 → 3 · 3 pairs. - Restore the rate. Set Interval back to
45and run1 h. Material now rotates between three destinations and the spur is visited only every third order, so the zone is a safety net rather than a bottleneck.
A traffic zone prevents the jams the model can see. It does not prove that a real layout is free of deadlocks or safe for people and vehicles.
- Delete the zone (Ctrl+Z restores it) and rerun the normal orders: with only one order in three going to Repack you may never see the jam. Stress tests find what everyday runs hide.
- Select the spur and change Segment speed (cm/s) (untick Use default speed) to 30 cm/s. A speed on a path takes priority over the fleet's default. Does the zone's capacity change?
- Read Links, speeds and traffic for links: optional named routes between stations that you did not need here.
Checkpoint
It contains: 9 paths · 7 stations · 1 traffic zone · 3 AGVs.
Download the checkpoint (aurora-05-traffic.en.sim)
Open it with Project›Import project. It replaces the project you have open, so save yours first (or open it in a new browser tab). Anything you do from here on is a copy: the checkpoint file itself never changes. Use it to continue from here if you skipped a lesson, or to compare your own project with the expected one.