Package fr.uga.pddl4j.plan
Interface Plan
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractPlan,ParallelPlan,SequentialPlan,TemporalPlan
This interface defines the main methods of to access a search generated by a planner.
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptionactions()Returns the list of actions contained in the search in the ordering of their time specifiers.booleanAdds an action at a specified time specifier in the search.voidclear()Removes all the actions of the search.booleanReturns if an action is contained in the search at a specified time specifier.doublecost()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.booleanisEmpty()Returns if the search is empty.booleanReturns if this plan is hierarchical.doublemakespan()Returns the makespan of the search.booleanremove(int time)Removes all the actions at a specified time specifier of the search.booleanRemoves an action at a specified time specifier of the search.voidsetHierarchy(Hierarchy hierarchy)Sets the hierarchy of this plan.intsize()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
Returns the ordered set of time specifiers used in this search.- Returns:
- the ordered set of time specifiers used in this search.
-
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
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:
trueif the search is empty;falseotherwise.
-
clear
void clear()Removes all the actions of the search. -
add
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:
trueif the action was added;falseotherwise.
-
remove
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:
trueif the action was removed;falseotherwise.
-
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:
trueif the action was removed;falseotherwise.
-
contains
Returns if an action is contained in the search at a specified time specifier.- Parameters:
time- the time specifier.action- the action.- Returns:
trueif the specified action is contained in the search at the specified time specifier;falseotherwise.
-
isHierarchical
boolean isHierarchical()Returns if this plan is hierarchical.- Returns:
trueif this plan is hierarchical;falseotherwise.
-
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
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.
-