@@ -2591,16 +2591,13 @@ bool heuristic_search_helper(const char *vertex_str, const char *expand_str, con
2591
2591
search_algorithm S (PT, G, M, CF, CE);
2592
2592
2593
2593
const double upper_bound = [&]() {
2594
- if constexpr (not search_algorithm::use_beam_search) {
2595
- /* ----- Run GOO to compute upper bound of plan cost. -----*/
2596
- GOO Goo;
2597
- Goo (G, CF, PT);
2598
- return PT.get_final ().cost ;
2599
- } else {
2600
- /* Beam search becomes incomplete if an upper bound derived from an actual plan is provided. Beam
2601
- * search may never find that plan or any better plan, and hence return without finding a path. */
2602
- return std::numeric_limits<double >::quiet_NaN ();
2603
- }
2594
+ /* ----- Run GOO to compute upper bound of plan cost. -----*/
2595
+ /* Beam search becomes incomplete if an upper bound derived from an actual plan is provided. Beam search
2596
+ * may never find that plan or any better plan, and hence return without finding a path. In this case, the
2597
+ * initial plan found by GOO is used. */
2598
+ GOO Goo;
2599
+ Goo (G, CF, PT);
2600
+ return PT.get_final ().cost ;
2604
2601
}();
2605
2602
if (Options::Get ().statistics )
2606
2603
std::cout << " initial upper bound is " << upper_bound << std::endl;
@@ -2620,9 +2617,11 @@ bool heuristic_search_helper(const char *vertex_str, const char *expand_str, con
2620
2617
reconstruct_plan_bottom_up (goal, PT, G, CE, CF);
2621
2618
}
2622
2619
} catch (std::logic_error err) {
2623
- std::cout << " search " << search_str << ' +' << vertex_str << ' +' << expand_str << ' +' << heuristic_str
2624
- << " did not reach a goal state, fall back to DPccp" << std::endl;
2625
- DPccp{}(G, CF, PT);
2620
+ if constexpr (not search_algorithm::use_beam_search) {
2621
+ std::cout << " search " << search_str << ' +' << vertex_str << ' +' << expand_str << ' +' << heuristic_str
2622
+ << " did not reach a goal state, fall back to DPccp" << std::endl;
2623
+ DPccp{}(G, CF, PT);
2624
+ }
2626
2625
}
2627
2626
#ifdef COUNTERS
2628
2627
if (Options::Get ().statistics ) {
0 commit comments