From b44457520d0f40a0528d73ae8529c0f6e029ceb8 Mon Sep 17 00:00:00 2001 From: ClemensBuechner Date: Wed, 7 Feb 2024 12:06:45 +0100 Subject: [PATCH] Remove unused function from landmark factories. --- src/search/landmarks/landmark_factory.h | 7 ------- src/search/landmarks/landmark_factory_h_m.cc | 4 ---- src/search/landmarks/landmark_factory_h_m.h | 1 - src/search/landmarks/landmark_factory_merged.cc | 9 --------- src/search/landmarks/landmark_factory_merged.h | 1 - .../landmarks/landmark_factory_reasonable_orders_hps.cc | 4 ---- .../landmarks/landmark_factory_reasonable_orders_hps.h | 1 - src/search/landmarks/landmark_factory_rpg_exhaust.cc | 4 ---- src/search/landmarks/landmark_factory_rpg_exhaust.h | 1 - src/search/landmarks/landmark_factory_rpg_sasp.cc | 4 ---- src/search/landmarks/landmark_factory_rpg_sasp.h | 1 - src/search/landmarks/landmark_factory_zhu_givan.cc | 4 ---- src/search/landmarks/landmark_factory_zhu_givan.h | 1 - 13 files changed, 42 deletions(-) diff --git a/src/search/landmarks/landmark_factory.h b/src/search/landmarks/landmark_factory.h index a0b78fbadc..2258f6bc61 100644 --- a/src/search/landmarks/landmark_factory.h +++ b/src/search/landmarks/landmark_factory.h @@ -32,13 +32,6 @@ class LandmarkFactory { std::shared_ptr compute_lm_graph(const std::shared_ptr &task); - /* - TODO: Currently reasonable orders are not supported for admissible landmark count - heuristics, which is why the heuristic needs to know whether the factory computes - reasonable orders. Once issue383 is dealt with we should be able to use reasonable - orders for admissible heuristics and this method can be removed. - */ - virtual bool computes_reasonable_orders() const = 0; virtual bool supports_conditional_effects() const = 0; bool achievers_are_calculated() const { diff --git a/src/search/landmarks/landmark_factory_h_m.cc b/src/search/landmarks/landmark_factory_h_m.cc index f6e92362f4..2894b41a30 100644 --- a/src/search/landmarks/landmark_factory_h_m.cc +++ b/src/search/landmarks/landmark_factory_h_m.cc @@ -1008,10 +1008,6 @@ void LandmarkFactoryHM::generate_landmarks( postprocess(task_proxy); } -bool LandmarkFactoryHM::computes_reasonable_orders() const { - return false; -} - bool LandmarkFactoryHM::supports_conditional_effects() const { return false; } diff --git a/src/search/landmarks/landmark_factory_h_m.h b/src/search/landmarks/landmark_factory_h_m.h index 7d6f0737fd..d8a411faab 100644 --- a/src/search/landmarks/landmark_factory_h_m.h +++ b/src/search/landmarks/landmark_factory_h_m.h @@ -140,7 +140,6 @@ class LandmarkFactoryHM : public LandmarkFactory { public: explicit LandmarkFactoryHM(const plugins::Options &opts); - virtual bool computes_reasonable_orders() const override; virtual bool supports_conditional_effects() const override; }; } diff --git a/src/search/landmarks/landmark_factory_merged.cc b/src/search/landmarks/landmark_factory_merged.cc index 61e6bb60a1..f67fb9a3b2 100644 --- a/src/search/landmarks/landmark_factory_merged.cc +++ b/src/search/landmarks/landmark_factory_merged.cc @@ -132,15 +132,6 @@ void LandmarkFactoryMerged::postprocess() { lm_graph->set_landmark_ids(); } -bool LandmarkFactoryMerged::computes_reasonable_orders() const { - for (const shared_ptr &lm_factory : lm_factories) { - if (lm_factory->computes_reasonable_orders()) { - return true; - } - } - return false; -} - bool LandmarkFactoryMerged::supports_conditional_effects() const { for (const shared_ptr &lm_factory : lm_factories) { if (!lm_factory->supports_conditional_effects()) { diff --git a/src/search/landmarks/landmark_factory_merged.h b/src/search/landmarks/landmark_factory_merged.h index 9d332f91c2..06556d9e1d 100644 --- a/src/search/landmarks/landmark_factory_merged.h +++ b/src/search/landmarks/landmark_factory_merged.h @@ -15,7 +15,6 @@ class LandmarkFactoryMerged : public LandmarkFactory { public: explicit LandmarkFactoryMerged(const plugins::Options &opts); - virtual bool computes_reasonable_orders() const override; virtual bool supports_conditional_effects() const override; }; } diff --git a/src/search/landmarks/landmark_factory_reasonable_orders_hps.cc b/src/search/landmarks/landmark_factory_reasonable_orders_hps.cc index 9d6a16baff..3469c0c1a1 100644 --- a/src/search/landmarks/landmark_factory_reasonable_orders_hps.cc +++ b/src/search/landmarks/landmark_factory_reasonable_orders_hps.cc @@ -349,10 +349,6 @@ bool LandmarkFactoryReasonableOrdersHPS::effect_always_happens( return eff.empty(); } -bool LandmarkFactoryReasonableOrdersHPS::computes_reasonable_orders() const { - return true; -} - bool LandmarkFactoryReasonableOrdersHPS::supports_conditional_effects() const { return lm_factory->supports_conditional_effects(); } diff --git a/src/search/landmarks/landmark_factory_reasonable_orders_hps.h b/src/search/landmarks/landmark_factory_reasonable_orders_hps.h index 91a7f2f991..01758afd49 100644 --- a/src/search/landmarks/landmark_factory_reasonable_orders_hps.h +++ b/src/search/landmarks/landmark_factory_reasonable_orders_hps.h @@ -21,7 +21,6 @@ class LandmarkFactoryReasonableOrdersHPS : public LandmarkFactory { public: LandmarkFactoryReasonableOrdersHPS(const plugins::Options &opts); - virtual bool computes_reasonable_orders() const override; virtual bool supports_conditional_effects() const override; }; } diff --git a/src/search/landmarks/landmark_factory_rpg_exhaust.cc b/src/search/landmarks/landmark_factory_rpg_exhaust.cc index a67a91d2f1..51e5d79579 100644 --- a/src/search/landmarks/landmark_factory_rpg_exhaust.cc +++ b/src/search/landmarks/landmark_factory_rpg_exhaust.cc @@ -53,10 +53,6 @@ void LandmarkFactoryRpgExhaust::generate_relaxed_landmarks( } } -bool LandmarkFactoryRpgExhaust::computes_reasonable_orders() const { - return false; -} - bool LandmarkFactoryRpgExhaust::supports_conditional_effects() const { return false; } diff --git a/src/search/landmarks/landmark_factory_rpg_exhaust.h b/src/search/landmarks/landmark_factory_rpg_exhaust.h index 027432ea11..7107893565 100644 --- a/src/search/landmarks/landmark_factory_rpg_exhaust.h +++ b/src/search/landmarks/landmark_factory_rpg_exhaust.h @@ -12,7 +12,6 @@ class LandmarkFactoryRpgExhaust : public LandmarkFactoryRelaxation { public: explicit LandmarkFactoryRpgExhaust(const plugins::Options &opts); - virtual bool computes_reasonable_orders() const override; virtual bool supports_conditional_effects() const override; }; } diff --git a/src/search/landmarks/landmark_factory_rpg_sasp.cc b/src/search/landmarks/landmark_factory_rpg_sasp.cc index af70a805ba..97a5e6b7da 100644 --- a/src/search/landmarks/landmark_factory_rpg_sasp.cc +++ b/src/search/landmarks/landmark_factory_rpg_sasp.cc @@ -627,10 +627,6 @@ void LandmarkFactoryRpgSasp::discard_disjunctive_landmarks() { } } -bool LandmarkFactoryRpgSasp::computes_reasonable_orders() const { - return false; -} - bool LandmarkFactoryRpgSasp::supports_conditional_effects() const { return true; } diff --git a/src/search/landmarks/landmark_factory_rpg_sasp.h b/src/search/landmarks/landmark_factory_rpg_sasp.h index 1489743dc7..9922974fd7 100644 --- a/src/search/landmarks/landmark_factory_rpg_sasp.h +++ b/src/search/landmarks/landmark_factory_rpg_sasp.h @@ -64,7 +64,6 @@ class LandmarkFactoryRpgSasp : public LandmarkFactoryRelaxation { public: explicit LandmarkFactoryRpgSasp(const plugins::Options &opts); - virtual bool computes_reasonable_orders() const override; virtual bool supports_conditional_effects() const override; }; } diff --git a/src/search/landmarks/landmark_factory_zhu_givan.cc b/src/search/landmarks/landmark_factory_zhu_givan.cc index 111cd54e85..349fac8954 100644 --- a/src/search/landmarks/landmark_factory_zhu_givan.cc +++ b/src/search/landmarks/landmark_factory_zhu_givan.cc @@ -300,10 +300,6 @@ void LandmarkFactoryZhuGivan::add_operator_to_triggers(const OperatorProxy &op) triggers[lm.var][lm.value].push_back(op_or_axiom_id); } -bool LandmarkFactoryZhuGivan::computes_reasonable_orders() const { - return false; -} - bool LandmarkFactoryZhuGivan::supports_conditional_effects() const { return true; } diff --git a/src/search/landmarks/landmark_factory_zhu_givan.h b/src/search/landmarks/landmark_factory_zhu_givan.h index 1b49f2cf0f..dbc1569a3f 100644 --- a/src/search/landmarks/landmark_factory_zhu_givan.h +++ b/src/search/landmarks/landmark_factory_zhu_givan.h @@ -77,7 +77,6 @@ class LandmarkFactoryZhuGivan : public LandmarkFactoryRelaxation { public: explicit LandmarkFactoryZhuGivan(const plugins::Options &opts); - virtual bool computes_reasonable_orders() const override; virtual bool supports_conditional_effects() const override; }; }