Page 3 of 3

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 14 Apr 2012 13:51
by AndiK
Thanks for the proposed fix. :-) I'll look into it.

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 28 Jun 2013 20:07
by aantono
Now, that CargoDist is integrated into truck, can there be an updated patch diff against it, as it would be very great to use combined with cargo-dist.

Thanks

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 29 Jun 2013 03:02
by bokkie

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 09 Jul 2013 14:42
by MagicBuzz
I still haven't tested this patch, but I hope it will be integrated to trunk as soon as possible.

As the "father" of the idea (I wrote the first timetable separation patch) I'm conviced that this feature is needed as soon as you try to make a passenger and mail network.

I was very surprised the cargodist was integrated first, as IMHO cargodist is absolutely useless without timetable separation (link graph will compute very badely when having all the vehicles running together instead of being separated along the path).

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 09 Jul 2013 14:55
by MagicBuzz
I'm not sure to understand...

Is that the patch already integrated to trunk ?

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 09 Jul 2013 15:10
by ChillCore
Yes, autoseparation for vehicles with shared orders is in trunk. ;)

The provided link is just the HG repository instead of the SVN one, otherwise it is exactly the same code and commits.

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 09 Jul 2013 15:18
by MagicBuzz
Hmmm :bow:

Ok, I downloaded the last trunk binary.

I see the "CTRL + Click" tip, but... My vehicule don't get separated ?(

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 09 Jul 2013 15:22
by Transportman
MagicBuzz wrote:Hmmm :bow:

Ok, I downloaded the last trunk binary.

I see the "CTRL + Click" tip, but... My vehicule don't get separated ?(
It sets the start dates for all vehicles with the same shared orders and separates based on that. So you need to actually start your vehicles to get them to separate (by late/earliness at the first order).

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 09 Jul 2013 15:27
by ChillCore
Do you have a comletely filled timetable?
Without that vehicles have nothing to base their start dates on.


Also,
Not sure if this is the place to discuss recent trunk; I have absolutely no clue which version of the feature made trunk myself.

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 09 Jul 2013 15:40
by MagicBuzz
I did some deeper tests and... As far as I see, it doesn't work.

As soon as I use "autofill" timetable, the separation stops. And when I enable it again, it looks like to work for a few seconds then... doesn't separate anything ?(

Thus, "ctrl + click" is somewhat an "hidden" feature. And... I still haven't understood why I should type a "start date" to make the separation.

May I don't use it properly, but at this time, it really need a documentation, I guess.

-- Edit : Oh, I think I understood the way it "works". Well the guy who wrote this didn't understand anything about separation based on timetable.

It I understand, as soon as the timetable changes (new station, new path, etc.) then we must set a new start date, then ctrl+click again ?
The same when buying/replaceing/selling a vehicle ?

This isn't what I call a "timetable based separation". It's just a "timetable based start time" or another stuff like this.
The "start time" must be recomputed automatically each time there is a change on the timetable, or when adding/changing/removing vehicles from the shared orders.

I just hope this is a "pre-release" and not the final implementation.
For me, autosepration should not be linked to manual start date, and start date of any but the first one vehicle of the shared orders list should be recomputed automatically each time timetable changes or vehicle number changes.

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 09 Jul 2013 21:03
by Eddi
MagicBuzz wrote:This isn't what I call a "timetable based separation". It's just a "timetable based start time" or another stuff like this.
The "start time" must be recomputed automatically each time there is a change on the timetable, or when adding/changing/removing vehicles from the shared orders.
maybe "semi-automatic distribution of start times" is a better description. anyway, after changing the timetable, just ctrl+click on start date again, and it will re-separate. without timetable change, no need to adjust anything (provided you have enough buffer time and places to overtake at the waiting stations)

it certainly is the most minimalistic way to implement the feature, but it IS a great help (if you can use the feature correctly).

it may need a step backwards if you used the old "fire and forget" kind of autoseparation, but i always felt that this was over the top and not sensibly usable if you have more than one line.

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 10 Sep 2013 11:47
by habnabit
Hi! I registered here to post about this.

I've updated the patch so that it cleanly applies against current OpenTTD trunk (as of writing this, r25755). I also fixed a couple of minor bugs and added a feature: the timetable separation will tell you if the timetable is incomplete (and thus separation won't happen) instead of showing initializing/running.

