The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: HeinBloed on April 18, 2012, 01:28:57 PM

Title: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: HeinBloed on April 18, 2012, 01:28:57 PM
I've noticed that the displayed travelling times on circular lines which have alternate directions turned on seem to be an average of the convoys travelling into the two different directions. To illustrate that, here's a screenshot:

(http://i.imgur.com/HhDPW.png)

That it's an average between the times of the two directions is only a guess, not having checked the code yet, but it's striking that the time for all the destinations is virtually the same. Needless to say that the adjacant stations are only like 5-10 minutes away if the pax choose the convoys travelling in the right direction.

I guess the time displayed here and the time used internally for routing is the same, which would mean that lots of pax decide not to travel due to the line being "too slow".

Playing with latest Windows Complete Package.
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: jamespetts on April 18, 2012, 01:49:57 PM
Thank you for the report- are you able to upload a saved game?
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: HeinBloed on April 18, 2012, 02:21:23 PM
Saved game is here: http://simutrans-germany.com/files/upload/long_travelling_times.sve

It happens for every circular line with alternate directions turned on, for example next to Berlin you can also check Hamburg on that map (the other cities with an inner city line are much smaller so the effect doesn't stand out as clearly, e.g. in Stuttgart). Mail is equally affected, too.
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: HeinBloed on April 21, 2012, 08:19:02 AM
As requested, here's a simple game which displays the bug: http://simutrans-germany.com/files/upload/circular_travelling_times_wrong.sve

I took a screenshot of a random station before the first convoy in the line arrived (where the travelling time is estimated based on some average speed I guess):
(http://i.imgur.com/y5ZXZ.png)

And another screenshot of two stations at opposite ends of the circular line two months later:
(http://i.imgur.com/Vg8iW.png)


(this time with modern buses so the absolute time is much shorter, but the problem of virtually identical travelling times to all the stops remains)
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: jamespetts on April 21, 2012, 04:21:39 PM
I have just finished fixing this on the -devel branch: I couldn't fix this on the 10.x branch, as an update to the save game format was necessary. In essence, what was happening was that the point to point routing system was not distinguishing between convoys going in opposite directions and was averaging times between going the short way and the long way around the circle for each stop. I have now added a mechanism to determine whether a route is a bidirectional circular route, and have a separate set of point to point average times for each direction where it is. This is why the save game version needs to change, as these additional data need to be saved.

Than you very much for the report!
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: inkelyad on April 21, 2012, 07:14:35 PM
What about passengers? Will they use right direction?
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: jamespetts on April 21, 2012, 07:57:08 PM
I think that they already do.
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: HeinBloed on April 21, 2012, 10:18:15 PM
Thanks for all the fixes James, hope I can give them a try tomorrow!
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: jamespetts on April 21, 2012, 11:06:57 PM
Excellent - shall look forward to test results.
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: HeinBloed on April 22, 2012, 10:19:01 AM
This seems to be fixed now, thank you! :) But see for new bugs I've encountered in the devel thread. ;)
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: asaphxiix on March 01, 2013, 10:19:26 PM
It seems to happen still, you can see it in Dorley Brownfriars Underground Railway Station on the server game, seems to be the same behavior described above, only no alternate destinations turned on. (but it is a two-way circular route, so they're should be able to take the short path)
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: jamespetts on March 02, 2013, 12:11:54 AM
What do you mean by "no alternate destinations turned on"?
Title: Re: [Bug] Travelling times wrong on circular lines with alternate directions
Post by: asaphxiix on March 02, 2013, 05:43:52 AM
sorry, should be "alternate directions".