[1.1.35] Train at chain signals tries to path through stopped train
Posted: Sat Jun 26, 2021 1:12 am
From the Wiki:
I also would have expected a parked train's currently occupied block to count as reserved.
If the option of avoiding (A) is removed by deconstructing a signal to make the left turn shortcut be one-way southbound, the train does choose the ideal path and departs immediately, as it is only choosing between (A) + (C) or (A) + (B): As a note, from the same wiki page:
The time based penalty could have rescued the situation, if "train currently waiting at a rail signal" also included "train waiting at a stop", since the pathfinding train would have eventually realized that the long term parking blockage was worse than pathing through (A) and (B).
However, I have a train leaving a temporary stop, which is choosing to try to path via chain signals through a parked train sitting at a stop (C), rather than passing through a pair of unoccupied stops (A), (B), that do not have occupants other than the pathfinding train itself (it does require a loopback over its own position). My entire rail network is composed of chain signals, so the train is definitely not exiting the chain sequence.0.17.38:
When a train performs path finding while in a chain signal sequence, the pathfinding will have a constraint to not go through reserved block before exiting the chain sequence. This solves a problem of train intersections being possible to be deadlocked even with proper chain signals usage in cases of using temporary stops or when path is changed because of station is being enabled/disabled by a circuit network. This also allowed us to to let train recalculate path spontaneously even in chain signal sequence, as it shouldn't break anything now.
I also would have expected a parked train's currently occupied block to count as reserved.
If the option of avoiding (A) is removed by deconstructing a signal to make the left turn shortcut be one-way southbound, the train does choose the ideal path and departs immediately, as it is only choosing between (A) + (C) or (A) + (B): As a note, from the same wiki page:
Clearly the path avoiding (A) by going through (C) wins by 1500 points, if it is permitted at all (from the 0.17.38 change it should be disallowed entirely as I understand it).When the path includes a train stop -> Add a penalty of 2000.
When the rail block contains a train that is stopped at a train stop -> Add a penalty of 500.
...
When the rail block contains a train currently waiting at a rail signal -> Add a penalty of 100 + 0.1 for every tick the train has already waited.
The time based penalty could have rescued the situation, if "train currently waiting at a rail signal" also included "train waiting at a stop", since the pathfinding train would have eventually realized that the long term parking blockage was worse than pathing through (A) and (B).
blueprint string for the train station