Skip to content

Commit

Permalink
Merge pull request #523 from aiplan4eu/fix-htn-kind
Browse files Browse the repository at this point in the history
fix(htn): Remove `ACTION_BASED` class from HTN planning problem kind.
  • Loading branch information
alvalentini committed Nov 17, 2023
2 parents 73cacaa + 2b2866d commit 4473e4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions unified_planning/model/htn/hierarchical_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def kind(self) -> "up.model.problem_kind.ProblemKind":
minimum time as possible."""
factory = self._kind_factory()
factory.kind.set_problem_class("HIERARCHICAL")
factory.kind.unset_problem_class("ACTION_BASED")
(TO, PO, TEMPORAL) = (0, 1, 2)

def lvl(tn: AbstractTaskNetwork):
Expand Down
7 changes: 4 additions & 3 deletions unified_planning/test/examples/hierarchical.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def goto_hier(


if __name__ == "__main__":
for name, problem in get_example_problems().items():
print(f"======= {name} ======")
print(str(problem))
for name, test_case in get_example_problems().items():
print(f"\n======= {name} ======\n")
print(test_case.problem.kind)
print(test_case.problem)

0 comments on commit 4473e4c

Please sign in to comment.