Page 1 of 1
Trains and deadlocks
Posted: Sat May 13, 2017 2:54 pm
by crysanja
It would be realy nice know which train is blocking the track.
Now it just tells you how many train are on a block. However a block is not allways easyly identified.
Im often in the situation that i want to place a signal but the game does not want it on the side i want to place it.
Re: Trains and deadlocks
Posted: Wed May 17, 2017 11:14 am
by ssilk
Do you mean deadlocks or just blocked trains? What situation are you describing? And what do you suggest to solve it?
It's in the nature of a deadlock, that it is ... well ... a deadlock; it cannot be solved automatically.
Re: Trains and deadlocks
Posted: Wed May 17, 2017 12:24 pm
by mp0011
I would like trains to recalculate route after X seconds of red light...
I often use single, bidirectional rails with passing loops, just for fun and realism.
However, there are situations when two trains stops in front of each other, while one of it is able to find alternative, free way to station, but it just does not.
Re: Trains and deadlocks
Posted: Wed May 17, 2017 5:57 pm
by ssilk
AFAIK the route is recalculated when the signal jumps to green. In most cases. But don't ask me about details.
Are you sure that you don't have a deadlock? You can check that yourself by locking at the occupied blocks and turning on the train-path in the
https://wiki.factorio.com/Debug_mode
Re: Trains and deadlocks
Posted: Wed May 17, 2017 11:17 pm
by BenSeidel
If you can post a save or screenshot of the issue then we might get a better understanding of your issue.
As Ssilk said, there are a few good options in the debug menu for dealing with trains. The one I usually have turned on is the "show rail paths" (I think?). It will draw a coloured line for each moving (or trying to move) train, showing you the path it has picked.
Re: Trains and deadlocks
Posted: Thu May 18, 2017 12:06 am
by mp0011
I expected the train on the right to recalculate its path (after some time maybe) and go through the station lower station.
CH = Chain signal, S = Signal.
I know it's less than ideal rail setup, but anyway, it should work...
Lower track must be bidirectional, sometimes both stations are occupied. I expect, in that case, right train to wait until train leave any station.
P.S.
If I hold left train on manual where it is standing, switch right to manual and back to auto, it still want to go that way, even if it's already red and blocked.
P.P.S.
Train recalculate the path (and goes through the station) immediately after I delete track section between them, so this path is "valid and legal".
Re: Trains and deadlocks
Posted: Thu May 18, 2017 12:47 am
by BenSeidel
The issue with your setup is that train stops have a pathing penalty applied to them. So in your example the train is not going through the middle path because the train "sees" it being longer because it has to pass a stop. If you just place a stop (but don't use it) on the bottom track I think you will get the result you are after.
Re: Trains and deadlocks
Posted: Thu May 18, 2017 1:16 am
by mp0011
I added the station, and it start to work. I removed it, and it still works just fine - the path is recalculating...