Package org.optaplanner.core.impl.constructionheuristic

## Class DefaultConstructionHeuristicPhase<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.phase.AbstractPhase<Solution_>
  - - org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase<Solution_>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
  All Implemented Interfaces:
    `EventListener`, `ConstructionHeuristicPhase<Solution_>`, `PhaseLifecycleListener<Solution_>`, `Phase<Solution_>`, `SolverLifecycleListener<Solution_>`

      public class DefaultConstructionHeuristicPhase<Solution_>
      extends AbstractPhase<Solution_>
      implements ConstructionHeuristicPhase<Solution_>

  Default implementation of `ConstructionHeuristicPhase`.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected ConstructionHeuristicDecider<Solution_>` | `decider` |
    `protected EntityPlacer<Solution_>` | `entityPlacer` |
    `protected boolean` | `skipBestSolutionCloningInSteps` |

    - ### Fields inherited from class org.optaplanner.core.impl.phase.AbstractPhase

      `assertExpectedStepScore, assertShadowVariablesAreNotStaleAfterStep, assertStepScoreFromScratch, bestSolutionRecaller, logger, logIndentation, phaseIndex, phaseLifecycleSupport, solverPhaseLifecycleSupport, termination`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultConstructionHeuristicPhase​(int phaseIndex, String logIndentation, BestSolutionRecaller<Solution_> bestSolutionRecaller, Termination<Solution_> termination)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getPhaseTypeString()` |
    `void` | `phaseEnded​(ConstructionHeuristicPhaseScope<Solution_> phaseScope)` |
    `void` | `phaseStarted​(ConstructionHeuristicPhaseScope<Solution_> phaseScope)` |
    `void` | `setDecider​(ConstructionHeuristicDecider<Solution_> decider)` |
    `void` | `setEntityPlacer​(EntityPlacer<Solution_> entityPlacer)` |
    `void` | `solve​(SolverScope<Solution_> solverScope)` |
    `void` | `solvingEnded​(SolverScope<Solution_> solverScope)` |
    `void` | `solvingStarted​(SolverScope<Solution_> solverScope)` |
    `void` | `stepEnded​(ConstructionHeuristicStepScope<Solution_> stepScope)` |
    `void` | `stepStarted​(ConstructionHeuristicStepScope<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, 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`

- - ### Field Detail

    - #### entityPlacer

          protected EntityPlacer<Solution_> entityPlacer

    - #### decider

          protected ConstructionHeuristicDecider<Solution_> decider

    - #### skipBestSolutionCloningInSteps

          protected final boolean skipBestSolutionCloningInSteps

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DefaultConstructionHeuristicPhase

          public DefaultConstructionHeuristicPhase​(int phaseIndex,
                                                   String logIndentation,
                                                   BestSolutionRecaller<Solution_> bestSolutionRecaller,
                                                   Termination<Solution_> termination)

  - ### Method Detail

    - #### setEntityPlacer

          public void setEntityPlacer​(EntityPlacer<Solution_> entityPlacer)

    - #### setDecider

          public void setDecider​(ConstructionHeuristicDecider<Solution_> decider)

    - #### getPhaseTypeString

          public String getPhaseTypeString()

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

    - #### solve

          public void solve​(SolverScope<Solution_> solverScope)

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

    - #### solvingStarted

          public void solvingStarted​(SolverScope<Solution_> solverScope)

      Specified by:
        `solvingStarted` in interface `SolverLifecycleListener<Solution_>`
      Overrides:
        `solvingStarted` in class `AbstractPhase<Solution_>`

    - #### phaseStarted

          public void phaseStarted​(ConstructionHeuristicPhaseScope<Solution_> phaseScope)

    - #### stepStarted

          public void stepStarted​(ConstructionHeuristicStepScope<Solution_> stepScope)

    - #### stepEnded

          public void stepEnded​(ConstructionHeuristicStepScope<Solution_> stepScope)

    - #### phaseEnded

          public void phaseEnded​(ConstructionHeuristicPhaseScope<Solution_> phaseScope)

    - #### solvingEnded

          public void solvingEnded​(SolverScope<Solution_> solverScope)

      Specified by:
        `solvingEnded` in interface `SolverLifecycleListener<Solution_>`
      Overrides:
        `solvingEnded` in class `AbstractPhase<Solution_>`