Skip to content

Commit

Permalink
[issue1130] Limit when iterated search passes bounds to component sea…
Browse files Browse the repository at this point in the history
…rches.
  • Loading branch information
ClemensBuechner authored Jul 10, 2024
1 parent ba7f864 commit e18adec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/search/search_algorithms/iterated_search.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ shared_ptr<SearchAlgorithm> IteratedSearch::create_current_phase() {
this overrides continue_on_fail.
*/
if (repeat_last_phase && last_phase_found_solution) {
return get_search_algorithm(
algorithm_configs.size() -
1);
return get_search_algorithm(algorithm_configs.size() - 1);
} else {
return nullptr;
}
Expand All @@ -63,7 +61,7 @@ SearchStatus IteratedSearch::step() {
if (!current_search) {
return found_solution() ? SOLVED : FAILED;
}
if (pass_bound) {
if (pass_bound && best_bound < current_search->get_bound()) {
current_search->set_bound(best_bound);
}
++phase;
Expand Down Expand Up @@ -143,8 +141,10 @@ class IteratedSearchFeature
true);
add_option<bool>(
"pass_bound",
"use bound from previous search. The bound is the real cost "
"of the plan found before, regardless of the cost_type parameter.",
"use the bound of iterated search as a bound for its component "
"search algorithms, unless these already have a lower bound set. "
"The iterated search bound is tightened whenever a component finds "
"a cheaper plan.",
"true");
add_option<bool>(
"repeat_last",
Expand Down

0 comments on commit e18adec

Please sign in to comment.