News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

[Developer discussion] Improving private car related performance

Started by jamespetts, January 04, 2011, 12:38:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

inkelyad

1) Add map City->travel time from city to each strasse_t tile (Brr..)
2) fill it using Dijkstra's algorithm at road networks changes.
3) When you need route from tile a to city B just build route backward from a.
  (prepend tile where travel time is less then travel time in current tile).

jamespetts

Forgive me for being slow, just a question or two for clarification if I may: do you intend to store in each road tile in the map its journey time to each tile of town hall road? And does step (3) described above entail checking a route from any of those tiles to the destination townhall road tile by searching for tiles with a shorter distance to the that townhall road tile?
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.

inkelyad

Quote from: jamespetts on January 09, 2011, 12:34:17 AM
Forgive me for being slow, just a question or two for clarification if I may: do you intend to store in each road tile in the map its journey time to each tile of town hall road?
No, just to one. Do we really need to be that precise?

jamespetts

9.3 includes a simple improvement to the performance of games after loading: private car origin/destination/journey time per tile triplets are now saved with the saved game, and cities re-calculate annually rather than monthly (and on rotation, so that cities recalculate throughout the year, rather than all at once in January). I have not resorted to the more sophisticated system of storing actual routes for the time being. I should be interested in people's views on post-loading performance in 9.3 on large games in eras when private car ownership is high.
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.


jamespetts

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.