Class StepCountingHillClimbingAcceptor<Solution_>
java.lang.Object
org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter<Solution_>
org.optaplanner.core.impl.localsearch.event.LocalSearchPhaseLifecycleListenerAdapter<Solution_>
org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor<Solution_>
org.optaplanner.core.impl.localsearch.decider.acceptor.stepcountinghillclimbing.StepCountingHillClimbingAcceptor<Solution_>
- All Implemented Interfaces:
EventListener,Acceptor<Solution_>,LocalSearchPhaseLifecycleListener<Solution_>,SolverLifecycleListener<Solution_>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected StepCountingHillClimbingTypeprotected ScoreFields inherited from class org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor
logger -
Constructor Summary
ConstructorsConstructorDescriptionStepCountingHillClimbingAcceptor(int stepCountingHillClimbingSize, StepCountingHillClimbingType stepCountingHillClimbingType) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAccepted(LocalSearchMoveScope<Solution_> moveScope) voidphaseEnded(LocalSearchPhaseScope<Solution_> phaseScope) voidphaseStarted(LocalSearchPhaseScope<Solution_> phaseScope) voidstepEnded(LocalSearchStepScope<Solution_> stepScope) Methods inherited from class org.optaplanner.core.impl.localsearch.event.LocalSearchPhaseLifecycleListenerAdapter
stepStartedMethods inherited from class org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter
solvingEnded, solvingStartedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.optaplanner.core.impl.localsearch.event.LocalSearchPhaseLifecycleListener
stepStartedMethods inherited from interface org.optaplanner.core.impl.solver.event.SolverLifecycleListener
solvingEnded, solvingError, solvingStarted
-
Field Details
-
stepCountingHillClimbingSize
protected int stepCountingHillClimbingSize -
stepCountingHillClimbingType
-
thresholdScore
-
count
protected int count
-
-
Constructor Details
-
StepCountingHillClimbingAcceptor
public StepCountingHillClimbingAcceptor(int stepCountingHillClimbingSize, StepCountingHillClimbingType stepCountingHillClimbingType)
-
-
Method Details
-
phaseStarted
- Specified by:
phaseStartedin interfaceLocalSearchPhaseLifecycleListener<Solution_>- Overrides:
phaseStartedin classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
isAccepted
- Parameters:
moveScope- not null- Returns:
- true if accepted
-
stepEnded
- Specified by:
stepEndedin interfaceLocalSearchPhaseLifecycleListener<Solution_>- Overrides:
stepEndedin classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
phaseEnded
- Specified by:
phaseEndedin interfaceLocalSearchPhaseLifecycleListener<Solution_>- Overrides:
phaseEndedin classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-