[2.0.73] Train can be forced to repath to a disabled station

Things that has been reported already before.
mrbaggins
Fast Inserter
Fast Inserter
Posts: 106
Joined: Wed Apr 26, 2017 9:08 am
Contact:

[2.0.73] Train can be forced to repath to a disabled station

Post by mrbaggins »

What did you do?
I circuit controlled a rail signal, which appeared to break station selection based on priorities.

What happened?
The train attempts to go to the stations (Priority 80) behind the red signal. Part way there it repaths to a disabled station (Priority 85) instead of a myriad other options (Priorities 40-70)

What did you expect to happen instead? It might be obvious to you, but do it anyway!
The train should go to one of the next highest priority stations (Priority 70) that are NOT disabled.

Does it happen always, once, or sometimes?
It only happened once I added the signal, but it does it every time in my save once the signal is in place. I could not make it happen with an MVP test loop, so I suspect path length is a factor.

More info:

The train leaving the disabled station at the top of the map, and pathing toward the blocked station in the bottom right
Image

Part way to the stations, it repaths directly back to the high priority disabled station
Image

Save file (Modded, sorry. Could not make an MVP do the same.)
https://drive.google.com/file/d/1Ot3rr_ ... sp=sharing
eugenekay
Filter Inserter
Filter Inserter
Posts: 970
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.73] Train can be forced to repath to a disabled station

Post by eugenekay »

There are very few signals in your Train network. Because the Train has never "left" the Disabled stop's block the Train Count value is never decremented.

Watching it tick-by-tick, what happens is:
  • The Train leaves the station because its Wait Condition is fulfilled
  • Train proceeds to the next Highest Priority (80) stop for a few Ticks
  • Mid-journey, encounters the Red signal forcing a re-Path because "The train is braking for a signal (chain or regular) it cant reserve."
  • It notices that the Highest Priority stop (85) is empty, and still has a "Reservation" since it never left the Block.
  • Re-Paths back to the station that it just left
  • GOTO 1
Semi-related: 123091
Loewchen wrote: Wed Nov 27, 2024 2:16 pm That is intended, the train is considered in station until it leaves its block.
Try adding more Rail Signals at each Station. Good Luck!
mrbaggins
Fast Inserter
Fast Inserter
Posts: 106
Joined: Wed Apr 26, 2017 9:08 am
Contact:

Re: [2.0.73] Train can be forced to repath to a disabled station

Post by mrbaggins »

That's interesting that it works that way. Extremely counter intuitive but never going to show up in 99% of rail systems.

Now I've gotta decide if I want to signal every station, or at the very least, randomly around that rectangle, assuming it loses the reservation once it leaves the block.

I still think it's odd that when it repaths it would rather "go home" than "go to another valid station". I'm guessing that's the priorities kicking in earlier than expected - that a high priority but reserved station is better than a lower priority "waiting" station.

How come I couldn't get it to work in the small one (at the bottom)? Simply not big enough for a repath to be called? My train would just get stuck at the red signal waiting forever. It was double headed too, so it should have been able to repath after waiting. But nothing ever happens.
eugenekay
Filter Inserter
Filter Inserter
Posts: 970
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.73] Train can be forced to repath to a disabled station

Post by eugenekay »

mrbaggins wrote: Sun Jan 18, 2026 9:43 pmI still think it's odd that when it repaths it would rather "go home" than "go to another valid station". I'm guessing that's the priorities kicking in earlier than expected - that a high priority but reserved station is better than a lower priority "waiting" station.
It’s not “home”, just “the highest priority station”. If another station with a Higher priority were to become available it would pick that one. The key point is that the Destination selection logic doesn’t exclude it from selection because it is already counting against that station’s “Train Limit”.

I did not experiment with (or even happen to notice) the second loop. The path-cost logic occurs after the Destination-selection logic, so it’s not clear to me why it would not work. The repath event seems to occur approximately once per second (I did not time it exactly); maybe the acceleration is just too high and the train ends up cornered on the branch line with the signal before it has a chance to fire?

Interesting set of problems! Tangentially, what is the point of this Train schedule/network layout? It looks like the “Ultracube” mod is a logistics challenge where only 1 catalyst/token Cube item exists, and has to be moved around to enable different recipes as-needed? Never tried it myself, maybe next time I start a new game.
mrbaggins
Fast Inserter
Fast Inserter
Posts: 106
Joined: Wed Apr 26, 2017 9:08 am
Contact:

Re: [2.0.73] Train can be forced to repath to a disabled station

Post by mrbaggins »

It’s not “home”, just “the highest priority station”. If another station with a Higher priority were to become available it would pick that one. The key point is that the Destination selection logic doesn’t exclude it from selection because it is already counting against that station’s “Train Limit”.
That's what I was saying. That the "still reserved but disabled" station is a better option than any other valid station seems to be a bad decision.

The counter argument would seem to be "But you need to guarantee it has a place to go, what it there weren't other enabled stations?" - To that I would say, that's no different to if there were signals at the stations making it leave the block and lose the reservation. Exact same result, except, in further playing this save, the train will happily go wait at the red signal indefinitely.

In doing all of this, I would really like to see a way to make a signal "no path" - Not just red and the big 1000 path penalty, make it physically cut the network. But I understand there are significant ups costs to changing the rail network, and being able to do so every tick would be a performance nightmare.
eugenekay
Filter Inserter
Filter Inserter
Posts: 970
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.73] Train can be forced to repath to a disabled station

Post by eugenekay »

mrbaggins wrote: Thu Jan 22, 2026 1:47 amIn doing all of this, I would really like to see a way to make a signal "no path" - Not just red and the big 1000 path penalty, make it physically cut the network.
While this is starting to stray a bit from the scope of the "Bug Report".... You can use Railguns (and an Egg-spoiling mechanism) or Modded Artillery to destroy Rails, which also forces a Repath. Assuming that the Locomotive is stuck at a Red Signal, and has no other Path past the obstruction it should end up in "No Path" state. This would require careful spacing of Roboports' Construction Network and management of the availability of Rail Items to re-connect the broken rail Block.

Good Luck!
mrbaggins
Fast Inserter
Fast Inserter
Posts: 106
Joined: Wed Apr 26, 2017 9:08 am
Contact:

Re: [2.0.73] Train can be forced to repath to a disabled station

Post by mrbaggins »

I don't think so - That's about traversing to stations and scheduling. I specifically have exactly their setup in my train (doubled station name), and it works fine.

The issue I'm "raising" is that leaving a station isn't leaving it unless you leave the block it's in, even if there's other valid destinations in the same block. So it physically leaves, but is still allowed to return. This is ONLY true when there's two separate blocks. Even if all but one station are on the same side of the block split. If EVERY station is in the same block, it's fine. But if you separate one, any repath events while still in the initial block send it to the original station instead of to a new destination.

The question is: do we count that as intended behaviour, that it can physically move far far away and still return? Or is that a bug?
Post Reply

Return to “Duplicates”