| Modifier and Type | Field and Description |
|---|---|
protected BasicPlumbingTermination |
basicPlumbingTermination |
protected BestSolutionRecaller |
bestSolutionRecaller |
protected boolean |
constraintMatchEnabledPreference |
protected EnvironmentMode |
environmentMode |
protected org.slf4j.Logger |
logger |
protected List<Phase> |
phaseList |
protected RandomFactory |
randomFactory |
protected InnerScoreDirectorFactory |
scoreDirectorFactory |
protected SolverEventSupport |
solverEventSupport |
protected DefaultSolverScope |
solverScope |
protected AtomicBoolean |
solving |
protected Termination |
termination |
| Constructor and Description |
|---|
DefaultSolver() |
protected final transient org.slf4j.Logger logger
protected SolverEventSupport solverEventSupport
protected EnvironmentMode environmentMode
protected RandomFactory randomFactory
protected boolean constraintMatchEnabledPreference
protected InnerScoreDirectorFactory scoreDirectorFactory
protected BasicPlumbingTermination basicPlumbingTermination
protected Termination termination
protected BestSolutionRecaller bestSolutionRecaller
protected AtomicBoolean solving
protected DefaultSolverScope solverScope
public EnvironmentMode getEnvironmentMode()
public void setEnvironmentMode(EnvironmentMode environmentMode)
public RandomFactory getRandomFactory()
public void setRandomFactory(RandomFactory randomFactory)
public boolean isConstraintMatchEnabledPreference()
public void setConstraintMatchEnabledPreference(boolean constraintMatchEnabledPreference)
public InnerScoreDirectorFactory getScoreDirectorFactory()
SolvergetScoreDirectorFactory in interface Solverpublic void setScoreDirectorFactory(InnerScoreDirectorFactory scoreDirectorFactory)
public void setBasicPlumbingTermination(BasicPlumbingTermination basicPlumbingTermination)
public void setTermination(Termination termination)
public BestSolutionRecaller getBestSolutionRecaller()
public void setBestSolutionRecaller(BestSolutionRecaller bestSolutionRecaller)
public DefaultSolverScope getSolverScope()
public Solution getBestSolution()
getBestSolution in interface SolverSolution with a Score null.public long getTimeMillisSpent()
getTimeMillisSpent in interface Solverpublic boolean isSolving()
SolverisSolving in interface SolverSolver.solve(Solution) method is still running.public boolean terminateEarly()
SolverSolver.solve(Solution) to actually return.
This method is thread-safe.
terminateEarly in interface SolverSolver.isTerminateEarly(),
Future.cancel(boolean)public boolean isTerminateEarly()
SolverisTerminateEarly in interface SolverSolver started.Future.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 nullCollection.add(E))public boolean isEveryProblemFactChangeProcessed()
SolverProblemFactChanges have been processed.
This method is thread-safe.
isEveryProblemFactChangeProcessed in interface SolverProblemFactChanges left to dopublic final void solve(Solution planningProblem)
SolverSolver early, call Solver.terminateEarly().solve in interface SolverplanningProblem - never null, usually its planning variables are uninitializedSolver.terminateEarly()public void outerSolvingStarted(DefaultSolverScope solverScope)
public void solvingStarted(DefaultSolverScope solverScope)
protected void runPhases()
public void solvingEnded(DefaultSolverScope solverScope)
public void outerSolvingEnded(DefaultSolverScope solverScope)
public void addEventListener(SolverEventListener eventListener)
addEventListener in interface SolvereventListener - never nullpublic void removeEventListener(SolverEventListener eventListener)
removeEventListener in interface SolvereventListener - never nullpublic void addPhaseLifecycleListener(PhaseLifecycleListener phaseLifecycleListener)
public void removePhaseLifecycleListener(PhaseLifecycleListener phaseLifecycleListener)
Copyright © 2006–2015 JBoss by Red Hat. All rights reserved.