Stations, Junctions, and all things deadlock - IMAGE HEAVY

Smart setups of railway stations, intelligent routing, solutions to complex train-routing problems.
Please provide - only if it makes sense of course - a blueprint of your creation.
Antaios
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Sun Jun 14, 2015 5:18 am
Contact:

Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by Antaios »

How many times has someone spouted to you that loops are bad, or rotaries cause deadlocks, theyre all harder to debug etc etc.
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.
Image


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

First:
Image
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.

Second:
Image
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:
Image

An 'ideal' T junction:
Image

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'
Image
Image

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:
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:
Image
Double header 'ideal' Terminus station:
Image
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:
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
Image
Image

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:
Image
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'.
Image
This is a big point for loop based systems, make sure incoming trains cant block outgoing ones!

Double header 'ideal' inline station:
Image
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.
Image

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.

That's it.


Moving on...

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:
Image
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?
Image
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.
Image

This, Is a loop.
Image
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:
Image
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.
Image
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.
Image
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.
Image

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.
Image
You know what causes deadlocks here?

Well, do you have a station like this:
Image
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:
Allow trains to enter and exit to and from desired directions.
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.


Consider this rather typical setup:
Image
Oops, it broke:
Image
Where have we seen this before? Looks like it's the capacity deadlock...
Image
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.
Image

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:
Image
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.
Last edited by Antaios on Sun Dec 20, 2015 11:12 am, edited 2 times in total.
vanatteveldt
Filter Inserter
Filter Inserter
Posts: 947
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by vanatteveldt »

Thanks for this guide! I've been experimenting a bit with station layouts, but I think I end up in the "siding plus roundabout" situation quite often, so its good to have a better look there.

Q: Looking at the "ideal inline single header station":
Careful chain signal placement to prevent trains from blocking the exit fix this problem, and the station becomes 'ideal'.
Just to be sure, the difference between the two is only that the signal on the incoming line at the bottom right is replaced by a chain signal, right?
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by ssilk »

This is quite interesting to read and can be recommended (even when I think it's too long).

But it's in the wrong board. I moved it from General discussion to Gameplay help.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Antaios
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Sun Jun 14, 2015 5:18 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by Antaios »

vanatteveldt wrote:Just to be sure, the difference between the two is only that the signal on the incoming line at the bottom right is replaced by a chain signal, right?
Technically, there's two signals there that have been replaced with chain signals, the one you mention, and the one next to it for trains leaving the station to that line.
But yes, only that one needs to be a chain signal.
The other one probably shouldn't be a chain signal, I'm not sure why I put it there...

* I've edited the image to remove the unnecessary chain signal, and point out the one that changed.
ssilk wrote:This is quite interesting to read and can be recommended (even when I think it's too long).

But it's in the wrong board. I moved it from General discussion to Gameplay help.
Ah, I wasn't entirely sure from looking at the boards whether gameplay help was for asking for help, or asking + guides, sorry about that.

I did go on a bit, but I wanted to try and explain things thoroughly.

I did want to make the images thumbnails, but couldn't figure out how to do it on this forum, if it's possible at all.
vanatteveldt
Filter Inserter
Filter Inserter
Posts: 947
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by vanatteveldt »

Antaios wrote:
I did want to make the images thumbnails, but couldn't figure out how to do it on this forum, if it's possible at all.
I think it's good like this. The pics make the story much easier to follow, and now it's easy to look at the pictures while reading the text, which is annoying with thumbnails. If you don't want to see the pics, just don't open the thread :-)
RoddyVR
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Thu May 07, 2015 6:29 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by RoddyVR »

Very nice post. THANK you!!!

I knew the whole "loops are bad" thing had a glaring whole in it somewhere, and this showed very well, that for well designed systems (single and double headed) the problems are prety much caused by the same things and none of them are the loops themselves (atleast not the loops that are made of 8 curved rails).
Also showed me the importance of some sort of stacker (waiting bays as you called them) for the stations with heavier trafic, which i had prety much been neglecting.
And hopefully your expanation on siding stations (with loops after them to turn around) will be enough to overcome the lazyness that makes me build them (i knew they were bad, just didnt have a clear idea how exactly).
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by ssilk »

Antaios wrote:Ah, I wasn't entirely sure from looking at the boards whether gameplay help was for asking for help, or asking + guides, sorry about that.
I did go on a bit, but I wanted to try and explain things thoroughly.
No, it's fine as it is. I just want you to give some helping critique, for the case that you plan to do more of this: You want to tell a story, but you take not the direct way. :)


Off-topic: What I really wish is, that such kind of explanation is part of the game. Some kind of "training-level". But it is much too complicated yet to produce such stuff.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
JoeSchmoe
Inserter
Inserter
Posts: 37
Joined: Thu May 08, 2014 4:06 pm
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by JoeSchmoe »

A+++ Sticky worthy IMO.
Author does a good job explaining the pros and cons of each design, how both designs can cause problems and how to fix them.
With a gold star towards not biasing the reading either way.
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by daniel34 »

JoeSchmoe wrote:A+++ Sticky worthy IMO.
Author does a good job explaining the pros and cons of each design, how both designs can cause problems and how to fix them.
I agree, stickied.
I've learned a lot from this thread myself, although I have only about 5 trains running at the same time on a big vanilla map (with T-junctions only) it's good practice for later and it taught me a lot about trains and signals.
I like how it explains trains in detail and the (very well edited) pictures add nicely to the explanation.
quick links: log file | graphical issues | wiki
Ringkeeper
Fast Inserter
Fast Inserter
Posts: 143
Joined: Wed Feb 03, 2016 7:16 pm
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by Ringkeeper »

nice thread :) Looks like someone played OpenTDD alot :D
o6dukeleto
Inserter
Inserter
Posts: 28
Joined: Fri Feb 12, 2016 12:23 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by o6dukeleto »

