Page 1 of 1
[boskid][1.1.48] Trains don't stop accurately enough at train stops
Posted: Sun Nov 28, 2021 5:11 am
by mrvn
A train with the same station name in the schedule will drive to another station with the same name as it's standing at. For this it should choose the closest station. Consider a game with dual headed stations like this:
- screenshot.png (4.22 MiB) Viewed 3325 times
All stops have the same name and the trains schedules have the station twice with 5s inactivity.
When the train is placed at a train stop and set to automatic it will switch between the 2 train stops of the station and not move at all. But if the train is send away from the station with a temporary stop then when it returns it doesn't seem to stop at the right position to go back to becoming unmoving. Instead it will leave the train station and return over and over.
This also applies to rail targets, not just stops.
Re: [1.1.48] Trains don't stop accurately enough at train stops
Posted: Sun Nov 28, 2021 4:40 pm
by ptx0
the problem is that you cannot have only the same two stations in the train schedule be a stop with the same name. the behaviour you describe will occur. i had the same problem when trying to unload an extremely long oil train with train stops named "Oil" "Oil" "Oil". I couldn't use inactivity condition, I had to use cargo condition and each stop with the same name had a very distinct reason it would leave, e.g. "Oil > 100k", "Oil > 200k", etc.
Re: [1.1.48] Trains don't stop accurately enough at train stops
Posted: Sun Nov 28, 2021 8:38 pm
by mrvn
I think you misunderstood the problem. The trains leave each station and go to another station once the scheduled condition is met (5s inactivity here). What condition is used really doesn't matter. You can have more stations in the schedule besides the two with the same name and that also doesn't matter. It's the choice of stop they drive to for the repeated station that is the problem.
A train freshly placed and snapped to a stop should behave the same way as a train arriving and stopped at a train stop. The behavior when freshly placed is the desired and expected one. In a dual headed station like in the save with the station name repeated the train should always visit both stops of the dual headed station.
Here is another example of trains behaving differently:
- screenshot.png (4.25 MiB) Viewed 3227 times
The top most station is named differently and both trains have the same schedule: Tim I Hely, Tim I Hely, kimnet. One will visit the two stops in the double headed stations while the other goes to one of the bottom most stations.
I suspect the train position of the two trains differs slightly and they stop at slightly different positions. One is within the margin where the opposite stop is reachable and the other is not. Maybe it would be enough to reset the trains position to be exactly at the stop every time a train stops at a train stop to get a consistent behavior.
Re: [boskid][1.1.48] Trains don't stop accurately enough at train stops
Posted: Tue Jan 04, 2022 2:51 pm
by boskid
Thanks for the report. Issue is now fixed for 1.1.51. It was related to incorrect check that would reject a path from the Back end of a train when last joint was already on the rail next to the train stop within acceptable margin of 0.05. Condition was correct for the Front end of a train.