Page 1 of 1

[0.15.34] Excessive penalty for some wait conditions

Posted: Fri Sep 15, 2017 6:44 pm
by aaargha
It seems like trains that are using anything but a simple time based wait condition (empty/full cargo, circuits, fluid, item count, compound time based conditions) generate an absolutely huge penalty for the pathfinder.

In the attached example a station with a penalty that should be about 200k (200 circuit closed signals) more than for the occupied staton is still the preferred destination.

Wild speculation: Does remainingTicksInStation() really return a good value for non time based conditions?

Re: [0.15.34] Excessive penalty for some wait conditions

Posted: Fri Sep 15, 2017 6:49 pm
by Rseding91
Thanks for the report. That's currently working as intended; there's no good measure for how long a train will wait at a station if it's not using a time based condition. For instance: inventory full - how long that actually takes is unknown.

So, the game guesses and just says "it will be there for quite some time".

That may change in the future but as of now there's no good measure to use.

Re: [0.15.34] Excessive penalty for some wait conditions

Posted: Fri Sep 15, 2017 7:01 pm
by aaargha
That sounds perfectly reasonable. I have to ask though, am I reading this wrong or shouldn't that penalty just be about 1k tiles?

Code: Select all

if (neighbourTrain->getTicksInStation() == uint32_t(-1))
{
    costFromStart += 1000;
    break;
}
I may well be missing something but I can't really see anything that should result in a penalty of over 200k.

Thank you for the quick reply, I hope I'm not making you regret sharing the pathfinder :)

Have a great day!