[1.1.0] Old Reservation Can Be Reused by Train
Posted: Tue Nov 24, 2020 10:08 am
When a train's leave condition is met and it leaves a stop, it does not immediately give up its reservation. Instead, it waits until it has physically left the stop (which may happen later due to eg destination full) to give up the reservation. As I understand it, this is a feature so that the reservation count of the stop reflects that the train is still physically there.
However, the reservation that the train continues to hold can also be used as the "target reservation" which the train paths to. This only comes into play when the name of the source station and destination station are the same. In particular, the following events could occur:
- The train is at a currently overfilled stop
- Its leave condition is met
- It attempts to head to a stop of the same name
- All other stops of this name are full as well
- It "goes back" to the stop it is already at without actually moving (although this is reflected in eg the stop reading out the train id).
This source stop being overfilled makes no difference here, since the train holds a reservation already.
This behavior is extremely surprising, and is causing a problem for an existing train design (I can expand on this with a savegame if desired). Restricting the reservations that a train continues to hold after having left a station to not be permissible "target reservations" would avoid this behavior while being unlikely to affect anybody who isn't doing crazy things like this.
However, the reservation that the train continues to hold can also be used as the "target reservation" which the train paths to. This only comes into play when the name of the source station and destination station are the same. In particular, the following events could occur:
- The train is at a currently overfilled stop
- Its leave condition is met
- It attempts to head to a stop of the same name
- All other stops of this name are full as well
- It "goes back" to the stop it is already at without actually moving (although this is reflected in eg the stop reading out the train id).
This source stop being overfilled makes no difference here, since the train holds a reservation already.
This behavior is extremely surprising, and is causing a problem for an existing train design (I can expand on this with a savegame if desired). Restricting the reservations that a train continues to hold after having left a station to not be permissible "target reservations" would avoid this behavior while being unlikely to affect anybody who isn't doing crazy things like this.