public class NoGoodsCollector<T extends IntVar> extends Object implements ExitChildListener<T>, TimeOutListener, ExitListener
| Modifier and Type | Field and Description |
|---|---|
boolean |
timeOut
It specifies if the timeout has occurred and search is being terminated.
|
| Constructor and Description |
|---|
NoGoodsCollector() |
| Modifier and Type | Method and Description |
|---|---|
void |
executedAtExit(Store store,
int solutionsNo)
It is executed right after time out is determined.
|
void |
executedAtTimeOut(int noSolutions)
It is executed right after time out is determined.
|
boolean |
leftChild(PrimitiveConstraint choice,
boolean status)
It is executed after exiting the left child.
|
boolean |
leftChild(T var,
int value,
boolean status)
It is executed after exiting left child.
|
void |
rightChild(PrimitiveConstraint choice,
boolean status)
It is executed after exiting the right child.
|
void |
rightChild(T var,
int value,
boolean status)
It is executed after exiting the right child.
|
void |
setChildrenListeners(ExitChildListener<T> child)
It adds one child listener.
|
void |
setChildrenListeners(ExitChildListener<T>[] children)
It sets the children listeners for the current listener.
|
void |
setChildrenListeners(ExitListener child)
It sets one child listener.
|
void |
setChildrenListeners(ExitListener[] children)
It sets the children of this exit listener.
|
void |
setChildrenListeners(TimeOutListener child)
It sets child listener for this timeout listener.
|
void |
setChildrenListeners(TimeOutListener[] children)
It sets children listeners for this timeout listener.
|
String |
toString() |
public boolean timeOut
public void executedAtTimeOut(int noSolutions)
executedAtTimeOut in interface TimeOutListenernoSolutions - number of solutions found before the timeout occurred.public boolean leftChild(T var, int value, boolean status)
leftChild in interface ExitChildListener<T extends IntVar>var - variable used in the choice point.value - value used in the choice point.status - true if the solution was found in the child subtree, false otherwise.public boolean leftChild(PrimitiveConstraint choice, boolean status)
ExitChildListenerleftChild in interface ExitChildListener<T extends IntVar>choice - primitive constraint used as the base of the choice point.status - true if the solution was found in the child subtree, false otherwise.public void rightChild(T var, int value, boolean status)
ExitChildListenerrightChild in interface ExitChildListener<T extends IntVar>var - variable used in the choice point.value - value used in the choice point.status - true if the solution was found in the child subtree, false otherwise.
exit the current node with falsepublic void rightChild(PrimitiveConstraint choice, boolean status)
ExitChildListenerrightChild in interface ExitChildListener<T extends IntVar>choice - primitive constraint used as the base of the choice point.status - true if the solution was found in the child subtree, false otherwise.
exit the current node with falsepublic void executedAtExit(Store store, int solutionsNo)
ExitListenerexecutedAtExit in interface ExitListenerstore - store in the context of which the search took place.solutionsNo - the number of solutions found.public void setChildrenListeners(ExitChildListener<T>[] children)
ExitChildListenersetChildrenListeners in interface ExitChildListener<T extends IntVar>children - array containing children listeners.public void setChildrenListeners(ExitListener[] children)
ExitListenersetChildrenListeners in interface ExitListenerchildren - an array containing the children.public void setChildrenListeners(TimeOutListener[] children)
TimeOutListenersetChildrenListeners in interface TimeOutListenerchildren - list of children listeners.public void setChildrenListeners(TimeOutListener child)
TimeOutListenersetChildrenListeners in interface TimeOutListenerchild - child listener for this timeout listener.public void setChildrenListeners(ExitListener child)
ExitListenersetChildrenListeners in interface ExitListenerchild - the only child listener used by this listener.public void setChildrenListeners(ExitChildListener<T> child)
ExitChildListenersetChildrenListeners in interface ExitChildListener<T extends IntVar>child - added child listener.Copyright © 2022. All rights reserved.