You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
A comparison of the pgr_bdastar algorithm with other astart implementation shows that the heuristic is not correctly used in pgr_bdastar: the current implementation for computing the cost of a visited node is to take the cost of the previous visited node and to add the cost of the edge between the two nodes. This is fine except for the fact that the cost of the previous node contains the heuristic cost, since it is provided by the queues.
The heuristic cost must only be used to decide which node to visit next and only for this: it must not be transmitted from node to node.
If you are ok with this analysis, I can work on a fix.
The text was updated successfully, but these errors were encountered:
Bug found when comparing the result of the A* algorithm with the bidirectional one:
In red the path with the classical A* algorithm, in purple the one provided by the bidirectional one. Both have been computed on a road network projected in Lambert 93; as a consequence a factor is applied to turn the distance provided the heuristic into a time.
The A* path is identical to the one found with the djikstra algorithm.
Problem
A comparison of the pgr_bdastar algorithm with other astart implementation shows that the heuristic is not correctly used in pgr_bdastar: the current implementation for computing the cost of a visited node is to take the cost of the previous visited node and to add the cost of the edge between the two nodes. This is fine except for the fact that the cost of the previous node contains the heuristic cost, since it is provided by the queues.
The heuristic cost must only be used to decide which node to visit next and only for this: it must not be transmitted from node to node.
If you are ok with this analysis, I can work on a fix.
The text was updated successfully, but these errors were encountered: