[0.8.5] Train Pathfinding Issue
Posted: Fri Jan 03, 2014 3:57 pm
This is somewhere between a defect and a suggestion, so feel free to move it, but I felt it was more of a defect myself, so posted it here.
I constructed the following structure, with the hopes of allowing multiple trains to share a single long section of track without having to wait for the entire length to clear before proceeding, basically building a passing siding (common in real world railroad systems):
Expected behavior:
Train A approaches from the west on track section 1, while at the same time Train B is approaching from the east on Track 4.
Train A enters Track 3, causing the signal light for this section to turn red
My expectation is that at this point, Train B would proceed on Track 2, allowing the two trains to pass, however, Train B simply pulls up at the signal light for Track 3, causing a deadlock
Suggested fixes:
1) Have trains recalculate their route each time they reach a switch, this would allow them to make a decision regarding blocked tracks, and hopefully pick an alternate path if one is available
2) Have all trains recalculate their routes each time the status of a section of track changes. This seems like it would end up being a lot more CPU intensive in large rail systems, but might work better for busy systems.
I constructed the following structure, with the hopes of allowing multiple trains to share a single long section of track without having to wait for the entire length to clear before proceeding, basically building a passing siding (common in real world railroad systems):
Expected behavior:
Train A approaches from the west on track section 1, while at the same time Train B is approaching from the east on Track 4.
Train A enters Track 3, causing the signal light for this section to turn red
My expectation is that at this point, Train B would proceed on Track 2, allowing the two trains to pass, however, Train B simply pulls up at the signal light for Track 3, causing a deadlock
Suggested fixes:
1) Have trains recalculate their route each time they reach a switch, this would allow them to make a decision regarding blocked tracks, and hopefully pick an alternate path if one is available
2) Have all trains recalculate their routes each time the status of a section of track changes. This seems like it would end up being a lot more CPU intensive in large rail systems, but might work better for busy systems.