A train that is stuck in traffic can re-route through an unrelated station as the pathfinding penalty from waiting grows every tick. This can cause unexpected deadlocks.
This doesn't happen often, but currently, the only way to guarantee no such behavior is to only use spur stations.
My suggestion is to add a toggle on stations to optionally add an infinite pathfinding penalty for passing through that station.
Add toggle on stations to prevent trains passing through
Moderator: ickputzdirwech
Re: Add toggle on stations to prevent trains passing through
Since 0.15.0 the Train path finding algorithm already incurs a 2000 Tile penalty for Train Stops. You can stack multiple Stops next to each other to increase this length, but if that is the ONLY path available then it will get used regardless. Increasing this value to “infinity” (preventing trains from using the route) would lead to more deadlocks; not less.
Re: Add toggle on stations to prevent trains passing through
That's not a real solution. When a train is stuck in traffic, the pathfinding penalty for the blocked path increases every tick. Eventually, that penalty will be greater than 2000, or 4000, or whatever finite number you choose.
Adding stations to increase the penalty is also clearly a kludge.
Stations are designed to support a number of trains up to the train limit. When an extra train passes through, that breaks that contract and can give you, say, 4 trains in a station that can only support 3.
Adding an optional toggle on stations would not meaningfully increase deadlocks. First, the toggle would be optional, and off by default. Second, deadlocks that are "solved" by pathing through a station more often than not just create a new, worse, deadlock.
Adding stations to increase the penalty is also clearly a kludge.
Stations are designed to support a number of trains up to the train limit. When an extra train passes through, that breaks that contract and can give you, say, 4 trains in a station that can only support 3.
Adding an optional toggle on stations would not meaningfully increase deadlocks. First, the toggle would be optional, and off by default. Second, deadlocks that are "solved" by pathing through a station more often than not just create a new, worse, deadlock.
Re: Add toggle on stations to prevent trains passing through
One in game solution is to offer a bypass lane to trains so they would not re-route through any station if they ever do re-route. If a deadlock occurs in your game when such event happen, i think unfortunatly it means there's something to fix with the station design. Maybe that's what you called "spur station" i'm not familiar with the term, i tried to look it up but i'm not sure what you want to do if it's not a "spur station", as in you "shouldn't" unload a train stationned on the main line because it will block the main line ^^
Another way to make sure trains never re-reroute through a station is to make them dead end and have the train with a loco on each side.
I don't see any drawback to the suggestion, but i think you could solve your problems even without it if you were to provide more information on the particular design.
Another way to make sure trains never re-reroute through a station is to make them dead end and have the train with a loco on each side.
I don't see any drawback to the suggestion, but i think you could solve your problems even without it if you were to provide more information on the particular design.
Check out my latest mod ! It's noisy !
Re: Add toggle on stations to prevent trains passing through
I could be wrong, but I don't think a bypass lane solves the root problem. Traffic that backs up to the bypass lane could still trigger a reroute through a station.
By spur stations, I mean dead-ends.
I think this is an issue that affects all builds that don't just use dead-end stations, in a way. I don't think it happens much in practice. I think unusual circumstances need to arise to raise this issue in practice (very particular builds, a parked manual train, exceptional traffic). But it would be nice to have guarantees against such behavior, and I think this sort of toggle would give you that.
By spur stations, I mean dead-ends.
I think this is an issue that affects all builds that don't just use dead-end stations, in a way. I don't think it happens much in practice. I think unusual circumstances need to arise to raise this issue in practice (very particular builds, a parked manual train, exceptional traffic). But it would be nice to have guarantees against such behavior, and I think this sort of toggle would give you that.
Re: Add toggle on stations to prevent trains passing through
I agree that the toggle would give "guarantee" there, and as i said, it's not damaging or breaking anything but when mentionning root causes, i think it wouldn't address them either, in some way as the root cause to me seem those re-route, adding the toggle would prevent them from cascading into worse situation, but those aren't supposed to happen in the first place ( in my mind).
I have nothing against the proposition, i'm just thinking when reading it that maybe you could solve some of your problems even without it.
I have nothing against the proposition, i'm just thinking when reading it that maybe you could solve some of your problems even without it.
Check out my latest mod ! It's noisy !