Package org.jacop.search.sgmpcs
Class SimpleImprovementSearch.CostListener<T extends IntVar>
- java.lang.Object
-
- org.jacop.search.SimpleSolutionListener<T>
-
- org.jacop.search.sgmpcs.SimpleImprovementSearch.CostListener<T>
-
- All Implemented Interfaces:
SolutionListener<T>
- Enclosing class:
- SimpleImprovementSearch<T extends IntVar>
public class SimpleImprovementSearch.CostListener<T extends IntVar> extends SimpleSolutionListener<T>
Saves the cost produced by a given search
-
-
Field Summary
-
Fields inherited from class org.jacop.search.SimpleSolutionListener
childrenSolutionListeners, noSolutions, parentSolutionListener, parentSolutionNo, solutionLimit, solutions, vars
-
-
Constructor Summary
Constructors Constructor Description CostListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
executeAfterSolution(Search<T> search, SelectChoicePoint<T> select)
It is executed by search after a solution is found.-
Methods inherited from class org.jacop.search.SimpleSolutionListener
assignSolution, assignSolution, findSolutionMatchingParent, getParentSolution, getSolution, getSolutions, getVariables, isRecordingSolutions, printAllSolutions, recordSolution, recordSolutions, returnSolution, returnSolution, searchAll, setChildrenListeners, setChildrenListeners, setParentSolutionListener, setSolutionLimit, setSolutionsNo, setVariables, solutionLimitReached, solutionsNo, toString
-
-
-
-
Method Detail
-
executeAfterSolution
public boolean executeAfterSolution(Search<T> search, SelectChoicePoint<T> select)
Description copied from interface:SolutionListener
It is executed by search after a solution is found.- Specified by:
executeAfterSolution
in interfaceSolutionListener<T extends IntVar>
- Overrides:
executeAfterSolution
in classSimpleSolutionListener<T extends IntVar>
- Parameters:
search
- the search which have found a solution.select
- the select choice point heuristic- Returns:
- false forces the search to keep looking for a solution, true then the search will accept a solution.
-
-