The A* (pronounced “A Star”) algorithm is based on Dijkstra’s algorithm with a heuristic that allow it to solve most shortest path problems by evaluation only a sub-set of the overall graph.
The A* (pronounced “A Star”) algorithm is based on Dijkstra’s algorithm with a heuristic, that is an estimation of the remaining cost from the vertex to the goal, that allows to solve most shortest path problems by evaluation only a sub-set of the overall graph. Running time: \(O((E + V) * \log V)\)
Currently the heuristic functions available are:
where \(\Delta x = x_1 - x_0\) and \(\Delta y = y_1 - y_0\)
Analysis 1
Working with cost/reverse_cost as length in degrees, x/y in lat/lon: Factor = 1 (no need to change units)
Analysis 2
Working with cost/reverse_cost as length in meters, x/y in lat/lon: Factor = would depend on the location of the points:
latitude | conversion | Factor |
---|---|---|
45 | 1 longitude degree is 78846.81 m | 78846 |
0 | 1 longitude degree is 111319.46 m | 111319 |
Analysis 3
Working with cost/reverse_cost as time in seconds, x/y in lat/lon: Factor: would depend on the location of the points and on the average speed say 25m/s is the speed.
latitude | conversion | Factor |
---|---|---|
45 | 1 longitude degree is (78846.81m)/(25m/s) | 3153 s |
0 | 1 longitude degree is (111319.46 m)/(25m/s) | 4452 s |