Rail station signaling failure

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
-JP-
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed May 15, 2019 2:24 am
Contact:

Rail station signaling failure

Post 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 3387 times
Bauer
Filter Inserter
Filter Inserter
Posts: 349
Joined: Fri May 05, 2017 12:48 pm
Contact:

Re: Rail station signaling failure

Post 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)
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Rail station signaling failure

Post 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.
-JP-
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed May 15, 2019 2:24 am
Contact:

Re: Rail station signaling failure

Post 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.
-JP-
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed May 15, 2019 2:24 am
Contact:

Re: Rail station signaling failure

Post 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.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Rail station signaling failure

Post 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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-JP-
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed May 15, 2019 2:24 am
Contact:

Re: Rail station signaling failure

Post 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!
Mr. Tact
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Mar 26, 2016 3:37 pm
Contact:

Re: Rail station signaling failure

Post 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.

Professional Curmudgeon since 1988.
Skeletpiece
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Jul 08, 2017 6:26 pm
Contact:

Re: Rail station signaling failure

Post by Skeletpiece »

Similar to my post:
viewtopic.php?f=23&t=63635

Shortest path is preferred
Post Reply

Return to “Gameplay Help”