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

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 »

Yes

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 »

Rubidium wrote:Yes
That's a quick comment ^^ Thanks! *continues experimenting*

God, this patch is so awesome with PBS and Pax. Destinations! I'll post some screenshots when my first mainline with branches is completed! (Timing the express trains between the slow trains will give me a headache)
Retired JapanSet developer and creator of TIAS.

User avatar
Ameecher
Tycoon
Tycoon
Posts: 11911
Joined: 12 Aug 2006 15:39
Location: MK UK
Contact:

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

Post by Ameecher »

Is this available in ticks as well because I use the timetable feature with ticks rather than days as using days in conjuction with the day length patch means that times are longer than I want.

Nice idea though, finally an organised network! :o
Image

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 »

I've got a suggestion for this patch. It might be hard to code, but it would come in very handy when planning a network. Especially when you have a lot of trains on the go!

How about making a graphical timetable where you can see if all trains are balanced and when they are occupying any tracks? This site explains it a bit further: http://www.hacon.de/tps/index.shtml Also a website which might help with the coding works: http://wiki.tcl.tk/19893

This might have been suggested before, but I'm sure this feature would come in very handy.
Retired JapanSet developer and creator of TIAS.

peebee
Engineer
Engineer
Posts: 31
Joined: 08 Feb 2008 13:02

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

Post by peebee »

Maybe I'm just to stupid for this patch, but it still will not work correctly. Can anybody explain how to adjust the timetable the way that the trains with the same timetable will be evenly spread?

Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4754
Joined: 09 Sep 2007 05:03
Location: home

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

Post by Alberth »


peebee
Engineer
Engineer
Posts: 31
Joined: 08 Feb 2008 13:02

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

Post by peebee »

Thanks for the link but the problem is, that the patch explained on that page (the "orginal" timetable-patch) has the timetable based auto-separation patch included. In case of Maedhros' patch this kind of seperation isn't included. That's why I'm looking for the correct adjustment of this patch to have both timetables and auto-seperation.

Teeg
Engineer
Engineer
Posts: 55
Joined: 31 Jul 2007 23:57

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

Post by Teeg »

Here's how I'm working it at present:

1) Have a vehicle run the route and autofill the timetable. Let it keep running through a second circuit.
2) Buy the other vehicles you want to run on the route, and add them to the cycle so they're following the first vehicle.
3) When the first vehicle arrives at the first stop, hit the "automatically separate" button. The other vehicles will be assigned proportionate start dates and they'll separate automatically.
Attachments
firstloop.png
The first vehicle makes a circuit of the route with Autofill turned on.
(337.68 KiB) Downloaded 239 times
releasetherest.png
Release the other vehicles so they follow as closely behind the first vehicle as possible.
(354.29 KiB) Downloaded 214 times
autosep.png
When the first vehicle arrives back at the first station, press the Automatically Separate button. The other vehicles will then be assigned proportionate start dates.
(350.35 KiB) Downloaded 240 times

peebee
Engineer
Engineer
Posts: 31
Joined: 08 Feb 2008 13:02

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

Post by peebee »

Thanks für your help.

_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_ »

Hi Maedhros! I hope you didn't give up this idea...From what I've seen it's working fine already, so this might be the reason for few comments :).
Robbie

St256
Engineer
Engineer
Posts: 32
Joined: 20 Jul 2007 11:03

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

Post by St256 »

Maybe this is more a general timetable problem, but as you are already improving the timetable functionality, you may also have an easy fix for it:

A train is scheduled to stay for a given time at a passenger station.
It arrives at the station, loads all waiting passengers.
During loading, additional passengers arrive -> The train loads the additional passengers, waiting time is up.
While the train loads the passengers, additional passengers arrive -> The train loads the additional passengers.
While the train loads the passengers, additional passengers arrive -> The train loads the additional passengers.
...

This continues until the train is full or (by change) no passengers arrive while loading the already waiting ones and completely destroys the timetable.
The same example is also valid for cargo stations with high throughput (e.g. transfer stations).

