Author Topic: How to modify the order of direct routes from here?  (Read 582 times)

0 Members and 1 Guest are viewing this topic.

Offline THLeaderH

How to modify the order of direct routes from here?
« on: September 26, 2017, 08:20:17 AM »
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".

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4812
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: How to modify the order of direct routes from here?
« Reply #1 on: September 26, 2017, 05:05:51 PM »
It is probably "random", and I'm not sure the list and the routing uses the same order.

Offline TurfIt

Re: How to modify the order of direct routes from here?
« Reply #2 on: September 26, 2017, 06:18:48 PM »
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!

Offline wlindley

Re: How to modify the order of direct routes from here?
« Reply #3 on: September 26, 2017, 08:46:48 PM »
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)


Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4812
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: How to modify the order of direct routes from here?
« Reply #4 on: September 27, 2017, 06:11:42 AM »
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.

Offline THLeaderH

Re: How to modify the order of direct routes from here?
« Reply #5 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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4812
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: How to modify the order of direct routes from here?
« Reply #6 on: September 27, 2017, 03:18:09 PM »
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.

Offline THLeaderH

Re: How to modify the order of direct routes from here?
« Reply #7 on: September 28, 2017, 12:56:13 AM »
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.

Offline Vladki

Re: How to modify the order of direct routes from here?
« Reply #8 on: September 28, 2017, 07:47:46 AM »


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.




Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4812
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: How to modify the order of direct routes from here?
« Reply #9 on: September 28, 2017, 03:14:14 PM »
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.

Online Leartin

  • Devotee
  • *
  • Posts: 800
  • Total likes: 287
  • Helpful: 44
  • !!!!!This user was banned for double posting!!!!!
  • Languages: DE, EN
Re: How to modify the order of direct routes from here?
« Reply #10 on: September 28, 2017, 04:09:35 PM »
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?

Offline DrSuperGood

Re: How to modify the order of direct routes from here?
« Reply #11 on: September 28, 2017, 08:41:16 PM »
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?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4812
  • Total likes: 191
  • Helpful: 108
  • Languages: EN, NO
Re: How to modify the order of direct routes from here?
« Reply #12 on: September 29, 2017, 08:01:54 AM »
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.