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
Modifier and TypeFieldDescriptionprotected int
protected int
protected StepCountingHillClimbingType
protected Score
Fields inherited from class org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor
logger
-
Constructor Summary
ConstructorDescriptionStepCountingHillClimbingAcceptor
(int stepCountingHillClimbingSize, StepCountingHillClimbingType stepCountingHillClimbingType) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isAccepted
(LocalSearchMoveScope<Solution_> moveScope) void
phaseEnded
(LocalSearchPhaseScope<Solution_> phaseScope) void
phaseStarted
(LocalSearchPhaseScope<Solution_> phaseScope) void
stepEnded
(LocalSearchStepScope<Solution_> 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, 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:
phaseStarted
in interfaceLocalSearchPhaseLifecycleListener<Solution_>
- Overrides:
phaseStarted
in classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
isAccepted
- Parameters:
moveScope
- not null- Returns:
- true if accepted
-
stepEnded
- Specified by:
stepEnded
in interfaceLocalSearchPhaseLifecycleListener<Solution_>
- Overrides:
stepEnded
in classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
phaseEnded
- Specified by:
phaseEnded
in interfaceLocalSearchPhaseLifecycleListener<Solution_>
- Overrides:
phaseEnded
in classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-