Class DefaultPartitionedSearchPhase<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.phase.AbstractPhase<Solution_>
-
- org.optaplanner.core.impl.partitionedsearch.DefaultPartitionedSearchPhase<Solution_>
-
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
- All Implemented Interfaces:
EventListener
,PartitionedSearchPhaseLifecycleListener<Solution_>
,PartitionedSearchPhase<Solution_>
,PhaseLifecycleListener<Solution_>
,Phase<Solution_>
,SolverLifecycleListener<Solution_>
public class DefaultPartitionedSearchPhase<Solution_> extends AbstractPhase<Solution_> implements PartitionedSearchPhase<Solution_>, PartitionedSearchPhaseLifecycleListener<Solution_>
Default implementation ofPartitionedSearchPhase
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultPartitionedSearchPhase.Builder<Solution_>
-
Field Summary
Fields Modifier and Type Field Description protected HeuristicConfigPolicy<Solution_>
configPolicy
protected List<PhaseConfig>
phaseConfigList
protected Integer
runnablePartThreadLimit
protected SolutionPartitioner<Solution_>
solutionPartitioner
protected ThreadFactory
threadFactory
-
Fields inherited from class org.optaplanner.core.impl.phase.AbstractPhase
assertExpectedStepScore, assertShadowVariablesAreNotStaleAfterStep, assertStepScoreFromScratch, logger, logIndentation, phaseIndex, phaseLifecycleSupport, phaseTermination, solver, stepScoreMap
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PartitionSolver<Solution_>
buildPartitionSolver(ChildThreadPlumbingTermination<Solution_> childThreadPlumbingTermination, Semaphore runnablePartThreadSemaphore, SolverScope<Solution_> solverScope)
protected void
doStep(PartitionedSearchStepScope<Solution_> stepScope)
String
getPhaseTypeString()
void
phaseEnded(PartitionedSearchPhaseScope<Solution_> phaseScope)
void
phaseStarted(PartitionedSearchPhaseScope<Solution_> phaseScope)
void
solve(SolverScope<Solution_> solverScope)
void
stepEnded(PartitionedSearchStepScope<Solution_> stepScope)
void
stepStarted(PartitionedSearchStepScope<Solution_> stepScope)
-
Methods inherited from class org.optaplanner.core.impl.phase.AbstractPhase
addPhaseLifecycleListener, assertWorkingSolutionInitialized, calculateWorkingStepScore, getPhaseIndex, getPhaseTermination, getSolver, isAssertExpectedStepScore, isAssertShadowVariablesAreNotStaleAfterStep, isAssertStepScoreFromScratch, phaseEnded, phaseStarted, predictWorkingStepScore, removePhaseLifecycleListener, setSolver, solvingEnded, solvingStarted, stepEnded, stepStarted
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.optaplanner.core.impl.phase.Phase
addPhaseLifecycleListener, removePhaseLifecycleListener
-
Methods inherited from interface org.optaplanner.core.impl.phase.event.PhaseLifecycleListener
phaseEnded, phaseStarted, stepEnded, stepStarted
-
Methods inherited from interface org.optaplanner.core.impl.solver.event.SolverLifecycleListener
solvingEnded, solvingStarted
-
-
-
-
Field Detail
-
solutionPartitioner
protected final SolutionPartitioner<Solution_> solutionPartitioner
-
threadFactory
protected final ThreadFactory threadFactory
-
runnablePartThreadLimit
protected final Integer runnablePartThreadLimit
-
phaseConfigList
protected final List<PhaseConfig> phaseConfigList
-
configPolicy
protected final HeuristicConfigPolicy<Solution_> configPolicy
-
-
Method Detail
-
getPhaseTypeString
public String getPhaseTypeString()
- Specified by:
getPhaseTypeString
in classAbstractPhase<Solution_>
-
solve
public void solve(SolverScope<Solution_> solverScope)
-
buildPartitionSolver
public PartitionSolver<Solution_> buildPartitionSolver(ChildThreadPlumbingTermination<Solution_> childThreadPlumbingTermination, Semaphore runnablePartThreadSemaphore, SolverScope<Solution_> solverScope)
-
doStep
protected void doStep(PartitionedSearchStepScope<Solution_> stepScope)
-
phaseStarted
public void phaseStarted(PartitionedSearchPhaseScope<Solution_> phaseScope)
- Specified by:
phaseStarted
in interfacePartitionedSearchPhaseLifecycleListener<Solution_>
-
stepStarted
public void stepStarted(PartitionedSearchStepScope<Solution_> stepScope)
- Specified by:
stepStarted
in interfacePartitionedSearchPhaseLifecycleListener<Solution_>
-
stepEnded
public void stepEnded(PartitionedSearchStepScope<Solution_> stepScope)
- Specified by:
stepEnded
in interfacePartitionedSearchPhaseLifecycleListener<Solution_>
-
phaseEnded
public void phaseEnded(PartitionedSearchPhaseScope<Solution_> phaseScope)
- Specified by:
phaseEnded
in interfacePartitionedSearchPhaseLifecycleListener<Solution_>
-
-