Page 1 of 1

[0.17.34] Train's path is not recalculated when the rail chain signal changes

Posted: Mon Apr 29, 2019 7:11 am
by jarcionek
I have 4 stations with the same name, served from a single rail. Even though last two stations are empty, the train is still waiting for the second station, even though it's rail chain signal is blue and it could go to another station:


Screenshot.PNG
Screenshot.PNG (3.11 MiB) Viewed 1543 times


I have added a normal rail signal with condition to be red if all stations are occupied. As soon as it changes to green, the train goes to the empty station, whichever one it is:


Screenshot 2.PNG
Screenshot 2.PNG (1.83 MiB) Viewed 1543 times


This is a behaviour I would expect when the rail chain signal changes from red to blue.

Re: [0.17.34] Train's path is not recalculated when the rail chain signal changes

Posted: Mon Apr 29, 2019 11:27 am
by mrvn
Chain signals don't cause a repath because iirc then trains would repath inside a roundabout and deadlock them self. Putting a full signal before the chain signal is the way to design your station and I think you don't have to program it at all. It turns red every time a train passes it causing the others to reconsider their path when it clears again.

Re: [0.17.34] Train's path is not recalculated when the rail chain signal changes

Posted: Mon Apr 29, 2019 11:32 am
by jarcionek
Rail signal before the Rail chain signal? Then the train is just going to pass it and stop at rail chain signal. Doesn't sound like it solves anything.

Re: [0.17.34] Train's path is not recalculated when the rail chain signal changes

Posted: Mon Apr 29, 2019 11:34 am
by Bilka
As mrvn said, chain signals changing state from red to blue do not trigger a repath, so this is working as intended. See also: https://wiki.factorio.com/Railway/Train_path_finding

Re: [0.17.34] Train's path is not recalculated when the rail chain signal changes

Posted: Mon Apr 29, 2019 12:12 pm
by mrvn
jarcionek wrote:
Mon Apr 29, 2019 11:32 am
Rail signal before the Rail chain signal? Then the train is just going to pass it and stop at rail chain signal. Doesn't sound like it solves anything.
Yes, the train will just pass it. But think of the train before that. It will have passed it on it's way into the station. So the path the current train has will be chosen after the last train entered and should pick a bay that is empty avoiding the problem.