Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autofill timetable #2466

Closed
DorpsGek opened this issue Dec 21, 2008 · 7 comments
Closed

Autofill timetable #2466

DorpsGek opened this issue Dec 21, 2008 · 7 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Moriarty opened the ticket and wrote:

I can set multiple trains on the same shared timetable to autofill at the same time. But only one train is used for the calculation.

r14706

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2466
@DorpsGek
Copy link
Member Author

Rubidium wrote:

Well... what would you expect? That is adds the times?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2466#comment5134

@DorpsGek
Copy link
Member Author

Moriarty wrote:

I expected one of two things:
a) That if all trains can be set to autofill that they all be used to do the calculations.
b) Failing that, that all other trains set to autofill be unset so only one is set.

The current behaviour follows no logical pattern.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2466#comment5141

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 5, 2009

PhilSophus wrote:

to a) All trains are used to do the calculation (i.e. all do autofill), but later trains overwrite the data of earlier trains. This is actually desired behavior when doing autofill after e.g. replacing trains by faster types. I don't see an easy way to distinguish between the desired and the undesired case without confusing people.

to b) It still makes sense to set multiple trains to autofill, as this will result in the order list to be completely timetabled faster if the trains are relatively evenly spread across the order list. Still the last train in the chain will overrule all before.

Though, now with order lists being a separate class, this could be implemented relatively easily by making autofill a property of the order list instead of the vehicles. As said, I doubt that it is desirable. After all, if you don't like that behavior you can easily set only one train to autofill.

The current behaviour follows no logical pattern.
It does. Two simple rules: Every train does a full round of autofill starting at the next arrival at order 1. Later changes of timetables overwrite earlier values.

What might confuse you: The first rule used to be "Every train autofills until a filled timetabled entry is encountered." That would be quite useless now as with non-destructive autofill the timetable is no longer cleared when starting autofill.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2466#comment5205

@DorpsGek
Copy link
Member Author

Moriarty wrote:

Thanks, but you've slightly confused me.
So multiple trains do fill the timetable? That's good (resolves point a).
However you also state that "Every train does a full round of autofill starting at the next arrival at order 1." - doesn't that defeat the point of all trains being set if they must all wait until they get to the start of the timetable before filling it? In that case it won't result in the timetable being filled faster, only in it being re-calculated several times after it has initially been filled.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2466#comment5277

@DorpsGek
Copy link
Member Author

PhilSophus wrote:

Okay, I just re-checked the code (as I've done quite a lot similar stuff in my ITiM patches, I wasn't sure I haven't confused something).

It is indeed the case, that when autofill is started, the vehicle is reset to a state where it has not yet started its timetable. So, my statement "Every train does a full round of autofill starting at the next arrival at order 1." holds.

"doesn't that defeat the point of all trains being set if they must all wait until they get to the start of the timetable before filling it? In that case it won't result in the timetable being filled faster, only in it being re-calculated several times after it has initially been filled."

Yes, you are right. So, at the moment, it just doesn't make sense to set autofill for multiple vehicles at the same time. So, just don't do it ;-)

On second thought, I don't think relocating autofill from Vehicle to OrderList and making it a joint effort of all vehicles in the order list would be the right thing to do: Vehicles might have different speeds. So, the user can no longer control, which vehicle gives the pace and with vehicles of different speeds producing the timetable together, it would result in quite an inconsistent timetable.

BTW, the comments in CmdAutofillTimetable weren't changed by the non-destructive autofill patch, and thus falsely state that the timetable is cleared. Find a Mercurial patch fixing the comments enclosed.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2466#comment5278

@DorpsGek
Copy link
Member Author

Moriarty wrote:

So, at the moment, it just doesn't make sense to set autofill for multiple vehicles at the same time. So, just don't do it ;-)

Fair enough. Hopefully that means you (or whoever the unfortunate soul is ;-) ) in the process of fixing it, given that was the entire point of reporting it (non-functional functionality).

As to your second thought - Personally I use only one type of train of train on each timetable - different speeds would be silly after all, but there's no accounting for sillyness in the userbase. ;-)


This comment was imported from FlySpray: https://bugs.openttd.org/task/2466#comment5302

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 6, 2009

Rubidium closed the ticket.

Reason for closing: Fixed

In r15382.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2466

@DorpsGek DorpsGek closed this as completed Feb 6, 2009
@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Vehicles labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant