Well, its all wrong, I'll show you that a loop-based system, when properly designed with what I'm calling 'ideal' stations and junctions, is as deadlock free as a double header system that branches out.
I'm going to explain deadlocks, or try to, and go into -why- they happen, in either system.
I hope to outline the mystery behind why loop-based, single headed systems, and rotary junctions are or have been condemned.
I'll also show how and where actual issues might develop, and the types of stations and junctions needed to prevent problems.
I will be dealing primarily with 3-way intersections here, as in most cases cross or four-way intersections aren't required.
Most of my diagrams and examples are also going to be rather scaled down, because I have to build them as examples, and there are quite a few.
Readers should be familiar with trains, and signalling, including chain signal basics, some parts might not be fully explained in this regard. I'm explaining stations and junctions in a 'what-it-should-allow-or-disallow' sense, not how to make that happen with signals.
Oh by the way, My trains drive on the left.
What is deadlock?
Deadlock, in a nutshell, is a situation where each and every train is blocked by another train, forming a loop of unmoving trains.
A small deadlock: Train A can't move because of train B, B can't move because of C, C can't move because of D, and D is stuck because of A. A loop of stuck trains (caused by bad signals in this instance).
I've highlighted the blocks here to show the problem.
Why has my network deadlocked?
In an ideal 'deadlock free' network, there are two reasons why the trains can actually deadlock, and both of these are to do with insufficient capacity
6 trains can't run between these stations, there isn't enough room.
Fix: Add more blocks if there's space, add more lanes, or use fewer trains.
Very similar, there are too many trains running along this line - but not all are assigned to these two stations.
Each station has a train waiting to enter, these trains are stopping trains on the main line, and those are preventing trains from leaving the stations.
Fix: Add a waiting bay for the stations, add more lanes, or use fewer trains.
As you can see, neither of these are a problem provided stations and the network are planned with enough space for the intended trains.
These issues affect both single and double headed railway designs, and loop or cross based intersections, they're unavoidable simply by design and every system has a limit to the number of trains it can run.
I'll reiterate that: These problems will affect all designs of stations and networks, they are a capacity issue and can be prevented with more lanes and waiting bays regardless of network station or intersection design.
Non-ideal network deadlocks:
Deadlocks are easy to cause when a network is not designed properly or well.
- non-ideal intersections/improperly signalled intersections
- non-ideal stations/improperly signalled stations
Principles of the ideal junction:
Ideally, a junction that can't cause deadlocks will do the following:
- Be a junction. That is, allow entry's and exit's to and from desired sides.
- Allow multiple trains to use the junction at the same time, as long as they won't crash.
- Prevent trains from waiting inside the junction, which would block access to trains that would otherwise not be blocked.
You've probably seen these before, and have an opinion on the better of the two:
An 'ideal' rotary junction:
An 'ideal' T junction:
Both of these junctions meet the three criteria, the only differences are that the rotary:
- Allows U turns (This is critical, look for it later on)
- Is bigger
Watch out though, you need to make sure the exits to intersections have blocks larger than the largest train that will pass through them, otherwise the junction is no longer 'ideal'
Principles of the ideal station:
Ideally, a station would do the following:
- Allow trains to enter and exit to and from desred directions.
- Prevent trains that want to enter the station from blocking trains that want to exit the station.
Terminus stations are stations that sit at the end of a line. They are very easy to make ideal since there's only one direction a train needs to enter from and only one it needs to exit to, If it's not ideal, it won't work at all with more than one train.
Single header 'ideal' Terminus station:
Double header 'ideal' Terminus station:
Terminus stations function the same for single and double header designs, as far as preventing deadlocks goes. If you want to be safe, use a Junction and a Terminus.
Inline stations sit on a main line and can interrupt the flow of main traffic if not designed with sufficient waiting bays.
Technically terminus stations are inline stations with large waiting bays between the station itself and wherever it connects to a main line
Single header 'ideal' inline station:
Take special care when designing inline single header stations, to make sure that trains leaving the station get priority over trains entering the station, or this could happen:
even placing signals seemingly the right way, always before intersections, this station clogs after reaching 4 trains.
Careful chain signal placement to prevent trains from blocking the exit fix this problem, and the station becomes 'ideal'.
This is a big point for loop based systems, make sure incoming trains cant block outgoing ones!
Double header 'ideal' inline station:
These are pretty simple, most double header station designs use a T junction to a terminus.
A more true inline station can be accomplished with two train stops set to the same name.
I want to take time to point out here that for both the terminus and inline stations, the single headed and double headed station designs are mechanically identical, when 'ideal'.
Trains entering from the left go straight into the station.
Trains entering from the right cross the tracks first, waiting at a chain signal if neccesary.
Trains exiting the station to the left cross the tracks first, waiting at a chain signal if neccesary.
Trains exiting the station to the right go straight onto the tracks.
The differences in this instance are:
The single headed station is bigger.
as a result of that, there's a waiting bay for entering the station and a waiting bay for leaving.
Why are these all Ideal?
The 'ideal' junctions can't deadlock for any other reason than there being too many trains for the rails to handle. If a big stack up of trains happens at a station, for instance:
the ones at the intersection don't stop traffic coming from the blocked station, the stack up continues beyond the junction, it doesn't 'break' the junction.
Why is this important?
It means that trains coming from the backed up station will continue to function.
'ideal' junctions and stations favour the trains that exit from a backed up system, enabling it to clear.
Just like 'ideal' stations don't let a backed up system stop trains leaving, it allows the trains to clear the blockade.
If your stations or intersections aren't 'ideal' they can cause deadlocks with much fewer trains, as they won't always enable clearing stacks of trains like this.
If you do design your network with 'ideal' junctions and 'ideal' stations, then the only deadlocks you can experience are because of insufficient capacity.
This type of deadlock is where the back up of trains reaches a station that is sending trains back towards the train stack, regardless of their intended destination.
This, Is a loop.
And go figure, it's a double headed system, yeah, I made a point of doing that...
So when I now say that loops cause deadlocks, you know I don't mean "oh, your station has a loop in it because your train has to turn around, your network SUX it'll break blah blah blah", "oh, your using rotary junction NOOB", "Contains loops 4/10", etc
That's all bull, and doesn't mean anything
I mean bigger loops, like the inherent "train goes from station 1 to station 2, then back to station 1" loop.
Or loops like these:
In essence, loops like this decrease the capacity of the network, because you can't have more trains running on any tracks within the loop than there are blocks in it.
It no longer takes stations to make a deadlock in these instances, all it takes is a train at each corner turning the correct direction, and having enough trains riding on the loop inbetween.
This is the principle of all deadlocks, a looped train path, full of trains. It only takes one train at each corner of a train loop turning just the right way to cause a deadlock when the rail lines are at capacity.
The same principles apply to stations, entering and exiting a station is a 'corner', except stations can be a bit special with waiting bays, plus the train in the station itself, so stations require 2 trains 'turning the corner' to cause a problem, one entering the station, and one leaving. Plus trains filling the stations waiting bays so the station is at capacity.
It's also important to point out that trains don't have to be travelling the exact path of a loop in order to cause a deadlock, they need only be within it. The same goes for the ones at the 'corners'. In this example, the stations could be entirely unrelated.
Both of these of loops aren't usually an issue, though.
As long as you keep them in check, you'll have handy shortcuts, alternate paths, and plenty of stations.
And keep in mind, having the same number of waiting bays at a station as there are trains visiting that station, means the station in question will never be the cause of a deadlock, entering the station is no longer a loop corner, since trains will always be able to enter.
The last type of problematic loop, are the loops between two rotaries, which is where the most common deadlocks happen, and where I beleive loops got their bad name.
You know what causes deadlocks here?
Well, do you have a station like this:
That's a siding, and its all neat and cool looking and simple, right?
Um, no, not really I'm afraid. Sidings do two things:
- They mean you have to put arbitrary turn-around points in your network, usually just rotary junctions.
- They mean a train want's to turn around somewhere, not at a nice, controllable station.
This means that a siding station is not ideal, because it doesn't follow one of the main rules:
If a train has to take a U-turn at a rotary, it means the station itself can't allow trains in from, or out to, that direction.Allow trains to enter and exit to and from desired directions.
Consider this rather typical setup:
Oops, it broke:
Where have we seen this before? Looks like it's the capacity deadlock...
But we only have one station?
We can look at this two ways:
Using our loop analagy from the square track and the stations earlier, the two rotaries are the corners of a nice loop through the station.
Trains trying to enter the station from the right have to make a U turn on the left rotary.
Trains trying to exit the station to the left have to make a U turn on the right rotary.
All it takes is one train trying to do each of these things, and a few extra trains to fill the spaces and viola, deadlock conditions have been met.
We could also look at it this way:
Because the siding makes trains want to turn around to exit and to enter the station, we can expand our view of the station to include the rotaries on either side:
and we see the problem, trains entering the station can block trains that are exiting the station.
This full station view shows us that the station, as a bi-directional station, is not 'ideal'.
And so, a train entering the station stacks up with another train, and the train leaving can't exit.
So what's the problem? The rotaries or the sidings?
Well, If you replace the rotaries with standard junctions the sidings won't work at all.
However, if you put turnarounds in the stations themselves (using an inline single-header design), you can make sure that entry's don't block exit's, and trains aren't going to want to do a U-turn on the rotaries, So there'll be no problem.
No sidings then?
Sortof. It all comes back to the problems with big loops, you can have sidings and rotaries all day long, as long as you make sure there's enough blocks between the rotaries to handle all the trains on that line, just like you have to have enough blocks on a big square loop to handle all the possible traffic on that line.
Don't think you can just assign one train per station and be problem free, either. If you have a siding to the right of the example one, for instance, and both stations have only one train, you can still get a deadlock (with about 12 trains on the line), if the train exits the station on the right, doing a U-turn left, and a train enters the station on the left, doing a U-turn right.
However there's another rule to sidings, if all trains that exit a siding station NEVER have to pull a U-turn somewhere else to get where they're going, the siding isn't causing an issue, but to pull that off you'll need other types of stations elsewhere, or big loops like the square above.
There we go, Deadlocks, most often caused by?
- Stations that are too close together, and without enough waiting bays, and that have trains turning towards eachother, and not enough blocks between said stations (really, if you're filling up all the blocks there, add some more lines, that's a busy train network!)
- stations that cause U-turns, because they don't accept trains from the side they're coming from, or don't allow trains to exit to the side they're going to.
- stations that make trains that are leaving wait for trains that are entering.
- Big loops, like a square made by four T junctions, if they're really heavily used can be a problem on busy networks, count the trains and the blocks.
And the problem with loops?
- Stations that are inefficiently designed in that they allow traffic that is entering the station to block traffic from exiting the station. This causes the station to lock up once the waiting bays are full.
- Stations that don't allow trains to exit or enter directly from the direction they're coming from, causing U-turns at rotaries or other turning-around places, which effectively creates a large station where trains that are leaving can be blocked by trains that are entering, again.
If these two things are kept in mind, loop-based single headed train systems run no different to double header systems. they just look a little different, that's all.
Hopefully you've learnt a bit more about train networks and deadlocks in general, and the actually very small differences between single v double header systems, and rotaries v T junctions.
Remember, there's no designs you ever have to avoid, just be aware of the capacity of the network you're designing.