[kovarex] [for 0.16] [0.15.31] Trains Rerouting Inconsistency

This subforum contains all the issues which we already resolved.
Post Reply
EpicFail1403
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed May 31, 2017 7:33 am
Contact:

[kovarex] [for 0.16] [0.15.31] Trains Rerouting Inconsistency

Post by EpicFail1403 »

If a new destination is designated manually when a train is running on automatic mode, though still on automatic mode, the train will first brake to a full stop, then reroute to the new destination.

In fact this is how it was in 0.14. But in 0.15, with the introduction of disabling train stations, when the current station gets disabled, the train will immediately reroute to the next station available on the schedule, without losing any speed. If I remember correctly, this behavior was introduced around 0.15.7. At that time, manually changing a train's destination on the flight will also cause the train to reroute without losing speed. Then some issue with train routing came up and after the fix, train's behavior when destination is manually changed gets rolled back to 0.14 like, while trains rerouted automatically remains the 0.15 style.

I hope my description is clear enough.

I'm guessing that this (trains have to stop first when manually designated a new destination vs train won't lose speed when a new destination is given automatically) isn't "working as intended", so I'd like to think it as a bug. If it's not categorized as a "bug", well, then I would like to propose "trains don't have to stop first when manually designated a new destination" as a feature.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Trains Rerouting Inconsistency

Post by kovarex »

I will talk with the guys about the details to see what we can do.
The problem is, that there certainly are situations where the train needs come to a full stop when changing path. The reason is, that as it changes path, it might suddenly take path through a signal that is near and is red, so the train would have no way to stop fast enough on that signal.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] Trains Rerouting Inconsistency

Post by kovarex »

I had a few discussions about this, and I have a plan of a solution, I will most probably talk about it in detail in FFF.
If we decide to do the changes, it would be 0.16 thing.

EpicFail1403
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed May 31, 2017 7:33 am
Contact:

Re: [kovarex] [for 0.16] [0.15.31] Trains Rerouting Inconsistency

Post by EpicFail1403 »

Wow, great to hear this!

My thought was:
Since disabling stations by circuit conditions can literally happen at any time, if there exists a point in the trains route where disabling a certain station will cause the train to "no path", then brake or not, this "no path" can always happen. Braking the train on reroute simply won't completely eliminate the possibility for the train to enter "no path" state.

Also, trains on full auto are already doing this (no braking on reroute). So I think it's OK to at least make manual controlled rerouting behave the same.

The most apparent way to implement a relatively safe solution that I can think of is to let the train repath from the "effective train position" i.e. the point to which the train has already reserved. While not optimal, this is definitely a viable solution which, I guess, is exactly or very close to the current implementation. Based on my limited knowledge of algorithm and of the game's code/data structure, I guess any attempt to totally avoid "no path" on rerouting would either be ups killing or require some kind of revamping of train pathing system, or both. I doubt if it's even worth it.

Post Reply

Return to “Resolved Problems and Bugs”