New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Train prefers service in depot over station #7901
Comments
So, if the route to the chosen depot passes through the station that is the current order, delay the automatic service until after stopping at the station? The logic seems reasonable at least. |
What do you mean with
? |
I assume you are talking about the automatic servicing, i.e. that a train decides it has passed its servicing interval/reliability threshold, and needs to visit a depot. Therefore it automatically searches for a path to the nearest depot. When it reaches that depot and has entered it, the train resumes its regular schedule by going to the station it was on the way to before the automatic servicing. This is different from manual servicing (clicking the "go to nearest depot" button in the train window) and from scheduled servicing (a depot appearing on the orders list). With manual servicing, you presumably clicked the button because you want the train in a depot as soon as possible and don't want any stops on the way. With scheduled servicing, presumably the schedule is planned so the train won't need to turn back to visit the next station. |
Yes, I understand now. I was talking about automatic servicing. So, as you said,
can be solution. This can also be applied with crossroad. |
What's the signalling set up? Is this just the issue where a train won't re-route to a depot for service unless there's a PBS signal between it and the depot? |
PBS is Path-Based Signals, so the signal type you are using. The following here are some general gameplay tips learned from experience with how things have always worked. In your first example, the signals are placed badly, in a way that will definitely cause problems. With path signals, you should never put signals at the entry to a station, only at the exit from the platform. Instead you should place signals before the junction in front of the station, path signals use track reservations and not blocks, so other trains can pass the junction as soon as the previous has cleared the points the next needs to traverse. Your second example doesn't have any reliable way of working, it would be very difficult to make the pathfinder able to reason that by taking that depot, the train would be unable to reach its destination again. Having depots on dead end branches, combined with automatic servicing, is generally a recipe for problems. Some situations can be improved with additional checks in the pathfinder, but many will never be able to get a good solution. |
Hi everyone. I want to revive this conversation as this is IMO a real issue that could be solved. For automatic servicing, I believe the logic should be smarter, like not just find the nearest one but instead look for the one that minimizes the path from the current location to the next destination with at least one depot along the way. I am new to OpenTTD development but I am happy to take a try on this but need some questions:
|
As a quick-fix, you can set the order of a train to go to a depot after a station; it will not do automatic service at that point, and go when it is done with the station. |
Possibly the same issue as #8022, but with trains instead of ships |
Version of OpenTTD
Version: 1.9.3
Expected result
Train prefers stop at station rather than going to the depot. And prefers going the right direction rather than going to the depot.
Actual result
When train is comming into the station and needs to be serviced, it goes to the depot which is behind station and completely ignores the station. This causes big issues when you have only one-way routes.
Also similar problem appears when you have crossroad and closer depot is in the wrong direction but train prefers it.
Steps to reproduce
I think fix can be done in pathfinder and make bigger priority to stop in the station (or go the right direction) rather than servicing.
The text was updated successfully, but these errors were encountered: