public class OneSolution<T extends Var> extends SimpleSolutionListener<T> implements ConsistencyListener, InitializeListener
childrenSolutionListeners, noSolutions, parentSolutionListener, parentSolutionNo, solutionLimit, solutions, vars
Constructor and Description |
---|
OneSolution() |
Modifier and Type | Method and Description |
---|---|
boolean |
executeAfterConsistency(boolean consistent)
It is executed right after consistency of the current search node.
|
boolean |
executeAfterSolution(Search<T> search,
SelectChoicePoint<T> select)
It is executed by search after a solution is found.
|
void |
executedAtInitialize(Store store)
It is executed before the search starts labeling procedure.
|
void |
setChildrenListeners(ConsistencyListener child)
Setting one child listener.
|
void |
setChildrenListeners(ConsistencyListener[] children)
Each of the child listeners will be called and the return code from them
will be combined (taken into account) by a parent).
|
void |
setChildrenListeners(InitializeListener child)
It sets one child listener for this initialize listener.
|
void |
setChildrenListeners(InitializeListener[] children)
It sets the children listeners of this initialize listener.
|
assignSolution, assignSolution, findSolutionMatchingParent, getParentSolution, getSolution, getSolutions, getVariables, isRecordingSolutions, printAllSolutions, recordSolution, recordSolutions, returnSolution, returnSolution, searchAll, setChildrenListeners, setChildrenListeners, setParentSolutionListener, setSolutionLimit, setSolutionsNo, setVariables, solutionLimitReached, solutionsNo, toString
public void executedAtInitialize(Store store)
InitializeListener
executedAtInitialize
in interface InitializeListener
store
- store in which context the search is performed.public void setChildrenListeners(InitializeListener[] children)
setChildrenListeners
in interface InitializeListener
children
- children listenerspublic void setChildrenListeners(InitializeListener child)
setChildrenListeners
in interface InitializeListener
child
- the child of this initialize listener.public boolean executeAfterSolution(Search<T> search, SelectChoicePoint<T> select)
SolutionListener
executeAfterSolution
in interface SolutionListener<T extends Var>
executeAfterSolution
in class SimpleSolutionListener<T extends Var>
search
- the search which have found a solution.select
- the select choice point heuristicpublic boolean executeAfterConsistency(boolean consistent)
ConsistencyListener
executeAfterConsistency
in interface ConsistencyListener
consistent
- specifies if the consistency call returned true or false.public void setChildrenListeners(ConsistencyListener[] children)
ConsistencyListener
setChildrenListeners
in interface ConsistencyListener
children
- the children listeners attached to this listener.public void setChildrenListeners(ConsistencyListener child)
ConsistencyListener
setChildrenListeners
in interface ConsistencyListener
child
- the only child listener added to this consistency listener.Copyright © 2022. All rights reserved.