Servicing.

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
ccomley
Traffic Manager
Traffic Manager
Posts: 227
Joined: 31 May 2013 16:19

Servicing.

Post by ccomley »

I find the treatment of breakdowns a bit bizarre so I tend to turn them off.

By default that means no vehicle ever goes for a service, even if you have a "service at depot" order in their config. But that seems a bit cheating to me, so I turn it back on.

Then of course, the problem is, how to most efficiently service vehicles, especially trains, when due, without gridlocking the network. Popping the depot just outside the terminus is an easy way to make new trains and start them but it's not such a good place for servicing.

I came up with a scheme where along the route, using waypoints and conditional orders to route those trains which are due a service into the depot area, whilst those that do not just go by.

Now in the past I've had odd results where trains appear to randomly shoot off to depot. I assume the problem is that the train reaches "needs servicing" status just after passing a depot so then behaves oddly.

In the attached config, you'll see a waypoint called Pindtown Waypoint. This is the "entry" to the depot zone. It's on the train orders between the two main stations the train is servicing. SO it goes
Station -1
Waypoint
Station 2

*Immediately* after the waypoint, the train has a conditional order - if it needs servicing it's routed to a waypoint called Pindtown Depot. IF it doesn't, it goes to Pindtown Mainline, i.e. trains needing service fork left, those that do not fork right. As this happnes ONE square after the previous order location, which the trains pass at 600kph, it seems to me the chance that the "needs servicing" status changing between the order to go to the waypoint and the subsequent conditional order are pretty low.

But still I get trains going past the depot which then say they need to go to the "Depots" waypoing, and trains going into the depots zone which don't need a service. The latter are not a problem - they can just pass the depots, though they may be held up if there are already too many trains going in and out, but the former then go all the way up the track and back to get to the "depots" waypoint. To reduce the impact of this I've built a loop where trains that have passed out of this area can come back without having to go all the way to the end and back. But I can't see why it happens!
Attachments
Depots.PNG
(627.51 KiB) Not downloaded yet
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Servicing.

Post by Alberth »

There is also a "service enabled if breakdowns are disabled" setting, that may of use to you. One thing to remember is that a train will not go looking for depots if it has a service order.

As for your problem, the moment of deciding "need service" is done waaaay before reaching the way-point. So the train is already made the waypoint decision, and then arrives here. In the mean time it decides it needs service. It just heads blindly for the nearest depot, not noticing waypoints and what not.
After servicing, its head is cleared and it need to find the next spot it has to visit, which is still the waypoint it decided on earlier.

I don't have service orders in the schedule, so train just look for a depot every now and then. For not so busy lines, adding a depot directly at the main line works (I have breakdowns enabled too, which makes really dense traffic impossible anyway). For the more busy tracks I have optional service tracks, like
optional_depot.png
optional_depot.png (108.89 KiB) Viewed 894 times
The train can go on the normal track, or it can visit a depot. Note that there is no straight track bypassing the depots. That prevents trains that do not need service taking the depot route, and getting major jams.
Being a retired OpenTTD developer does not mean I know what I am doing.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Bing [Bot] and 32 guests