[0.12.29] Train pathing bug

Bugs that are actually features.
Post Reply
Leto
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Apr 25, 2016 7:39 am
Contact:

[0.12.29] Train pathing bug

Post by Leto »

A picture will be the easiest way to understand this bug:
Can't go:
Image


Can't go:
Image

Free to go:
Image


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.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.12.29] Train pathing bug

Post by Klonan »

Thanks for the report

Can confirm,
Train path finding doesn't really consider these other paths:
https://gfycat.com/VainCapitalDormouse

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.12.29] Train pathing bug

Post by kovarex »

It is not a bug, For the patfinder, there is no reason to pick the other path.

sckuzzle
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Thu Mar 31, 2016 8:51 am
Contact:

Re: [0.12.29] Train pathing bug

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

Image

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.

Leto
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Apr 25, 2016 7:39 am
Contact:

Re: [0.12.29] Train pathing bug

Post 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:
Image

Takes open path:
Image

Loewchen
Global Moderator
Global Moderator
Posts: 8322
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [0.12.29] Train pathing bug

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

Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: [0.12.29] Train pathing bug

Post by Zeblote »

Leto wrote: Wait forever at signal:
Image
It makes no sense to have a chain signal at the start of the short part, though.

sckuzzle
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Thu Mar 31, 2016 8:51 am
Contact:

Re: [0.12.29] Train pathing bug

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

Leto
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Apr 25, 2016 7:39 am
Contact:

Re: [0.12.29] Train pathing bug

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

Post Reply

Return to “Not a bug”