Page 1 of 1

Rail station signaling failure

Posted: Wed May 15, 2019 2:34 am
by -JP-
Greetings factorio wizards. I am greatly enjoying the game and i've been working on getting a good rail setup going. I am having this weird problem with the station waiting lanes. For some reason trains are determined to take a path that is currently occupied when other lanes are open. What am I doing wrong?
train problem.png
train problem.png (1.86 MiB) Viewed 3008 times

Re: Rail station signaling failure

Posted: Wed May 15, 2019 6:26 am
by Bauer
Not sure if this will solve the problem.
However, you need regular signals at the entry AND exit of the stations.

Otherwise it's a best practice to build a train stacker in a way that all paths through it have the same lengths.
(like the one in this posting but without all the circuitry viewtopic.php?f=194&t=61305&p=423228&hi ... er#p423228)

Re: Rail station signaling failure

Posted: Wed May 15, 2019 5:01 pm
by orzelek
Will that train stay there for long?
In theory it should recalculate the path after few seconds and because of penalty for train standing on it's path switch to the next one.
Maybe something doesn't work properly.

Re: Rail station signaling failure

Posted: Wed May 15, 2019 6:24 pm
by -JP-
I have chain signals on the exits from the waiting bays and the stations to prevent a train from entering the merging sections and blocking them. Regular signals entering the waiting bays and stations to allow free entry. Are you sure I need regular signals everywhere? I'm pretty sure it would cause a problem with the very bottom merge section.

Re: Rail station signaling failure

Posted: Wed May 15, 2019 6:25 pm
by -JP-
orzelek wrote:
Wed May 15, 2019 5:01 pm
Will that train stay there for long?
In theory it should recalculate the path after few seconds and because of penalty for train standing on it's path switch to the next one.
Maybe something doesn't work properly.
I know it isn't random, but I can't tell why it happens b/c it happens only like once every ten times.

Re: Rail station signaling failure

Posted: Wed May 15, 2019 6:36 pm
by eradicator
-JP- wrote:
Wed May 15, 2019 2:34 am
What am I doing wrong?
Intuitively i'd say: You're not waiting long enough. The entering train should decide on it's own after a few seconds (10ish? but at most 2 minutes) that it should go to one of the other waiting bays. But then again you'd probably not post a thread without waiting 10 seconds..., so maybe you should try circuit magic: Put a circuit on all but one of the target stations that disables the station when a train is in it ("if train_id is not 0").

Edit: Hm, dammit. It's a mixed material station. In that case place a regular signal at the entry of each unloading bay that is disabled when a train is at the station.

Both of these solutoins use the fact that circut-changing signals or stations forces all trains en-route to recalculate their path. So it doesn't really matter *what* you circut change, it just needs to be in the path of the train.

Edit 2: This "happens" because trains calculate their path when they *leave* a station, and only re-calculate it when nessecary. Basically the waiting bay it's trying to go to *was* free when it left it's previous station.

Re: Rail station signaling failure

Posted: Wed May 15, 2019 10:46 pm
by -JP-
eradicator wrote:
Wed May 15, 2019 6:36 pm
-JP- wrote:
Wed May 15, 2019 2:34 am
What am I doing wrong?
Intuitively i'd say: You're not waiting long enough. The entering train should decide on it's own after a few seconds (10ish? but at most 2 minutes) that it should go to one of the other waiting bays. But then again you'd probably not post a thread without waiting 10 seconds..., so maybe you should try circuit magic: Put a circuit on all but one of the target stations that disables the station when a train is in it ("if train_id is not 0").

Edit: Hm, dammit. It's a mixed material station. In that case place a regular signal at the entry of each unloading bay that is disabled when a train is at the station.

Both of these solutoins use the fact that circut-changing signals or stations forces all trains en-route to recalculate their path. So it doesn't really matter *what* you circut change, it just needs to be in the path of the train.

Edit 2: This "happens" because trains calculate their path when they *leave* a station, and only re-calculate it when nessecary. Basically the waiting bay it's trying to go to *was* free when it left it's previous station.
Edit 2 explains exactly why its happening. Thanks!

Re: Rail station signaling failure

Posted: Thu May 16, 2019 2:30 am
by Mr. Tact
Mr. Tact wrote:
Tue Apr 23, 2019 8:16 pm
What can happen is train A selects a spot prior to train B taking the spot, then train A arrives before a recalculation of its path has been forced. You can place two signals wired together just before the parking lot to force a pathing recalc, I have included a blueprint.


Re: Rail station signaling failure

Posted: Mon May 27, 2019 3:01 am
by Skeletpiece
Similar to my post:
viewtopic.php?f=23&t=63635

Shortest path is preferred