[Routing] Getting A* to prefer Motorways

Marcus Wolschon Marcus at Wolschon.biz
Sat Sep 29 17:17:28 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Hello,

I am currently using A* for simple routing but
for longer routes it often gets caught in some
parts of a city that are in the general direction
of the target but far away from the motorway it
should use.
The heuristic at each node is to prefer ways that
get the router near to the target just by calculating
the distance.

Does anyone have a good Idea how to get A* to prefer
a certain type of way? It would be far easier with
dijkstra but I do not want to use that because of
the memory it would use for long routes.

An added penalty-constant for leaving onto lesser
roads comes to mind but that would still not attract
it to the motorway (that is in the opposite direction).


Marcus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG/nqYf1hPnk3Z0cQRAsQOAJ9jDArAbmKcDEsno3GvAe2JuykWYwCgvUCt
zNOiPi7zFw98U4Dn+msafN8=
=xERm
-----END PGP SIGNATURE-----




More information about the Routing mailing list