Chain signal delay problem

Bugs that are actually features.
Post Reply
Skeletpiece
Long Handed Inserter
Long Handed Inserter
Posts: 81
Joined: Sat Jul 08, 2017 6:26 pm
Contact:

Chain signal delay problem

Post by Skeletpiece » Sat Nov 24, 2018 1:44 am

Hello everybody,
While I was playing today, I noticed that there is a problem delay with chain signals. I do not know if it is a bug or train pathfinder algorithm is running ok.
Scenario:
- Consider the parking on the right side and unload stations on the left, named from A to H (From left to right)
unload_Station.png
unload_Station.png (50.65 KiB) Viewed 356 times
In the .gif attached, you can see that A station has the lowest priority (I think because its far from the others, then B, C, ...).
From my perspective that should not happen, as you can see, chain signal on the waiting train is already blue (Because a free way to station A) but train does not move, some seconds later, a train leaves another station (Chain signal is still blue because other empty station) and the waiting train goes to where the nearest train left.
ChainDelay.gif
ChainDelay.gif (1.97 MiB) Viewed 356 times

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

Re: Chain signal delay problem

Post by Loewchen » Sat Nov 24, 2018 2:25 am

There is no instant recalculation when a new path becomes available, so the train waits for the previously chosen station. NaB.

Zavian
Smart Inserter
Smart Inserter
Posts: 1421
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Chain signal delay problem

Post by Zavian » Sat Nov 24, 2018 3:59 am

Also be aware that an occupied station is only a 500 tile penalty for the pathfinder. It's a little hard to tell from the screenshot, but I think that station C is more than 500 tiles further than station H, so any trains in the stacker will prefer to wait for the train in H to finish unloading rather than use stations A, B, or C.

I know 2 approaches to fix that.

1. Move the approach rail for to the unload stations to approach the stations from above probably between stations D and E. (Assuming you have enough space you can just route the existing exit from the stacker across the top, and then down, and change the entry curve for stations E, F, G and H to match the new entry direction. You can also add a few more signals along that approach, so that trains can use the approach as an extension to the stacker.

2. Add a circuit controlled signal or two behind the trains in station D, E, F, G, and H. Set the signal to red when there is a train in the station. Each circuit controlled red signal adds an extra 1000 tile penalty to the path.

Also I with that many stations I would be worried about the exit time from the stacker. With 8 ore trains unloading, you may run into a situation where the stacker exit performance isn't good enough to service 8 unload stations.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 3178
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Chain signal delay problem

Post by eradicator » Sat Nov 24, 2018 12:03 pm

The easiest way to fix your problem is to disable stations when they're occupied. Because a train can not path towards a disabled station and will instantly repath to a different one of the same name.
Author of: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Zavian
Smart Inserter
Smart Inserter
Posts: 1421
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Chain signal delay problem

Post by Zavian » Sat Nov 24, 2018 8:20 pm

eradicator wrote:
Sat Nov 24, 2018 12:03 pm
The easiest way to fix your problem is to disable stations when they're occupied. Because a train can not path towards a disabled station and will instantly repath to a different one of the same name.
I've never tried that solving this problem that way, but won't that result in any trains heading to the ore unload station, suddenly repathing back towards the mines, when all unload stations are full? That could be problematic. (Think about cases where the ore mines are 5 mins from the ore unload stations. That could be a lot of trains suddenly turning around, and heading back to the ore patches, and also a long delay once a station becomes available once more).

Hmmm. Thinking about it some more, you could also add a dummy station that is never used, and hence is always available for trains to path towards. Place it beside the real unload stations, add some circuit controlled signals or an empty train to make sure it is never used.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 3178
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Chain signal delay problem

Post by eradicator » Sat Nov 24, 2018 8:47 pm

Zavian wrote:
Sat Nov 24, 2018 8:20 pm
Hmmm. Thinking about it some more, you could also add a dummy station that is never used, and hence is always available for trains to path towards. Place it beside the real unload stations, add some circuit controlled signals or an empty train to make sure it is never used.
I personally use two permanent red rail signal to block off the dummy (because then i don't need a constant combinator and get extra penalty as a bonus). An even simpler solution would be to never disable the last real station.
Author of: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Not a bug”

Who is online

Users browsing this forum: rampa6e