TL;DR
Add an option to the TrainScheduleRecord that allows trains to change direction when looking for the next destination when the record has no wait_conditions.What ?
A TrainScheduleRecord with no wait_conditions switches to the next record when the breaking point reaches the destination. The train then tries to extend the path it is on to the next destination. If a destination is found that extends the current path (by at least one extra rail) then the train continues it travel without slowing down. But this ignores all stops that do not extend the current path or are connected to the rail itself.Extend the TrainScheduleRecord with an option that makes all directions and distances valid for such a case. This would allow a train to pick a station connected to the rail directly but also allow the train to stop and reverse direction to reach a stop that is closer than extending on the current path. Trains should also reverse their direction without being stopped for one tick so inserters don't load items accidentally.
Why ?
Say I have a train stop like this:Using the train stop directly trains can only approach the train stop from the bottom. Trains coming from the top have to drive past it and do a U-turn someplace and then approach the station from the bottom. This is because TrainScheduleRecords with a train stop have a direction.
When multiple stops with the same name exist there is no way to send a train to a specific stop. Instead the train has to be send to rail as a waypoint and then to the stop. LTN does this by sending the train to the rail the stop is connected to like this:
The TrainScheduleRecord LTN uses has a wait_condition of "0s passed". This makes the train break and stop at the rail for 1 tick and then continue to the real stop, which will always be the closest. Well, not always. Since the TrainScheduleRecord LTN used had no direction trains could approach it from the top and then pick a totally different stop that is closer than doing a U-turn and approaching the stop from the bottom. The fix for that was recently added to set a direction on the TrainScheduleRecord.
But that still has problems. The train will stop for 1 tick at the rail before continuing to the train stop. In that 1 tick inserters can load items screwing up the manifest of the train when it actually arrives at the stop. To fix that a TrainScheduleRecord without wait_conditions would be better. But then the train stop connected to the rail is ignored leading to a path like this:
For LTN and similar mods it would be nice to turn of the distance restriction for extending the path.
bi-directional trains
Using the train stop directly trains can only approach the train stop from the bottom. Trains coming from the top have to drive past it and do a U-turn someplace and then approach the station from the bottom. To allow trains to approach the stop from the top a waypoint must be set that drives the train past the stop far enough so that it can reverse directions and ends up at the stop like this:This would be a far better option than doing a U-turn somewhere far off. But for this to work, so that the train will reverse directions, the TrainScheduleRecord need a stop with a wait_conditions. This also runs into the problem that for 1 tick the train is stopped and inserters can load items into the train.
Next consider what this means for a train coming from the bottom. It would also stop at the waypoint:
For trains coming from the bottom a TrainScheduleRecord without wait_conditions would be far superior as the train would drive right through and only break for the final stop. This would avoid having the train stop on the east-west lane causing congestion.
Summary
I'm asking for a TrainScheduleRecord that allows sending uni-directional and bi-directional trains to specific stations using waypoints that don't have the train stop at a bad place or interact with inserters for 1 tick.PS: I know there are changes to the trains in the works for the extension that probably solve the first case. But I'm unsure if the second case with bi-directional trains has been considered as well.