News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Bug: Timetabled line double booking a single departure time slot.

Started by DrSuperGood, December 05, 2017, 02:41:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DrSuperGood

I also occasionally see the long running doubly booked time slot bug (which was present back on the old server years ago).

There is a small chance that 2 or more convoys on the same line arriving at the same timetabled stop get assigned the same departure time slot meaning 2 or more convoys of that line will try to leave the stop at the same time rather than with the scheduled delay between them.

What triggers this is seemingly random. Sometimes it works correctly with the convoy arriving slightly later getting assigned the next time slot after the first convoy. Other times it bugs and both get assigned the same departure time slot.

Best way to recreate it is to assign timetabling at a bus/coach stop that a line uses in both directions. If it is working correctly then when 2 convoys arrive at the stop at the same time (one in each direction) they will both be allocated different departure times. Occasionally it can be observed that both are allocated the same departure time. If this occurs both convoys will leave in their appropriate direction at the same time.

Spenk009

To add to this, in a similarly random/rare manner, if many convoys have the same departure time slot e.g. 0:48:00 due to timetabled stops they may ignore the next departure entirely and set to depart one timing cycle/instance later.

Typing this out, I realise that this may be within a line or global. The behavior appears as if there are too many convoys looking to depart at the same time and it can't book departure into that second/moment. I believe I see this behavior on reversing vehicles, usually in a departure window that follows a very common departure interval (i.e. 12cpm, 16cpm, 24cpm, 32cpm). I'd like to remind that not only do they start at 0:00:00, but also tend to meet at other times of the month 1:36:00, 3:12:00,... .

To avoid this behavior I delay the scheduled departure by a few seconds and this usually seems to avoid the issue.

I hope I'm not hijacking this thread.

jamespetts

Dr. Supergood - thank you for the report. Are you able to upload s saved game in which this issue can reliably be reproduced at a specific point in time? Without this, it will be extremely difficult to track down the problem.

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

DrSuperGood

Not sure if this is related to the original bug but it does seem to have similar symptoms. The line graphs show more departures than scheduled. It also seems extremely reliably stuck in this state.

The line is meant to have just 3 departures per month per stop (2 stops) for a total of 6 departures per month. The line stats are recording 12 departures per month. Either the convoys are leaving a lot sooner than they should or departures are being recorded twice per actual departure.

jamespetts

Thank you for letting me know. I will look into this in January when I get back home, assuming that it can still be reproduced by then.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Jando

Hi James and others! Happy new year to you all!

I now have a saved game where this behaviour can be observed at a stop where it happens, saved game is here: http://files.simutrans.com/index.php/s/aYl3JEb1OKX6iTU

You see the bus stop Crabgate Hall with three departure points, one to the west, one to the east and one to the south. Departures to the west and east work as expected, departures to the south show the bug with two buses departing on the same time slot.

How to observe:
1. Load saved game.
2. Hit pause.
3. You see the stop with 5 buses already waiting and a 6th one is just arriving from the south. All lines are set to depart on the same time slot in this example, in about 9 minutes. Please ignore all other things, map is made just today to test passenger numbers, it's not a real game.
4. Unpause game and watch the buses at the southern departure point. You may want to hide the buildings for a better view. You will see the 2 buses to the south depart on the same time slot.
5. This seems to be consistent. The two buses will depart, go to the next town, turn around there and arrive closely after each other 2 time slots later where they again will depart on the same slot.


Jando

