Train pathfinding: choose free path over blocked by manually stopped

Bugs that are actually features.
User avatar
planetmaker
Fast Inserter
Fast Inserter
Posts: 188
Joined: Mon Jan 21, 2019 9:30 am
Contact:

Train pathfinding: choose free path over blocked by manually stopped

Post by planetmaker »

This is not exactly a bug as it probably works as designed, yet I believe the path finding can be improved:

In the attached savegame, train ID 362 (heavy oil train) is heading for the TrainYard station. It tries to pass the tracks on which my personal train (ID 324) is stopped which has no schedule - thus will never move.

At the cost of a detour of about ~10 tiles train ID 362 could get to its destination, but it chooses to wait indefinitely for a free path through the blocked track.

Maybe the path finding can be re-considered periodically when the train has not moved after a certain time. This could be especially the case when the path crosses tracks blocked by trains not acting on automatic orders.
Attachments
train_alternative_route.zip
(12.35 MiB) Downloaded 63 times
Loewchen
Global Moderator
Global Moderator
Posts: 10378
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Train pathfinding: choose free path over blocked by manually stopped

Post by Loewchen »

As you said yourself, this does not describe a bug, make a development suggestion for things you consider improvements.
User avatar
planetmaker
Fast Inserter
Fast Inserter
Posts: 188
Joined: Mon Jan 21, 2019 9:30 am
Contact:

Re: Train pathfinding: choose free path over blocked by manually stopped

Post by planetmaker »

As you moved it here... can you possibly move this thread to the suggestion forum instead, please to avoid duplicate threads?
User avatar
Oktokolo
Filter Inserter
Filter Inserter
Posts: 894
Joined: Wed Jul 12, 2017 5:45 pm
Contact:

Re: Train pathfinding: choose free path over blocked by manually stopped

Post by Oktokolo »

Loewchen wrote: Sat Aug 17, 2019 9:03 pm As you said yourself, this does not describe a bug, make a development suggestion for things you consider improvements.
That is what he obviously did (although in the wrong subforum).
planetmaker wrote: Thu Aug 29, 2019 9:05 am As you moved it here... can you possibly move this thread to the suggestion forum instead, please to avoid duplicate threads?
+1 for both: Moving the suggestion to the right place and reevaluating paths of stuck trains every couple of seconds.
mrvn
Smart Inserter
Smart Inserter
Posts: 5969
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Train pathfinding: choose free path over blocked by manually stopped

Post by mrvn »

planetmaker wrote: Sat Aug 17, 2019 8:47 pm This is not exactly a bug as it probably works as designed, yet I believe the path finding can be improved:

In the attached savegame, train ID 362 (heavy oil train) is heading for the TrainYard station. It tries to pass the tracks on which my personal train (ID 324) is stopped which has no schedule - thus will never move.

At the cost of a detour of about ~10 tiles train ID 362 could get to its destination, but it chooses to wait indefinitely for a free path through the blocked track.

Maybe the path finding can be re-considered periodically when the train has not moved after a certain time. This could be especially the case when the path crosses tracks blocked by trains not acting on automatic orders.
Can't load your save right now but trains already re-path after being stopped at a signal for a while. And from https://wiki.factorio.com/Railway/Train_path_finding

When the path includes a manually controlled stopped train -> Add a penalty of 2000.
When the path includes a manually controlled stopped train without a passenger -> Add a penalty of 7000.

10 tiles detour should be nothing.
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 3237
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Train pathfinding: choose free path over blocked by manually stopped

Post by BlueTemplar »

That's only for chain signals though ?
Also, I had trains being blocked for more than half an hour (unless they got stuck again in the same position later ?) while other paths were available :
(Disregard the removed rail, and also the branch to the left of it going north that I had just added.)
Attachments
Screenshot from 2019-08-27 22-30-03.png
Screenshot from 2019-08-27 22-30-03.png (4.13 MiB) Viewed 1597 times
BobDiggity (mod-scenario-pack)
Locked

Return to “Not a bug”