News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Bug: Mirrored schedule waypoint logic incorrect when reversing

Started by DrSuperGood, January 29, 2018, 06:08:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DrSuperGood

A road schedule with several stops, e.g. a bus/coach route stopping at several cities between terminals often runs the schedule in mirror mode so the same stops are visited going in both directions. Occasionally one needs to place waypoints on road, e.g. to divert around jams or other convoys blocking. It seems possible that the schedule can get into a bugged state such that when it is time to visit the waypoint instead of correctly using it to advance to the next stop in the appropriate direction, it gets used to advance to the next stop in the forward direction even if the convoy has just arrived there. The result is an infinite loop of the convoys bouncing between the waypoint and the forward stop.

A, B are stops.
W is waypoint.

Correct sequence:
Forward: A -> W -> B
Reverse: B -> W -> A

Bugged schedule:
Forward: A -> W -> B
Reverse: B -> W -> B -> W -> B -> ...

Unfortunately this bug does not appear easy to recreate and I corrected it on the line it occurred. Attempts to recreate it in a controlled environment always resulted in the correct sequence. As such this report is acting more as a log/recognition of its existence rather than with the intent of getting it fixed. It is completely possible it will get passively fixed as more advanced scheduling logic gets implemented.

jamespetts

Thank you for noting this. If anyone can upload a saved game in which this issue can reliably be reproduced, I should be most grateful. I should note that the work that I am doing on the schedules is not currently planned to include altering the way in which convoys advance from one point in their schedule to the next, save for the conditional skip option, so this issue, whatever it may be, may well not be addressed by that work.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.