Automated timetables and separation

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

User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1264
Joined: 15 Feb 2003 17:32
Location: Villefranche-sur-Saône, France

Re: Automated timetables and separation

Post by MagicBuzz »

Alberth wrote:
NCarlson wrote:With respect to time tabling, I have consistently failed to get any form of time tabling working in my games. Until I see something that actually works, I won't spend time on it.
About this sentence, I disagree.

At least parts of this patch works fine.

The timetable based separation feature (this implementation and mine, a few months before) works just fine and is absolutely fantastic to keep clean passenger lines.

Two things are possible : you don't think it's usefull, and you didn't even correctly tried it ; or the patch has effects different than which ones you expect for.

But globally, this patch works just fine, and most features (the most usefull ones) just works perfectly.

jungle
Engineer
Engineer
Posts: 76
Joined: 17 Dec 2004 23:40
Location: UK

Re: Automated timetables and separation

Post by jungle »

The issue with the patch is that it doesn't generally work on complex rail or tram layouts, for unclear reasons. I tried to reduce this to a simple example above some time ago (and failed).

On any complex and/or busy layout, you just end up with trains sitting in stations believing they are several months early, for whatever reason. This blocks the trains behind, which extends the timetable, causing other trains to wait, further extending the timetable (etc etc etc)...

I had thought this was because two separately timetabled routes sharing track obstructed each other. Every time a vehicle on one route occupied the platform for the timetable to catch up, it would delay the other route, causing it to make its timetable slightly longer, and this would just escalate over time.

However, I now think the bigger issue is when a train is overtaken by a second train on a multi-track section. The auto separation seems to want the second train to wait until the first train is in front again. This is often impossible, since the pathfinder usually wants to send them both to the same platform.

It's quite easy for this to become unfixable on a network. Once a route becomes unbalanced (i.e. disruption causing all the trains to get stuck in one area) the automated timetable cannot fix it. This is because the long waits at stations needed to even out the timetable cause the trains behind to reverse, taking unexpected routes and again getting themselves into the 'wrong' order (Train 2 stuck in front of Train 1 again).

Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Automated timetables and separation

Post by Yexo »

MagicBuzz wrote:Why not creating an AI API in order to allow AIs to use the separation feature ?
Most of the time, I see AIs building vehicles that are not correctly separated, and they have bad ratings, while I have better rattings with a fewer vehicles on the same line.

In programmation terms, I'm not sure, but I think it may be changed in a few lines of code.
This is useful and even needed when it hits trunk, but before that it's not so useful. It'll requires changes to every AI and I'm not sure any AI developer wants to change their AI when it's only useful with a certain patch. Even more because they'll have to take special care not to call these functions in a trunk build or it'll crash their AI.

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

Re: Automated timetables and separation

Post by Alberth »

MagicBuzz wrote:
Alberth wrote:
NCarlson wrote:With respect to time tabling, I have consistently failed to get any form of time tabling working in my games. Until I see something that actually works, I won't spend time on it.
About this sentence, I disagree.
The next time, please quote correctly. NCarlson did not say that, I did.
MagicBuzz wrote:Two things are possible : you don't think it's usefull, and you didn't even correctly tried it ; or the patch has effects different than which ones you expect for.
Oh I do think it is useful, it just doesn't seem to do anything.
I don't exclude the possibility that I am doing something wrong, that I am looking in the wrong direction, or even that my enabled breakdowns throw in so much troubles that the time tables have no chance of straightening things out.
MagicBuzz wrote:But globally, this patch works just fine, and most features (the most usefull ones) just works perfectly.
Glad it is working for at least one player :)

Creat
Traffic Manager
Traffic Manager
Posts: 141
Joined: 26 Oct 2009 16:33

Re: Automated timetables and separation

Post by Creat »

