Timetables - a patch, and a request for comments

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

Moderator: OpenTTD Developers

User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Timetables - a patch, and a request for comments

Post by Maedhros »

I've been writing a small series of patches that allow you to set a date for the timetable to start, and to make even separation of trains along a route easier by setting their starting dates automatically. I'd like to hear comments from people about it - whether you like it or not, and any suggestions you might have for improvements.
timetable_start_dates_and_separation_r12751.diff
I'd also like to hear any other suggestions for making timetables better. What do you think works or doesn't work, and how can things be improved?

Thanks for your comments. :)
No-one's more important than the earthworm.
Youri219
Traffic Manager
Traffic Manager
Posts: 191
Joined: 28 Apr 2007 11:53

Re: Timetables - a patch, and a request for comments

Post by Youri219 »

Having a start date and an automated separation actually makes timetables useful. I think that says enough. Even though I haven't tested this patch yet, I'd love to see it get to trunk.
zypa
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 30 Mar 2006 12:05
Location: Germany
Contact:

Re: Timetables - a patch, and a request for comments

Post by zypa »

Lame vista excuse --> Can't compile on my own.

I know (and like) the timetable based separation patch. What's the difference between your patch and the separation patch? As I cannot compile your patch on my own, I cannot figure it out on my own. :(
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Timetables - a patch, and a request for comments

Post by Rubidium »

zypa wrote:Lame vista excuse --> Can't compile on my own.
What? None of the recent Microsoft C compilers work under Windows Vista? I did know Vista was bad, but THAT bad?
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: Timetables - a patch, and a request for comments

Post by Maedhros »

zypa wrote:I know (and like) the timetable based separation patch. What's the difference between your patch and the separation patch?
I haven't played with that patch, so I don't know. That's one of the reasons I was asking for comments. ;-)

Some of the differences I can see from using the code are that the vehicles will not separate themselves automatically - you have to tell them explicitly. It also doesn't do any of the constant timetable adjustments to keep vehicles being on time. I have trains with different timetables that interact, and I don't want them to be updated because one of my trains happens to be late, or else the network would end up in chaos.
No-one's more important than the earthworm.
zypa
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 30 Mar 2006 12:05
Location: Germany
Contact:

Re: Timetables - a patch, and a request for comments

Post by zypa »

@Rubidium:
BuildTTD does not work on my vista system. I could use a c++ compiler, that's not the big problem. I cannot apply diff files. I'm too lazy for it. I do not want to add any "development" toolon my vista system. I want to use unbuntu for that. Unfortunately unbuntu hates my WLAN card. I'm waiting for the new version.

@Maedhros:
Thank you for that short comparison.

To your patch: I really like the idea that I can setup starting times.

I like the "...setting their starting dates automatically in particular. :)
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Timetables - a patch, and a request for comments

Post by Yexo »

First about your patch: It is nice to set start dates, so you can actually sync two different networks. But the autoseperation only works for vehicles that can overtake. For example my 4 trams that were only able to drive one circle couldn't autoseperate, because the second vehicle on the line was the third in start date, I'd have had to fix that manually to let the seperate. This is a big pro for the timetable_seperation patch, as that patch reorders the vehicles according to the order they are in. The autoseperation did work fine for a small train network, where trains were able to overtake in stations.
Now you're setting the start dates of all vehicles as soon as you click the button autoseperate, right? Can you change it to only set the start date for vehicles as soon as the come to the first station? That way you don't have problems with vehicles being out of order.

And I have one gerenal comment about timetables: I just find it plain stupid a train can be more late than the total run-time of the timetable! If a timetable takes 100 days to complete, and the vehicle is 120 days late, it should be reset to 20 days late. For example when you're rebuilding some junction, that takes some time, and all your vehicles are 500 days late, then for the next 10 years the timetable is useless as they won't run on time.
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: Timetables - a patch, and a request for comments

Post by Maedhros »

Ok, here's a new version of the patch, which will now keep the order that the vehicles are currently travelling in when separating them. The vehicle whose timetable autoseparate was called from will be the first in the chain, and the start dates will be set relative to that. Start dates are used to determine which order vehicles are travelling in, so this means you should only use autoseparate on the vehicle that has most recently arrived at the first destination, as if another one has arrived after the specified one it will end up at the end of the list. Any vehicles that haven't been started yet will be sorted by vehicle number.
Yexo wrote:And I have one gerenal comment about timetables: I just find it plain stupid a train can be more late than the total run-time of the timetable!
That's something I'd meant to do when I first came up with the idea, but it never found its way into the code. I've included it in this patch, though.
Attachments
timetable_start_dates_and_separation_r12762.diff
(27.95 KiB) Downloaded 310 times
No-one's more important than the earthworm.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Timetables - a patch, and a request for comments

Post by Yexo »

This updated version works good. At least I can seperate a bunch of trams now.
Draakon
Director
Director
Posts: 542
Joined: 11 Mar 2007 16:50

Re: Timetables - a patch, and a request for comments

Post by Draakon »

Rubidium wrote:
zypa wrote:Lame vista excuse --> Can't compile on my own.
What? None of the recent Microsoft C compilers work under Windows Vista? I did know Vista was bad, but THAT bad?
Indeed it is bad witch makes it more bad after their newest news.
_Robbie_
Engineer
Engineer
Posts: 49
Joined: 23 Feb 2008 09:52
Location: Norway

Re: Timetables - a patch, and a request for comments

Post by _Robbie_ »

I'm surprised that there is so little response...
Maedhros - I'll test this patch today and give you some feedback. It's a feature that I've been waiting for for a long time - it actually makes timetables usefull.
Robbie
_Robbie_
Engineer
Engineer
Posts: 49
Joined: 23 Feb 2008 09:52
Location: Norway

