Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(htn): Remove ACTION_BASED class from HTN planning problem kind. #523

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading