News:

SimuTranslator
Make Simutrans speak your language.

How to modify the order of direct routes from here?

Started by THLeaderH, September 26, 2017, 08:20:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

This may be a FAQ, but I couldn't find the appropriate word to search.
By what algorithm the order of "direct routes from here" determined? Can a player modify this order?


~The background of this question~
In a map with a huge aviation network, there are many routes whose route costs are same. However, there are airports that have huge capacity and those that does not have. I want transfer passengers use a big airport, but they often use the smaller airport because the smaller airport is in a higher position in "direct routes from here".

Ters

It is probably "random", and I'm not sure the list and the routing uses the same order.

TurfIt

The only current way to modify the routing is to add an extra stop to the schedule to increase the weighting by 1. Easy for trucks/trains/boats, perhaps not for planes...

See: Changes in routing of passengers
I'm still seized on the best solution for tie breakers. Distance based works great, until you setup a bus network in Manhattan!

wlindley

Is there some reason a simple sort cannot be introduced?

It's annoying that Simutrans has so many places where the lists are in irritatingly hopeless order.

How is anyone supposed to make heads of tails of a legend like this?  (From Extended, but you can see my consternation)


Ters

Quote from: wlindley on September 26, 2017, 08:46:48 PM
Is there some reason a simple sort cannot be introduced?

There might not be a simple sort that makes more sense and/or that everybody can agree upon.

THLeaderH

How about arranging stops by the route cost? If two stops have the same route costs, a stop that has smaller Euclid distance should be in a higher position.

Ters

Quote from: THLeaderH on September 27, 2017, 07:08:54 AM
How about arranging stops by the route cost? If two stops have the same route costs, a stop that has smaller Euclid distance should be in a higher position.

That is potentially quite different from your initial wish to have the biggest hubs first.

THLeaderH

I saw some of code and found that the order of "direct routes from here" is determined by the comparison using strcmp. https://github.com/aburch/simutrans/blob/master/gui/halt_detail.cc

IMO, to realize my initial wish, the stops that has bigger capacity left should be chosen when the two stops have the same route cost.

Vladki



Quote from: THLeaderH
IMO, to realize my initial wish, the stops that has bigger capacity left should be chosen when the two stops have the same route cost.

I think it should be be the total capacity, not currently free capacity. In real world you don't know if a far away station is overcrowded right now or not, but you may know how big it is.

Sent from my ONEPLUS A3003 using Tapatalk


Ters

One could use the "reputation", by which I mean the thing that is shown as a color (yellow, green, orange, red) for the stop. You may not know that a station is overcrowded right now, nor if a station will be overcrowded when you get there, but I do think travelers will avoid stopovers that are chronically overcrowded if they can help it.

Leartin

It was already said that this list might not affect routing - but if so, I'd suggest the list SHOULD display stops by route cost, including any tie-breaker introduced in routing. However, that tiebreaker should probably be consistent so changing it based on "current free capacity" or even "reputation" does not seem like a good idea. Even the total capacity could easily change, and I don't see why a route would change just because a station on a different route got a new roof.
Since it's currently random, I'd just go with distance, since that's consistent. And not distance to the nearest station tile, but to the stations "center", which would be shown by the label (hence even if you extend a station, since the label would not move, it does not change the position of that station)

Perhaps one could also manually change there position?

DrSuperGood

I believe they are ordered based on internal ordering. There is method to the madness, just not a human one!

In many cases the lists are there purely for debug or mistake autopsies as opposed to be actually usable. Ideally they should be ordered alphabetically, but honestly who spends more than 5 seconds looking at those lists anyway?

Ters

I think we are done talking about the list, since THLeaderH has figured that one out, except as a possible GUI to directly control the goods routing algorithm.