Skip to content

Commit

Permalink
Last fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Enrico Scala committed Sep 18, 2024
1 parent b194a2b commit ae6be6b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"tarski": ["tarski[arithmetic]"],
"pyperplan": ["up-pyperplan~=1.1.0"],
"tamer": ["up-tamer~=1.1.0"],
"enhsp": ["up-enhsp~=0.0.24"],
"enhsp": ["up-enhsp~=0.0.26"],
"fast-downward": ["up-fast-downward==0.4.1"],
"lpg": ["up-lpg==0.0.10"],
"fmap": ["up-fmap==0.0.13"],
Expand All @@ -35,7 +35,7 @@
"tarski[arithmetic]",
"up-pyperplan~=1.1.0",
"up-tamer~=1.1.0",
"up-enhsp~=0.0.24",
"up-enhsp~=0.0.26",
"up-fast-downward==0.4.1",
"up-lpg==0.0.10",
"up-fmap==0.0.13",
Expand Down
6 changes: 5 additions & 1 deletion unified_planning/io/pddl_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,11 @@ def _add_effect(
),
cond,
)
act.add_decrease_effect(*eff if timing is None else (timing, *eff)) # type: ignore
if isinstance(act, up.model.Process):
eff1 = (eff[0], (eff[1] * (-1)).simplify())
act.add_derivative(*eff1)
else:
act.add_decrease_effect(*eff if timing is None else (timing, *eff)) # type: ignore
elif op == "forall":
assert isinstance(exp, CustomParseResults)
if forall_variables:
Expand Down
2 changes: 1 addition & 1 deletion unified_planning/model/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ def add_derivative(
f"Process effect has an incompatible value type. Fluent type: {fluent_exp.type} // Value type: {value_exp.type}"
)
if not fluent_exp.type.is_int_type() and not fluent_exp.type.is_real_type():
raise UPTypeError("Increase effects can be created only on numeric types!")
raise UPTypeError("Derivative can be created only on numeric types!")
self._add_effect_instance(
up.model.effect.Effect(
fluent_exp,
Expand Down

0 comments on commit ae6be6b

Please sign in to comment.