| 
OptaPlanner core 6.2.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Solver
A Solver solves a planning problem.
 Clients usually call solve(Solution) and then getBestSolution().
 
solve(Solution) is not thread-safe for clients of this class,
 that method is free to do multi-threading inside itself.
 
 Build by a SolverFactory.
| Method Summary | |
|---|---|
 void | 
addEventListener(SolverEventListener eventListener)
 | 
 boolean | 
addProblemFactChange(ProblemFactChange problemFactChange)
Schedules a ProblemFactChange to be processed. | 
 Solution | 
getBestSolution()
 | 
 ScoreDirectorFactory | 
getScoreDirectorFactory()
 | 
 long | 
getTimeMillisSpent()
 | 
 boolean | 
isEveryProblemFactChangeProcessed()
Checks if all scheduled ProblemFactChanges have been processed. | 
 boolean | 
isSolving()
This method is thread-safe.  | 
 boolean | 
isTerminateEarly()
This method is thread-safe.  | 
 void | 
removeEventListener(SolverEventListener eventListener)
 | 
 void | 
solve(Solution planningProblem)
Solves the planning problem.  | 
 boolean | 
terminateEarly()
Notifies the solver that it should stop at its earliest convenience.  | 
| Method Detail | 
|---|
Solution getBestSolution()
Solution with a Score null.long getTimeMillisSpent()
void solve(Solution planningProblem)
Solver early, call terminateEarly().
planningProblem - never null, usually its planning variables are uninitializedterminateEarly()boolean isSolving()
solve(Solution) method is still running.boolean terminateEarly()
solve(Solution) to actually return.
 
 This method is thread-safe.
isTerminateEarly(), 
Future.cancel(boolean)boolean isTerminateEarly()
Future.isCancelled()boolean addProblemFactChange(ProblemFactChange problemFactChange)
ProblemFactChange to be processed.
 
 As a side-effect, this restarts the Solver, effectively resetting all Terminations,
 but not terminateEarly().
 
 This method is thread-safe.
 Follows specifications of BlockingQueue.add(Object) with by default
 a capacity of Integer.MAX_VALUE.
problemFactChange - never null
Collection.add(E))boolean isEveryProblemFactChangeProcessed()
ProblemFactChanges have been processed.
 
 This method is thread-safe.
ProblemFactChanges left to dovoid addEventListener(SolverEventListener eventListener)
eventListener - never nullvoid removeEventListener(SolverEventListener eventListener)
eventListener - never nullScoreDirectorFactory getScoreDirectorFactory()
  | 
OptaPlanner core 6.2.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||