|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.search.AbstractSearchStrategy
public abstract class AbstractSearchStrategy
An abstract class handling the control for solving a model
Field Summary | |
---|---|
protected static Logger |
LOGGER
an object for logging trace statements |
protected int |
nbSolutions
count of the solutions found during search |
protected ISolutionPool |
solutionPool
|
Solver |
solver
The (optimization or decision) model to which the entity belongs. |
Constructor Summary | |
---|---|
AbstractSearchStrategy(Solver solver)
|
Method Summary | |
---|---|
boolean |
existsSolution()
indicates if the search find at least one solution. |
int |
getSolutionCount()
Get the solution count of the measure |
ISolutionPool |
getSolutionPool()
|
Solver |
getSolver()
Retrieves the solver of the entity |
List<Solution> |
getStoredSolutions()
|
void |
recordSolution()
recording the current state as a solution stores information from the current state in the next solution of the model note: only instantiated variables are recorded in the Solution object either all variables or a user-defined subset of them are recorded this may erase a soolution that was previously stored in the ith position this may also increase the size of the pb.solutions vector. |
void |
resetSolutions()
|
void |
restoreBestSolution()
|
void |
setSolutionPool(ISolutionPool solutionPool)
a null argument cancel the solution recording. |
void |
writeSolution(Solution sol)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger LOGGER
public final Solver solver
protected ISolutionPool solutionPool
protected int nbSolutions
Constructor Detail |
---|
public AbstractSearchStrategy(Solver solver)
Method Detail |
---|
public Solver getSolver()
public final boolean existsSolution()
ISolutionMeasures
existsSolution
in interface ISolutionMeasures
public final int getSolutionCount()
ISolutionMeasures
getSolutionCount
in interface ISolutionMeasures
public final ISolutionPool getSolutionPool()
public final void setSolutionPool(ISolutionPool solutionPool)
public final void resetSolutions()
public void recordSolution()
public void writeSolution(Solution sol)
public void restoreBestSolution()
public final List<Solution> getStoredSolutions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |