Train Signal: to chain or not to chain

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Train Signal: to chain or not to chain

Post by zOldBulldog »

In the following screenshot I would normally use chain signals to split the vertical track so that each intersection is separate. But I worry that if I do that and a train enters horizontally through the bottom as the vertical train is already descending downwards... it would stop and block the middle horizontal lane, with stop and startup taking more time than in the current setup where it either does not cross or goes through at full speed and gets out of the way.

I am being told that I should religiously split that segment, but it feels so wrong.

Can someone look at this screenshot and explain whether my approach or the classic one is better for this scenario, and exactly why?

Thanks

Image

mmmPI
Smart Inserter
Smart Inserter
Posts: 2733
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Train Signal: to chain or not to chain

Post by mmmPI »

rail42.jpg
rail42.jpg (248.14 KiB) Viewed 1083 times
The problem with this is that train doing a=>b will block trains doing c=>d and/or e=>f.

if you have many trains doing a=>b, the blue vertical block will be always occupied by those trains, preventing the others to do their task for seemingly no reason, or reducing the troughput. Instead of having 3 parralel lines, this act as 1 bottleneck.

Adding chain signals in the red square locations would solve the issue.

I'm not sure i understood what you described as potentially problematic in the "classic" approach.

DaleStan
Filter Inserter
Filter Inserter
Posts: 368
Joined: Mon Jul 09, 2018 2:40 am
Contact:

Re: Train Signal: to chain or not to chain

Post by DaleStan »

I don't follow the potential interruption either. Remember that a train will never stop at the signal after a chain signal, regardless of what the other trains are doing.

Replacing no signal with a chain signal is almost always better.

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Train Signal: to chain or not to chain

Post by zOldBulldog »

@mmmPI,

Thank you very much!!! It was staring me in the face but I didn't see it until you said it. Others I had discussed it with even said it and I failed to understand what they were saying. It is obvious now... a horizontal train crossing ALSO activates the whole segment. In trying to solve a smaller problem I created a bigger one.

So I guess there's nothing that I can do if a train starts crossing from the top to "e" and while it is doing it a train comes from "f to e" and makes the vertical train stop in the middle of the intersection thus blocking "c to d". Or maybe some smart circuit logic might work so that it turns everything horizontal red the moment a train goes down vertically... but that is work for another day.

I am going to put those chain signals in.

Thank you again!!!

mmmPI
Smart Inserter
Smart Inserter
Posts: 2733
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Train Signal: to chain or not to chain

Post by mmmPI »

zOldBulldog wrote:
Wed Feb 22, 2023 9:16 am
So I guess there's nothing that I can do if a train starts crossing from the top to "e" and while it is doing it a train comes from "f to e" and makes the vertical train stop in the middle of the intersection thus blocking "c to d". Or maybe some smart circuit logic might work so that it turns everything horizontal red the moment a train goes down vertically... but that is work for another day.
glad i could help :)


I understand now what you describe, (i think), part of it is automatically handled by the game. If a train come from the top and goes to "e". It will "reserve" all the blocks that it need to reach a regular signal, only the blue vertical bloc for now, but adding chain signal will make the train reserve all newly created blocks that replace the vertical one.

This means if you have heavy traffic from "c" to "d" maybe the train coming from north will never be allowed to go through due to being unable to reserve 1 bloc. But when/if it is allowed, it will always go until the signal in the bottom left, it reserve all blocs, or nothing. If you use regular signal, then there is a risk that the train coming from north get stuck in the vertical part, if many train come from "f" and go to "e" because then the train coming from north can stop between the 2 red square location.

( it may still happen with chain signal in very rare cases if for example all stations are disabled while a train is in between the 2 red squares, that train will stop there, and when resuming its schedule, it will be in a problematic position, reducing station limit to 0 is safer)

