Skip to content

Commit

Permalink
fix issue #255
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Fuggitti <francesco.fuggitti@gmail.com>
  • Loading branch information
francescofuggitti committed Jul 6, 2023
1 parent dc144b1 commit dcabbe5
Show file tree
Hide file tree
Showing 2 changed files with 177 additions and 86 deletions.
25 changes: 18 additions & 7 deletions plan4past/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,23 @@ def _update_domain_actions_det(
"""Update domain actions."""
new_actions = set()
for action in actions:
new_actions.add(
Action(
name=action.name,
parameters=[*action.parameters],
precondition=And(action.precondition),
effect=AndEffect(action.effect, *progression),
if isinstance(action.effect, AndEffect):
previous_effects = action.effect.operands
new_actions.add(
Action(
name=action.name,
parameters=[*action.parameters],
precondition=And(action.precondition),
effect=AndEffect(*previous_effects, *progression),
)
)
else:
new_actions.add(
Action(
name=action.name,
parameters=[*action.parameters],
precondition=And(action.precondition),
effect=AndEffect(action.effect, *progression),
)
)
)
return new_actions
Loading

0 comments on commit dcabbe5

Please sign in to comment.