[0.12.35] [Hanziq] Trains sometimes change path after chain signals
[0.12.35] [Hanziq] Trains sometimes change path after chain signals
Sometimes trains change to a different path when passing chain signals.
This is a problem because the new exit block might not be free.
It can happen that a train passes a chain signal, but then has to wait before the exit block.
I've attached a short video. Please note the trains coming from east.
- The first train (iron ore) travels straight from east to west ahead along the reserved path. All is well.
- The second train (copper ore) reserves the same path, but just before the first chain signal, the train suddenly chooses a different path and stops abruptly because the exit is occupied by another train. Subobtimal, but not really a problem.
- The third train (also copper ore) passes the first chain signal without a problem. The train then changes its path at the second chain signal and finally stops in the middle of the intersection at the third chain signal.
In this case, the train only needs to wait for a short time, but I've seen other cases where a train mysteriously passed a chain signal and caused a deadlock.
IMHO when a train needs to change its path after it passed a chain signal, only paths through free exit blocks should be considered.
Old path: New path:
This is a problem because the new exit block might not be free.
It can happen that a train passes a chain signal, but then has to wait before the exit block.
I've attached a short video. Please note the trains coming from east.
- The first train (iron ore) travels straight from east to west ahead along the reserved path. All is well.
- The second train (copper ore) reserves the same path, but just before the first chain signal, the train suddenly chooses a different path and stops abruptly because the exit is occupied by another train. Subobtimal, but not really a problem.
- The third train (also copper ore) passes the first chain signal without a problem. The train then changes its path at the second chain signal and finally stops in the middle of the intersection at the third chain signal.
In this case, the train only needs to wait for a short time, but I've seen other cases where a train mysteriously passed a chain signal and caused a deadlock.
IMHO when a train needs to change its path after it passed a chain signal, only paths through free exit blocks should be considered.
Old path: New path:
Re: [0.12.35] Trains sometimes wait after chain signals
Thanks for the report,
This end up part of a long list of train related bugs, which will be tended to at some point
This end up part of a long list of train related bugs, which will be tended to at some point
Re: [0.12.35] Trains sometimes wait after chain signals
This must be the same issue that cause the "roundabout" problem when the train gets stuck in a roundabout because it want to do more than a 360 and sees itself.
I would recommend trains only recalculate after they hit a train signal this would fix a lot of issues with train stopping/getting stuck in junction.
I would recommend trains only recalculate after they hit a train signal this would fix a lot of issues with train stopping/getting stuck in junction.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
it's a big problem on big base like mine, because every 10 mins a train is stuck because the train try to do more that 360° turn on a circle ... blocking itself.
perhaps a simple way to solve that is to NEVER try to change path of train after chain signals, EXPECT when we check a checkbox on GUI signal who specify the on this chain signal, path MUST be calculate again.
Bonus part, it will add a very good signal to loadbalance train between track, because we will choose where path must be recalculate again.
perhaps a simple way to solve that is to NEVER try to change path of train after chain signals, EXPECT when we check a checkbox on GUI signal who specify the on this chain signal, path MUST be calculate again.
Bonus part, it will add a very good signal to loadbalance train between track, because we will choose where path must be recalculate again.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
No matter what kind of rules the game code it's using to reroute trains, they are completely hidden/secret.
From the point of view of players trains can randomly change routes whenever they please. Of course that massively complicates rail design.
From the point of view of players trains can randomly change routes whenever they please. Of course that massively complicates rail design.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
This seems more like a design problem than an issue with the train pathingfregate84 wrote:it's a big problem on big base like mine, because every 10 mins a train is stuck because the train try to do more that 360° turn on a circle ... blocking itself.
.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
With trains rerouting mid-intersection all bets are off. Nothing rail signals, chain signals or rail layout can do when trains can reroute as they please.Klonan wrote:This seems more like a design problem than an issue with the train pathingfregate84 wrote:it's a big problem on big base like mine, because every 10 mins a train is stuck because the train try to do more that 360° turn on a circle ... blocking itself.
.
Take for example this typical chain signaled roundabout:
Follows the whole "chain signals on all entries, rail signals on all exits" mantra. So it should just work, right?
All I did was change the name of the station on the east, train rerouted in the middle of the intersection to station to the north, but now it's blocking it's own path north = deadlock. That's the only train in the rail system, BTW.
Granted, players don't change the name of stations all that often to make this a big problem. But the video in OP shows that trains do this kind of rerouting on their own, so this kind of deadlock can happen spuriously without player intervention.
There's a way around the issue though: Never give the same name to two stations. Train rerouting shouldn't happen (as much). Maybe use same-name stations on very limited applications, but never on stations which are far apart and reachable via different paths from intersections.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
Once again, this seems like more of a rail design problem.Yoyobuae wrote:With trains rerouting mid-intersection all bets are off. Nothing rail signals, chain signals or rail layout can do when trains can reroute as they please.Klonan wrote:This seems more like a design problem than an issue with the train pathingfregate84 wrote:it's a big problem on big base like mine, because every 10 mins a train is stuck because the train try to do more that 360° turn on a circle ... blocking itself.
.
Take for example this typical chain signaled roundabout
Follows the whole "chain signals on all entries, rail signals on all exits" mantra. So it should just work, right?
All I did was change the name of the station on the east, train rerouted in the middle of the intersection to station to the north, but now it's blocking it's own path north = deadlock. That's the only train in the rail system, BTW.
Granted, players don't change the name of stations all that often to make this a big problem. But the video in OP shows that trains do this kind of rerouting on their own, so this kind of deadlock can happen spuriously without player intervention.
There's a way around the issue though: Never give the same name to two stations. Train rerouting shouldn't happen (as much). Maybe use same-name stations on very limited applications, but never on stations which are far apart and reachable via different paths from intersections.
Your loops are not big enough for your trains, you are liberally applying extra chain signals, and you are using roundabouts for general intersections.
Any one of these can cause the train to deadlock like this, with or without the re-pathing.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
I can probably force a deadlock on almost any kind of roundabout just by triggering a reroute at the precise time. Pretty much having any chain signals at all inside the roundabout allows this kind of deadlock to happen, no matter the size of the roundabout, or the placement of the chain signals.
Maybe it's best to just avoid roundabouts. This kind of problems shouldn't affect T intersections, I think. So if by "good rail design" you mean "no roundabouts" then I agree with you.
Maybe it's best to just avoid roundabouts. This kind of problems shouldn't affect T intersections, I think. So if by "good rail design" you mean "no roundabouts" then I agree with you.
Last edited by Yoyobuae on Fri Dec 23, 2016 8:51 pm, edited 1 time in total.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
Roundabouts are fine as far as roundabouts being fine goes, The key thing to remember is your blocks need to be bigger than your trains. and you need more blocks then potential trains between stations. If the but of your train can block a potential exit for that train deadlocks can occur
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
And I'm saying that single train can always block it's own exit if there's any kind of chain signals inside the roundabout. All it takes it's rerouting to happen at some precise time and boom! deadlock.Nexela wrote:Roundabouts are fine as far as roundabouts being fine goes, The key thing to remember is your blocks need to be bigger than your trains. and you need more blocks then potential trains between stations. If the but of your train can block a potential exit for that train deadlocks can occur
If rerouting can happen, then the only kind of roundabouts which are deadlock free are the ones without any signals except at entries/exits.
Now, some player might never encounter the exact rerouting situation where deadlock will happen. That depends on the rail layout outside the roundabout (where stations are placed, etc).
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
Remove the last cargo wagon from your train and it will go through the intersection just fine. The last wagon is blocking the topmost chain signal closing the block causing the eastmost signal to turn red because there is a train in the block.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
I can remove all cargo wagons if you want:Nexela wrote:Remove the last cargo wagon from your train and it will go through the intersection just fine. The last wagon is blocking the topmost chain signal closing the block causing the eastmost signal to turn red because there is a train in the block.
Oh I know, I'll add another chain signal:
Trust me, it's an unsolvable problem. Train rerouting can deadlock any roundabouts, no matter their size or signaling, unless there's zero signals on the circle itself.
Please keep in mind this is a rather unlikely event. Train rerouting doesn't happen often and in some cases it will never happen like this. But whether train rerouting happens or not depends on the rail layout outside the roundabout.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
I think there is no need to discuss individual results of path-changing-after-chain-signals. As I understand it, there is agreement that the behaviour in general is considered a bug, as it defeats the purpose of the chain signal and results in unexpected and unreliable behaviour. And just to make sure there are no misconceptions, the path-changing-after-chain-signal is not limited to changing/removing stations or even roundabouts.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
Great we have agreed its a bug and it still exists in 15.20, 12 months later.
Can we please have trains check if they are in between two chain signals and disable rerouting logic?
Rather, when a train recalculates a path, just use the old path (early out) if the train is current in between two chain signals or if this is hard to check for, if next signal is a chain signal.
Because I don't think a train should ever change paths after it has entered a chain signal block till it reaches regular signals. Since a train has to reserve a path through chain signals, changing that path midway (Mainly to a non reservable path because its already occupied) defeats the point of reserving a path and chain signals.
If the rerouting logic can't be disabled, then it needs to detect if its in a chain block and only consider the currently reserved chain blocks a valid path, ie force it to follow its reserved route through the chain blocks, or at least to find a reservable route.
Picking a worse path to the destination is acceptable. Getting stuck in any roundabout (And many other constructs) using chain signals is not.
Can we please have trains check if they are in between two chain signals and disable rerouting logic?
Rather, when a train recalculates a path, just use the old path (early out) if the train is current in between two chain signals or if this is hard to check for, if next signal is a chain signal.
Because I don't think a train should ever change paths after it has entered a chain signal block till it reaches regular signals. Since a train has to reserve a path through chain signals, changing that path midway (Mainly to a non reservable path because its already occupied) defeats the point of reserving a path and chain signals.
If the rerouting logic can't be disabled, then it needs to detect if its in a chain block and only consider the currently reserved chain blocks a valid path, ie force it to follow its reserved route through the chain blocks, or at least to find a reservable route.
Picking a worse path to the destination is acceptable. Getting stuck in any roundabout (And many other constructs) using chain signals is not.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
So I talked to the developers on IRC and apparently several videos and a dozen screenshots of the bug are not enough, they need a save just before it happens or they won't look into it.
Can anyone provide one? I tried but without knowing what causes trains to repath (I asked the devs and they won't tell me) I haven't a clue how to reproduce it outside of my modded savegame with 40+ trains running around between different stations.
Can anyone provide one? I tried but without knowing what causes trains to repath (I asked the devs and they won't tell me) I haven't a clue how to reproduce it outside of my modded savegame with 40+ trains running around between different stations.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
I made it happen every 30sec in my test world by turning a station off and on (btw gif !!).BlackMoon wrote:they need a save just before it happens or they won't look into it.
- Attachments
-
- Kreativ.zip
- (31.01 MiB) Downloaded 282 times
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
That's not the issue described here. That's simply a train trying to plan a self-intersecting route which is in another bug report.Nexarius wrote:I made it happen every 30sec in my test world by turning a station off and on (btw gif !!).BlackMoon wrote:they need a save just before it happens or they won't look into it.
The issue here existed before train stop disabling was a thing.
If you want to get ahold of me I'm almost always on Discord.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
My report contains such a save: viewtopic.php?f=47&t=34844BlackMoon wrote:So I talked to the developers on IRC and apparently several videos and a dozen screenshots of the bug are not enough, they need a save just before it happens or they won't look into it.
Can anyone provide one? I tried but without knowing what causes trains to repath (I asked the devs and they won't tell me) I haven't a clue how to reproduce it outside of my modded savegame with 40+ trains running around between different stations.
It's from 0.14.14 but I'm pretty sure it's reproducable on the latest build.
Anyway it should be easily reproducable if you have several paths with the same "cost" leading to the destination.
I really hope this bug will be addressed at some point. It occurs quite often on big train networks, especially in bottlenecks such as unloading bays.
Re: [0.12.35] [Hanziq] Trains sometimes change path after chain signals
I'll take a look at it tomorrow.Sephrat wrote:My report contains such a save: viewtopic.php?f=47&t=34844BlackMoon wrote:So I talked to the developers on IRC and apparently several videos and a dozen screenshots of the bug are not enough, they need a save just before it happens or they won't look into it.
Can anyone provide one? I tried but without knowing what causes trains to repath (I asked the devs and they won't tell me) I haven't a clue how to reproduce it outside of my modded savegame with 40+ trains running around between different stations.
It's from 0.14.14 but I'm pretty sure it's reproducable on the latest build.
Anyway it should be easily reproducable if you have several paths with the same "cost" leading to the destination.
I really hope this bug will be addressed at some point. It occurs quite often on big train networks, especially in bottlenecks such as unloading bays.
If you want to get ahold of me I'm almost always on Discord.