Skip to content

Commit

Permalink
Merge branch 'aibasel:main' into issue1082
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDold authored Apr 5, 2024
2 parents 35a2867 + 61646d7 commit b697025
Show file tree
Hide file tree
Showing 22 changed files with 573 additions and 433 deletions.
7 changes: 0 additions & 7 deletions src/search/landmarks/landmark_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ class LandmarkFactory {

std::shared_ptr<LandmarkGraph> compute_lm_graph(const std::shared_ptr<AbstractTask> &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 {
Expand Down
4 changes: 0 additions & 4 deletions src/search/landmarks/landmark_factory_h_m.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1010,10 +1010,6 @@ void LandmarkFactoryHM::generate_landmarks(
postprocess(task_proxy);
}

bool LandmarkFactoryHM::computes_reasonable_orders() const {
return false;
}

bool LandmarkFactoryHM::supports_conditional_effects() const {
return false;
}
Expand Down
1 change: 0 additions & 1 deletion src/search/landmarks/landmark_factory_h_m.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ class LandmarkFactoryHM : public LandmarkFactory {
LandmarkFactoryHM(int m, bool conjunctive_landmarks,
bool use_orders, utils::Verbosity verbosity);

virtual bool computes_reasonable_orders() const override;
virtual bool supports_conditional_effects() const override;
};
}
Expand Down
9 changes: 0 additions & 9 deletions src/search/landmarks/landmark_factory_merged.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,6 @@ void LandmarkFactoryMerged::postprocess() {
lm_graph->set_landmark_ids();
}

bool LandmarkFactoryMerged::computes_reasonable_orders() const {
for (const shared_ptr<LandmarkFactory> &lm_factory : lm_factories) {
if (lm_factory->computes_reasonable_orders()) {
return true;
}
}
return false;
}

bool LandmarkFactoryMerged::supports_conditional_effects() const {
for (const shared_ptr<LandmarkFactory> &lm_factory : lm_factories) {
if (!lm_factory->supports_conditional_effects()) {
Expand Down
1 change: 0 additions & 1 deletion src/search/landmarks/landmark_factory_merged.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class LandmarkFactoryMerged : public LandmarkFactory {
std::vector<std::shared_ptr<LandmarkFactory>> &lm_factories,
utils::Verbosity verbosity);

virtual bool computes_reasonable_orders() const override;
virtual bool supports_conditional_effects() const override;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class LandmarkFactoryReasonableOrdersHPS : public LandmarkFactory {
std::shared_ptr<LandmarkFactory> &lm_factory,
utils::Verbosity verbosity);

virtual bool computes_reasonable_orders() const override;
virtual bool supports_conditional_effects() const override;
};
}
Expand Down
4 changes: 0 additions & 4 deletions src/search/landmarks/landmark_factory_rpg_exhaust.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ void LandmarkFactoryRpgExhaust::generate_relaxed_landmarks(
}
}

bool LandmarkFactoryRpgExhaust::computes_reasonable_orders() const {
return false;
}

bool LandmarkFactoryRpgExhaust::supports_conditional_effects() const {
return false;
}
Expand Down
1 change: 0 additions & 1 deletion src/search/landmarks/landmark_factory_rpg_exhaust.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class LandmarkFactoryRpgExhaust : public LandmarkFactoryRelaxation {
explicit LandmarkFactoryRpgExhaust(bool only_causal_landmarks,
utils::Verbosity verbosity);

virtual bool computes_reasonable_orders() const override;
virtual bool supports_conditional_effects() const override;
};
}
Expand Down
4 changes: 0 additions & 4 deletions src/search/landmarks/landmark_factory_rpg_sasp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,6 @@ void LandmarkFactoryRpgSasp::discard_disjunctive_landmarks() {
}
}

bool LandmarkFactoryRpgSasp::computes_reasonable_orders() const {
return false;
}

bool LandmarkFactoryRpgSasp::supports_conditional_effects() const {
return true;
}
Expand Down
1 change: 0 additions & 1 deletion src/search/landmarks/landmark_factory_rpg_sasp.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class LandmarkFactoryRpgSasp : public LandmarkFactoryRelaxation {
bool disjunctive_landmarks, bool use_orders,
bool only_causal_landmarks, utils::Verbosity verbosity);

virtual bool computes_reasonable_orders() const override;
virtual bool supports_conditional_effects() const override;
};
}
Expand Down
4 changes: 0 additions & 4 deletions src/search/landmarks/landmark_factory_zhu_givan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,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;
}
Expand Down
1 change: 0 additions & 1 deletion src/search/landmarks/landmark_factory_zhu_givan.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class LandmarkFactoryZhuGivan : public LandmarkFactoryRelaxation {
public:
LandmarkFactoryZhuGivan(bool use_orders, utils::Verbosity verbosity);

virtual bool computes_reasonable_orders() const override;
virtual bool supports_conditional_effects() const override;
};
}
Expand Down
Loading

0 comments on commit b697025

Please sign in to comment.