|
OptaPlanner core 6.0.0.Beta3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.optaplanner.core.impl.solver.DefaultSolver
public class DefaultSolver
Default implementation for Solver.
Solver| Field Summary | |
|---|---|
protected BasicPlumbingTermination |
basicPlumbingTermination
|
protected BestSolutionRecaller |
bestSolutionRecaller
|
protected org.slf4j.Logger |
logger
|
protected Long |
randomSeed
|
protected ScoreDirectorFactory |
scoreDirectorFactory
|
protected SolverEventSupport |
solverEventSupport
|
protected List<SolverPhase> |
solverPhaseList
|
protected DefaultSolverScope |
solverScope
|
protected AtomicBoolean |
solving
|
protected Termination |
termination
|
| Constructor Summary | |
|---|---|
DefaultSolver()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final transient org.slf4j.Logger logger
protected SolverEventSupport solverEventSupport
protected ScoreDirectorFactory scoreDirectorFactory
protected Long randomSeed
protected BasicPlumbingTermination basicPlumbingTermination
protected Termination termination
protected BestSolutionRecaller bestSolutionRecaller
protected List<SolverPhase> solverPhaseList
protected AtomicBoolean solving
protected DefaultSolverScope solverScope
| Constructor Detail |
|---|
public DefaultSolver()
| Method Detail |
|---|
public long getRandomSeed()
public void setRandomSeed(long randomSeed)
public ScoreDirectorFactory getScoreDirectorFactory()
getScoreDirectorFactory in interface Solverpublic void setScoreDirectorFactory(ScoreDirectorFactory scoreDirectorFactory)
public void setBasicPlumbingTermination(BasicPlumbingTermination basicPlumbingTermination)
public void setTermination(Termination termination)
public void setBestSolutionRecaller(BestSolutionRecaller bestSolutionRecaller)
public List<SolverPhase> getSolverPhaseList()
public void setSolverPhaseList(List<SolverPhase> solverPhaseList)
public void setPlanningProblem(Solution planningProblem)
setPlanningProblem in interface SolverplanningProblem - never nullpublic Solution getBestSolution()
getBestSolution in interface SolverSolution with a Score null.public long getTimeMillisSpend()
Solver
getTimeMillisSpend in interface Solverpublic SolutionDescriptor getSolutionDescriptor()
public DefaultSolverScope getSolverScope()
public boolean isSolving()
Solver
isSolving in interface SolverSolver.solve() method is still running.public boolean terminateEarly()
SolverSolver.solve() to actually return.
This method is thread-safe.
terminateEarly in interface SolverSolver.isTerminateEarly(),
Future.cancel(boolean)public boolean isTerminateEarly()
Solver
isTerminateEarly in interface SolverFuture.isCancelled()public boolean addProblemFactChange(ProblemFactChange problemFactChange)
SolverProblemFactChange to be processed.
As a side-effect, this restarts the Solver, effectively resetting all Terminations,
but not Solver.terminateEarly().
This method is thread-safe.
Follows specifications of BlockingQueue.add(Object) with by default
a capacity of Integer.MAX_VALUE.
addProblemFactChange in interface SolverproblemFactChange - never null
Collection.add(E))public boolean isEveryProblemFactChangeProcessed()
SolverProblemFactChanges have been processed.
This method is thread-safe.
isEveryProblemFactChangeProcessed in interface SolverProblemFactChanges left to dopublic final void solve()
SolverSolver early, call Solver.terminateEarly().
solve in interface SolverSolver.terminateEarly()public void solvingStarted(DefaultSolverScope solverScope)
protected void runSolverPhases()
public void solvingEnded(DefaultSolverScope solverScope)
public void addEventListener(SolverEventListener eventListener)
addEventListener in interface SolvereventListener - never nullpublic void removeEventListener(SolverEventListener eventListener)
removeEventListener in interface SolvereventListener - never nullpublic void addSolverPhaseLifecycleListener(SolverPhaseLifecycleListener solverPhaseLifecycleListener)
public void removeSolverPhaseLifecycleListener(SolverPhaseLifecycleListener solverPhaseLifecycleListener)
|
OptaPlanner core 6.0.0.Beta3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||