ActionInstance

class unified_planning.plans.ActionInstance(action: Action, params: Sequence[Timing | Timepoint | int | float | Fraction | FNode | Fluent | Parameter | Variable | bool | str | Object] = (), agent: Agent | None = None, motion_paths: Dict[MotionConstraint, Path] | None = None)[source]

Bases: object

Represents an action instance with the actual parameters.

NOTE: two action instances of the same action with the same parameters are considered different as it is possible to have the same action twice in a Plan.

property agent: Agent | None

Returns the Agent of this ActionInstance.

property motion_paths: Dict[MotionConstraint, Path] | None

Returns the motion paths of this ActionInstance.

property action: Action

Returns the Action of this ActionInstance.

property actual_parameters: Tuple[FNode, ...]

Returns the actual parameters used to ground the Action in this ActionInstance.

is_semantically_equivalent(oth: ActionInstance) bool[source]

This method returns True Iff the 2 ActionInstances have the same semantic.

NOTE: This is different from __eq__; there the 2 Action Instances need to be exactly the same object.

Parameters:

oth – The ActionInstance that must be tested for semantical equivalence with self.

Returns:

True if the given ActionInstance is semantically equivalent to self, False otherwise.