[0.17.14] Strange pathfinding of Trains

Bugs that are actually features.
Post Reply
klausdieter5164
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Mar 17, 2019 3:40 pm
Contact:

[0.17.14] Strange pathfinding of Trains

Post by klausdieter5164 »

I think something is wrong about the pathfinding of the trains. Sometimes the train takes a much longer path than the shortest path. It is much more easier to show the issue than to explain it:

Here:
Condition.jpg
Condition.jpg (1.82 MiB) Viewed 1038 times
you can find 4 Stations and it is obvious, what would be the shortest path from the starting point.
- At "Wrong-Path-X.jpg" you can see the path that the train takes.
- At "Island_1.7.zip" you can find the savegame.

What might be the problem:

- It seems like the train is looking for the next crossroads and it might be more important turning left in a roundabout (which is faster on left-hand traffic) than finding a shorter way where you have to turn right in an other roundabout.
Attachments
Island_1.7.zip
savegame
(11.16 MiB) Downloaded 59 times
Third example
Third example
Wrong-Path-3.jpg (1.72 MiB) Viewed 1038 times
Second example
Second example
Wrong-Path-2.jpg (1.7 MiB) Viewed 1038 times
First example
First example
Wrong-Path-1.jpg (1.76 MiB) Viewed 1038 times

knightelite
Fast Inserter
Fast Inserter
Posts: 132
Joined: Fri Oct 05, 2018 3:49 pm
Contact:

Re: [0.17.14] Strange pathfinding of Trains

Post by knightelite »

I haven't checked your save yet since I'm not at home currently, but does the train ever turn right from the intersection shown? Perhaps there's a signaling issue or something there that causes it to only be able to turn left when leaving the InternBase stop?

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.17.14] Strange pathfinding of Trains

Post by Choumiko »

Train stations apply a heavy penalty to the path length if a train passes through them.
When the path includes a train stop that is not the destination -> Add a penalty of 2000.
from https://wiki.factorio.com/Railway/Train_path_finding

Your InternKraftwerk and InternIronWest need to be passed by your train in order to get from the Base to Uranium
InternKraftwerk needs to be passed from Base to IronWest (or back to Base)

Adding bypasses and/or moving the stations resolves the problem

klausdieter5164
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Mar 17, 2019 3:40 pm
Contact:

Re: [0.17.14] Strange pathfinding of Trains

Post by klausdieter5164 »

Choumiko wrote:
Mon Mar 18, 2019 4:32 pm
Train stations apply a heavy penalty to the path length if a train passes through them.
When the path includes a train stop that is not the destination -> Add a penalty of 2000.
from https://wiki.factorio.com/Railway/Train_path_finding

Your InternKraftwerk and InternIronWest need to be passed by your train in order to get from the Base to Uranium
InternKraftwerk needs to be passed from Base to IronWest (or back to Base)

Adding bypasses and/or moving the stations resolves the problem
Thank you, that solved the Problem

Post Reply

Return to “Not a bug”