[0.18.3] Trains don't repath properly depending on track orientation

Bugs that are actually features.
Post Reply
19wolf
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Fri May 06, 2016 3:49 pm
Contact:

[0.18.3] Trains don't repath properly depending on track orientation

Post by 19wolf »

I have a train stacker that only fills properly in certain orientations, in the opposite orientation, trains don't repath properly to fill the stacker. See screenshots and save file, let me know if you need more details.
Attachments
Sandbox.zip
(4.41 MiB) Downloaded 88 times
screenshot-tick-6128643.png
screenshot-tick-6128643.png (8.6 MiB) Viewed 2082 times
screenshot-tick-6126222.png
screenshot-tick-6126222.png (8.49 MiB) Viewed 2082 times
screenshot-tick-6113586.png
screenshot-tick-6113586.png (6.66 MiB) Viewed 2082 times
screenshot-tick-6103646.png
screenshot-tick-6103646.png (8.2 MiB) Viewed 2082 times

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2241
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.18.3] Trains don't repath properly depending on track orientation

Post by boskid »

Define "properly"

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: [0.18.3] Trains don't repath properly depending on track orientation

Post by TruePikachu »

I was going to complain as such as well, but e.g. in the 2nd and 3rd screenshots, the exit stacker has a train sitting at a blue chain signal.

19wolf
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Fri May 06, 2016 3:49 pm
Contact:

Re: [0.18.3] Trains don't repath properly depending on track orientation

Post by 19wolf »

In the second screenshot, the train will sit at the blue signal forever. It's trying to path through the second to the top, which is closed by the bottom signal. It should path to the open bottom signal first, even though that top signal is closed. It does this properly in the first/fourth screenshots. It paths to the nearest open signal.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2241
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.18.3] Trains don't repath properly depending on track orientation

Post by boskid »

TruePikachu wrote:
Wed Feb 05, 2020 7:16 pm
I was going to complain as such as well, but e.g. in the 2nd and 3rd screenshots, the exit stacker has a train sitting at a blue chain signal.
I saw that in game, but because of CN logic, in all stacker branches, there is equal amount of rail signals set to ReservedByCN - it is eiher first rail signal or last that is ReservedByCN. Since all legs are of equal penalty, pathfinder is free to choose which branch it will go and this issue is because train cannot go through path it choosed because first rail signal is here ReservedByCN. In Train Pathfinder there is special tie-breaking code that is required to keep decisions deterministic. It uses for example, Segment ID, Segment direction and since Segment ID may be different based on build order, choosen paths may be different. Since they are of same cost, it is Not a bug.

19wolf
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Fri May 06, 2016 3:49 pm
Contact:

Re: [0.18.3] Trains don't repath properly depending on track orientation

Post by 19wolf »

boskid wrote:
Wed Feb 05, 2020 7:29 pm
Since all legs are of equal penalty, pathfinder is free to choose which branch it will go
Perhaps when they have equal penalty, they should choose the one with the nearest/first open signal? Or else is there some other way to create a 'specific order' in/out stacker?

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2241
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.18.3] Trains don't repath properly depending on track orientation

Post by boskid »

19wolf wrote:
Wed Feb 05, 2020 7:38 pm
Perhaps when they have equal penalty, they should choose the one with the nearest/first open signal? Or else is there some other way to create a 'specific order' in/out stacker?
Yes there is one solution: not keeping all stacker lanes at equal penalty.
- use more penalty in case of closed rail signal near the lane exit, for example by using double rail signals parallel,
- or: by keeping both (enter and exit) rail signals closed when given lane should not be used at the moment.

Post Reply

Return to “Not a bug”