Solution_
- the solution type, the class with the PlanningSolution
annotationpublic class MultiThreadedConstructionHeuristicDecider<Solution_> extends ConstructionHeuristicDecider<Solution_>
Modifier and Type | Field and Description |
---|---|
protected boolean |
assertExpectedStepScore |
protected boolean |
assertShadowVariablesAreNotStaleAfterStep |
protected boolean |
assertStepScoreFromScratch |
protected ExecutorService |
executor |
protected CyclicBarrier |
moveThreadBarrier |
protected int |
moveThreadCount |
protected List<MoveThreadRunner<Solution_>> |
moveThreadRunnerList |
protected BlockingQueue<MoveThreadOperation<Solution_>> |
operationQueue |
protected OrderByMoveIndexBlockingQueue<Solution_> |
resultQueue |
protected int |
selectedMoveBufferSize |
protected ThreadFactory |
threadFactory |
assertExpectedUndoMoveScore, assertMoveScoreFromScratch, forager, logger, logIndentation, termination
Constructor and Description |
---|
MultiThreadedConstructionHeuristicDecider(String logIndentation,
Termination termination,
ConstructionHeuristicForager forager,
ThreadFactory threadFactory,
int moveThreadCount,
int selectedMoveBufferSize) |
Modifier and Type | Method and Description |
---|---|
protected ExecutorService |
createThreadPoolExecutor() |
void |
decideNextStep(ConstructionHeuristicStepScope<Solution_> stepScope,
Placement<Solution_> placement) |
void |
phaseEnded(ConstructionHeuristicPhaseScope<Solution_> phaseScope) |
void |
phaseStarted(ConstructionHeuristicPhaseScope<Solution_> phaseScope) |
void |
setAssertExpectedStepScore(boolean assertExpectedStepScore) |
void |
setAssertShadowVariablesAreNotStaleAfterStep(boolean assertShadowVariablesAreNotStaleAfterStep) |
void |
setAssertStepScoreFromScratch(boolean assertStepScoreFromScratch) |
doMove, getForager, pickMove, setAssertExpectedUndoMoveScore, setAssertMoveScoreFromScratch, solvingEnded, solvingStarted, stepEnded, stepStarted
protected final ThreadFactory threadFactory
protected final int moveThreadCount
protected final int selectedMoveBufferSize
protected boolean assertStepScoreFromScratch
protected boolean assertExpectedStepScore
protected boolean assertShadowVariablesAreNotStaleAfterStep
protected BlockingQueue<MoveThreadOperation<Solution_>> operationQueue
protected OrderByMoveIndexBlockingQueue<Solution_> resultQueue
protected CyclicBarrier moveThreadBarrier
protected ExecutorService executor
protected List<MoveThreadRunner<Solution_>> moveThreadRunnerList
public MultiThreadedConstructionHeuristicDecider(String logIndentation, Termination termination, ConstructionHeuristicForager forager, ThreadFactory threadFactory, int moveThreadCount, int selectedMoveBufferSize)
public void setAssertStepScoreFromScratch(boolean assertStepScoreFromScratch)
public void setAssertExpectedStepScore(boolean assertExpectedStepScore)
public void setAssertShadowVariablesAreNotStaleAfterStep(boolean assertShadowVariablesAreNotStaleAfterStep)
public void phaseStarted(ConstructionHeuristicPhaseScope<Solution_> phaseScope)
phaseStarted
in class ConstructionHeuristicDecider<Solution_>
public void phaseEnded(ConstructionHeuristicPhaseScope<Solution_> phaseScope)
phaseEnded
in class ConstructionHeuristicDecider<Solution_>
protected ExecutorService createThreadPoolExecutor()
public void decideNextStep(ConstructionHeuristicStepScope<Solution_> stepScope, Placement<Solution_> placement)
decideNextStep
in class ConstructionHeuristicDecider<Solution_>
Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.