|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.AbstractEntity
choco.AbstractSolver
public abstract class AbstractSolver
An abstract class handling the control for solving a problem
Field Summary | |
---|---|
protected static java.util.logging.Logger |
logger
an object for logging trace statements |
int |
maxNbSolutionStored
capacity of the history record (keeping solutions) |
java.util.ArrayList |
solutions
The historical record of solutions that were found |
Fields inherited from class choco.AbstractEntity |
---|
hook, problem |
Constructor Summary | |
---|---|
AbstractSolver()
|
Method Summary | |
---|---|
boolean |
existsSolution()
|
protected Solution |
makeSolutionFromCurrentState()
|
void |
recordSolution()
recording the current state as a solution stores information from the current state in the next solution of the problem 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 |
restoreBestSolution()
|
abstract void |
run()
main entry point: running the search algorithm controlled the Solver object |
void |
showSolution()
showing information about the last solution |
protected void |
storeSolution(Solution sol)
|
Methods inherited from class choco.AbstractEntity |
---|
getProblem, pretty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.ArrayList solutions
public int maxNbSolutionStored
protected static java.util.logging.Logger logger
Constructor Detail |
---|
public AbstractSolver()
Method Detail |
---|
public void recordSolution()
protected Solution makeSolutionFromCurrentState()
public void showSolution()
protected void storeSolution(Solution sol)
public boolean existsSolution()
public void restoreBestSolution()
public abstract void run()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |