From f883ab7240128b4c182b9c638b7867ad467b102b Mon Sep 17 00:00:00 2001 From: Samuel Gobbi Date: Tue, 24 Sep 2024 13:51:47 +0200 Subject: [PATCH] fix(interpreted functions): sequential simulator can handle IF in conditions - this breaks test_partial_order_plan --- unified_planning/engines/interpreted_functions_planner.py | 2 +- unified_planning/engines/sequential_simulator.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/unified_planning/engines/interpreted_functions_planner.py b/unified_planning/engines/interpreted_functions_planner.py index 6eff7ecfc..90c39e7c3 100644 --- a/unified_planning/engines/interpreted_functions_planner.py +++ b/unified_planning/engines/interpreted_functions_planner.py @@ -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") diff --git a/unified_planning/engines/sequential_simulator.py b/unified_planning/engines/sequential_simulator.py index d1657b2bb..85159e443 100644 --- a/unified_planning/engines/sequential_simulator.py +++ b/unified_planning/engines/sequential_simulator.py @@ -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")