From e0cf32b396fb96410e22f9daf802da03707b43a2 Mon Sep 17 00:00:00 2001 From: ClemensBuechner Date: Wed, 4 Oct 2023 18:02:49 +0200 Subject: [PATCH] [issue1087] Fix broken assertion. Conjunctive landmarks may overlap with simple landmarks. --- src/search/landmarks/landmark_graph.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/search/landmarks/landmark_graph.cc b/src/search/landmarks/landmark_graph.cc index 812147d6b9..4ce14e2ebf 100644 --- a/src/search/landmarks/landmark_graph.cc +++ b/src/search/landmarks/landmark_graph.cc @@ -102,9 +102,11 @@ bool LandmarkGraph::contains_landmark(const FactPair &lm) const { } LandmarkNode &LandmarkGraph::add_landmark(Landmark &&landmark) { - assert(all_of(landmark.facts.begin(), landmark.facts.end(), [&](const FactPair &lm_fact) { - return !contains_landmark(lm_fact); - })); + assert(landmark.conjunctive + || all_of(landmark.facts.begin(), landmark.facts.end(), + [&](const FactPair &lm_fact) { + return !contains_landmark(lm_fact); + })); unique_ptr new_node = utils::make_unique_ptr(move(landmark)); LandmarkNode *new_node_p = new_node.get();