[0.17.65] Train will rather wait (possibly forever) instead of calculating another route

Bugs that are actually features.
metabot
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed Aug 14, 2019 3:56 pm
Contact:

[0.17.65] Train will rather wait (possibly forever) instead of calculating another route

Post by metabot »

See the screenshot below. When the red train arrived, the stacker was full. After three trains from the stacker departed, the red train still waits for the train in the first lane to make up room. Save file is attached.

20190814181342_1.jpg
20190814181342_1.jpg (613.04 KiB) Viewed 1966 times
Attachments
sandbox.zip
(2.67 MiB) Downloaded 72 times
mmmPI
Smart Inserter
Smart Inserter
Posts: 3634
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route

Post by mmmPI »

According to the wiki https://wiki.factorio.com/Railway/Train_path_finding

(among other reasons ) :

The train is preparing to stop at a signal (chain or regular) that changes so that the train can now continue. The train is forced to recalculate its path.
The train has waited at a chain signal for a multiple of 5 seconds.
If the trains has waited for a multiple of 30 seconds or if multiple train stops with the name of the destination exist, the train is forced to recalculate its path.
The train wants to depart from a signal (chain or regular) that it stopped at. The train is forced to recalculate its path.

I think the save file shows an example of the 5 or 30 sec rules for the trains that waits "too long". Sometimes the other rules comes into play too, which makes some other trains not wait as much time as those that seems to be buggy when one trains wait its full 5 second, and block another one that can also wait for its full 5 second and so on.

If you cut one rail piece after the dropoff station, or set to manual a train that is there, you will notice that the trains stops waiting "forever" and park correctly in the stacker after those 5 , 30 seconds.

To prevent this, you can use a dummy train station called "waypoint" or "entrance" or any name really, at the entrance of the stacker. The train will then calculate a new path just before choosing one of the parking lane. Choosing a free one, instead of choosing its lane when leaving the "train stop whatever" and then not recalculating unless blocked at a chain signal for seconds.

I don't think it's a bug but maybe i'm wrong :) , hopefully that helps.
User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route

Post by Impatient »

+1 for that insight and explanation mmmPI. I play factorio for too long and I didn't know that.
metabot
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed Aug 14, 2019 3:56 pm
Contact:

Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route

Post by metabot »

That was actually a great write-up, thank you very much for that. One could probably argue whether this behaviour qualifies as a bug or not, it seems it is more or less intended. As it is still an intuitively unexpected behaviour, i would like to wait for a developer response.
Trebor
Filter Inserter
Filter Inserter
Posts: 293
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route

Post by Trebor »

I’m confused, if the train has to recalculate its path why is it not choosing a path without another train?
metabot
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed Aug 14, 2019 3:56 pm
Contact:

Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route

Post by metabot »

Trebor wrote: Fri Aug 16, 2019 6:44 am I’m confused, if the train has to recalculate its path why is it not choosing a path without another train?
Because at the time of the screenshot, the recalculation of the path has most likely not yet triggered (see the above explanation of train routing). The stacker gets emptied very fast (the following train stop has a waiting condition of 5s or somerhing and nothing else), so maybe a multiple of 30s has not been hit.
Trebor
Filter Inserter
Filter Inserter
Posts: 293
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route

Post by Trebor »

So it’s not that the train is waiting forever, it just didn’t move as quick as the player expected.
metabot
Burner Inserter
Burner Inserter
Posts: 14
Joined: Wed Aug 14, 2019 3:56 pm
Contact:

Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route

Post by metabot »

Trebor wrote: Fri Aug 16, 2019 4:12 pm So it’s not that the train is waiting forever, it just didn’t move as quick as the player expected.
Yeah, that title was maybe a bit too click-baitey...
Post Reply

Return to “Not a bug”