News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Wrong waiting times at stops

Started by Jando, July 12, 2017, 09:29:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jando

Greetings James and others!

Occasionally I see wrong waiting times at stops. Since waiting times are an important aspect of passenger generation (too long waiting times and the player may not see any passengers at all) I tried to find ways to reproduce wrong waiting times. I have found one method how to reliably produce wrong waiting times, though I'm quite sure at least one other method must exist as well.

The method I found involves placing a new bus stop along an already existing line. i.e. having a line running from A to B and placing a new stop C somewhere between A and B and letting the buses of that existing line stop there. Here's an example where you can reproduce this: http://files.simutrans.com/index.php/s/2o0dfZ7HsOnU5yo

It's still the regional small-town bus network in 1943. How to reproduce:
1. Load saved game, hit pause.
2. You see the town Curlingsea. There is a printworks on the north-western border of the town. The road to the west passes along the printwork. Please place a bus stop on that road directly at the printworks.
3. Open line management. Find the line Curlingsea-Swainesmouth. Buses of that line will pass along there. Please add the newly created stop to the route so that buses now stop at the printworks on both legs.
4. To see the effect best open the station information windows and the respective detail information windows for all 3 involved stops: the newly created stop at the printworks, and the 2 end stops of that line in Curlingsea and Swainesmouth.
5. Unpause the game. After a few seconds the detail information windows will get updated. Waiting times will be shown. All waiting times involving the newly created bus stop at the printworks however will be wrong (too long).

In this example the waiting time from Curlingsea Monument to Swainesmouth Town Hall (the 2 end stops) of the line will be 10m:00s, a correct value since the waiting time on a properly spaced out line with enough capacity should be around half the time of the service frequency (service frequency 19m:47s in that case). The waiting time to the newly created stop at the printworks however (served by the same line) will 28m:36s, almost 3 times the correct value.

You can reproduce this behaviour with all bus lines on that map though the actual wrong waiting time shown will be different. Wrong waiting times of that kind can persist for a very long time. To see another stop with wrong waiting times locate stop Bexinglock Onion Street on that same map. That stop has been created 11 game months ago and shows wrong waiting times as well. Waiting times from other stops to Bexinglock Onion Street are wrong too. That stop was also added to an existing line. 

jamespetts

Thank you for that report. I think that I have managed to fix this. Would you be able to re-test to confirm? Note that the incorrect time does appear for a short while after inserting the stop, but fairly quickly reverts to the correct waiting time; if I have understood the problem properly, this is because wrong data were stored in some cases.
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

Thank you for looking into this, James.

Sadly not fixed though, tested with newest nightly. Initial waiting times still wrong with up to 3 times the correct value, waiting time changed to another wrong value (even longer than the initial one) after about 2-3 game hours, that wrong value persisted for the next 6 game days/months on fast-forward (then I stopped testing).

In case it matters: I see two different wrong waiting times in these cases, with one wrong value used for the new stop and other intermediate stops, the other wrong value used for endpoints of the line, this wrong value at endpoints is double the one used for intermediate stops. For a line with properly spaced-out convoys with enough spare capacity however waiting time can never be above the service frequency and will mathematically average out at half the service frequency at all stops of a line.

After all it's not possible for a passenger to wait at a stop for longer than 10 minutes when an empty bus travels there every 10 minutes. :)

Spenk009

Have you tried replicating the behavior in a new savegame? Schedules may retain behaviors unless they are scrapped and made entirely new.

jamespetts

You refer in general to right and wrong values; can you be more specific about precisely what values that you are getting at what stations and at what in-game times? My tests showed that the waiting time from Curlingsea to Swainsborough was 10 minutes when loading your saved game; it went up for a short time to over 20 minutes when adding the extra printworks stop to the schedule, but then shortly afterwards returned to slightly under 10 minutes.
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

#5
Will test more and gather the data, thanks James.

Edit 2: Made a new bug report thread since bug is unrelated to waiting times.

Jando

#6
Hello James!

Have run more tests in the meantime and I'm pretty sure I know what happens. All with the same saved game from the first post but with a different line that does not have any bug with buses turning around mid-way. :)
These two stops are served by the same line, same vehicles, same destinations, same schedule, thus the waiting times at these two stops should be pretty similar, with only minor variations. However, they are not. Most notably, three destinations from Bexinglock Onion Street show the exact same waiting time of 34m:12s for these 3 different destinations. That is the same waiting time that showed for all destinations when that stop Bexinglock Onion Street got added to the line about a game-year ago.

We can easily show that by deleting stop Bexinglock Onion Street and creating a new stop at the same spot like in this second screenshot: http://files.simutrans.com/index.php/s/adU8lZ6k2LFBHcD

All waiting times for all destinations from that new stop will be 34m:12s. Whether that waiting time will ever get a new value or not depends solely on luck and the random number generator. Since the waiting time value of 34m:12s is that long almost no passengers will get generated - unless we are lucky and the game generates a passenger with an extreme tolerance for waiting times. In that case the passenger(s) will travel and the waiting time for that destination will change.

Thus I believe we're looking at some deadlock situation: the wrong (too long) initial waiting time can prevent that the game generates any passengers - but we need passengers to correct that initial waiting time.

Edit: May as well add a suggestion I hope. Please use service frequency divided by 2 as initial waiting time. A properly scheduled line with enough capacity in the vehicles will average out at service frequency divided by 2 anyway.

jamespetts

I think that I have managed to fix this now - the error was caused by not having enough brackets. Would you be able to re-test this? I should be most grateful.
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

That looks much better, James, thank you!

I took the current regional bus network, paused the game, deleted every single stop with passenger service and made a new stop at the spot of the deleted ones. All initial waiting times are much closer to the expected value now. Checking the initial waiting times I'd say there's no deadlock any more. Will watch the development of the waiting times for a few game-months and report back if I see any problems.

Thank you again!