All of my work is posted to github. (The branch is named 'tut' because 'trunk-uniform-timetabling' is too long.) For convenience, I'm also attaching the patch against current trunk.

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 13 Sep 2013 14:14
by MasterMeNL
Thanks a lot habnabit!
I assume I can also patch it against 25760 since the only changes are basically translation and a bugfix. I'll report back if it works.
Works perfectly!

The control+click feature on regular OpenTTD is pretty useless, it still requires you so send everything to depot and release them all manually to be on schedule or wait a year for them to catch up.

Really, why is this not in trunk yet? Maybe disable it by default if "this makes the game too easy". But manual timetables are just a chore and not hard to do at all, just takes a lot of time.

Edit: made a thread for compiled combined patch stuff here in case someone needs it.

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 15 Oct 2013 19:58
by AndiK
Hi all,

thanks for maintaining (& using) my patch. :) Much appreciated. I neither have time nor motivation to do it myself.

Edit:

@ MasterMeNL:
Could you elaborate on what you mean by useless Ctrl+Click / Waiting a year? I don't quite understand. Maybe I can help. :)

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 16 Oct 2013 09:36
by zooks
AndiK wrote:Hi all,

Edit:

@ MasterMeNL:
Could you elaborate on what you mean by useless Ctrl+Click / Waiting a year? I don't quite understand. Maybe I can help. :)
He's talking about the recent trunk feature to separate vehicles based on their timetable. If you ctrl-click on start date, it computes separation for all vehicles and sets start dates accordingly. However, it often takes a while for the vehicles to catch up with their new timetable start dates. See http://vcs.openttd.org/svn/changeset/25377/

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 16 Oct 2013 09:40
by AndiK
Ah, thanks. I seem to be a bit out of touch. ^_^

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 22 Jan 2014 20:48
by KeldorKatarn
I don't get why such a crappy version was added to trunk. I'm using that other auto-seperation patch (never saw this one unfortunately as it is not used in any patchpacks which I used for reference to look into patches, but it seems to do the same on auto-mode, or possibly that part is even the same code), and that is easy to use and works fine. I go to the timetable, click on automate and the rest is handled for me. No strange CTRL-Click or any other hidden stuff. Really don't get this one... The UI in the first post and the description of the feature sound great. Honestly I cannot see how any normal player would ever wrap his head around the current time table UI anyway. I don't even think that should be in there. it's WAY too complicated and too much micromanagement.
This automation is exactly what is needed and it should be easy to use and clearly visible. I would even make that the default UI and hide all the manual stuff back behind some "advanced" button. The standard player will never use that. It is just too much work and nobody gets it at first glance.

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 18 Nov 2015 18:22
by Karmorak
Hi AndiK,
I have al little question, do you can upload an ready zip file with the patch and so on. Because i cant programming.
PS. sry my enlgish is not so good.
MfG Karmorak

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 10 Jan 2016 14:52
by KeldorKatarn
I found a problem with this patch. If the first order in the list is a "via" order, e.g. for ships with buoys that can happen a lot,
then the separation never initialized. If I simply move the orders around so the first one is a loading order it works, despite the ordering of the orders themselves not having changed. I'll look into how to fix that but it definitely is an issue.

Re: [Patch] Slim Timetable Separation (new V60 out)

Posted: 11 Jan 2016 12:59
by KeldorKatarn
This should fix it (as long as there's at least one station in the orders list...)

Code: Select all

	/* If all requirements for separation are met, we can initialize it. */
	if (_settings_game.order.automatic_timetable_separation) {
		int first_load_order_index = -1;

		for (int i = 0; i < this->orders.list->GetNumOrders(); ++i) {
			Order* order = this->orders.list->GetOrderAt(i);

			if (order->IsType(OT_GOTO_STATION) && !order->IsType(OT_IMPLICIT)) {
				first_load_order_index = i;
				break;
			}
		}

		if (this->IsOrderListShared() &&
			this->orders.list->IsCompleteTimetable() &&
			(this->cur_implicit_order_index == first_load_order_index)) {

			if (!this->orders.list->IsSeparationValid()) {
				this->orders.list->InitializeSeparation();
			}
			this->lateness_counter = this->orders.list->SeparateVehicle();

		}
	}