[patch] Wait for half load

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
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

[patch] Wait for half load

Post by adf88 »

This patch adds new order loading modifier - wait until half load. If set, vehicle will wait until total amount of loaded cargo is 50% or more then total vehicle capacity.
half_load.png
half_load.png (13.8 KiB) Viewed 1461 times
Attachments
wait_for_half_load_v1_r27189.diff
(13.74 KiB) Downloaded 45 times
:] don't worry, be happy and checkout my patches
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: [patch] Wait for half load

Post by Eddi »

(i've said all this before)

i find the whole idea to add more order modifiers ill-conceived. because you only ever cover that narrow use case that you had in mind, and not the thousands of other use cases that other people have.

what should be done (imo) is, right before leaving a station, to evaluate the next order, including all conditional orders, and go back to the loading phase if the result is the same station as before.

take for example the following use case:
  1. go to A
    -> travel for 40 days
  2. go to B, no loading, wait for 10 days
  3. go to B
    -> travel for 40 days
  4. go to A, no loading, wait for 10 days
this would allow adding buffer times in your schedule without the cargo value decaying during that time.

[also, timetables could use the function to differentiate "travel for 0 days" vs. "there is no time scheduled for this". currently you need to puzzle things together with random 1 day times]
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: [patch] Wait for half load

Post by Alberth »

Instead of an ever increasing number of options to the one order that we have now, I believe it would be beneficial if we can have several smaller orders that can be executed at the same time, eg

* a load order
* a wait order
* an unload order
* a goto order (or a leave order and an arrive order perhaps)
* a refit order
* a 'visit' order (eg waypoint or implicit station)
etc

That would make the order system more modular, hopefully giving more room to express what you mean.
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Wait for half load

Post by adf88 »

Eddi wrote:i find the whole idea to add more order modifiers ill-conceived. because you only ever cover that narrow use case that you had in mind, and not the thousands of other use cases that other people have.
Well, I was thinking about some simple but effective solution. I realize that it covers only some cases, but having something between "full load" and "any load" is a lot already.
Eddi wrote:what should be done (imo) is, right before leaving a station, to evaluate the next order, including all conditional orders, and go back to the loading phase if the result is the same station as before.
I think so too. Lately I had some free time and took a closer look on the code. These areas (handling of loading and orders) are quite complicated. I tried few approaches and finally came to something sensible. The solution seems working well. Watch the "Developement" sub-forum, I'll publish something soon.
Alberth wrote:Instead of an ever increasing number of options to the one order that we have now, I believe it would be beneficial if we can have several smaller orders that can be executed at the same time, eg...
Something like this? :)
:] don't worry, be happy and checkout my patches
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: [patch] Wait for half load

Post by Alberth »

adf88 wrote:
Alberth wrote:Instead of an ever increasing number of options to the one order that we have now, I believe it would be beneficial if we can have several smaller orders that can be executed at the same time, eg...
Something like this? :)
Quite, unfortunately, it got lost in the noise :(
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: [patch] Wait for half load

Post by pavel1269 »

Eddi wrote:what should be done (imo) is, right before leaving a station, to evaluate the next order, including all conditional orders, and go back to the loading phase if the result is the same station as before.
Something like this? http://www.tt-forums.net/viewtopic.php?p=936600#p936600
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: [patch] Wait for half load

Post by Eddi »

well, yes. and as you can see, i made the same argument there...
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 52 guests