org.optaplanner.core.impl.partitionedsearch

## 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 the `PlanningSolution` 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 of `PartitionedSearchPhase`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected HeuristicConfigPolicy` | `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, bestSolutionRecaller, logger, logIndentation, phaseIndex, phaseLifecycleSupport, solverPhaseLifecycleSupport, termination`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultPartitionedSearchPhase(int phaseIndex, String logIndentation, BestSolutionRecaller<Solution_> bestSolutionRecaller, Termination termination, SolutionPartitioner<Solution_> solutionPartitioner, ThreadFactory threadFactory, Integer runnablePartThreadLimit)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PartitionSolver<Solution_>` | `buildPartitionSolver(ChildThreadPlumbingTermination childThreadPlumbingTermination, Semaphore runnablePartThreadSemaphore, DefaultSolverScope<Solution_> solverScope)`
    `protected void` | `doStep(PartitionedSearchStepScope<Solution_> stepScope)`
    `String` | `getPhaseTypeString()`
    `void` | `phaseEnded(PartitionedSearchPhaseScope<Solution_> phaseScope)`
    `void` | `phaseStarted(PartitionedSearchPhaseScope<Solution_> phaseScope)`
    `void` | `setConfigPolicy(HeuristicConfigPolicy configPolicy)`
    `void` | `setPhaseConfigList(List<PhaseConfig> phaseConfigList)`
    `void` | `solve(DefaultSolverScope<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, getTermination, isAssertExpectedStepScore, isAssertShadowVariablesAreNotStaleAfterStep, isAssertStepScoreFromScratch, phaseEnded, phaseStarted, predictWorkingStepScore, removePhaseLifecycleListener, setAssertExpectedStepScore, setAssertShadowVariablesAreNotStaleAfterStep, setAssertStepScoreFromScratch, setSolverPhaseLifecycleSupport, 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, setSolverPhaseLifecycleSupport`

    - ### 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 List<PhaseConfig> phaseConfigList

    - #### configPolicy

          protected HeuristicConfigPolicy configPolicy

  - ### Constructor Detail

    - #### DefaultPartitionedSearchPhase

          public DefaultPartitionedSearchPhase(int phaseIndex,
                                               String logIndentation,
                                               BestSolutionRecaller<Solution_> bestSolutionRecaller,
                                               Termination termination,
                                               SolutionPartitioner<Solution_> solutionPartitioner,
                                               ThreadFactory threadFactory,
                                               Integer runnablePartThreadLimit)

  - ### Method Detail

    - #### setPhaseConfigList

          public void setPhaseConfigList(List<PhaseConfig> phaseConfigList)

    - #### setConfigPolicy

          public void setConfigPolicy(HeuristicConfigPolicy configPolicy)

    - #### getPhaseTypeString

          public String getPhaseTypeString()

      Specified by:
        `getPhaseTypeString` in class `AbstractPhase<Solution_>`

    - #### solve

          public void solve(DefaultSolverScope<Solution_> solverScope)

      Specified by:
        `solve` in interface `Phase<Solution_>`

    - #### buildPartitionSolver

          public PartitionSolver<Solution_> buildPartitionSolver(ChildThreadPlumbingTermination childThreadPlumbingTermination,
                                                                 Semaphore runnablePartThreadSemaphore,
                                                                 DefaultSolverScope<Solution_> solverScope)

    - #### doStep

          protected void doStep(PartitionedSearchStepScope<Solution_> stepScope)

    - #### phaseStarted

          public void phaseStarted(PartitionedSearchPhaseScope<Solution_> phaseScope)

      Specified by:
        `phaseStarted` in interface `PartitionedSearchPhaseLifecycleListener<Solution_>`

    - #### stepStarted

          public void stepStarted(PartitionedSearchStepScope<Solution_> stepScope)

      Specified by:
        `stepStarted` in interface `PartitionedSearchPhaseLifecycleListener<Solution_>`

    - #### stepEnded

          public void stepEnded(PartitionedSearchStepScope<Solution_> stepScope)

      Specified by:
        `stepEnded` in interface `PartitionedSearchPhaseLifecycleListener<Solution_>`

    - #### phaseEnded

          public void phaseEnded(PartitionedSearchPhaseScope<Solution_> phaseScope)

      Specified by:
        `phaseEnded` in interface `PartitionedSearchPhaseLifecycleListener<Solution_>`

Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.