[0.15.34] Excessive penalty for some wait conditions

Bugs that are actually features.
Post Reply
aaargha
Filter Inserter
Filter Inserter
Posts: 330
Joined: Wed Dec 07, 2016 8:35 am
Contact:

[0.15.34] Excessive penalty for some wait conditions

Post 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?
Attachments
Excessive path penalty.zip
(2.82 MiB) Downloaded 88 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.34] Excessive penalty for some wait conditions

Post 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.
If you want to get ahold of me I'm almost always on Discord.

aaargha
Filter Inserter
Filter Inserter
Posts: 330
Joined: Wed Dec 07, 2016 8:35 am
Contact:

Re: [0.15.34] Excessive penalty for some wait conditions

Post 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!

Post Reply

Return to “Not a bug”