Class MultiThreadedLocalSearchDecider<Solution_>
java.lang.Object
org.optaplanner.core.impl.localsearch.decider.LocalSearchDecider<Solution_>
org.optaplanner.core.impl.localsearch.decider.MultiThreadedLocalSearchDecider<Solution_>
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected ExecutorServiceprotected CyclicBarrierprotected final intprotected List<MoveThreadRunner<Solution_,?>> protected BlockingQueue<MoveThreadOperation<Solution_>>protected OrderByMoveIndexBlockingQueue<Solution_>protected final intprotected final ThreadFactoryFields inherited from class org.optaplanner.core.impl.localsearch.decider.LocalSearchDecider
acceptor, assertExpectedUndoMoveScore, assertMoveScoreFromScratch, forager, logger, logIndentation, moveSelector, termination -
Constructor Summary
ConstructorsConstructorDescriptionMultiThreadedLocalSearchDecider(String logIndentation, Termination<Solution_> termination, MoveSelector<Solution_> moveSelector, Acceptor<Solution_> acceptor, LocalSearchForager<Solution_> forager, ThreadFactory threadFactory, int moveThreadCount, int selectedMoveBufferSize) -
Method Summary
Modifier and TypeMethodDescriptionprotected ExecutorServicevoiddecideNextStep(LocalSearchStepScope<Solution_> stepScope) voidphaseEnded(LocalSearchPhaseScope<Solution_> phaseScope) voidphaseStarted(LocalSearchPhaseScope<Solution_> phaseScope) voidsetAssertExpectedStepScore(boolean assertExpectedStepScore) voidsetAssertShadowVariablesAreNotStaleAfterStep(boolean assertShadowVariablesAreNotStaleAfterStep) voidsetAssertStepScoreFromScratch(boolean assertStepScoreFromScratch) voidsolvingError(SolverScope<Solution_> solverScope, Exception exception) Methods inherited from class org.optaplanner.core.impl.localsearch.decider.LocalSearchDecider
doMove, getAcceptor, getForager, getMoveSelector, getTermination, pickMove, setAssertExpectedUndoMoveScore, setAssertMoveScoreFromScratch, solvingEnded, solvingStarted, stepEnded, stepStarted
-
Field Details
-
threadFactory
-
moveThreadCount
protected final int moveThreadCount -
selectedMoveBufferSize
protected final int selectedMoveBufferSize -
assertStepScoreFromScratch
protected boolean assertStepScoreFromScratch -
assertExpectedStepScore
protected boolean assertExpectedStepScore -
assertShadowVariablesAreNotStaleAfterStep
protected boolean assertShadowVariablesAreNotStaleAfterStep -
operationQueue
-
resultQueue
-
moveThreadBarrier
-
executor
-
moveThreadRunnerList
-
-
Constructor Details
-
MultiThreadedLocalSearchDecider
public MultiThreadedLocalSearchDecider(String logIndentation, Termination<Solution_> termination, MoveSelector<Solution_> moveSelector, Acceptor<Solution_> acceptor, LocalSearchForager<Solution_> forager, ThreadFactory threadFactory, int moveThreadCount, int selectedMoveBufferSize)
-
-
Method Details
-
setAssertStepScoreFromScratch
public void setAssertStepScoreFromScratch(boolean assertStepScoreFromScratch) -
setAssertExpectedStepScore
public void setAssertExpectedStepScore(boolean assertExpectedStepScore) -
setAssertShadowVariablesAreNotStaleAfterStep
public void setAssertShadowVariablesAreNotStaleAfterStep(boolean assertShadowVariablesAreNotStaleAfterStep) -
phaseStarted
- Overrides:
phaseStartedin classLocalSearchDecider<Solution_>
-
phaseEnded
- Overrides:
phaseEndedin classLocalSearchDecider<Solution_>
-
solvingError
- Overrides:
solvingErrorin classLocalSearchDecider<Solution_>
-
createThreadPoolExecutor
-
decideNextStep
- Overrides:
decideNextStepin classLocalSearchDecider<Solution_>
-