Op wo 28 nov. 2018 om 20:47 schreef Stefan Monnier <[email protected]
>:

>
> Would it make sense to adjust this coefficient based on distance, then?
> I.e. when the "straight line to destination" is hundreds of km, use
> a value around 1.4/1.5, but only use 1.2/1.3 or so when the distance is
> down to a handful of kilometers?
>
>
Like Poutnik also mentions:  Only theoretically.
There is another reason why it is not logical to mix those, apart from the
"programming complexities".
If you have to drive > 200 km, the optimizations in begin and end (using
1.2 or 1.3) might result in 1-2 minutes shorter travel time (again: in
theory, think of the traffic lights or busy traffic, etc.) on a total
travel time of perhaps 2-3 hours. Who cares?

A better approach (I think) would be to use the coordinates of start and
destiny.
If the straight point to point, "as the bird flies", distance is below < 25
km, use a heuristic coefficient of 1.2
If the straight point to point, "as the bird flies", distance is  25 km  <
distance < 100 km, use 1.3
If the straight point to point, "as the bird flies", distance is  > 100 km,
use 1.4

Of course this is only a suggestion. It should be optimized (or user
selectable).
The heuristic-coefficient is read on OsmAnd start from the routing.xml, but
that isn't a problem.
All routing rules can be read on OsmAnd start, and as soon as the
"geographic" distance is calculated, the route calculation with the
specific heuristic-coefficient can start.

-- 
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