Skip to content

Commit

Permalink
fix(interpreted functions): sequential simulator can handle IF in con…
Browse files Browse the repository at this point in the history
…ditions - this breaks test_partial_order_plan
  • Loading branch information
Samuel Gobbi committed Sep 24, 2024
1 parent 21e4699 commit f883ab7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion unified_planning/engines/interpreted_functions_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def _attempt_to_solve(
# print (res.plan)

spv = SequentialPlanValidator(environment=get_environment())
spv.skip_checks = True # have to use this
# spv.skip_checks = True # --------------------------------------------------------------------------
validation_result = spv.validate(problem, mappedbackplan)
if validation_result.status == ValidationResultStatus.VALID:
# print("the plan is ok")
Expand Down
3 changes: 3 additions & 0 deletions unified_planning/engines/sequential_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,9 @@ def supported_kind() -> "up.model.ProblemKind":
supported_kind.set_conditions_kind("EQUALITIES")
supported_kind.set_conditions_kind("EXISTENTIAL_CONDITIONS")
supported_kind.set_conditions_kind("UNIVERSAL_CONDITIONS")
supported_kind.set_conditions_kind(
"INTERPRETED_FUNCTIONS_IN_CONDITIONS"
) # causes problems in test_partial_order_plan
supported_kind.set_effects_kind("CONDITIONAL_EFFECTS")
supported_kind.set_effects_kind("INCREASE_EFFECTS")
supported_kind.set_effects_kind("DECREASE_EFFECTS")
Expand Down

0 comments on commit f883ab7

Please sign in to comment.