You could indeed use circuit network to give priority to the vertical lane, by turning red the others when a train is willing to cross, or just make sure you don't have too much traffic congestion, so train will find a moment to cross, easier but not 100000 % safe :)

Tertius
Filter Inserter
Filter Inserter
Posts: 667
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Train Signal: to chain or not to chain

Post by Tertius »

zOldBulldog wrote:
Wed Feb 22, 2023 9:16 am
So I guess there's nothing that I can do if a train starts crossing from the top to "e" and while it is doing it a train comes from "f to e" and makes the vertical train stop in the middle of the intersection thus blocking "c to d".
The vertical train stop in the middle will not happen, if you add chain signals in the spots given by mmmPi. If a train comes from the top, and the regular signal at e is red, all chain signals on the vertical track are red as well and the train will not enter at all. If the regular signal at e is green, all chain signals on the vertical track are green as well and the train will reserve all these (they turn yellow) and other signals that guard entry to all these blocks turn yellow as well. Reserved signals act as red, if a train tries to enter a block guarded by a reserved signal, it stops. So a train coming from f at the same time will see a yellow chain signal in front of the intersection and will stop. The vertical train will drive without stopping, and if it left the block at e, the chain signal in front of the intersection will turn green again and that train will continue.

Chain signals are, well, chained. The chain starts with a regular signal at front. If you have multiple blocks created by chain signals, a train will either reserve all of them or none. If it was able to reserve it, it is blocked for everything else, so it's always guaranteed that the train is able to drive through all of them uninterrupted.

zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Re: Train Signal: to chain or not to chain

Post by zOldBulldog »

Tertius wrote:
Wed Feb 22, 2023 10:06 am
zOldBulldog wrote:
Wed Feb 22, 2023 9:16 am
So I guess there's nothing that I can do if a train starts crossing from the top to "e" and while it is doing it a train comes from "f to e" and makes the vertical train stop in the middle of the intersection thus blocking "c to d".
The vertical train stop in the middle will not happen, if you add chain signals in the spots given by mmmPi. If a train comes from the top, and the regular signal at e is red, all chain signals on the vertical track are red as well and the train will not enter at all. If the regular signal at e is green, all chain signals on the vertical track are green as well and the train will reserve all these (they turn yellow) and other signals that guard entry to all these blocks turn yellow as well. Reserved signals act as red, if a train tries to enter a block guarded by a reserved signal, it stops. So a train coming from f at the same time will see a yellow chain signal in front of the intersection and will stop. The vertical train will drive without stopping, and if it left the block at e, the chain signal in front of the intersection will turn green again and that train will continue.

Chain signals are, well, chained. The chain starts with a regular signal at front. If you have multiple blocks created by chain signals, a train will either reserve all of them or none. If it was able to reserve it, it is blocked for everything else, so it's always guaranteed that the train is able to drive through all of them uninterrupted.
I think I understand.

1) If a train crosses the vertical at e/f it of course cascades down the chain signals and the vertical is stopped all the way to the top. This part I understood from the beginning.

but there is a 2nd part that I did not know was there and is not clear in any of the tutorials I saw over the years:

2) If a train enters throught he top (the end of the chain) *it doesn't just reserve the a/b intersection*, it reserves that whole chain of segments up until it sees the regular train signal at e.

Tertius
Filter Inserter
Filter Inserter
Posts: 667
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Train Signal: to chain or not to chain

Post by Tertius »

Unfortunately, it's a bit difficult to see 2) in the regular game. To inspect things, create a sandbox game and switch to the map editor (use /editor). In map editor mode, you can pause processing, or decelerate tick processing and even single step through every game tick, so you can freeze and thoroughly inspect every situation. If you do this, you see when, how and which signals turn yellow if a train approaches, and even blue for some chain signals at intersections. Usually this is only for a split second until they turn red, so it really helps if you single step.

This helps for understanding complex train setups, and even better for inspecting circuit network contraptions.

Post Reply

Return to “Gameplay Help”