The International Simutrans Forum

Simutrans Extended => Simutrans Extended Discussion => Topic started by: Ves on June 08, 2020, 01:39:03 PM

Title: What are the routing principles?
Post by: Ves on June 08, 2020, 01:39:03 PM
Hi James and all,
After seeing some interresting behavior on the bridgewater-brunell server, I came to wonder what actually would make freight prefer one route over the other when two are present. Now I do not talk about passengers, as I believe they function differently, but mail and the rest of the cargo categories.

The different parameters that I can think of that would have an impact:
* Number of interchanges between convoys
* Total jurney time
and in the case of mail:
* Classes available (for priority mail)

I would assume that goods prefer as few interchanges as possible, with the jurney time being the tiebreaker. As for mail, I would assume there to be a time tolerance differential for when priority mail can take a longer route with "priority" vehicles, than a shorter route with "normal" vehicles.

What I am seeing on the server is some occasions where it seems as mail wants to take a diversory route where they have to switch convoys and with higher waiting times, instead of a direct route with lower waiting time.

Could you throw some light on the subject?  :)
Title: Re: What are the routing principles?
Post by: jamespetts on June 08, 2020, 03:25:08 PM
All transportable things will prefer the lowest total journey time. However, journey time takes into account transshipment and waiting times, and thus a preference for a lower journey time will often, but not necessarily, lead to a preference for fewer transfers.

For passengers and mail, which have classes, all possible transport links that are only open to passengers/mail of a higher class are ignored when considering routing.

Currently, only passengers have a journey time tolerance. This determines whether the passengers travel at all and is evaluated before any journey begins.

However, all transportable items have a waiting time tolerance at stops to prevent infinite accumulations.
Title: Re: What are the routing principles?
Post by: Ves on June 08, 2020, 03:37:19 PM
Thank you for that clarification,

For the classes, yes it makes sense for passengers and mail to ignore higher classes, but will they always choose the lowest class (within their tolerances, though) if that jurney is the shortest?

In other words, if I have two routes between the same two destinations. One route is slightly faster than the other, but is medium class. The other is longer and is high class. What route will the high class passengers choose?
Title: Re: What are the routing principles?
Post by: Freahk on June 08, 2020, 03:57:09 PM
However, all transportable items have a waiting time tolerance at stops to prevent infinite accumulations.
And that maximum time is still affected by the speed, which itself is not used anymore.
Goods without a speedbonus defined do not have such a maximum waiting time.

but will they always choose the lowest class (within their tolerances, though) if that jurney is the shortest?
They will always choose the quickest possible route. Passenger classes do only affect routing in a binary way: exclude all connections that cannot be afforded, search the quickest path on the remaining network.
Title: Re: What are the routing principles?
Post by: Ves on June 08, 2020, 04:23:24 PM
They will always choose the quickest possible route. Passenger classes do only affect routing in a binary way: exclude all connections that cannot be afforded, search the quickest path on the remaining network.

Ok thanks, that makes sense.
Title: Competitive line can easily destroy the other party's freight network.
Post by: Ranran on July 02, 2020, 08:49:38 AM
I've seen an unnatural freight route selection routine due to competition on servers.
I was convinced of it today by discovering a very understandable example of it.

I built a freight network that connects the fishing swarm with the fishing port and market industrial chains, and the freight flowed smoothly for a while on that network.
But a new player has created a competitive route connecting the fishing swarm to the fishing port.
My line had 4 boats going back and forth and for a long time it was well balanced.
The new player has created a competitive route and ran only one boat there. Then it became impossible to catch fresh fish on my line. So the fishing that was balanced on 4 ships was reduced to 1/4. Because the route (fishing swarm to fishing port) is now transported by only that one ship. In other words, the amount of fish distributed to the market is also 1/4. This causes a big loss on my route connecting the markets. And now the fish are piled up in the fishing ground. But my boat is not allowed to catch it.
You can see the situation as soon as you log in to the birdgewater server. Because that's happens where players log in. So I immediately noticed that anomaly.
At least that has happened in several places so far.

EDIT:
It seems that the position was reversed just because a rerouting occurred on the server a few minutes ago. However, neither me nor the other player is operating. My ship had been stuck for a long time, so travel time should have been longer than our competitors... But sudden changes came.
I wonder if this phenomenon will be repeated over and over again.