Skip to content

Commit

Permalink
refactoring: fixed natural_transition set property
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Gobbi committed Dec 3, 2024
1 parent 1ec433c commit c770833
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 8 additions & 1 deletion unified_planning/model/mixins/natural_transitions_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@ def natural_transitions(
]
]:
"""Returns the list of the `Processes` and `Events` in the `Problem`."""
return self.events + self.processes
ntlist: List[
Union[
up.model.natural_transition.Event, up.model.natural_transition.Process
]
] = []
ntlist.extend(self.processes)
ntlist.extend(self.events)
return ntlist

def clear_events(self):
"""Removes all the `Problem` `Events`."""
Expand Down
1 change: 0 additions & 1 deletion unified_planning/test/test_pddl_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ def test_examples_io(self):
w.write_problem(problem_filename)

reader = PDDLReader()
print(problem)
parsed_problem = reader.parse_problem(domain_filename, problem_filename)

# Case where the reader does not convert the final_value back to actions_cost.
Expand Down

0 comments on commit c770833

Please sign in to comment.