I have only been playing this game for a month, but I already know that the generalization that "loops are bad" is just a ridiculous rant.

Anything in a train network CAN BE bad, but they are not inherently bad. As for one type being simpler than another, that is not the case either. If you restrict yourself from using simple tools, such as loops, you will probably create overly complex routes and/or terminus stations to get around not using them.

There is an idiom for this "don't throw the baby out with the bathwater".

The most important thing mentioned above is capacity -- all train networks will have a capacity where deadlocks will occur regardless of having loops, no loops, terminus or roros. This means throughput is important, if you can run your train network with less trains and/or smaller trains you will have a simpler time managing the network.

Judicial use of RoRos can help improve throughput and mean you will have less trains, Don't throw them out just because they will add a loop to your network, they can make your network simpler.
vanatteveldt
Filter Inserter
Filter Inserter
Posts: 947
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by vanatteveldt »

AFAIK, the "loops is bad" meme is from a version where chain signals did not exist yet. In that case, loops can always cause deadlock if a train can't exit a loop because of another train trying to exit the loop. With proper chain signals, the train would never enter the loop if there is no possible exit.

(i.e. "loops with normal signals are bad if they are smaller than the summed length of all trains that can be expected to enter the loop")

ofc, please correct me if I'm wrong :)
o6dukeleto
Inserter
Inserter
Posts: 28
Joined: Fri Feb 12, 2016 12:23 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by o6dukeleto »

"Loops is bad (all your stations are belong to us?)" originated last year in August with this version (0.12) which includes chain signals.
SteelRodent
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Mar 13, 2016 5:09 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by SteelRodent »

Your guide is very well written (and I'm sorry that I don't have time to read the whole thread atm), but just looking at your pictures: you put signals in the middle of crossings, which is bad practice. Run enough trains and you end up with trains going one way blocking the path of trains going the other way, simply because the line fills up and the trains can't clear the intersection in the other end. This does depend on how many trains you run and how far there is to the next intersection, but you should never ever allow a train to be stopped on top of crossing tracks - so you should place all signals so the trains aren't allowed to enter an intersection unless they can leave it - that is the whole point in the chain signal (and it's how you do it IRL for that same reason). This way it's also much easier to add tracks and change the direction of intersections, because you don't have to redo the signals every time.

Look at it this way: While there are trains stopped at red signals you should be able to tear up the entire intersection without having to move the trains (if you can't then your signals are in the wrong place).

Another thing is that you should always design your network for running longer trains than you think you need. As you go further out from your base you're going to want more cars on the trains (the longer distance the train has to cover, the more cars you need to compensate for the travel time), so if you build everything around 2 or 3 cars, you're going to get in trouble when you suddenly decide to run trains with 4, 5, or 6 cars (or more). Always make the distances between signals long enough to fit longer trains.
SteelRodent
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Mar 13, 2016 5:09 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by SteelRodent »

vanatteveldt wrote:AFAIK, the "loops is bad" meme is from a version where chain signals did not exist yet. In that case, loops can always cause deadlock if a train can't exit a loop because of another train trying to exit the loop. With proper chain signals, the train would never enter the loop if there is no possible exit.

(i.e. "loops with normal signals are bad if they are smaller than the summed length of all trains that can be expected to enter the loop")

ofc, please correct me if I'm wrong :)
The problem with loops, both in this game and TTD, is that you need a lot more signals to control the flow and you end up with trains wanting to go through stations when there's a train stopped on the main line. Trains that are passing by have a higher priority than trains that are waiting for another train, so through-traffic can effectively end up using the station to get around trains that are waiting to get into the station. If you only run a few trains you won't notice this, but run enough trains and you will see this happen more and more frequently.
User avatar
MalcolmCooks
Filter Inserter
Filter Inserter
Posts: 253
Joined: Mon Apr 06, 2015 8:32 pm
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by MalcolmCooks »

SteelRodent wrote:you should never ever allow a train to be stopped on top of crossing tracks - so you should place all signals so the trains aren't allowed to enter an intersection unless they can leave it - that is the whole point in the chain signal
If you look closely at the junction you will see that trains can't stop on crossing tracks. They can stop on splitting and merging tracks, but if you used extra chain signals to prevent that, the junction would actually function no differently. I prefer to have trains wait off the junction, but technically it's not necessary, so people often refer to the pictured design as "ideal" because it uses as few signals as possible, and far fewer chain signals. The saving for each junction is hardly worth mentioning, though, especially since chain signals are no more expensive than normal signals.
realm174
Fast Inserter
Fast Inserter
Posts: 106
Joined: Sat Apr 02, 2016 12:32 pm
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by realm174 »

This is pretty awesome. Not sure if it's been requested (didn't see it) or if it already exists somewhere else, but would the blueprints for these be available anywhere by chance?
Antaios
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Sun Jun 14, 2015 5:18 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by Antaios »

Sorry I haven't replied, apparently the forums stopped sending me emails of responses...
Ringkeeper wrote:nice thread :) Looks like someone played OpenTDD alot :D
Actually never played it, have heard of it because of these forums, but I still don't know what it is, exactly.

