Timetable Question

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

Moderator: OpenTTD Developers

Post Reply
User avatar
AntoninKyrene
Engineer
Engineer
Posts: 74
Joined: 29 May 2011 17:32
Location: SW US

Timetable Question

Post by AntoninKyrene »

Hello!

This is my first OpenTTD game where I'm using timetables for more than just experimentation.

In this particular game, I drew two rules which are enforced: 1) I cannot have double-track mainlines, and 2) passing sidings cannot be longer than a train +1 square. The two rules together results in time drift: no matter how well you plan it, one train will have a minor delay in a passing siding unless there is a siding exactly at the middle of the line. That didn't happen, and rather than fix it, I want to work around it. But I don't think I have my head wrapped around this feature.

Train A leaves Milton Mines, makes the journey to Gadston Steel, and arrives back at the mine in 116 days, give or take 2 days. I have enough revenue to have a Train B on the same line. Ideally, I'd want both trains to leave their opposite destination on the same day for each journey by telling the computer to have them start each journey at the mine at specific intervals. I don't mind holding them for a few extra days if needed. Since the trip one-way is benchmarked at a minimum of 56 days (and has taken as long as 58 days) I want to start with a 70-day cycle. For example...

Day 000: Train A leaves Milton Mines / Train B leaves Gadston Steel.
Day 058: Train B arrives Gadston Steel / Train A arrives Gadston Steel. (with a possible delay of a couple of days due to a hold at the sidings)
Day 070: Both trains return to their staring point by waiting until Day 070 to begin.

The idea here is that both trains are programmed to leave a station after a set number of days, so that a late arrival has a chance to unload and be ready to go. In this situation, the trains would depart every 70 days.

Can timetables support that?

Timing is critical because part of this "main line" will be used as the back-forth route from the steel mill to the factory, so squeezing other traffic on this stretch of line becomes critical.

I hope this explanation / question makes sense.

-Marc
Kuolema Tekee Taiteilijan
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Timetable Question

Post by Transportman »

Yes, timetables support this. With timetables, trains wait at stations until their scheduled departure time if on time or early, and it will depart as soon as possible if late, but not before the scheduled departure time.

In your case, you would have something like:
Wait 10 days at Milton
Travel 60 days to Gladston
Wait 10 days at Gladston
Travel 60 days to Milton

Total time: 140 days, 2 stops makes 70 days.

Should the train to Gladston take 50 days, it will wait 20 days, but if it takes 70 days, it will depart as soon as possible, as it's lateness exceeds the wait time at the station.

One thing to keep in mind with lateness: If it exceeds the total timetable time, it will subtract the timetable duration from the delay until the delay is smaller than the timetable duration. It will not be an issue in your case, but with longer lines, more stops and more trains you might get delayed trains stuck behind on time trains that reduced their delay in this way.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
AntoninKyrene
Engineer
Engineer
Posts: 74
Joined: 29 May 2011 17:32
Location: SW US

Re: Timetable Question

Post by AntoninKyrene »

Thank you, Transportman! That seems to have solved the problem. I'll let them run a few years, but it looks good so far.

-Marc
Kuolema Tekee Taiteilijan
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 25 guests