[0.17.66] Trains waiting at regular signals do not try to Repath every X seconds ?

Bugs that are actually features.
Post Reply
User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2341
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

[0.17.66] Trains waiting at regular signals do not try to Repath every X seconds ?

Post by BlueTemplar »

N.B. : https://wiki.factorio.com/Railway/Train_path_finding

This situation feels like a bug :
dual-train_no_repathing.png
dual-train_no_repathing.png (3.37 MiB) Viewed 640 times
I would expect the green train to try to Repath after a while : switch to the other side-facing locomotive, and go to the other (identically named) vertical Green stop.
It never seems to.

Scenario :
dual-train test.zip
(386.5 KiB) Downloaded 20 times
(To reproduce, you'll have to somehow temporarily disable the other path, for instance by removing a rail in the hazard-concrete marked space.
In a regular base this can happen by simply having a third train passing through that segment at the same time that the green train tries to Path through it, making it temporarily unavailable.)
BobDiggity (mod-scenario-pack)

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

Re: [0.17.66] Trains waiting at regular signals do not try to Repath every X seconds ?

Post by boskid »

Once train chooses direction it wants to travel to destination (for example: when changing from manual to automatic or after full stop at previously reached station), it will only repath in same direction. If you toggle green train into "manual" and then again into "automatic", it will choose to go in opposite direction to reach second "Green" station ([-15, 5]). I am curious if this will be marked as "not a bug" or if will be fixed.

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2341
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [0.17.66] Trains waiting at regular signals do not try to Repath every X seconds ?

Post by BlueTemplar »

With a chain signal, the train does repath after a few seconds in the other direction.

However, while I now know about this trick, it took me a while to figure it out.
(P.S.: And one might not be able to use it in all situations, considering how chain signals... chain ?)

And new players, that don't like digging for the exact game mechanics, might be stumped by this behaviour.
(P.S.: They are also more likely to use single tracks with two-sided trains than more experienced players...)
BobDiggity (mod-scenario-pack)

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

Re: [0.17.66] Trains waiting at regular signals do not try to Repath every X seconds ?

Post by Loewchen »

Trains waiting at a closed regular signal is a very common occurrence, forcing them to repath every few seconds in the off chance that they can find a better route by going backwards the way they came makes absolutely no sense to me.

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2341
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [0.17.66] Trains waiting at regular signals do not try to Repath every X seconds ?

Post by BlueTemplar »

I'd settle on :
wiki wrote:
  • If the trains has waited for a multiple of 30 seconds or if multiple train stops with the name of the destination exist, the train is forced to recalculate its path.
BobDiggity (mod-scenario-pack)

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2341
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: [0.17.66] Trains waiting at regular signals do not try to Repath every X seconds ?

Post by BlueTemplar »

Also note that this is a situation with one (2-stop) Green station, but one could have two (or more) Green stations, hoping to send a stuck train to a better station elsewhere (on the same loop in this screenshot, but you get the idea...), but getting stuck anyway :
dual-train_no_repathing_multiple_stations.png
dual-train_no_repathing_multiple_stations.png (3.5 MiB) Viewed 588 times
I guess that whether this is considered a bug or not will rather depend on how viable the devs consider dual-headed train networks to be ?
BobDiggity (mod-scenario-pack)

mrvn
Smart Inserter
Smart Inserter
Posts: 5112
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.17.66] Trains waiting at regular signals do not try to Repath every X seconds ?

Post by mrvn »

This hopefully-a-bug mans your train track should probably look like this:
double-train.png
double-train.png (554.39 KiB) Viewed 561 times
Which is a pain to build because you have to place a chain signal first, then you can place both full signal and finally you can place the second chain signal.

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

Re: [0.17.66] Trains waiting at regular signals do not try to Repath every X seconds ?

Post by Rseding91 »

Thanks for the report however this is working as intended: trains stopped at normal signals explicitly do not do the repath-check logic.
If you want to get ahold of me I'm almost always on Discord.

mrvn
Smart Inserter
Smart Inserter
Posts: 5112
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.17.66] Trains waiting at regular signals do not try to Repath every X seconds ?

Post by mrvn »

If it's a matter of saving cpu time this could be limited to special cases:

1) bidirectional train, if the train can't go backwards then there is no point
2) bidirectional signal, if the track is uni-directional again no point
3) only do this every 30 seconds, that should be rare enough

Post Reply

Return to “Not a bug”