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.
[0.17.65] Train will rather wait (possibly forever) instead of calculating another route
[0.17.65] Train will rather wait (possibly forever) instead of calculating another route
- Attachments
-
- sandbox.zip
- (2.67 MiB) Downloaded 71 times
Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route
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.
(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.
Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route
+1 for that insight and explanation mmmPI. I play factorio for too long and I didn't know that.
Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route
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.
Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route
I’m confused, if the train has to recalculate its path why is it not choosing a path without another train?
Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route
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.
Re: [0.17.65] Train will rather wait (possibly forever) instead of calculating another route
So it’s not that the train is waiting forever, it just didn’t move as quick as the player expected.