[2.0.41] Train priority overrides enable/disable and train limit 0
Posted: Fri Mar 14, 2025 1:50 pm
In the video I have a double-headed train with a schedule in which it stops at an "Enter" station, is unloaded until the chests at the station are full, and then it leaves by going to the "Exit" station with no wait condition. Each "Enter" station is disabled via a circuit once the chests are full and are not renabled until they are empty. The schedule also has an interrupt to wait at the "Depot" station in case every "Enter" station is full.
If every "Enter" station has the same priority, then this works almost as expected. There is some weird behavior in which the train goes back to visit the same stop twice before going to the depot in the case where all the "Enter" stations are disabled, but this is only a minor part of the issue. The real issue is when one of the "Enter" stations has a higher priority than the others. In this case, the train will visit this stop when it is enabled, and then continually circle back to it, even when it is disabled by the circuit.
I would expect that if a station is disabled, then it is impossible for a train to choose it as a destination. Hence whenever all the stations are disabled, it should be forced to go to the depot station.
I don't think there is any chance that the circuit is enabling the stop for 1 tick or something like this, at least assuming it is working correctly in-game. Perhaps I made my schedule poorly, but I still don't see why this behavior should arise. This seems to be a problem with the way the train is choosing which "Enter" station it wants to visit.
Below I am attaching a dropbox link to a video showing the behavior. It is very consistently reproducible. I am also including the save file this was recorded on. The save file is using the mods Editor Extensions v2.4.2 and Factorio Library v0.16.2 for demonstration purposes, but this happens without these mods as well.
EDIT: I forgot to add the log file.
https://www.dropbox.com/scl/fi/mu46xjyj ... kxd89&dl=0
If every "Enter" station has the same priority, then this works almost as expected. There is some weird behavior in which the train goes back to visit the same stop twice before going to the depot in the case where all the "Enter" stations are disabled, but this is only a minor part of the issue. The real issue is when one of the "Enter" stations has a higher priority than the others. In this case, the train will visit this stop when it is enabled, and then continually circle back to it, even when it is disabled by the circuit.
I would expect that if a station is disabled, then it is impossible for a train to choose it as a destination. Hence whenever all the stations are disabled, it should be forced to go to the depot station.
I don't think there is any chance that the circuit is enabling the stop for 1 tick or something like this, at least assuming it is working correctly in-game. Perhaps I made my schedule poorly, but I still don't see why this behavior should arise. This seems to be a problem with the way the train is choosing which "Enter" station it wants to visit.
Below I am attaching a dropbox link to a video showing the behavior. It is very consistently reproducible. I am also including the save file this was recorded on. The save file is using the mods Editor Extensions v2.4.2 and Factorio Library v0.16.2 for demonstration purposes, but this happens without these mods as well.
EDIT: I forgot to add the log file.
https://www.dropbox.com/scl/fi/mu46xjyj ... kxd89&dl=0