Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Does anyone know, what heuristic function is used in a*?

May i change that heuristic in a* ? and how i change it?

Here some heuristic, Euclidean distance, Manhattan distance, Maximum distance

Thanks :)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you are talking about pgRouting, by default I think it is (|dx|+|dy|)/2 . See the source code in the link:

PgRouting source

You can easily change the heuristic function but then you would probably have to recompile the pgRouting.

share|improve this answer
    
Thanks for ur answer..:) Hwo to change and compile it? I want to try use euclidean distance heuristic, may u give me tutorial how to change the heuristic and recompile it? :) –  robi_blitzx Jul 6 '12 at 7:24
    
it depends on the OS, but you can look at this link github.com/pgRouting/pgrouting/wiki/Developer---Getting-Started maybe it will help you to get started –  Mario Miler Jul 6 '12 at 8:04
    
My os is windows 7. i did open the link, but i don't get idea how to change it..hmm I'll try to find how to change it..if i get some news, i'll text you here..:) If you have some news, text me in here.. hehehe, thanks mr. Mario.. –  robi_blitzx Jul 6 '12 at 22:34
    
Fyi, a* already use ecludian function, it was used in astar_sp function. Info from mailing list pgrouting. tq :) –  robi_blitzx Jul 12 '12 at 4:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.