Advanced Timetable (Auto Seperate Vehicle)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Advanced Timetable (Auto Seperate Vehicle)

Post by l_Blue_l »

I have had this idea forever and now with timetables it should be much simpler to complete.

What this patch would do is allow you to set shared orders to auto seperate vehicles. This will work by letting your vehicle wait for a given about of time at a station to achieve the separation between vehicles. This will be achieved in 2 ways.

The first way is the to use the average travel time of the vehicles to calculate the preferred amount of time between vehicle's.

The second way to preset a minimum (and maximum) preferred time between vehicles.

New Features:

Average travel time between orders
Auto seperate Vehicle


An examples of this is:

You have a coal mine attached to a station and you set the auto separation to 20 days at that station. Lets say you just build 5 trains and let them all go at once. What would happen is the vehicles would go to the station and every 20 days one of the vehicles will leave the station.

Another example would be you have two cities with bus stations in them and 3 vehicles traveling back and forth between the cities. For this you could set Auto Separation on and from the average amount of travel time the vehicles would then seperate. Let say it take an average of 60 day to go between the two stop this mean it would mean the preferred separation of the vehicles would be 20 days each (60 days / 3 vehicles).

I understand Timetables has just been added to the trunk and there could be further development currently happening that i am unaware of so please let me know if know of any.

Also please let me know what you think of this and don't be scared to post you thoughts or ideas about this patch or ways i could improve upon this idea.

Edit:

Advanced Timetable v0.5 r 10403
Last edited by l_Blue_l on 01 Jul 2007 05:50, edited 1 time in total.
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Post by l_Blue_l »

Update: I have edited the display to now show two lines after the station in the timetable this new line is currently used to show the average amount of time of travel.

On the subject of average how should the averages be calculated? I was thinking something along the lines of Average time = ((Average time / (number of Vehicles + 1) + Travel time / (number of Vehicles + 1) )) * ((number of Vehicles + 1) / 2)
Attachments
Auto-Seperate-Vehicle.PNG
Auto-Seperate-Vehicle.PNG (8.69 KiB) Viewed 6960 times
User avatar
Ailure
Route Supervisor
Route Supervisor
Posts: 435
Joined: 26 Apr 2005 19:06
Location: Sweden

Post by Ailure »

Funny, I was just gonna post a suggestion about having average travel times in timetables, and someone already done that. :lol: Measuring manually isn't exactly fun. :roll:
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Post by Maedhros »

Personally I'd rather see the average in brackets after each time, as that means you could see the average waiting time at stations too without making the display too hard to read.
No-one's more important than the earthworm.
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Post by l_Blue_l »

I agree i just wanted to to work out the display (it somehow confused me for a little while) and am still yet to fully work out how the new options will be set in the window. All i know so far is there will need to be a way to display the average Travel times (and average station dwell times toot), set / display which stations vehicles are allowed to wait at and set two new variables Min / Max for All Station.

So i think the average times will be placed in brackets after each time and the Min / Max placed after the station. Hmm does that mean i made a new line for nothing, meh maybe i will find a use for it.
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Post by l_Blue_l »

I have fixed up the display and now the average times are next to each time and look down the bottom next to the late counter it has the current travel time since arriving or leaving a station.
Attachments
Auto-Seperate-Vehicle2.PNG
Auto-Seperate-Vehicle2.PNG (8.64 KiB) Viewed 6716 times
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Post by l_Blue_l »

Another update. Here is what it looks like now. After i clean up the code (and updated it to the current revision *runs and hides*) i should be able to release what i have currently done so it shouldn't be to long now till it can begin being tested. (ps i am still working on the timetable window)
Attachments
Auto-Seperate-Vehicle3.PNG
Auto-Seperate-Vehicle3.PNG (8.74 KiB) Viewed 6577 times
User avatar
NukeBuster
Traffic Manager
Traffic Manager
Posts: 222
Joined: 04 Jan 2006 18:16
Location: Alphen aan den Rijn, The Netherlands
Contact:

Post by NukeBuster »

This is a great patch, it really saves much hassle separating buses manually :D. I'd really like to try the patch.
NukeBuster

Transport Empire: The Transport Empire Linux effort
Join the Transport Empire IRC channel: [url]irc://irc.oftc.net/transportempire[/url] !

OpenTTD patch(es): Password at join
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Post by peter1138 »

It's 'separate', by the way ;-)
He's like, some kind of OpenTTD developer.
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Post by l_Blue_l »

Advanced Timetable v0.5

Features:
Average travel times
Current travel time
Minimum Station wait time
Maximum Station wait time
Minimum separation between vehicles
Maximum separation between vehicles

To-do list:
Implement more advanced average travel time
Implement Auto-Separate based on Average travel times
Improve the timetables window
Fix up coding style and add comments

Bugs:
Unknown

Edit: Development on hold until Routes has been developed
Attachments
Advanced_Timetable_v0.5_r10403.diff
(31.03 KiB) Downloaded 402 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Baidu [Spider], Semrush [Bot] and 23 guests