Page 1 of 1

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

Posted: Sat Jan 11, 2020 5:18 pm
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 3001 times
Blueprint for reproduction

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

Posted: Sat Jan 11, 2020 5:56 pm
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.

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

Posted: Mon Jan 13, 2020 1:35 pm
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

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

Posted: Mon Jan 20, 2020 10:18 am
by boskid
Both issues are now fixed for next release.