Package fr.uga.pddl4j.problem.operator
Interface OrderingConstraintNetwork
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractOrderingConstraintNetwork,DefaultOrderingConstraintNetwork,TemporalOrderingConstraintNetwork
This class implements an orderings constraints network. This class interface is used to deal with ordering
constraints in method.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of tasks with no predecessors.Returns the list of tasks with no successors.booleanReturns if this ordering constraints is consistent.booleanReturnstrueif the orderings constraints is totally ordered.voidremoveTask(int task)Remove a task of the ordering constraints network.voidresize(int newSize)Resize the ordering constraints network.intsize()Returns the size of the ordering constraints network, i.e., its number of tasks.voidCompute the transitive closure of the ordering constraints network.
-
Method Details
-
isTotallyOrdered
boolean isTotallyOrdered()Returnstrueif the orderings constraints is totally ordered.- Returns:
trueif the ordering constraints is totally ordered;falseotherwise.
-
getTasksWithNoSuccessors
Returns the list of tasks with no successors. The method works if only if the methodtransitiveClosure()was previously called.- Returns:
- the list of tasks with no successors.
-
getTasksWithNoPredecessors
Returns the list of tasks with no predecessors. The method works if only if the methodtransitiveClosure()was previously called.- Returns:
- the list of tasks with no predecessors.
-
isConsistent
boolean isConsistent()Returns if this ordering constraints is consistent.- Returns:
trueif the ordering constraints network is consistent,falseotherwise.
-
transitiveClosure
void transitiveClosure()Compute the transitive closure of the ordering constraints network. -
removeTask
void removeTask(int task)Remove a task of the ordering constraints network.- Parameters:
task- the task to removed.
-
size
int size()Returns the size of the ordering constraints network, i.e., its number of tasks.- Returns:
- the size of the ordering constraints network, i.e., its number of tasks.
-
resize
void resize(int newSize)Resize the ordering constraints network.- Parameters:
newSize- the new size.
-