Class AbstractDurativeOperator

java.lang.Object
fr.uga.pddl4j.problem.operator.AbstractInstantiatedOperator
fr.uga.pddl4j.problem.operator.AbstractDurativeOperator
All Implemented Interfaces:
Operator, Serializable
Direct Known Subclasses:
DurativeAction, DurativeMethod

public abstract class AbstractDurativeOperator extends AbstractInstantiatedOperator
This abstract class implements the common part of a durative operator.
See Also:
Serialized Form
  • Field Details

    • DEFAULT_DURATION

      public static NumericVariable DEFAULT_DURATION
      The default duration of the operator (0.0).
  • Constructor Details

    • AbstractDurativeOperator

      protected AbstractDurativeOperator(AbstractDurativeOperator other)
      Creates a new operator from an other.
      Parameters:
      other - the other operator.
    • AbstractDurativeOperator

      protected AbstractDurativeOperator(String name, int arity)
      Creates a new operator.
      Parameters:
      name - the name of the operator.
      arity - the arity of the operator.
    • AbstractDurativeOperator

      protected AbstractDurativeOperator(String name, int[] parameters, int[] instantiations, TemporalCondition preconditions)
      Creates a new operator. The length of the parameters and the length of instantiations must be the same.
      Parameters:
      name - the name of the operator.
      parameters - the types of the parameters.
      instantiations - the values of the parameters.
      preconditions - the precondition of the operator.
  • Method Details

    • getPrecondition

      public final TemporalCondition getPrecondition()
      Return the precondition of the operator.
      Returns:
      the precondition of the operator.
    • setPrecondition

      public final void setPrecondition(TemporalCondition precondition)
      Set the precondition of the operator.
      Parameters:
      precondition - the precondition to set.
    • getDurationConstraints

      public final List<NumericConstraint> getDurationConstraints()
      Returns the duration of the action.
      Returns:
      the duration of the action.
    • setDurationConstraints

      public final void setDurationConstraints(List<NumericConstraint> constraints)
      Sets the duration of the action.
      Parameters:
      constraints - the duration to set.
    • getDuration

      public final NumericVariable getDuration()
      Returns the duration of the action.
      Returns:
      the duration of the action.
    • setDuration

      public final void setDuration(NumericVariable duration)
      Sets the duration of the action.
      Parameters:
      duration - the duration to set.