Page 1 of 1

Why do temporary stops have a condition?

Posted: Sat Oct 09, 2021 1:13 am
by mrvn
When LTN picks a station for either pickup or delivery it adds a temporary stop on the rail the stop is connected too. This ensures the train goes to the location of the stop first and only then picks the actual stop to drive to, which is the stop right there because it is nearest. Normally. Not so if one has bidirectional stations. Then the stop might be on the wrong side of the track and the opposite stop is used instead.

But why does LTN add a condition to the temporary stop? The condition, even a time passed = 0, makes the train slow down and stop at the temporary stop. For single direction stations it doesn't matter because it stops right in front of the stop. But for bidirectional stops, when it comes from the wrong direction, it then has drive to the opposite stop. Without a condition the temporary stop is removed as soon as the breaking distance hits the spot and then it can delay breaking for the real stop.

So any reason the condition is needed? Could it be removed or made a config option?

Re: Why do temporary stops have a condition?

Posted: Sun Oct 10, 2021 7:19 pm
by Optera
I was certain stops require at least one condition.

Re: Why do temporary stops have a condition?

Posted: Fri Nov 19, 2021 6:32 pm
by Optera
Without wait condition trains will overshoot and path to a wrong stop when there's multiple stops with the same name.

Re: Why do temporary stops have a condition?

Posted: Fri Nov 19, 2021 9:07 pm
by mrvn
Yes and no.

What actually happens is that if there is no wait_condition then the game tries to find a station that will extend the current path of the train and is at least 2 rails long, one of those overlaps the current path. The stop that we want the train to go to has a path with only 1 rail because the train is already at the destination and is not a valid stop. If another stop with the same name exists then that becomes the new destination.

To remove the wait condition the rail target would have to be the rail before the train stop. This might change in the near future.

Re: Why do temporary stops have a condition?

Posted: Sat Nov 20, 2021 6:02 am
by ssilk
See also viewtopic.php?p=556633#p556633

Which brings me to thinking this can get quite tricky if I put a switch directly in front of a LTN-stop. In that case the current method might be more useful.

Re: Why do temporary stops have a condition?

Posted: Sat Nov 20, 2021 7:04 am
by mrvn
Yeah. The rail before the stop doesn't have to be unique. But you can't make a proper train stop with a switch. 1) that would make it 2 stops depending on where the train comes from and 2) the alignment with a curve doesn't work quite right, fluid wagons don't work at all. The straight rail before a stop is probably the one you want even with a switch.

But the code might change soon so I would just wait and see before adding something complex that might become uneccessary.