MalcolmCooks wrote:
SteelRodent wrote:you should never ever allow a train to be stopped on top of crossing tracks - so you should place all signals so the trains aren't allowed to enter an intersection unless they can leave it - that is the whole point in the chain signal
If you look closely at the junction you will see that trains can't stop on crossing tracks. They can stop on splitting and merging tracks, but if you used extra chain signals to prevent that, the junction would actually function no differently. I prefer to have trains wait off the junction, but technically it's not necessary, so people often refer to the pictured design as "ideal" because it uses as few signals as possible, and far fewer chain signals. The saving for each junction is hardly worth mentioning, though, especially since chain signals are no more expensive than normal signals.
Pretty much this, I remember designing those intersections carefully, I think I missed a signal before, but fixed it. There may still be a random signal in there somewhere that's wrong and I keep missing, but I've gone over them quite a few times.

I don't consider the stations ideal because of the low number of signals, but because of the characteristics of the junction laid out in the first post.
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.
The rest, including signal positions / waiting outside or inside, is completely up to individual preference.

I did originally, before posting, include putting intermediary signals in to make sure that trains which didn't cross paths didn't slow each-other down. But I decided it wasn't relevant to deadlocking and backing trains up, it's more of an efficiency thing. Putting signals on just the in/out bits of the intersection, with chain signals on anything heading into the intersection makes a junction ideal, and even though it may not be efficient, in practice it would take a lot of traffic to make a difference.
SteelRodent wrote:
vanatteveldt wrote:AFAIK, the "loops is bad" meme is from a version where chain signals did not exist yet. In that case, loops can always cause deadlock if a train can't exit a loop because of another train trying to exit the loop. With proper chain signals, the train would never enter the loop if there is no possible exit.

(i.e. "loops with normal signals are bad if they are smaller than the summed length of all trains that can be expected to enter the loop")

ofc, please correct me if I'm wrong :)
The problem with loops, both in this game and TTD, is that you need a lot more signals to control the flow and you end up with trains wanting to go through stations when there's a train stopped on the main line. Trains that are passing by have a higher priority than trains that are waiting for another train, so through-traffic can effectively end up using the station to get around trains that are waiting to get into the station. If you only run a few trains you won't notice this, but run enough trains and you will see this happen more and more frequently.
I don't see this as much of a problem, actually.
If a station is backlogged to the point that a train wants to use it to 'go around' a blockade, then if the train was prevented from entering the station, it would still block the entrance anyway. Any trains entering that station still have to wait for the blockade to clear. Also since the station's route travels along the path of the blockade, even a small amount, those trains are added to the blockade 'train count' for that rail loop's capacity. If this happens, you're running too many trains there, and it'll happen with or without loops just the same.

If the trains are backing up but not deadlocking, the solution still isn't 'don't use a loop station', its make the station where the backup originates faster, add another terminal or some waiting bays so it doesn't gum up the main line tracks.

If the trains are wanting to do U-turns in stations, that's a different issue which I discussed in the first post. It's prevented by using ideal stations, that make trains do their U turns at the station they're leaving, not anywhere else.
realm174 wrote:This is pretty awesome. Not sure if it's been requested (didn't see it) or if it already exists somewhere else, but would the blueprints for these be available anywhere by chance?
All of the bits in the guide are pretty simple and straightforward, they're also fairly common designs. I'd say its more worthwhile getting used to making them on your own, and setting up your own blueprints that match your train setup, that way you get accustom to proper signal and rail setup.
Shokubai
Filter Inserter
Filter Inserter
Posts: 470
Joined: Mon May 02, 2016 3:17 pm
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by Shokubai »

I like the roundabouts a lot for ends of track but I'm not sold on them for junctions. I feel its just wasted extra time in the junction. Id rather go 10 tiles further and make a roundabout if I needed one there for some reason.
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Stations, Junctions, and all things deadlock - IMAGE HEAVY

Post by siggboy »

Shokubai wrote:I like the roundabouts a lot for ends of track but I'm not sold on them for junctions. I feel its just wasted extra time in the junction. Id rather go 10 tiles further and make a roundabout if I needed one there for some reason.
Rotary (roundabout) junctions are a lot easier to build than T-junctions. Especially a perfect 4-way T-junction is surprisingly difficult to construct.

So if you have no blueprints for junctions, the rotaries are really good (or maybe you have blueprints but you don't have robots researched yet).
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
Post Reply

Return to “Railway Setups”