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.boolean
Returns if this ordering constraints is consistent.boolean
Returnstrue
if the orderings constraints is totally ordered.void
removeTask(int task)
Remove a task of the ordering constraints network.void
resize(int newSize)
Resize the ordering constraints network.int
size()
Returns the size of the ordering constraints network, i.e., its number of tasks.void
Compute the transitive closure of the ordering constraints network.
-
Method Details
-
isTotallyOrdered
boolean isTotallyOrdered()Returnstrue
if the orderings constraints is totally ordered.- Returns:
true
if the ordering constraints is totally ordered;false
otherwise.
-
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:
true
if the ordering constraints network is consistent,false
otherwise.
-
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.
-