As a solution, if a timetable is set, loading of cargo/passengers should only be done while the train is not late. I am aware that this might result in cargo left back at the station, but if the waiting time is set reasonably high, the train should be filled to a good percentage (even full?) and also keep to its timetable.

User avatar
Roest
Traffic Manager
Traffic Manager
Posts: 215
Joined: 03 Apr 2008 08:18

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

Post by Roest »

Maedhros are you still maintaining this?

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 »

I'm not at the moment, but I'll revisit it after my exams finish in a few weeks.
No-one's more important than the earthworm.

bokkie
Transport Coordinator
Transport Coordinator
Posts: 326
Joined: 19 Jan 2007 19:26

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

Post by bokkie »

I use timetables to automagically seperate vehicles (busses) so thanks for your patch (used Magicbuzz's patch earlier), it didn't work the way I expected in the first few minutes I tried it but with the explanation above it'll probably work out (will comment later on that!).
There is one question I have: since the driving and loading don't always take the same amount of time, loading times can be adjusted upwards to give vehicles time to compensate for this. The downside of this is that stations get clogged. Adding bays parallel or serial doesn't always work that good because vehicles don't behave that intelligent when looking for free bays. The solution I thought of is adding a visit to the depot at the end of the timetable, with a set waiting time. I'd prefer them to wait there instead of on a crowded station, which happens often at end of lines in my network. The problem is that it is not possible to set a waiting time at depots... is there a better solution which I'm overlooking or would that be a good addition to the current system?

EDIT: auto-seperation didn't seem to work good but I believe it's a problem with the version I'm using in Roest's Patchpack v9.

Eddi
Tycoon
Tycoon
Posts: 7426
Joined: 17 Jan 2007 00:14

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

Post by Eddi »

i have updated this patch to r14005

made a class of the SetDateWindow

PS: why is this thread not in Development?

edit: tiny error with saveload.cpp
Attachments
timetable_start_dates_and_separation_r14005.diff
(28.19 KiB) Downloaded 110 times
You might not exactly be interested in Ferion, but if you are, have fun :)

PhilSophus
Chairman
Chairman
Posts: 776
Joined: 20 Jan 2007 12:08
Location: Germany

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

Post by PhilSophus »

I'm working on a patch with working title "real timetables". Among others, it should make it easier for the player to create a system of highly synchronized timetables and lines with fixed train headway.

For that it would be quite practical, if I could use part of the patch in this thread (mainly the start date stuff).
Is that okay?

Of course, due credit will be given and my resulting patch will be published in the forum when it's done (quite soon probably).
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008

User avatar
Brianetta
Tycoon
Tycoon
Posts: 2566
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

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

Post by Brianetta »

PhilSophus wrote:For that it would be quite practical, if I could use part of the patch in this thread (mainly the start date stuff).
Is that okay?
I think you can probably take it as read that a published patch against software licensed under the GPL, is also GPL.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED

PhilSophus
Chairman
Chairman
Posts: 776
Joined: 20 Jan 2007 12:08
Location: Germany

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

Post by PhilSophus »

Brianetta wrote: I think you can probably take it as read that a published patch against software licensed under the GPL, is also GPL.
I know, but I consider it good style to ask anyway (at least to keep the original author informed).

I attach the current version of the patch (as posted by Eddi) updated to current trunk r14108.
Attachments
timetable_start_dates_and_separation_r14108.diff
(27.84 KiB) Downloaded 113 times
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008

Mondane
Engineer
Engineer
Posts: 14
Joined: 09 Jul 2007 13:23

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

Post by Mondane »

Maybe this patch can collaborate with http://www.tt-forums.net/viewtopic.php? ... h&start=80 (Timetable based separation patch)

PhilSophus
Chairman
Chairman
Posts: 776
Joined: 20 Jan 2007 12:08
Location: Germany

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

Post by PhilSophus »

evaarties wrote:Maybe this patch can collaborate with http://www.tt-forums.net/viewtopic.php? ... h&start=80 (Timetable based separation patch)
You may want to look at the patch I just released, since it "steals" features (and code) from both patches.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008

Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 7 guests