[1.1.0] Old Reservation Can Be Reused by Train

Bugs that are actually features.
Post Reply
DreamConspiracy
Burner Inserter
Burner Inserter
Posts: 15
Joined: Tue Feb 26, 2019 5:49 pm
Contact:

[1.1.0] Old Reservation Can Be Reused by Train

Post by DreamConspiracy »

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.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2244
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.0] Old Reservation Can Be Reused by Train

Post by boskid »

Thanks for the report. I made some tiny tweaks that should resolve this issue.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2244
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.0] Old Reservation Can Be Reused by Train

Post by boskid »

Unfortunately i had to revert fix for this bug because it was causing other issue with far greater impact: 92195. I will try to make this work but it is less important compared to the other issue.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2244
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.0] Old Reservation Can Be Reused by Train

Post by boskid »

Given this fix was reverted long time ago, i am still not seeing reasonable way to fix this and in 2.0 this behavior will be even more visible (holding reservation until train leaves block next to a train stop) and it must be able to reuse reservation in certain cases, i am moving this to Not a bug (and removing one test i had stashed for this behavior).

Post Reply

Return to “Not a bug”