Class AbstractSTNNode

java.lang.Object
fr.uga.pddl4j.planners.htn.stn.AbstractSTNNode
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PFDNode, TFDNode

public abstract class AbstractSTNNode extends Object implements Serializable
This class implements a node for the simple task network planners of the PDDL4J library.
Since:
4.0
See Also:
Serialized Form
  • Field Details

    • DEFAULT_OPERATOR

      public static int DEFAULT_OPERATOR
      The default operator value.
    • DEFAULT_TASK

      public static int DEFAULT_TASK
      The default task value.
  • Constructor Details

    • AbstractSTNNode

      public AbstractSTNNode(AbstractSTNNode other)
      Creates a new node from an other. This constructor creates a deep copy of the node in parameters.
      Parameters:
      other - the node to be copied.
    • AbstractSTNNode

      public AbstractSTNNode()
      Creates a new empty node with an empty state. The parent node is set to null, the operator to DEFAULT_OPERATOR and the task is set to DEFAULT_TASK.
    • AbstractSTNNode

      public AbstractSTNNode(State state, AbstractSTNNode parent, int operator, int task)
      Creates a new node with a specified state and task network.
      Parameters:
      state - state of this node.
      parent - the parent node of the node.
      operator - the index of the operator applied to reach the node.
      task - the task processed in this node.
  • Method Details

    • getState

      public final State getState()
      Returns the state of this node. The state describes the state of the world reached by the search.
      Returns:
      the state of this node.
    • setState

      public final void setState(State state)
      Sets the state of this node. The state describes the state of the world reached by the search.
      Parameters:
      state - the state to set.
    • getParent

      public final AbstractSTNNode getParent()
      Returns the parente node of this node. By convention, a node with a parent node equals to null is considered as the root node.
      Returns:
      the parent node of this node.
    • setParent

      public final void setParent(AbstractSTNNode parent)
      Sets the parent node of this node.
      Parameters:
      parent - the parent node to set.
    • getOperator

      public final int getOperator()
      Returns the operator applied to reach this node. The operator can be an action or a method. By convention, the operator is represented by its index in the action or method tables of the problem. To dissociate actions and methods, positive indexes are used for actions and negative ones for methods.
      Returns:
      the operator applied to reach this node.
    • setOperator

      public final void setOperator(int operator)
      Sets the operator applied to reach this node. The operator can be an action or a method. By convention, the operator is represented by its index in the action or method tables of the problem. To dissociate actions and methods, positive indexes are used for actions and negative ones for methods.
      Parameters:
      operator - the operator applied to reach this node.
    • getTask

      public int getTask()
      Returns the task process in this node.
      Returns:
      the task process in this node.
    • setTask

      public void setTask(int task)
      Sets the task process in this node.
      Parameters:
      task - the task process in this node.