Page 1 of 1
[0.12.29] Train pathing bug
Posted: Mon Apr 25, 2016 8:13 am
by Leto
A picture will be the easiest way to understand this bug:
Can't go:
Can't go:
Free to go:
The issue is when the train has a choice between chain and block signals after a chain signal. If the chain signal path is shorter it will never consider the open block signal path which allows the train to get closer to it's destination. If the block signal path is shorter, it will happily select this path. A second oddity in this scenario is if the paths are equal length as shown in the picture the train will take the path which is shortest to the intermediate signal. The train does not reconsider it's path, it sits waiting forever. This bug was confirmed by another user in the factorio IRC.
Re: [0.12.29] Train pathing bug
Posted: Mon Apr 25, 2016 12:24 pm
by Klonan
Thanks for the report
Can confirm,
Train path finding doesn't really consider these other paths:
https://gfycat.com/VainCapitalDormouse
Re: [0.12.29] Train pathing bug
Posted: Tue Apr 26, 2016 10:47 am
by kovarex
It is not a bug, For the patfinder, there is no reason to pick the other path.
Re: [0.12.29] Train pathing bug
Posted: Wed Apr 27, 2016 1:26 pm
by sckuzzle
I've created a mockup of when you would have a piece of track that suffers from this bug where rearranging the signals isn't able to fix the issue.
Track section C is a passover in case the train stations at D are full of waiting trains. You don't want trains to wait at B because they might block the intersection while waiting to get into A while there are trains simply waiting to exit Out.
I make no argument on whether this is worth dev time, simply that there is a situation where this bug prevents intended use.
Re: [0.12.29] Train pathing bug
Posted: Thu Apr 28, 2016 11:47 am
by Leto
kovarex wrote:It is not a bug, For the patfinder, there is no reason to pick the other path.
I'm not clear on what you mean - are you saying that this is intended behaviour?
Another aspect to this is if there is a train inside the short path, the train will path around it.
Wait forever at signal:
Takes open path:
Re: [0.12.29] Train pathing bug
Posted: Thu Apr 28, 2016 12:02 pm
by Loewchen
Leto wrote:Another aspect to this is if there is a train inside the short path, the train will path around it.
A train adds a markup on the path for the pathfinder, a not accessible block because of a chain signal does not, it might be possible to change that, but that would be a new feature and not a bug fix.
Re: [0.12.29] Train pathing bug
Posted: Thu Apr 28, 2016 12:15 pm
by Zeblote
Leto wrote:
Wait forever at signal:
It makes no sense to have a chain signal at the start of the short part, though.
Re: [0.12.29] Train pathing bug
Posted: Thu Apr 28, 2016 12:50 pm
by sckuzzle
Zeblote wrote:
It makes no sense to have a chain signal at the start of the short part, though.
See my post earlier in this thread. It makes perfect sense to have a chain signal at the start of a short path, and I give an example of such a case.
Re: [0.12.29] Train pathing bug
Posted: Sun May 01, 2016 11:34 am
by Leto
After some further experimentation I've come to the conclusion that the train pathfinder almost entirely ignores signals. It's pathing priorities go something like this:
1. Unoccupied by a train.
2. Shortest path in rail pieces/distance.
3. Complicated rules with signals/blocks to decide between equal length paths.
The train will then drive down it's chosen path until it gets to it's destination or is stopped by a red signal.
These rules work well when there are only block signals, as a block signal can only be red in the case that a train occupies a path. Currently this is not the case for train signals and the pathfinder does not path in an expected manner when chain signals are heavily used.