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 thePlanningSolution
annotation
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected boolean
protected ExecutorService
protected CyclicBarrier
protected final int
protected List<MoveThreadRunner<Solution_,
?>> protected BlockingQueue<MoveThreadOperation<Solution_>>
protected OrderByMoveIndexBlockingQueue<Solution_>
protected final int
protected final ThreadFactory
Fields inherited from class org.optaplanner.core.impl.localsearch.decider.LocalSearchDecider
acceptor, assertExpectedUndoMoveScore, assertMoveScoreFromScratch, forager, logger, logIndentation, moveSelector, termination
-
Constructor Summary
ConstructorDescriptionMultiThreadedLocalSearchDecider
(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 ExecutorService
void
decideNextStep
(LocalSearchStepScope<Solution_> stepScope) void
phaseEnded
(LocalSearchPhaseScope<Solution_> phaseScope) void
phaseStarted
(LocalSearchPhaseScope<Solution_> phaseScope) void
setAssertExpectedStepScore
(boolean assertExpectedStepScore) void
setAssertShadowVariablesAreNotStaleAfterStep
(boolean assertShadowVariablesAreNotStaleAfterStep) void
setAssertStepScoreFromScratch
(boolean assertStepScoreFromScratch) void
solvingError
(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:
phaseStarted
in classLocalSearchDecider<Solution_>
-
phaseEnded
- Overrides:
phaseEnded
in classLocalSearchDecider<Solution_>
-
solvingError
- Overrides:
solvingError
in classLocalSearchDecider<Solution_>
-
createThreadPoolExecutor
-
decideNextStep
- Overrides:
decideNextStep
in classLocalSearchDecider<Solution_>
-