Page 1 of 1
Train Signals - Correct Way to Set Bi-directional Bypasses
Posted: Sat Mar 06, 2021 7:02 pm
by msgerard
I have created a rail track with multiple load and unload stops, and placed the train signals correctly so they will go to open/unoccupied load and unload destinations. However, trains will occasionally collide. The load stops have the same names, i.e. 'Oil Source' and the unload stops have the same name, i.e. 'Oil Home'. The track is bi-directional, not looped.
The collision happens at a fork between two load stops. I have placed two signals (bi-directional) after the fork for both paths - so a total of 4 signals. I have observed the trains running correctly for a while, heading to the open load stop where it is not currently occupied. However, for some reason, after a while a train will enter a occupied forked path although the signal heading into that stop is red and the signal for the other path is green.
I believe that this a bug and makes it difficult for me to utilize having a main track branching into multiple loads/stops. This setup is intended to maximize my oil production by having multiple trains going to unoccupied stops.
Re: Train Signal Bug
Posted: Sat Mar 06, 2021 7:13 pm
by boskid
You need to provide more details: at least game version, save file with your rails setup or screenshots. Save file with description is the preferred way.
Re: Train Signal Bug
Posted: Sat Mar 06, 2021 8:14 pm
by MassiveDynamic
99.9999999999999999999% chance that you’re doing something wrong. Post a screenshot if you dare.
Re: Train Signal Bug
Posted: Sun Mar 07, 2021 9:21 am
by msgerard
This was my first time using this forum and I did not know sending my save file was possible. I have attached the file I've been trying to test in getting multiple trains to work bi-directionally with a forked path but have not been successful with not having them collide or deadlocking.
In the save file, you'll see I've set up a track with stops named 'Test1' and 'Test2'. What do I need to do set up train signals to have it work every time? I've played around with different placements of the signals and tried the setup from the basic rail signal tutorial with signals on the other-side as well for trains to go bi-directionally. At first, I thought it may be a timing issue with two trains approaching the signal, but once a signal turns yellow shouldn't that halt the other train from occupying the section? My attempts with using the '(recipe)' signal type to look at the next signal(s) was also unsuccessful.
I've also attached a screenshot - the top train is heading down and did not take the turnout although the signal there is green. Placing signals in the turnout was not shown in the basic tutorial, but without signals there, the train does not stop when there is another train heading in the opposite direction along the main track.
If this is not a bug issue and due my error, then I apologize in advance for my erroneous assumption. I followed signal placement from the basic tutorial and it was causing collisions - leading me to think it is a bug issue.
Thanks! I immensely enjoy this game and would love to get the trains to work as intended so I can expand my resource gathering - which I never seem to have enough of!
Re: Train Signal Bug
Posted: Sun Mar 07, 2021 11:32 am
by disentius
One track two-way signaling is tricky
you have to keep the shared portions of the track free at all times. one way to do this is using bypasses, like you did, and make each branch one-way, by dsetting a chain signal at the exit, and a normal signal at the entrance.
This is exactly the opposite to the normal rule of thumb of "Chain in, Normal out"
I have signaled the test track in your zip to (what I believe) is a correct way of signalling this.
- 2021-03-07 12_33_28-Window.png (473.6 KiB) Viewed 7968 times
Re: Train Signal Bug
Posted: Sun Mar 07, 2021 1:28 pm
by MassiveDynamic
Re: Train Signal Bug
Posted: Sun Mar 07, 2021 6:04 pm
by msgerard
Thank you both for your help! I thought I could make my bypasses bi-directional. So, for every bypass I need to set them on both sides heading in a single direction. This solution works and it looks like I have to shoot down some more trees
Re: Train Signals - Correct Way to Set Bi-directional Bypasses
Posted: Mon Mar 08, 2021 12:31 pm
by disentius
You're welcome
You can make your bypasses bidirectional, but that doesn't increase troughput, so it's a waste of signals.
This is how:
- 2021-03-08 13_28_36-Factorio 1.1.26.png (915.28 KiB) Viewed 7846 times
Re: Train Signals - Correct Way to Set Bi-directional Bypasses
Posted: Mon Mar 08, 2021 12:44 pm
by bormand
disentius wrote: ↑Mon Mar 08, 2021 12:31 pm
You can make your bypasses bidirectional, but that doesn't increase troughput, so it's a waste of signals.
Not only a waste of signals, but a potential cause for (rare) deadlocks.
Re: Train Signals - Correct Way to Set Bi-directional Bypasses
Posted: Tue Mar 09, 2021 9:51 am
by disentius
bormand wrote: ↑Mon Mar 08, 2021 12:44 pm
Not only a waste of signals, but a potential cause for (rare) deadlocks.
Intertesting!
In which situation would it deadlock? Aside from having to many trains on the line for them to have a free spot to move to.
Re: Train Signals - Correct Way to Set Bi-directional Bypasses
Posted: Tue Mar 09, 2021 10:41 am
by bormand
disentius wrote: ↑Tue Mar 09, 2021 9:51 am
In which situation would it deadlock?
Something like that:
- Screenshot from 2021-03-09 17-35-31.png (4.27 KiB) Viewed 7773 times
Your previous design is immune to such deadlocks: it never allows two trains to occupy both bypass lanes in the same direction.
Re: Train Signals - Correct Way to Set Bi-directional Bypasses
Posted: Tue Mar 09, 2021 5:33 pm
by disentius
yes, offcourse. Thanks!
Re: Train Signals - Correct Way to Set Bi-directional Bypasses
Posted: Tue Mar 09, 2021 7:38 pm
by SoShootMe
bormand wrote: ↑Mon Mar 08, 2021 12:44 pm
disentius wrote: ↑Mon Mar 08, 2021 12:31 pm
You can make your bypasses bidirectional, but that doesn't increase troughput, so it's a waste of signals.
Not only a waste of signals, but a potential cause for (rare) deadlocks.
Yes, and ironically, I think it potentially does increase throughput for the same reason as it can cause deadlock, ie allowing two trains heading the same way to wait at the bypass while they cannot proceed due to train(s) on the other side, instead of forcing one to wait further away until the other clears the bypass.
You can get the best of both worlds by making a unidirectional bypass long enough to allow two trains to wait in each side and adding a rail signal to each side.
Mind you, if throughput is a concern it is probably time to keep extending that bypass until you have something more like a twin track network
.
Re: Train Signals - Correct Way to Set Bi-directional Bypasses
Posted: Tue Mar 09, 2021 8:12 pm
by bormand
SoShootMe wrote: ↑Tue Mar 09, 2021 7:38 pm
making a unidirectional bypass long enough to allow two trains to wait in each side
It's better to add another bypass in the middle of bidirectional track than gathering trains at the ends, I think. You may get almost 2x throughput from that.
Re: Train Signals - Correct Way to Set Bi-directional Bypasses
Posted: Wed Mar 10, 2021 12:11 pm
by SoShootMe
bormand wrote: ↑Tue Mar 09, 2021 8:12 pm
SoShootMe wrote: ↑Tue Mar 09, 2021 7:38 pm
making a unidirectional bypass long enough to allow two trains to wait in each side
It's better to add another bypass in the middle of bidirectional track than gathering trains at the ends, I think. You may get almost 2x throughput from that.
For a stretch of single track (assume many train lengths), I think adding "short" (one train length) passing places evenly distributed along its length is optimal for throughput, with more places directly increasing the capacity as well as improving throughput. If you start with one in the middle, replacing it with one at 1/3 and another 2/3 would give the same capacity but better throughput than the single "long" (two train lengths) loop I suggested.
What I suggested is like two "short" loops next to each other, except without any bidirectional track between them. It's also like two loops that are not evenly distributed, which is obviously not optimal per what I wrote above, but it still increases capacity and I think therefore achievable throughput compared to a single "short" loop.
However, I think this is all academic, as per the final point in my previous post: if throughput is a concern, it is probably time to build a twin track network.
Re: Train Signals - Correct Way to Set Bi-directional Bypasses
Posted: Wed Mar 10, 2021 4:37 pm
by gGeorg
bormand wrote: ↑Tue Mar 09, 2021 10:41 am
disentius wrote: ↑Tue Mar 09, 2021 9:51 am
In which situation would it deadlock?
Something like that:
Screenshot from 2021-03-09 17-35-31.png
Your previous design is immune to such deadlocks: it never allows two trains to occupy both bypass lanes in the same direction.
as OP requests, bi-directional is side tracks. It means, make the main track one way only and side track plus single track in between two way. No deadlock, and potentialy higher throughput.
Anyway iidea of 3 tracks will be fun to watch. Especially when use different lenght of trains so they tend to use middle track to overcome the slower trains.