News:

SimuTranslator
Make Simutrans speak your language.

Maximum routing depth default too low [112.3]

Started by jamespetts, August 04, 2013, 07:58:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

In fixing this issue in Experimental, it occurs to me that the problem is the same in Standard: the maximum routing depth for any given map is the minimum of the world's x dimension multiplied by its y dimension and the maximum routing steps set in simuconf.tab. This is not always sufficient for a ship going from one end of the map to another otherwise in a straight line (for example, avoiding islands).

This is how I fixed the problem for Experimental - I am not sure whether any of the Standard developers want to use a more sophisticated solution. (Note that this also solves a related problem where using the advanced settings dialogue to change the routing depth had no effect until the game was saved/reloaded as the nodes were not reinitialised on closing the window).
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.

prissi

#1
If there are less water tunnels and bridges than land tiles (never saw such a map) a routing depth of width*height is mathematically sufficient, since a tile is visited at most once or is discarded when already in the closed list. Insuffient space in the closed list is a strong indication of a broken implementation.

EDIT: I just checked it. It will work unless the value in simuconf.tab is too small (this value was for reducing the memory footprint and increase route search speed). DEBUG_ROUTE show that the way search from standard does not touch much more than 1/3 or all tiles even for very hidden ports back on two islands, even on large maps.

Ters

If route searching has to traverse the world fully at one level, let alone many, it's a strange map indeed.