Re: Timetables - a patch, and a request for comments

Post by _Robbie_ »

I'm sorry about double-posting, I hope it's ok to do it with 10 hours between posts.

I tested your patch Maedhros and so far it looks great. I got one suggestion though - if I set a start date for a filled timetable, is it possible to make it write when particular orders will start? I mean something like this:

Code: Select all

Timetable begins: 1 January 1950

Go to Puddlefield Central and stay for 10 days     (1 Jan 1950)
   Travel for 15 days                              (11 Jan 1950)
Go to Lake Fidgetton and stay for 5 days           (26 Jan 1950)
   Travel for 15 days                              (6 Feb 1950)
...or something similar. I believe it could make synchronizing timetables easier.
Robbie
Youri219
Traffic Manager
Traffic Manager
Posts: 191
Joined: 28 Apr 2007 11:53

Re: Timetables - a patch, and a request for comments

Post by Youri219 »

What I also wondered is what the difference between the following is:

Travel to station A for 10 days
Stay at station A for 90 days
Travel to station B for 10 days
Stay at station B for 90 days

or

Travel to station A for 50 days
Stay at station A for 50 days
Travel to station B for 50 days
Stay at station B for 50 days

Isn't it better to merge the travel and stay, so you don't have to enter 2 times for each station?
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Timetables - a patch, and a request for comments

Post by frosch »

@Youri219:
Imagine you have a station that supplies only a few passengers, so that full load takes too long, and no full load results in too few passengers transported. In such cases I usally tell the vehicle to stay some days for loading. However the "travel time" is left blank, as I do not care how long the vehicle travels.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
charlymorton
Engineer
Engineer
Posts: 45
Joined: 08 Nov 2005 12:33
Location: Bergen
Contact:

Re: Timetables - a patch, and a request for comments

Post by charlymorton »

frosch wrote:@Youri219:
Imagine you have a station that supplies only a few passengers, so that full load takes too long, and no full load results in too few passengers transported. In such cases I usally tell the vehicle to stay some days for loading. However the "travel time" is left blank, as I do not care how long the vehicle travels.
But, let's say it takes 10 days to travel A-B and it's set to stay at station B for 90 days, before travelling back and then staying at station A for another 90 days, totalling 200 days for that schedule.
If the schedule is set to travel for 50 days and then staying for another 50 then in my experience, when I last played with timetables, the train will arrive at station B 40 days early, and then stay those 40 in addition to the 50 it's supposed to stay.
Therefore it should make a difference whether the schedule is set to 10+90+10+90 days or 50+50+50+50 days.
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: Timetables - a patch, and a request for comments

Post by Maedhros »

Youri219 wrote:Isn't it better to merge the travel and stay, so you don't have to enter 2 times for each station?
This way is more flexible, as it allows you to timetable only the time spent at stations. You might not care how long a vehicle takes to get there, but you want it to stay for a certain amount of time once it does. If you combine them, you always have to care how long the vehicle takes to travel as well.
No-one's more important than the earthworm.
Teeg
Engineer
Engineer
Posts: 55
Joined: 31 Jul 2007 23:57

Re: Timetables - a patch, and a request for comments

Post by Teeg »

Hello there!

I don't mean to be rude, but I'm having a great deal of trouble getting this patch to work. Could I possibly get you to spell out precisely how it's meant to be deployed? I keep getting trains with start dates out of order, even when it's completely impossible for them to overtake. Meanwhile, my trams keep bunching no matter what I do.

I've been following the instructions I've gleaned from this thread (only distribute based on a vehicle leaving the first station), but that either has no effect [as per trams] or does wacky things like set up start dates that make the next train two years early even though the route is only four months long. [as per trains]
peebee
Engineer
Engineer
Posts: 31
Joined: 08 Feb 2008 13:02

Re: Timetables - a patch, and a request for comments

Post by peebee »

I've got a problem with the new seperation patch. All works fine for the first "ingame-days", but then it seems as if the trains are ignoring the seperation. This problem can't be solved by clicking the "Automatic Seperation"-button. All I want is an automaticly sepereration of my trains, even if I add one or more trains to the timetable.
Last edited by peebee on 28 Apr 2008 12:56, edited 1 time in total.
broodje
Director
Director
Posts: 615
Joined: 13 Jul 2003 12:47
Location: Alphen aan den Rijn
Contact:

Re: Timetables - a patch, and a request for comments

Post by broodje »

Hear! Hear! that is exactly what I want, I do not want a timetable, I want a properly separated flow of trains. I do not really care if that is done with a timetable or anything else, but I rather don't spend to much time on it.

The problem with most patches start when you ad more trains to a group of shared trains, or start replacing engines. I currently have over 200 trains on my network, and I rather not spend hours on separating everything again as soon as I replace some trains with faster trains*. In fact it doesn't even have to be faster trains, even more horsepower can completely ruin a tt.

[*] at the other hand, the traffic jams around Birmingham and Leeds are of course a good duplicate of the real thing ;).
User avatar
Toni Babelony
Tycoon
Tycoon
Posts: 1389
Joined: 07 Jul 2006 09:34
Skype: toni_babelony
Location: Sagamihara-shi, Japan
Contact:

Re: Timetables - a patch, and a request for comments

Post by Toni Babelony »

Regarding late running trains with a with a waiting order of some time, are they making up the lost time while waiting?

For example:

- Sta. A: 1 day;
- Travel to B: 6 days;
- Sta. B: 1 day;
- Travel to C: 5 days;
- (...)
- Sta. F: 32 days;
- Travel to G: 6 days;
- etc.
- etc.
--Running 6 days late

Can that train make up the lost time at Sta. F by cutting 6 days off the 32 waiting days?
Retired JapanSet developer and creator of TIAS.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 11 guests