Package org.optaplanner.core.impl.localsearch.decider.acceptor.lateacceptance

## Class LateAcceptanceAcceptor

- java.lang.Object
- - org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter<Solution_>
  - - org.optaplanner.core.impl.localsearch.event.LocalSearchPhaseLifecycleListenerAdapter
    - - org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor
      - - org.optaplanner.core.impl.localsearch.decider.acceptor.lateacceptance.LateAcceptanceAcceptor

- All Implemented Interfaces:
    `EventListener`, `Acceptor`, `LocalSearchPhaseLifecycleListener`, `SolverLifecycleListener`

      public class LateAcceptanceAcceptor
      extends AbstractAcceptor

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected boolean` | `hillClimbingEnabled` |
    `protected int` | `lateAcceptanceSize` |
    `protected int` | `lateScoreIndex` |
    `protected Score[]` | `previousScores` |

    - ### Fields inherited from class org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor

      `logger`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `LateAcceptanceAcceptor()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `isAccepted​(LocalSearchMoveScope moveScope)` |
    `void` | `phaseEnded​(LocalSearchPhaseScope phaseScope)` |
    `void` | `phaseStarted​(LocalSearchPhaseScope phaseScope)` |
    `void` | `setHillClimbingEnabled​(boolean hillClimbingEnabled)` |
    `void` | `setLateAcceptanceSize​(int lateAcceptanceSize)` |
    `void` | `stepEnded​(LocalSearchStepScope stepScope)` |

    - ### Methods inherited from class org.optaplanner.core.impl.localsearch.event.LocalSearchPhaseLifecycleListenerAdapter

      `stepStarted`

    - ### Methods inherited from class org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter

      `solvingEnded, solvingStarted`

    - ### 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.localsearch.event.LocalSearchPhaseLifecycleListener

      `stepStarted`

    - ### Methods inherited from interface org.optaplanner.core.impl.solver.event.SolverLifecycleListener

      `solvingEnded, solvingStarted`

- - ### Field Detail

    - #### lateAcceptanceSize

          protected int lateAcceptanceSize

    - #### hillClimbingEnabled

          protected boolean hillClimbingEnabled

    - #### previousScores

          protected Score[] previousScores

    - #### lateScoreIndex

          protected int lateScoreIndex

  - ### Constructor Detail

    - #### LateAcceptanceAcceptor

          public LateAcceptanceAcceptor()

  - ### Method Detail

    - #### setLateAcceptanceSize

          public void setLateAcceptanceSize​(int lateAcceptanceSize)

    - #### setHillClimbingEnabled

          public void setHillClimbingEnabled​(boolean hillClimbingEnabled)

    - #### phaseStarted

          public void phaseStarted​(LocalSearchPhaseScope phaseScope)

      Specified by:
        `phaseStarted` in interface `LocalSearchPhaseLifecycleListener`
      Overrides:
        `phaseStarted` in class `LocalSearchPhaseLifecycleListenerAdapter`

    - #### isAccepted

          public boolean isAccepted​(LocalSearchMoveScope moveScope)

      Parameters:
        `moveScope` - not null
      Returns:
        true if accepted

    - #### stepEnded

          public void stepEnded​(LocalSearchStepScope stepScope)

      Specified by:
        `stepEnded` in interface `LocalSearchPhaseLifecycleListener`
      Overrides:
        `stepEnded` in class `LocalSearchPhaseLifecycleListenerAdapter`

    - #### phaseEnded

          public void phaseEnded​(LocalSearchPhaseScope phaseScope)

      Specified by:
        `phaseEnded` in interface `LocalSearchPhaseLifecycleListener`
      Overrides:
        `phaseEnded` in class `LocalSearchPhaseLifecycleListenerAdapter`