Page 1 of 1

Train waiting forever on closed station

Posted: Fri Sep 29, 2017 2:54 pm
by Rinin
My iron station is closed with circuit network signal, but another open and passable station with the same name exist in network. But train waiting forever on closed station. Is it bug or feature?

Because I remember, train could find path to station with the same name in equal, but smaller network. If pathfinding limited by network size, then how is it limited?

Re: Train waiting forever on closed station

Posted: Fri Sep 29, 2017 3:31 pm
by Loewchen

Re: Train waiting forever on closed station

Posted: Fri Sep 29, 2017 3:59 pm
by Rinin
Loewchen wrote:14748
Can't see how they are related. There is no parked (forever) trains in my setup, and it obviously was not addressed in 0.13 because i'm playing 0.15.35 now

Re: Train waiting forever on closed station

Posted: Sat Sep 30, 2017 2:00 pm
by daniel34
Rinin wrote:Can't see how they are related. There is no parked (forever) trains in my setup, and it obviously was not addressed in 0.13 because i'm playing 0.15.35 now
I have to agree with Rinin, and also because of this statement:
Rseding91 wrote:
HanziQ wrote:This is a known problem and will be addressed in 0.13.
Correction: will be addressed at some point when someone feels like gutting how trains work and re-doing it completely. So, we don't really have an estimate as to when it will happen or if it will happen.
Since it still happens (0.15.35) as OP demonstrated, it's not fixed.

@Rinin: Please provide a save file where that issue can be observed.

Re: Train waiting forever on closed station

Posted: Sat Sep 30, 2017 6:23 pm
by Rseding91
I'm not seeing the bug in your screenshots. You've blocked both paths the trains want to take such that there is no path not blocked by a red signal. The 3rd path that may be able to reach another station with the same name has a path cost *wayyyyyy* higher than the one that's a few train lengths in front of it so it's never going to path to it.

I don't consider this a bug.

Re: Train waiting forever on closed station

Posted: Sun Oct 01, 2017 7:27 am
by Rinin
Rseding91 wrote:I'm not seeing the bug in your screenshots. You've blocked both paths the trains want to take such that there is no path not blocked by a red signal. The 3rd path that may be able to reach another station with the same name has a path cost *wayyyyyy* higher than the one that's a few train lengths in front of it so it's never going to path to it.

I don't consider this a bug.
As I see from your explanation you are right it's not a bug. But I would appreciate some explanation about trains pathfinding algorithm to understand what is bug and what is not in the future.

As I understand from my research and your explanation trains are using wave algorithm with metrics, and semaphores only affects this metrics. But could I find any more detailed explanation somewhere? How they are affected, and when this algoritm is recalculated?

Re: Train waiting forever on closed station

Posted: Sun Oct 01, 2017 7:54 am
by Bilka
You can find the train pathfinding code here: https://gist.github.com/Rseding91/c0d4d ... 3f6c6a8fe6

That should answer all your questions if you understand it

Re: Train waiting forever on closed station

Posted: Sun Oct 01, 2017 1:06 pm
by Rinin
Bilka wrote:You can find the train pathfinding code here: https://gist.github.com/Rseding91/c0d4d ... 3f6c6a8fe6

That should answer all your questions if you understand it
Thanks alot.

Re: Train waiting forever on closed station

Posted: Sun Oct 01, 2017 3:05 pm
by Rinin
All this "magic numbers" in algorithm seems well balanced, but it makes me think about this suggestion anyway, to control at least one of them.