[0.18.7] Non-optimal train pathing

Bugs that are actually features.
Post Reply
dahhakd
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Jan 30, 2020 7:07 am
Contact:

[0.18.7] Non-optimal train pathing

Post by dahhakd »

Hi.

I'm experiencing an issue where the train chooses a much worse path, like 2 to 3 times longer than the shortest.

Here in the first image you can see where I am, where I want to go and the long path that is being chosen:

https://drive.google.com/file/d/1QEHh6x ... UrOkT/view

Here you can see that there is a path from where I am, because it is chosen up until that point on the tracks:

https://drive.google.com/file/d/1f8zbUb ... Do9jy/view

Then if I go just a little further on the right path, even with automatic routing, then the rest is calculated correctly:

https://drive.google.com/file/d/1T58668 ... VHsaE/view

Here is another instance on the same map, but the difference is not as dramatic:

https://drive.google.com/file/d/1Dw6sAu ... 3Ipp-/view
https://drive.google.com/file/d/1qChLmB ... fDXy9/view
https://drive.google.com/file/d/1lE1EyK ... 4JVJG/view

The screenshots and savefile:

https://drive.google.com/drive/folders/ ... sp=sharing

Thanks!
Attachments
factorio-current.log
(6.9 KiB) Downloaded 65 times

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

Re: [0.18.7] Non-optimal train pathing

Post by boskid »

Train stop "Defense 5" adds penalty that makes your longer path be in fact "better" (has lower cost). Short path is when there is no other path that could avoid train stop "Defense 5"
https://wiki.factorio.com/Railway/Train_path_finding wrote:When the path includes a train stop that is not the destination -> Add a penalty of 2000.

dahhakd
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Jan 30, 2020 7:07 am
Contact:

Re: [0.18.7] Non-optimal train pathing

Post by dahhakd »

Oh, I see. Thank you for the clarification and sorry for the bother!

Post Reply

Return to “Not a bug”