Class MultiThreadedConstructionHeuristicDecider<Solution_>
- java.lang.Object
- 
- org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider<Solution_>
- 
- org.optaplanner.core.impl.constructionheuristic.decider.MultiThreadedConstructionHeuristicDecider<Solution_>
 
 
- 
- Type Parameters:
- Solution_- the solution type, the class with the- PlanningSolutionannotation
 
 public class MultiThreadedConstructionHeuristicDecider<Solution_> extends ConstructionHeuristicDecider<Solution_> 
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleanassertExpectedStepScoreprotected booleanassertShadowVariablesAreNotStaleAfterStepprotected booleanassertStepScoreFromScratchprotected ExecutorServiceexecutorprotected CyclicBarriermoveThreadBarrierprotected intmoveThreadCountprotected List<MoveThreadRunner<Solution_,?>>moveThreadRunnerListprotected BlockingQueue<MoveThreadOperation<Solution_>>operationQueueprotected OrderByMoveIndexBlockingQueue<Solution_>resultQueueprotected intselectedMoveBufferSizeprotected ThreadFactorythreadFactory- 
Fields inherited from class org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDeciderassertExpectedUndoMoveScore, assertMoveScoreFromScratch, forager, logger, logIndentation, termination
 
- 
 - 
Constructor SummaryConstructors Constructor Description MultiThreadedConstructionHeuristicDecider(String logIndentation, Termination<Solution_> termination, ConstructionHeuristicForager<Solution_> forager, ThreadFactory threadFactory, int moveThreadCount, int selectedMoveBufferSize)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ExecutorServicecreateThreadPoolExecutor()voiddecideNextStep(ConstructionHeuristicStepScope<Solution_> stepScope, Placement<Solution_> placement)voidphaseEnded(ConstructionHeuristicPhaseScope<Solution_> phaseScope)voidphaseStarted(ConstructionHeuristicPhaseScope<Solution_> phaseScope)voidsetAssertExpectedStepScore(boolean assertExpectedStepScore)voidsetAssertShadowVariablesAreNotStaleAfterStep(boolean assertShadowVariablesAreNotStaleAfterStep)voidsetAssertStepScoreFromScratch(boolean assertStepScoreFromScratch)- 
Methods inherited from class org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDeciderdoMove, getForager, pickMove, setAssertExpectedUndoMoveScore, setAssertMoveScoreFromScratch, solvingEnded, solvingStarted, stepEnded, stepStarted
 
- 
 
- 
- 
- 
Field Detail- 
threadFactoryprotected final ThreadFactory threadFactory 
 - 
moveThreadCountprotected final int moveThreadCount 
 - 
selectedMoveBufferSizeprotected final int selectedMoveBufferSize 
 - 
assertStepScoreFromScratchprotected boolean assertStepScoreFromScratch 
 - 
assertExpectedStepScoreprotected boolean assertExpectedStepScore 
 - 
assertShadowVariablesAreNotStaleAfterStepprotected boolean assertShadowVariablesAreNotStaleAfterStep 
 - 
operationQueueprotected BlockingQueue<MoveThreadOperation<Solution_>> operationQueue 
 - 
resultQueueprotected OrderByMoveIndexBlockingQueue<Solution_> resultQueue 
 - 
moveThreadBarrierprotected CyclicBarrier moveThreadBarrier 
 - 
executorprotected ExecutorService executor 
 - 
moveThreadRunnerListprotected List<MoveThreadRunner<Solution_,?>> moveThreadRunnerList 
 
- 
 - 
Constructor Detail- 
MultiThreadedConstructionHeuristicDeciderpublic MultiThreadedConstructionHeuristicDecider(String logIndentation, Termination<Solution_> termination, ConstructionHeuristicForager<Solution_> forager, ThreadFactory threadFactory, int moveThreadCount, int selectedMoveBufferSize) 
 
- 
 - 
Method Detail- 
setAssertStepScoreFromScratchpublic void setAssertStepScoreFromScratch(boolean assertStepScoreFromScratch) 
 - 
setAssertExpectedStepScorepublic void setAssertExpectedStepScore(boolean assertExpectedStepScore) 
 - 
setAssertShadowVariablesAreNotStaleAfterSteppublic void setAssertShadowVariablesAreNotStaleAfterStep(boolean assertShadowVariablesAreNotStaleAfterStep) 
 - 
phaseStartedpublic void phaseStarted(ConstructionHeuristicPhaseScope<Solution_> phaseScope) - Overrides:
- phaseStartedin class- ConstructionHeuristicDecider<Solution_>
 
 - 
phaseEndedpublic void phaseEnded(ConstructionHeuristicPhaseScope<Solution_> phaseScope) - Overrides:
- phaseEndedin class- ConstructionHeuristicDecider<Solution_>
 
 - 
createThreadPoolExecutorprotected ExecutorService createThreadPoolExecutor() 
 - 
decideNextSteppublic void decideNextStep(ConstructionHeuristicStepScope<Solution_> stepScope, Placement<Solution_> placement) - Overrides:
- decideNextStepin class- ConstructionHeuristicDecider<Solution_>
 
 
- 
 
-