Skip to content

Commit

Permalink
[issue1087] Fix broken assertion.
Browse files Browse the repository at this point in the history
Conjunctive landmarks may overlap with simple landmarks.
  • Loading branch information
ClemensBuechner authored Oct 4, 2023
1 parent 6974655 commit e0cf32b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/search/landmarks/landmark_graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<LandmarkNode> new_node =
utils::make_unique_ptr<LandmarkNode>(move(landmark));
LandmarkNode *new_node_p = new_node.get();
Expand Down

0 comments on commit e0cf32b

Please sign in to comment.