Page 1 of 1

[0.17.79] Train pathing to distant station instead of closer one

Posted: Mon Dec 09, 2019 11:59 pm
by Stevetrov
What I did
I was playing around with a test bench to better understand some of the quirks of train pathing.
This particular test was supposed to see at what point a train would choose a more distant station when the closer one was behind a CN closed rail signal.
What Happened
The train pathed to the more distant station when everything else was equal. even though the more distance station was over 500 rail pieces away (1000 tiles)
Also the train in the attached save is repathing on every tick for some reason (guessing this is probably related in some way)
What did I expect to happen
I expected the train to path to the nearest station and only path to the distant one when I applied a penalty to the near one.
I did not expect the train to repath every tick.

Link to the savefile: https://drive.google.com/open?id=1V2QbZ ... KfJyfwUe2j

Re: [0.17.79] Train pathing to distant station instead of closer one

Posted: Tue Jan 07, 2020 7:33 pm
by boskid
Hm.. this partialy fits to 74994 and somehow explains why i had some issues with preparing test for 79640 - it looks that length of last segment on path is not counted into penalty. Adding extra signal 1 rail piece after CN Reserved signals still gives path to far station while placing it 2 rail pieces after makes train choose near station

Re: [0.17.79] Train pathing to distant station instead of closer one

Posted: Wed Jan 08, 2020 1:21 pm
by boskid
Issue with pathfinder choosing far station is fixed for next release. Test case included.