Interface Plan

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractPlan, ParallelPlan, SequentialPlan, TemporalPlan

public interface Plan extends Serializable
This interface defines the main methods of to access a search generated by a planner.
Since:
3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the list of actions contained in the search in the ordering of their time specifiers.
    boolean
    add​(int time, Action action)
    Adds an action at a specified time specifier in the search.
    void
    Removes all the actions of the search.
    boolean
    contains​(int time, Action action)
    Returns if an action is contained in the search at a specified time specifier.
    double
    Returns the cost of the search.
    getActionSet​(int time)
    Returns the set of actions at a specified time specifier.
    Returns the hierarchy of this plan.
    boolean
    Returns if the search is empty.
    boolean
    Returns if this plan is hierarchical.
    double
    Returns the makespan of the search.
    boolean
    remove​(int time)
    Removes all the actions at a specified time specifier of the search.
    boolean
    remove​(int time, Action action)
    Removes an action at a specified time specifier of the search.
    void
    setHierarchy​(Hierarchy hierarchy)
    Sets the hierarchy of this plan.
    int
    Returns the size of the search.
    Returns the ordered set of time specifiers used in this search.
  • Method Details

    • size

      int size()
      Returns the size of the search. The size of the search is its number of actions.
      Returns:
      the size of the search.
    • makespan

      double makespan()
      Returns the makespan of the search. The makespan is the the time difference between the start and finish of the search.
      Returns:
      the makespan of the search.
    • cost

      double cost()
      Returns the cost of the search. The cost of a search is the sum of the cost of its actions.
      Returns:
      the cost of the search.
    • timeSpecifiers

      Set<Integer> timeSpecifiers()
      Returns the ordered set of time specifiers used in this search.
      Returns:
      the ordered set of time specifiers used in this search.
    • actions

      List<Action> actions()
      Returns the list of actions contained in the search in the ordering of their time specifiers.
      Returns:
      the ordered set of actions of the search.
    • getActionSet

      Set<Action> getActionSet(int time)
      Returns the set of actions at a specified time specifier.
      Parameters:
      time - the time specifier.
      Returns:
      the set of actions at a specified time specifier or null if no actions are scheduled in the search at the the time specifier.
    • isEmpty

      boolean isEmpty()
      Returns if the search is empty.
      Returns:
      true if the search is empty; false otherwise.
    • clear

      void clear()
      Removes all the actions of the search.
    • add

      boolean add(int time, Action action)
      Adds an action at a specified time specifier in the search.
      Parameters:
      action - the action to add.
      time - the time specifier of the action in the search.
      Returns:
      true if the action was added; false otherwise.
    • remove

      boolean remove(int time, Action action)
      Removes an action at a specified time specifier of the search.
      Parameters:
      action - the action to remove.
      time - the time specifier of the action in the search to remove.
      Returns:
      true if the action was removed; false otherwise.
    • remove

      boolean remove(int time)
      Removes all the actions at a specified time specifier of the search.
      Parameters:
      time - the time specifier of the actions in the search to remove.
      Returns:
      true if the action was removed; false otherwise.
    • contains

      boolean contains(int time, Action action)
      Returns if an action is contained in the search at a specified time specifier.
      Parameters:
      time - the time specifier.
      action - the action.
      Returns:
      true if the specified action is contained in the search at the specified time specifier; false otherwise.
    • isHierarchical

      boolean isHierarchical()
      Returns if this plan is hierarchical.
      Returns:
      true if this plan is hierarchical; false otherwise.
    • getHierarchy

      Hierarchy getHierarchy()
      Returns the hierarchy of this plan. The hierarchy is additional information produced by HTN planners to specified the hierarchical decomposition of the initial task networks into primitive tasks applied to produce this plan.
      Returns:
      the hierarchical decomposition of this plan or null is this plan is not hierarchical.
    • setHierarchy

      void setHierarchy(Hierarchy hierarchy)
      Sets the hierarchy of this plan. The hierarchy is additional information produced by HTN planners to specified the hierarchical decomposition of the initial task networks into primitive tasks applied to produce this plan.
      Parameters:
      hierarchy - the hierarchical decomposition of this plan.