JGRennison / OpenTTD-patches

OpenTTD - http://www.openttd.org/ - with additional patches
Other
583 stars 133 forks source link

[Bug]: Timetable #623

Open kedzior3 opened 10 months ago

kedzior3 commented 10 months ago

Version of OpenTTD

0.56.0, Windows 10

Expected result

Add option to the timetable: Jump to the order (number) when current hour and time is more than (time) AND less than (time),

Actual result

Random trams are stoping on the stop, where they should change route, and waits to the time of first slot of the timetable.

Steps to reproduce

Hi, Timetable on the hour and minute option have some bugs.

In my savegame trams on the specific route line should change order, because timetable is ended, or actual time is 22:30 or less than 4:00 (for example). Normally few trams on this line changes order to other route - in my idea - goes to the stop before goes to the depot.

Unfortunately random trams are stoping on the stop, where they should change route, and waits to the time of first slot of the timetable. This is not right action.

So I think, in the timetable should be a option: Jump to the order (number) when current hour and time is more than (time) AND less than (time),

In my savegame should be for example: more than 22:30 (10:30pm) and less than 4:30 (am)

JGRennison commented 10 months ago

There is already conditional orders for the current hour and minute which you can use for this.

If you can attach a save which shows what is not working I can take a look at it.

kedzior3 commented 10 months ago

Okay. Look at Kraków on "Krowodrza Górka" (5-04, 5-06), "Bronowice" (14-01), "Mistrzejowice" (16-02, 16-04) This trams should not stay on the stops, but they should change routes to the depots at specific time.

I know some trains are missing orders. Kraków is in progress, and priority is trams, but I don't know, why timetable doesn't work fine on line routes (1,2,4,5,14,16,24,52) without a depots on the tram loops. PL2048x2048_PK_2024_01_03_openttd_jgrpp-056.zip

JGRennison commented 10 months ago

Screenshot_2024-01-04_01-40-39 This seems to be what is needed to implement the time conditions that you're looking for?

For various reasons it is problematic to have multiple tests in a single conditional order.

kedzior3 commented 10 months ago

Okay, now I understand, how it works. For example in route no 24:

If I want to keep tram on the route in Kurdwanów loop between 4:00(am) to 22:47(10:47pm) hour, I should set following orders:

Jump to order 62 (go to depot) if hour is less than 4:00 //use for trams who is still on track after midnight Jump to order 8 (go to Bronowice Małe) if hour is more than 4:00 Jump to order 8 (go to Bronowice Małe) if hour is less than 22:47 Jump to order 62 (go to depot) if hour is more than 22:47

and finally this makes advanced function for my timetable, it is right?

kedzior3 commented 10 months ago

I'm losing patience with this.... image Only '2' route line works fine without stop for all night long on Salwator, or Cmentarz Rakowicki. image image

This needs to be simplified because it's too complicated and doesn't work properly.

JGRennison commented 10 months ago

What you're trying to do is complicated, there's only so much that I can do about that.

In your first image, orders 74 and 75 don't make sense. One or the other will jump to order 3 because these conditions can't both be false at the same time.

kedzior3 commented 10 months ago

As I said before, I have a tram route lines should runs between 4:00 to 22:30. On the other times between 22:30 to 4:00 all of trams on day route lines must go to the depot after ending a last order to the first or second loop. This is the scheme for work on the line:

Problem is the last order on the basic line may be ended after midnight 0:00, as like in reality. And this is the reason I'd like to resolve. Because tram doesn't go to the depot if HH:MM is less than 4:00. So, between 0:00 to 4:00 trams should go to the depot either.

It would be best if tram go to the depot (on the specific route) if in scheduled dispatch on the some loop next departure slot is first. But even this is not easy. Because route to the first loop from the depot, skiping my tram to the depot either! Why? Because it is the flag - go to the depot if next departure slot is FIRST. 🤯

In reality is there another thing - other runs on the peak time, with more trams on the street (with some departure slots from and to the depot)