[boskid][0.17.79] Train pathfinder incorreclty assumes path in same segment is shortest

This subforum contains all the issues which we already resolved.
Post Reply
aaargha
Filter Inserter
Filter Inserter
Posts: 330
Joined: Wed Dec 07, 2016 8:35 am
Contact:

[boskid][0.17.79] Train pathfinder incorreclty assumes path in same segment is shortest

Post by aaargha »

As the train pathfinder is currently implemented it will always prefer the path that ends in the same segment as it starts in, regardless of whether it is the closest one or not:
demonstration.png
demonstration.png (398.02 KiB) Viewed 2998 times
Blueprint for reproduction

quyxkh
Smart Inserter
Smart Inserter
Posts: 1028
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: [0.17.79] Train pathfinder incorreclty assumes path in same segment is shortest

Post by quyxkh »

Is automatic routing designed to work with no rail signals at all?

No sensible signalling I can find for that setup produces a bad result. If the train starts out in the same rail segment as its destination stop, it'll go to that stop. Why spend cpu and dev time avoiding such a shruggable consequence? Put signals on your destination stops, everything works.

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

Re: [boskid][0.17.79] Train pathfinder incorreclty assumes path in same segment is shortest

Post by boskid »

This case will take little more time to fix since there are 2 underlying issues:
- when pathfinding (multi segment), penalty of first segment is taken from end to end without consideration where locomotive is, so technicaly train choosed shortest path (it has penalty of only long segment)
- single segment pathfinder runs before main pathfinder and has priority because of this

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

Re: [boskid][0.17.79] Train pathfinder incorreclty assumes path in same segment is shortest

Post by boskid »

Both issues are now fixed for next release.

Post Reply

Return to “Resolved Problems and Bugs”