Here is a 2nd saved game where another schedule bug (but probably related that's why I post it in the same thread) can be observed: http://files.simutrans.com/index.php/s/o9LUWU6IOgzNblb

In this case it's not 2 buses leaving on the same time slot but a (horse) bus waiting for 2 time slots instead of for the next one, leaving the next time slot without departure.

How to observe:
1. Load saved game.
2  Hit pause.
3. Locate stop Stockinglock to the west and a little north of current position.
4. At Stockinglock you see a horse omnibus waiting for it's time slot and a 2nd omnibus waiting to pull into the stop. The stop is only served by one line and buses are scheduled to depart there every 17m27secs.
5. Unpause the game. Departure counter for bus at station will be around 10 minutes. 
6. With around 30 seconds left on the counter the omnibus will correctly start reversing (in doing so opening the stop for the already waiting 2nd horse omnibus).
7. This 2nd omnibus will however not wait for the next departure slot in about 17 minutes but instead wait for the departure slot after that one in 34 minutes.

jamespetts

Splendid, thank you for reporting this. I think that I have now managed to fix it, which fix should be in the next nightly build. I should be grateful if you could re-test.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

DrSuperGood

Not fixed or maybe reverted...

Just seen this on the server game.

Additional details...

  • Both trains were at the same terminal stop. The terminal has 4 platforms.
  • Line schedule frequency was lowered. From 26 to 18.
  • Trains were reasonably clumped together, the terminal stop ran out of platform space before this occurred.
  • The terminal has only 1 entrance line. As such the trains arrived with some time between them.
  • Both info windows were captured at the same time next to each other in game.
  • The terminal is used to schedule another dedicated mail line. These convoys depart 4 times a month.
  • 2 new trains were added to the line. These were not told to wait at the terminal but instead depart from its junction to the next stop immediately.
  • The trains have turning time of ~6 minutes.

Image shows 2 different convoys at the same stop with the same departure time.

EDIT:
This is happening fairly frequently. When it does happen it always starts with a train arriving and suddenly being scheduled 2 slots ahead of the last scheduled train, skipping the time slot it is meant to use. When the next train arrives that train is scheduled in the same slot, which is its correct time slot. Hence the bug is that a train is randomly skipping a scheduled time slot for another one.

jamespetts

Can I check whether this is reliably reproducable in the same place in the server game so that I can find a recurrence easily?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

DrSuperGood

QuoteCan I check whether this is reliably reproducable in the same place in the server game so that I can find a recurrence easily?
Yes it occurs fairly frequently at one of my terminals on the server game. I watched on and off for about 1 in game month and it occurred 3-4 times.

The Terminal is Kelpike Terminal Station @5329,1294. It is serviced by 2 lines. The mail line is not a problem as only 1 convoy is there at any time. The problem is the passenger line which has a lot higher frequency.

For example when I logged into the server 2 trains were departing from it at the same time for the same line. They even had emergency stops in the junction due to the station signal.

In fact it occurs so much, that almost immediately after those 2 departed, another 2 also had the same problem where they were given a shared time slot. It is happening a lot at that terminal!

Ves

This is also frequently happening at "Polditch Railway Station" at (1122,1152) on the servergame.

DrSuperGood

Any update on fixing this? It makes running trains reliably very difficult.

jamespetts

My apologies: bugs are currently being reported faster than I can fix them. One thing that might assist me to fix this more quickly would be a reproduction case on a much smaller saved game than the server game, as it is extremely difficult to work with the server game in a debug build as it is enormously unresponsive without optimisations.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Rollmaterial

My "Broken Time Interval" saves from my previous bug reports showcase this bug very frequently.

jamespetts

Thank you - that is helpful. Can you indicate precisely where and when this can be observed in a specific one of these saved games?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Rollmaterial

It can be seen at Fleckesmouth Road in Broken Time Interval 4, among others.

jamespetts

Thank you for letting me know. It is not immediately apparent simply by looking at that saved game where this is occurring. Can you clarify on what line(s) and at what points in time that this can reliably be observed to occur?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Rollmaterial


jamespetts

Thank you - that is helpful. I think that I have now fixed this: I should be grateful if you could re-test with the next nightly build.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

DrSuperGood

Not fixed. At least One of my train lines on the server game is still showing occasional double booked time slots. I have personally observed it twice.

jamespetts

I am no longer able to reproduce this in the test game, so I will need a saved game in which this can reliably be reproduced at a specific time and place in order to fix this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

DrSuperGood

I think it fixed some of the lines as I have not noticed the problem again on them. But one line still has it occurring occasionally (rarely?).

jamespetts

It may well be that what you now see is a different error causing similar symptoms (just as the error that has just been fixed is distinct from the error fixed in January, though its symptoms were similar). To fix this different error, I will need a saved game in which this can reliably be reproduced at a specific place and time.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

Have you been able to find a way of reproducing this reliably as yet?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

DrSuperGood

No but I can confirm that it still exists.

On the server game I have been updating some of my train lines. Since the replacement tool is useless for replacing trains (as it does not count reversing assemblies the same as normal assemblies) this is done by withdrawing all active old trains and starting a whole lot of new trains from a depot at a terminal. Around the start of the repopulation of the line there almost always seems to be 1 or 2 trains that decide to use the same departure slot so leave at the same time.

Of course now that absolute block signals exist this is less of a problem as they only permit 1 train to enter the junction of a station at any time.

Except when they run into legacy time interval signals in which case they ignore the 5 or 10 minute wait time and decide to run at full speed through a danger time interval signal... But I guess that is another bug for another time.

jamespetts

Thank you for letting me know. Unfortunately, without a way of reproducing this reliably at a specific time and place in a specific saved game, I have virtually no chance of being able to fix this.

As to the issue with the time interval signals, again, that has not been reported, and I will have no chance of fixing it without a full reproduction case.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Matthew

James, you seem to have a very productive/leisurely weekend (I guess that debugging Simutrans counts as both!) and I'm grateful for your efforts. There seem to be improvements great and small.

I can't write C++, but I can file bug reports. Here's a reproducible example of double departure for you, playing with the nightly from 10 June (#65707af).

Steps to reproduce:
1. Open the save provided.
2. Go to Polwich Railway Station (Polwich & Greeninglock Railway).
3. Around 6:00:00 in July 1912, you should see two convoys (368 and 369) from line "A1 Polwich-Perborough-Panton-Garden Coast Passenger Train" depart at the same time.
4. I tried reproducing it from the autosave at the start of July, but the game crashed near the end of the month (nothing to do with Simutrans; Windows Update started itself & ate up CPU). I hope to try again with the new (11 June) nightly.

(If it helps: The only change I can remember making to Polwich trains in July is scheduling line "A3 Larch Branch Passenger Train" to depart Polwich 12 times/month with a shift of about 10 minutes: you can see what I did in the step 1 save.)
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

Matthew - thank you for the report. Unfortunately, the saved game provided is too late in time, as the incorrect information (the departure time) is already encoded into both of the convoys (the waiting time can be seen in the convoy information windows). The error occurs when these data are first encoded: thereafter, the data are simply saved, and thus the actual problem cannot be reproduced at this point. What would be very helpful is if you (or anyone else) could reproduce a situation in which these incorrect timings come to be encoded in the first instance.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

sinair285

I think I can replicate the problem now.
I have a bus route that have two buses bunching at every loop of service (Departs at the same time when returning to the terminal) also.

The save game will send to James by inbox.  Hope it helps

jamespetts

Thank you for sending that. I have now had a chance to look in some detail at the saved game provided. The behaviour in this saved game is actually correct: one of the 'buses is set to "reverse route" wheras the others are not. By coincidence, the particular schedule that you have means that these 'buses will follow each other until Victoria stop, where they are timed. Because one is set to "reverse route" and the other is not, they are treated as if they are heading in opposite directions in the schedule, and thus do not wait for one another. This should not even be a problem in this particular situation, since they should be heading in opposite directions.
Edit: I have just run some tests to check whether the originally reported bug could occur at the end of a route with "reverse direction" enabled, but this does not appear to be the issue.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.