SimulatedExecutionEnvironment
- class unified_planning.model.contingent.SimulatedExecutionEnvironment(problem: ContingentProblem, max_constraints: int | None = None)[source]
Bases:
ExecutionEnvironmentSimulates the effects of actions on a given contingent planning problem.
This class creates a deterministic version of a contingent problem by randomly resolving hidden fluent values (respecting oneof/or constraints), then uses a sequential simulator to apply actions and return observations.
- Parameters:
problem – A
ContingentProblemobject representing the planning problem to simulate.
- apply(action: ActionInstance) Dict[FNode, FNode][source]
Applies the given action to the current state and returns the resulting observation.
- Parameters:
action – A
ActionInstanceobject representing the action to apply.- Returns:
A dictionary mapping the fluent expressions observed by the sensing action to their corresponding values.