Interface Operator

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractDurativeOperator, AbstractInstantiatedOperator, AbstractIntOperator, AbstractOperator, Action, DurativeAction, DurativeMethod, IntAction, IntMethod, Method

public interface Operator extends Serializable
This interface defines the main methods of to access to an operator whatever its representation.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the arity of the operator.
    int[]
    Returns the values that represents the instantiated parameters of the operator.
    Return the name of this operator.
    int[]
    Returns the list of parameters of the operator.
    int
    getTypeOfParameters​(int index)
    Returns the type of the parameter at the specified index.
    int
    getValueOfParameter​(int index)
    Returns the value of the parameter at a specified index.
    boolean
    Return if the operator is already instantiated with the specified value.
    boolean
    Returns true if the operator is dummy.
    void
    setDummy​(boolean dummy)
    Sets the dummy flag of the operator to a specified value.
    void
    setName​(String name)
    Set the name of the operator.
    void
    setTypeOfParameter​(int index, int type)
    Set a new type the parameter at a specified index.
    void
    setValueOfParameter​(int index, int value)
    Instantiate a parameter of the operator at a specified index with a value.
  • Method Details

    • getName

      String getName()
      Return the name of this operator.
      Returns:
      the name of this operator
    • setName

      void setName(String name)
      Set the name of the operator.
      Parameters:
      name - the name to set.
    • getTypeOfParameters

      int getTypeOfParameters(int index)
      Returns the type of the parameter at the specified index.
      Parameters:
      index - the index of the parameter. The index must be in [0, arity].
      Returns:
      the type of the parameter at the specified index.
    • setTypeOfParameter

      void setTypeOfParameter(int index, int type)
      Set a new type the parameter at a specified index.
      Parameters:
      index - the index of the parameter. The index must be in [0, arity].
      type - the type to set.
    • getValueOfParameter

      int getValueOfParameter(int index)
      Returns the value of the parameter at a specified index.
      Parameters:
      index - the index. The index must be in [0, arity].
      Returns:
      the value of the parameter.
    • setValueOfParameter

      void setValueOfParameter(int index, int value)
      Instantiate a parameter of the operator at a specified index with a value.

      The assumption is made that different operator parameters are instantiated with different constants, i.e., the planner never generates actions like move(a,a) because we consider this as a bad domain representation that should be revised. In fact, in actions with identical constant parameters, all but one of the constants are superfluous and can be skipped from the representation without loss of information.

      Parameters:
      index - the index of the parameter to instantiate. The index must be in [0, arity].
      value - the value of instantiation.
    • arity

      int arity()
      Returns the arity of the operator.
      Returns:
      the arity of the operator.
    • getParameters

      int[] getParameters()
      Returns the list of parameters of the operator.
      Returns:
      the list of parameters of the operator.
    • getInstantiations

      int[] getInstantiations()
      Returns the values that represents the instantiated parameters of the operator.
      Returns:
      the values that represents the instantiated parameters of the operator.
    • isAlreadyInstantiatedWith

      boolean isAlreadyInstantiatedWith(int value)
      Return if the operator is already instantiated with the specified value.
      Parameters:
      value - the value.
      Returns:
      true if the operator is already instantiated with the specified value; false otherwise.
    • isDummy

      boolean isDummy()
      Returns true if the operator is dummy.
      Returns:
      true if the operator is dummy; false otherwise.
    • setDummy

      void setDummy(boolean dummy)
      Sets the dummy flag of the operator to a specified value.
      Parameters:
      dummy - the value of the dummy flag of the operator to set.