Class CompositeAcceptor<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.CompositeAcceptor<Solution_>
- All Implemented Interfaces:
EventListener
,Acceptor<Solution_>
,LocalSearchPhaseLifecycleListener<Solution_>
,SolverLifecycleListener<Solution_>
Combines several acceptors into one.
Does a logical AND over the accepted status of its acceptors.
For example: combine planning entity and planning value tabu to do tabu on both.
-
Field Summary
Fields inherited from class org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor
logger
-
Constructor Summary
ConstructorDescriptionCompositeAcceptor
(List<Acceptor<Solution_>> acceptorList) CompositeAcceptor
(Acceptor<Solution_>... acceptors) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isAccepted
(LocalSearchMoveScope<Solution_> moveScope) void
phaseEnded
(LocalSearchPhaseScope<Solution_> phaseScope) void
phaseStarted
(LocalSearchPhaseScope<Solution_> phaseScope) void
solvingEnded
(SolverScope<Solution_> solverScope) void
solvingStarted
(SolverScope<Solution_> solverScope) void
stepEnded
(LocalSearchStepScope<Solution_> stepScope) void
stepStarted
(LocalSearchStepScope<Solution_> stepScope) 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.solver.event.SolverLifecycleListener
solvingError
-
Field Details
-
acceptorList
-
-
Constructor Details
-
CompositeAcceptor
-
CompositeAcceptor
-
-
Method Details
-
solvingStarted
- Specified by:
solvingStarted
in interfaceSolverLifecycleListener<Solution_>
- Overrides:
solvingStarted
in classSolverLifecycleListenerAdapter<Solution_>
-
phaseStarted
- Specified by:
phaseStarted
in interfaceLocalSearchPhaseLifecycleListener<Solution_>
- Overrides:
phaseStarted
in classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
stepStarted
- Specified by:
stepStarted
in interfaceLocalSearchPhaseLifecycleListener<Solution_>
- Overrides:
stepStarted
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_>
-
solvingEnded
- Specified by:
solvingEnded
in interfaceSolverLifecycleListener<Solution_>
- Overrides:
solvingEnded
in classSolverLifecycleListenerAdapter<Solution_>
-