News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

FIX: Travelling times were calculated incorrectly on circular routes with convoy

Started by chs, October 30, 2012, 11:32:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

chs

Thank you very much for the new release. I have been waiting for it, in particular for the fix for circular routes, as this kept me from optimizing one of my major routes and some minor routes in between.

I have not exactly the circular route situation, but one very similar. My train schedule is, using the clock as the circular route and hours as cities: 1 - 3 - 5 - 8 - 10 - 1 (mirrored, returning 10 - 8 - 5 - 3 - 1), where I think a circular would be two routes 1 - 3 - 5 - 8 - 10 and 1 - 10 - 8 - 5 - 3 for the other direction. In my schedule, the train stops at one point in the circle, returns and does the full circle to the same point, returns again, and so on.

Now I have copied the windows binaries and configuration file of release 10.12 (had 10.11 before), loaded my 10.11 game and run the game for about a year. The situation I had initially, that passengers travelling from 1 to 10 took the long way (1 - 3 - 5 - 8 - 10) instead of the short way (1 - 10) seems to have varied a little, but still exists. The savegames are available here: mydrive.ch (login public@chs78, pwd public), both initially and after running it for 1 year.



A second thing I have noticed is that waiting times are updated very slowly, it takes several months. The travelling time as shown in the station detail is correct, just the waiting time is updated not often. Maybe that is related to the above issue, probably the shortest route including the waiting time is calculated.
Theoretically, if there is a train in the station going to the right destination and is not full yet, and if I know the (correct) travelling time, I could board that train (if that travelling time is short enough). The waiting time for boarding this train is not relevant any more, since the train is here, has free seats, and leaves soon enough. This seems not to happen, as sometimes even empty trains are leaving from 1 to 10, where lots of passengers are waiting and taking the long way. I am not sure how this is implemented and supposed to work in detail, this is just my observation. 


It is possible that I am missing a certain setting. I have not modified any settings, just copied the config file as is available for download. Also I am not sure whether this fix applies to old savegames, or whether it applies to this particular situation. Any feedback would be welcome.

Carl

Waiting times are, I think, updated every month. (Travelling times are the same, unless I'm mistaken...) One advantage of having short months (i.e. low bits-per-month setting), then, is that these will get updated often and passengers won't be in the dark for too long.

Passengers do not simply board the fastest service -- when any service to their destination arrives, they perform a calculation to work out whether its journey time will be within a reasonable tolerance of the fastest time, and if so, they will board it. (That is -- they won't board just any old slow service, but something that's nearly-as-fast as the fastest service will work.)

I'm not sure about the circular route things -- someone else will have to comment on that.

jamespetts

Chs,

apologies for the delay in replying, and thank you for your report. Carl has answered your second question, I think, but is your first problem the same as this, do you think? If so, that is a rather complicated one to fix, and will need some more thought. If not, could you let me know how it differs so that I can narrow it down? Thank you!
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.

chs

James, thank you for your reply.

In my savegame, I am referring to the circle in the right lower corner, line "ZB Pidleigh SW Circle". I have a "simple" circle: Pidleigh - Berryington - Pondshore - Parbere - Kiling - Pidleigh (and same way back), where Pidleight I think corresponds to London or A in the linked example.

For Pidleigh, the travelling times are wrong: always the travelling time for the long route are taken. So somebody going from Pidleigh to Berryington would board a train going from Pidleigh via Kiling - Parbere - Pondshore to Berryington, instead of the direct way. The journey times on all other stops (exept Pidleigh) seem to be correct.

The problem is not exactly the same I think, as I have an A-B-C-A - situation (compared to what you describe in Reply #8 on the other thread), where upon each arrival at A the new departure time would be recorded. So if I understood this correctly, this is not the same situation.

As I have wrong travelling times, some thoughts I had:
1. is it possible that the cause of this is "only" the late update of travelling times? I run the game for a year, but I am not sure that is enough.
2. As there are 2 ways to go from Pidleigh to Berryington on the same route, how are these travelling times calculated? Maybe the average (weighted by the number of passengers) is used. Regarding Carl's explanation that passengers would board anything that is "nearly as fast" as the fastest route, the long rough would be roughly 1.5 times longer than the average. Maybe this is not big enough to keep passengers from taking the longer way?
(Berryington - Pidleigh: 22 min, Pidleigh - Berryington: 74 min)
This probably does not make sense, as the average would be the same as the travelling time in Pidleigh which is 74 min now. Just a thought.

jamespetts

Hmm, I suspect that this is the same problem as in the other thread, in that I had only designed this to work for linear routes, circular routes, and Y-shaped routes, so anything more exotic than that can generate errors. This is a somewhat concpetual issue, and will need some careful thought as to how to solve it.
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.

Carl

Quote from: chs on November 11, 2012, 09:18:59 PM
Regarding Carl's explanation that passengers would board anything that is "nearly as fast" as the fastest route, the long rough would be roughly 1.5 times longer than the average. Maybe this is not big enough to keep passengers from taking the longer way?

This is sensitive to the length of the journey. I can't remember exactly how the equation goes, but for anything under an hour's journey length, 1.5 times the fastest time is probably tolerated. (Perhaps 1.4).

A year should certainly be enough for any oddities in journey times to iron themselves out.