choco
Class AbstractSolver

java.lang.Object
  extended by choco.AbstractEntity
      extended by choco.AbstractSolver
All Implemented Interfaces:
Entity
Direct Known Subclasses:
AbstractGlobalSearchSolver

public abstract class AbstractSolver
extends AbstractEntity

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

solutions

public java.util.ArrayList solutions
The historical record of solutions that were found


maxNbSolutionStored

public int maxNbSolutionStored
capacity of the history record (keeping solutions)


logger

protected static java.util.logging.Logger logger
an object for logging trace statements

Constructor Detail

AbstractSolver

public AbstractSolver()
Method Detail

recordSolution

public 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.


makeSolutionFromCurrentState

protected Solution makeSolutionFromCurrentState()

showSolution

public void showSolution()
showing information about the last solution


storeSolution

protected void storeSolution(Solution sol)

existsSolution

public boolean existsSolution()

restoreBestSolution

public void restoreBestSolution()

run

public abstract void run()
main entry point: running the search algorithm controlled the Solver object