Why do my depot trains act like this and how can i prevent it?
https://gyazo.com/87ae539d099e11be1d416bf0bcf5e15d
Setup:
Depot trains acting weird
Re: Depot trains acting weird
Without a savefile it's quite difficult to guess what is happening. It's also difficult to understand what you wish to have the trains do.
Re: Depot trains acting weird
They seem to be at the depot, the interrupt is triggerred, they wait 5s, then the cycle repeats.
I've seen suggestions to incorporate "At specified station/Not at specified station" in the interrupt's condition.
I've seen suggestions to incorporate "At specified station/Not at specified station" in the interrupt's condition.
Re: Depot trains acting weird
I want the trains to do exactly what they are doing right now: go to depot if they are not needed and check every 5 seconds if they can go somewhere else. But that weird opening/closing behaviour along with the accompaning sound effect makes it weird and feel like i have not done this in an intended way. The sound effect gets terribly annoying if i am near the depots.mmmPI wrote: Sun Jan 05, 2025 2:10 pm Without a savefile it's quite difficult to guess what is happening. It's also difficult to understand what you wish to have the trains do.
How do people usually implement this in their depot interrupts?Muche wrote: Sun Jan 05, 2025 3:51 pm They seem to be at the depot, the interrupt is triggerred, they wait 5s, then the cycle repeats.
I've seen suggestions to incorporate "At specified station/Not at specified station" in the interrupt's condition.
Re: Depot trains acting weird
I do it like Muche suggested. Exclude the depot from the depot interrupt.
I use depots for empty trains. My trains have one default schedule entry: "go to loading station". The depot interrupt triggers for "destination full". So if the train is empty and tries to go to its default schedule, and every loading station is full, the depot interrupt triggers and the empty train gets directed to the depot. The interrupt only adds a waiting condition of "inactivity 5 seconds" at the depot, just like yours.
The only valid destination from the depot is the static schedule entry, the loading station. However, if it is full, the train doesn't need to be directed to the depot again, because it is already there. So I added an additional condition to the depot trigger: "... AND not at depot station". This way the depot interrupt will not trigger if the train is already at the depot. Instead no interrupt is triggered and the train goes to sleep at the default schedule entry as long as no other interrupt fires and all loading stations are still full.
As soon as one loading station becomes open, one sleeping train wakes up and drives to the loading station. No interrupt involved here, it just wakes up and drives according to the default schedule entry.
If the train is full, the next destination is interrupt controlled again. The interrupt detects the cargo that was loaded and adds the corresponding unloading station as temporary schedule. If all unloading stations are full, the "destination full" condition for the depot interrupt will not trigger, because an interrupt will not interrupt an already active interrupt. Instead, the train just sits at the loading station sleeping and waiting for an unloading station to open. But this is ok, because if no unloading station has any demand, there is no need to free the loading station.
I use depots for empty trains. My trains have one default schedule entry: "go to loading station". The depot interrupt triggers for "destination full". So if the train is empty and tries to go to its default schedule, and every loading station is full, the depot interrupt triggers and the empty train gets directed to the depot. The interrupt only adds a waiting condition of "inactivity 5 seconds" at the depot, just like yours.
The only valid destination from the depot is the static schedule entry, the loading station. However, if it is full, the train doesn't need to be directed to the depot again, because it is already there. So I added an additional condition to the depot trigger: "... AND not at depot station". This way the depot interrupt will not trigger if the train is already at the depot. Instead no interrupt is triggered and the train goes to sleep at the default schedule entry as long as no other interrupt fires and all loading stations are still full.
As soon as one loading station becomes open, one sleeping train wakes up and drives to the loading station. No interrupt involved here, it just wakes up and drives according to the default schedule entry.
If the train is full, the next destination is interrupt controlled again. The interrupt detects the cargo that was loaded and adds the corresponding unloading station as temporary schedule. If all unloading stations are full, the "destination full" condition for the depot interrupt will not trigger, because an interrupt will not interrupt an already active interrupt. Instead, the train just sits at the loading station sleeping and waiting for an unloading station to open. But this is ok, because if no unloading station has any demand, there is no need to free the loading station.
Re: Depot trains acting weird
It seems it currently may not work as desired in all cases, see 121203 Inconsistent Train Interrupt Condition Handling (Full Destination vs. No Path).
Re: Depot trains acting weird
That's just how trains work. When they're at a stop they open. When they're departing, driving, or arriving, they're closed. What you're seeing is the train opening for 5 seconds while it waits then closing to depart, then the interrupt triggers because they have no destination, then they go to the wait stop (which they're already at), and they open up again.
Re: Depot trains acting weird
Yeah, i got that - but don't you figure that this is undesirable behaviour? I set it to 5 seconds because of a lazy thought. 5 seconds is good enough to never have to worry about it causing UPS issues and good enough for the trains not idling for that long. Make it shorter and you get a symphony of death.waterBear wrote: Mon Jan 06, 2025 12:08 am That's just how trains work. When they're at a stop they open. When they're departing, driving, or arriving, they're closed. What you're seeing is the train opening for 5 seconds while it waits then closing to depart, then the interrupt triggers because they have no destination, then they go to the wait stop (which they're already at), and they open up again.
While messing around with that i found a hacky solution: set the time passed condition to 0 seconds. It will try to open the cargo bay doors for what seems like just a tick, but there is no sound effect!
Re: Depot trains acting weird
@Tertius suggestion works - I just tried it at my Fulgora wait station. Just add the condition "and not at <wait station>" to the condition "destination full or no path" and your train will sit at the wait station asleep, never opening its doors.jaylawl wrote: Mon Jan 06, 2025 6:41 pmYeah, i got that - but don't you figure that this is undesirable behaviour? I set it to 5 seconds because of a lazy thought. 5 seconds is good enough to never have to worry about it causing UPS issues and good enough for the trains not idling for that long. Make it shorter and you get a symphony of death.waterBear wrote: Mon Jan 06, 2025 12:08 am That's just how trains work. When they're at a stop they open. When they're departing, driving, or arriving, they're closed. What you're seeing is the train opening for 5 seconds while it waits then closing to depart, then the interrupt triggers because they have no destination, then they go to the wait stop (which they're already at), and they open up again.
While messing around with that i found a hacky solution: set the time passed condition to 0 seconds. It will try to open the cargo bay doors for what seems like just a tick, but there is no sound effect!
If it really bothers you that much, there's your solution.
Re: Depot trains acting weird
For us visual learners: