[kovarex] [0.17.45] Trains repathing in chain signals don't obey reserved block restriction under certain circumstances
Posted: Wed May 29, 2019 8:29 pm
See 70684. What I thought was a more general bug turned out to be very specific.
When you tell a train to change its destination by clicking one of the station play buttons in its schedule, it ignores the following restriction:ONLY happens if you change its destination by clicking a play button in the schedule. If you cause the train to change its destination by disabling or removing (either physically or from the schedule) its intended destination stop, the train follows the restriction as expected (for this setup).
I'm attaching an example save, with a symmetric rail setup and two locomotives: The bottom locomotive is under circuit control, while the top one is to be controlled manually.
If you set the bottom one off by switching on the train signal on the constant combinator, it will attempt to reach the stop to the bottom right, but that stop will be disabled as it enters the roundabout. The train will continue right through the disabled stop and stop behind the rightmost cargo wagon while attempting to return to its original stop (bottom left). This is the expected behavior: However, if you open the schedule for the top locomotive and tell it to go to its second stop (the top left one), and then switch back to the first stop (top right) as it enters the roundabout, it will attempt to path through one of the cargo wagons in the roundabout, (violating the restriction above,) and stop in the roundabout: Save:
When you tell a train to change its destination by clicking one of the station play buttons in its schedule, it ignores the following restriction:
As far as I can tell, thisFactorioBot wrote: ↑Fri May 10, 2019 2:36 pm Changes[...]
- 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. (68681) This also allowed us to to let train recalculate path spontaneously even in chain signal sequence, as it shouldn't break anything now.
I'm attaching an example save, with a symmetric rail setup and two locomotives: The bottom locomotive is under circuit control, while the top one is to be controlled manually.
If you set the bottom one off by switching on the train signal on the constant combinator, it will attempt to reach the stop to the bottom right, but that stop will be disabled as it enters the roundabout. The train will continue right through the disabled stop and stop behind the rightmost cargo wagon while attempting to return to its original stop (bottom left). This is the expected behavior: However, if you open the schedule for the top locomotive and tell it to go to its second stop (the top left one), and then switch back to the first stop (top right) as it enters the roundabout, it will attempt to path through one of the cargo wagons in the roundabout, (violating the restriction above,) and stop in the roundabout: Save: