Page 1 of 1

[1.1.30] Train selects blocked path

Posted: Sun Mar 28, 2021 9:53 pm
by mathe172
I am encountering an issue where trains select a path that is currently blocked over a path that would be free. The attached save corresponds to the first screenshot below.

The issue occurs in the following situation: A train (the train carrying the sulfuric acid) is in front of a "normal" train stop next to the main rail, and an in-line train stop on the main rail itself. The normal train stop is occupied by a train (carrying sulfur in the image), the in-line train stop is deactivated by a circuit condition.
Image
Map image of the same location, with the route the train chooses to go through the segment:
Image

Forcing the train to use the lower path shows that the path is fully valid:
Image
Image

It should also be noted that the issue does not occur with any of the other identical train stop setups on that map. It occurred at another location at some earlier point, but randomly taring down rails & signals seems to have fixed it there.

Re: [1.1.30] Train selects blocked path

Posted: Sun Mar 28, 2021 11:00 pm
by Loewchen
You placed the train stop that is in front of said train slightly after the next intersection so diverting north has a lower penalty. NaB.

Re: [1.1.30] Train selects blocked path

Posted: Mon Mar 29, 2021 8:05 am
by disentius
You can find how path penalty's work here:
https://wiki.factorio.com/Railway/Train_path_finding

Re: [1.1.30] Train selects blocked path

Posted: Mon Mar 29, 2021 11:05 am
by mathe172
Thanks! That explains the seemingly random working/not working of the different train stops. It's just a bit unexpected that a train would ever choose an occupied train stop over any number of unoccupied stops, but I guess the current values were carefully chosen to make the system work in the largest fraction of situations.

From looking at the list of penalties, it looks like the state of the train stop itself (enabled/disabled by circuit network) is not factored into the penalties at all. Would it maybe make sense to reduce the penalty for disabled train stops?