(The following may well have occurred to you already, but for completeness ...)
If I've fully understood the information that you have (and in context of A* pseudocode as you cited):
At any given time, the set openset
holds the nodes that are candidates to step off to. Each of these nodes has an f_score[]
value, which is the lower bound you refer to in your question.
(Intuitively, if I'm using A* to find the shortest path on a simple four-connected grid, my lower bound distance is the 'as the crow flies' distance, which is a lower bound to the 'follow the grid' distance.)
The condition you add is that, from another source, you know that the distance from $x$ to $dest$ should be no more than some upper bound.
Consequently when adding nodes to the open set (openset
), you could ignore nodes that have a distance to $dest$ that are greater than your supplied upper bound. As in
upperboundDistToDest = (Calculation of upper bound)
(... then in the appropriate place ...)
if neighbor not in openset and dist(neighbour, dest) < upperboundDistToDest
add neighbor to openset