[Routing] Getting A* to prefer Motorways
Marcus Wolschon
Marcus at Wolschon.biz
Sun Sep 30 15:22:25 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
thanks for all the answers. :)
finally solved my problems and now routing has become
incredibly fast. :)
(A route between a street in the middle of Freiburg,
up the A5-motorway into a street smack in the middle of
Karlsruhe in 90-23ms.) And I haven't even started reducing
the map yet (eleminate nodes, ways and tags that are not
required or allowed for routing).
- ------------- algorithm used
In the end I used the heuristics for choosing the path to
descend for the recursion in A* but applied it to sorting
the stack of nodes to examine in Dijkstra. It seems I was
wrong in my estimations about the expected memory-footprint.
Stack-Size is far more limiting for me.
It looks like traveling-salesman may actually hit the road
this week to see how well it performs outside the lab.
(driving into one of the big white spots on the map anyway.
mapping on the way to, testing routing on the way back a few
days later.)
- ------------- Havenstine-distance
I think using the Havenstine-distance is not an issue
unless routes get incredibly long (like spain->china).
- ------------- outcome of the motorway-issue
I found in my code that it did not avoid the motorway
(I had a penalty multiplied to the distance for leaving
onto a "lesser" road) but simply got cought in some loops
due to a typo in the code.
It routed fairly well without being actually attracted to
the motorway but discouraged to leave it by this factor.
PS:
Are there any plans to specify how to tag turn-restrictions
and house-numbers yet? With the upcomming relations this
was supposed to become possible and I can't wait to add
support for both.
Marcus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG/7Ehf1hPnk3Z0cQRAvtxAKCcXjM9+BznpiXpHROHrMHZZuCeMwCgoO6Z
evGByXrHxdCmZCovM+k1PBA=
=XbTb
-----END PGP SIGNATURE-----
More information about the Routing
mailing list