The heuristic coefficient is a priori rating of not yet evaluated part of the route.

Routing algoritms based on A-star algorithm use cost rating for way segments, that multiply the segment length to give the "cost" of the passing the way segment.

It is a measure of how much is disliked a  usage of such kind of a way.

E.g 10km long way with rating 1.2 is taken as good as 12km long way with ideal rating 1.0.

The algorithm takes the sum of segment costs of already evaluated route.
Then, it adds the length of the straight line to destination multiplied by heuristic coefficient.

This gives the estimated total cost of evaluated route variant.

It compares theae estimated costs during finding the ideal route.

It follows further analysis of such a partial route,
That has the lowest estimation of total cost.

If the heuristic coefficient is greater than 1, it speeds up finding the route, as it prefers evaluation of routes aiming toward the destination.

But with increasing the value is increasing the risk it can miss the optimal route.

This risk decreases with the route length.

If the value is higher than the average way cost per straight line length,
It becomes very fast and wrong. As it starts to prefer route evaluations with their progress getting the closest to the destination, with less caring about the cost.

Statistically, if all roads have ideal 1.0 rating,
ratio of way cost(=way length) / straight line length is 1.2-1.3, given by the average way prolonging because of curvature.

So 1.4 is still quite safe,
because ways are not ideal and have their average rating >1.0.

----------
Dne 28. listopadu 2018 13:56:35 Stefan Monnier <[email protected]> napsal:

I also use a heuristicCoefficient="1.4" since several years following the
example of Harry van der Wolf, which makes the calculation of routing much
faster. I like it!

BTW, what does this magic button do?


       Stefan

--
You received this message because you are subscribed to the Google Groups "Osmand" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google Groups 
"Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to