The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: cwlau9 on May 13, 2009, 01:53:12 pm

Title: [Suggestion v3.8] Choosing the Route
Post by: cwlau9 on May 13, 2009, 01:53:12 pm
I have set up a network with the following 2 p****ager routes.

1. A -- B -- C -- D
2. E -- B -- C -- F

Some p****egers want to go from station B to station C. However, they always take buses of route 1. They don't take the buses of route 2. However, I think it is because the waiting time for route 2 is longer than route 1.

I think it is better for the p****egers whether to get on the buses should not count the waiting time of the current station. Also, if the journey time of the 2 routes is within a threshold time, the p****egers will choose the first arrival bus.

Title: Re: [Suggestion v3.8] Choosing the Route
Post by: jamespetts on May 13, 2009, 02:16:01 pm
Cwlau9,

welcome to the forums! Thank you for your interest in Simutrans-Experimental, and for your suggestion. The issue is not as straightforward as it first seems, however. The total journey time is computed as a sum of all the travelling times and the waiting times, which determines which path is used. However, waiting times are not used for choosing the best route between one stop and another (because the p****engers might just happen to turn up seconds before the fastest, but very infrequent, 'bus service leaves).

Instead, p****engers will prefer to board the mode of transport with the least journey time. However, if they have been waiting more than a fixed amount of time (the shorter their anticipated journey time, the shorter that this period is), then they will take the next mode of transport that actually takes them to their next destination.

The reason that your p****engers are preferring route 1 is probably because the journey time is longer, not the waiting time. If p****engers never take route 2, then the service on route 1 must be frequent enough that they never have to wait more than about half of their travelling time, so they always take the fastest route.

As to the threshold suggestion, I had considered that at one stage, but discarded it because of the extent to which it would slow down all the pathing calculations: it would require, in effect, an array of best lines or convoys to be stored for each connexion from every stop to every other stop, rather than just one of each. Given that pathfinding is one of the most processor intensive parts of the game, I was very concerned about the effect of this on the performance of the game.

Thank you very much for raising the suggestion, though - it is always extremely helpful to have feedback. Thank you for trying Simutrans-Experimental; any further feedback would be most welcome :-)
Title: Re: [Suggestion v3.8] Choosing the Route
Post by: cwlau9 on May 13, 2009, 04:07:59 pm
Thank you for your quick reply.

However, for the 2 routes I mentioned, they are both bus services and they are using the same road from B to C. Therefore, I suppose the journey time should be the same for the 2 routes from B to C.
Title: Re: [Suggestion v3.8] Choosing the Route
Post by: jamespetts on May 13, 2009, 06:39:23 pm
They may be similar in journey time, but there can only be one best convoy or line: there is only one "best convoy" and "best line" variable, for the reasons given above (memory consumption and processing speed).