The patch works just fine, but it has severe limitation (due to which I don't use it anymore). Once you enable atomated separation for a group of vehicles sharing a certain orde list it will space them out nicely.
BUT: if you have an order that sends a vehicle to depot for maintenance ("maintain if needed"), it will fail and do nothing.
This limitation along with the potential problems with vehicles overtaking each other (already described above) were enough for me not to use it anymore, especially coupled with the fact that the initial developer is no longer active. Even though I desperately want something that does what this patch has set out to do...

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

Re: Automated timetables and separation

Post by Eddi »

I have had a glimpse of testing this patch (in Chill's PatchPack), and have some (to me) immediately obvious suggestions:

first of all, when un-automating, keep the autofilled timetable by default, use ctrl+un-automate to delete the timetable.

second, have the ability to manually interfere with the automatisation. give a frequency ("this timetable should be exactly X ticks long", or "a vehicle should leave here every Y ticks"), and explicitly select the stations where a vehicle may wait longer to adjust the timetable. this should facilitate the introduction of periodic meeting points. on shared train stations, you might want to synchronise the timetables. or on shared tram lines you might want to disallow waiting, to not disturb the other line (since trams can't overtake).
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: Automated timetables and separation

Post by Dimme »

I really like those ideas Eddi!
About synchronisation at stations, this can be done:
at station x, match timetable with timetable y

It can perhaps be done rather simply as an order, and then let the timetable adjust to timetable y by adding slack at some chosen station like Eddi says, or there could be some more global optimization.
Try my modular airports minigame!

Image

User avatar
JamieLei
Tycoon
Tycoon
Posts: 7433
Joined: 10 Jan 2007 18:42
Location: Stratford, London

Re: Automated timetables and separation

Post by JamieLei »

I'm using the Chill patchpack and I know I should report there rather, but on a game with over 150 trains, it seems that it fails to work after a specific period of time. This could also be related to the fact I keep putting the clock back every 10 years to reset to the year 2000. Would this have an effect?
Any opinions expressed are purely mine and not that of any employer, past or present.

User avatar
snowie
Engineer
Engineer
Posts: 14
Joined: 06 Feb 2009 18:09
Location: Kraków, Poland
Contact:

Re: Automated timetables and separation

Post by snowie »

Dimme wrote:I really like those ideas Eddi!
About synchronisation at stations, this can be done:
at station x, match timetable with timetable y
Yeahh, that's what i need the most now. I think about it for some time. I've got network with about 40 lines (average 7 trains on each line). Designed timetibles in a way so I can synchronise everything. I was synchronising lines manually. Stopping the "group leader" train on first station, waiting to proper moment and reseting it's delay. First it was everyting ok and nice, but after some time some lines had moved without my ingerence. After longer time everything was desynchronised, so this work is not worth to do.

User avatar
Level Crossing
Tycoon
Tycoon
Posts: 1187
Joined: 07 Feb 2011 22:04
Location: East Coast, United States

Re: Automated timetables and separation

Post by Level Crossing »

Maybe something like, at station X, do not leave until train from group Y arrives?
Like my avatar? See my screenshot thread

User avatar
snowie
Engineer
Engineer
Posts: 14
Joined: 06 Feb 2009 18:09
Location: Kraków, Poland
Contact:

Re: Automated timetables and separation

Post by snowie »

Or just to set a date, on which the timetable will begin, and with every repeating that date uprades ONLY by SIMPLE adding the EXACT timetable lenght (or its multiple), and not changing without any known reason, even when the train go to a depot and stay there for few years. That would be satisfying for me.

xav
Engineer
Engineer
Posts: 1
Joined: 25 Aug 2011 07:14

Re: Automated timetables and separation

Post by xav »

Here's an update against r22816. I'm new to all this, so I don't know if I should have asked for permission, nor what to call the new version. The last was v0.72, so I guess this is v0.73. I just love this patch so much, and I wouldn't know what to do without it.

No significant changes, although the interface is updated to the version in Chill's patch pack. Also grays out "automate" in timetable if that's not enabled in the settings.

This was compiled on OSX successfully. Tell me if you have problems.

patch with -p0, not -p1 as in the original.
Attachments
automated-timetables-and-separation-v0.73_trunk_svn_r22816.patch
Against 22816. Use -p0.
(29.42 KiB) Downloaded 119 times

Birdbrain
Engineer
Engineer
Posts: 4
Joined: 02 Nov 2011 00:19

Re: Automated timetables and separation

Post by Birdbrain »

Hi.
I know I am going out on a limb here, but is there any cind person out there that has the heart to post a compilation of this patch for win64?
I know that this probably dosent give me any credits om the popularityboard but having read about the process to compile this together with the tools I have to get for a (hopefully) one-time use lead me to hope someone could help me out.
I alsp know that this is in a patchpack that is compiled, but there is another patch there I really dosent want and I cannot turn it off.

User avatar
ChillCore
Tycoon
Tycoon
Posts: 2664
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Automated timetables and separation

Post by ChillCore »

Birdbrain wrote:Hi.
Hello.
I know I am going out on a limb here, but is there any kind person out there that has the heart to post a compilation of this patch for win64?
I know that this probably doesn't give me any credits om the popularity board but having read about the process to compile this together with the tools I have to get for a (hopefully) one-time use lead me to hope someone could help me out.
You should get the tools ... really, you will not regret doing so even if it takes some time. ;)
Once you set up the compiler properly, you can compile pretty much any patch you would like to test with minimal efforts.
I also know that this is in a patchpack that is compiled, but there is another patch there I really do not want and I cannot turn it off.
[offtopic]
Just out of personal interest: what patch, in whatever patchpack you speak about, would you like to be able to disable?
[/offtopic]
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.

Birdbrain
Engineer
Engineer
Posts: 4
Joined: 02 Nov 2011 00:19

Re: Automated timetables and separation

Post by Birdbrain »

You should get the tools ... really, you will not regret doing so even if it takes some time. ;)
Once you set up the compiler properly, you can compile pretty much any patch you would like to test with minimal efforts.
You are probably right, but right now I am revisiting this game after some years away from it to see why I stopped playing it. Turned out it was the lack of the features in this patch, so for the initial testing to see if I really should pick it up I rather would not get that.

[offtopic]
Just out of personal interest: what patch, in whatever patchpack you speak about, would you like to be able to disable?
I have only found chill's compiled and it is the Cargo distribution I am not ready for yet.
[/offtopic]

User avatar
Level Crossing
Tycoon
Tycoon
Posts: 1187
Joined: 07 Feb 2011 22:04
Location: East Coast, United States

Re: Automated timetables and separation

Post by Level Crossing »

Set distribution type to manual (as opposed to symmetric or unsymmetric).
Like my avatar? See my screenshot thread

dbkblk
Traffic Manager
Traffic Manager
Posts: 154
Joined: 29 Mar 2008 18:38

Re: Automated timetables and separation

Post by dbkblk »

This patch is really wonderful ! It should be in trunk as it is ESSENTIAL for passengers / mails.
Does the recent versions (the last year) have fixed the fact that autoseparation does not work with depot and control point orders ?

Thanks,

oberhümer
Tycoon
Tycoon
Posts: 1285
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: Automated timetables and separation

Post by oberhümer »

I believe not, just give this a shot instead.
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---

User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 283
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: Automated timetables and separation

Post by ColdIce »

Hi,

I will be a jerk, but i dont have other option. for 4 days i tried to make this to trunk, but i failed everytime. I dont have c++ skills at all and I dont understand the language. all i did was to modify some lines in the patch, but was useless.

So here I am, asking if someone have the time and knowledge to bump this to trunk, please. thank you very much.
ImageImage

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

Re: Automated timetables and separation

Post by Alberth »

Current trunk has moved in the mean-time, so merging with it is non-trivial to say the least.
Applying the patch to the revision it was created for (usually some rABCDE number in the filename) should be trivial and compilation should work immediately.
Why not try that instead?

It should give you a good idea of what the patch does.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests