From 3677d285a243bdf218777dd0b2c8afed02eee7fe Mon Sep 17 00:00:00 2001 From: ClemensBuechner Date: Mon, 8 Jan 2024 12:20:24 +0100 Subject: [PATCH 1/4] Use bounds of component algorithms in iterated search. --- src/search/search_algorithms/iterated_search.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/search_algorithms/iterated_search.cc b/src/search/search_algorithms/iterated_search.cc index 83f66890bd..df643e8b2e 100644 --- a/src/search/search_algorithms/iterated_search.cc +++ b/src/search/search_algorithms/iterated_search.cc @@ -63,7 +63,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; From 32d8798c5f299c2c61cce75701dae5e89562b474 Mon Sep 17 00:00:00 2001 From: ClemensBuechner Date: Tue, 16 Jan 2024 10:28:48 +0100 Subject: [PATCH 2/4] Prettify unrelated code. --- src/search/search_algorithms/iterated_search.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/search/search_algorithms/iterated_search.cc b/src/search/search_algorithms/iterated_search.cc index df643e8b2e..b62ec0d339 100644 --- a/src/search/search_algorithms/iterated_search.cc +++ b/src/search/search_algorithms/iterated_search.cc @@ -47,9 +47,7 @@ shared_ptr 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; } From cf95dc519aa265173a79ccbfabd45b035df660a4 Mon Sep 17 00:00:00 2001 From: ClemensBuechner Date: Mon, 22 Jan 2024 11:34:23 +0100 Subject: [PATCH 3/4] Add document note. --- src/search/search_algorithms/iterated_search.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/search/search_algorithms/iterated_search.cc b/src/search/search_algorithms/iterated_search.cc index b62ec0d339..8addead747 100644 --- a/src/search/search_algorithms/iterated_search.cc +++ b/src/search/search_algorithms/iterated_search.cc @@ -183,6 +183,18 @@ class IteratedSearchFeature "(using heuristic predefinition) between iterations, " "the path data (that is, landmark status for each visited state) " "will be saved between iterations."); + document_note( + "Semantics of Search Bounds", + "The definition of our interfaces for search algorithms allow to " + "set bounds for the iterated search and all its component search " + "algorithms individually. We do not see a reasonable use case " + "where setting a bound for a component search algorithm is " + "advisable. If this is done anyways, the bound of said search " + "iteration is set to the minimum of that bound and the overall " + "bound on the iterated search. This can be particularly relevant " + "when the option `pass_bound` is set to true in which case the " + "bound of the iterated search is updated whenever a better " + "solution is found by one of its components."); } virtual shared_ptr create_component(const plugins::Options &options, const utils::Context &context) const override { From d65e3dbf67137c98dd7c28d0acaf4167bb04f181 Mon Sep 17 00:00:00 2001 From: ClemensBuechner Date: Tue, 9 Jul 2024 14:33:14 +0200 Subject: [PATCH 4/4] Update documentation. --- .../search_algorithms/iterated_search.cc | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/search/search_algorithms/iterated_search.cc b/src/search/search_algorithms/iterated_search.cc index 8addead747..5755623be2 100644 --- a/src/search/search_algorithms/iterated_search.cc +++ b/src/search/search_algorithms/iterated_search.cc @@ -141,8 +141,10 @@ class IteratedSearchFeature true); add_option( "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( "repeat_last", @@ -183,18 +185,6 @@ class IteratedSearchFeature "(using heuristic predefinition) between iterations, " "the path data (that is, landmark status for each visited state) " "will be saved between iterations."); - document_note( - "Semantics of Search Bounds", - "The definition of our interfaces for search algorithms allow to " - "set bounds for the iterated search and all its component search " - "algorithms individually. We do not see a reasonable use case " - "where setting a bound for a component search algorithm is " - "advisable. If this is done anyways, the bound of said search " - "iteration is set to the minimum of that bound and the overall " - "bound on the iterated search. This can be particularly relevant " - "when the option `pass_bound` is set to true in which case the " - "bound of the iterated search is updated whenever a better " - "solution is found by one of its components."); } virtual shared_ptr create_component(const plugins::Options &options, const utils::Context &context) const override {