From f6661b8e77009e01ed5f7de93445847e82c94c92 Mon Sep 17 00:00:00 2001 From: David Speck Date: Tue, 30 Jan 2024 19:23:26 +0100 Subject: [PATCH] fixed prepearbucket function which can lead to non-optimal plans for bidirectional search in rare cases --- src/search/symbolic/searches/uniform_cost_search.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/search/symbolic/searches/uniform_cost_search.cc b/src/search/symbolic/searches/uniform_cost_search.cc index 329529e02..2a6fa0c30 100644 --- a/src/search/symbolic/searches/uniform_cost_search.cc +++ b/src/search/symbolic/searches/uniform_cost_search.cc @@ -155,7 +155,10 @@ void UniformCostSearch::stepImage(int maxTime, int maxNodes) { } } } - prepareBucket(); + + while (!frontier.bucketReady() && !open_list.empty()) { + prepareBucket(); + } engine->setLowerBound(getG() + mgr->getAbsoluteMinTransitionCost()); step_estimation.set_data(step_timer(), stepNodes, !res_expansion.ok);