Class CompositeAcceptor
- 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.CompositeAcceptor
-
- All Implemented Interfaces:
EventListener,Acceptor,LocalSearchPhaseLifecycleListener,SolverLifecycleListener
public class CompositeAcceptor extends AbstractAcceptor
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 Modifier and Type Field Description protected List<Acceptor>acceptorList-
Fields inherited from class org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor
logger
-
-
Constructor Summary
Constructors Constructor Description CompositeAcceptor(List<Acceptor> acceptorList)CompositeAcceptor(Acceptor... acceptors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAccepted(LocalSearchMoveScope moveScope)voidphaseEnded(LocalSearchPhaseScope phaseScope)voidphaseStarted(LocalSearchPhaseScope phaseScope)voidsolvingEnded(DefaultSolverScope solverScope)voidsolvingStarted(DefaultSolverScope solverScope)voidstepEnded(LocalSearchStepScope stepScope)voidstepStarted(LocalSearchStepScope stepScope)
-
-
-
Method Detail
-
solvingStarted
public void solvingStarted(DefaultSolverScope solverScope)
- Specified by:
solvingStartedin interfaceSolverLifecycleListener- Overrides:
solvingStartedin classSolverLifecycleListenerAdapter
-
phaseStarted
public void phaseStarted(LocalSearchPhaseScope phaseScope)
- Specified by:
phaseStartedin interfaceLocalSearchPhaseLifecycleListener- Overrides:
phaseStartedin classLocalSearchPhaseLifecycleListenerAdapter
-
stepStarted
public void stepStarted(LocalSearchStepScope stepScope)
- Specified by:
stepStartedin interfaceLocalSearchPhaseLifecycleListener- Overrides:
stepStartedin classLocalSearchPhaseLifecycleListenerAdapter
-
isAccepted
public boolean isAccepted(LocalSearchMoveScope moveScope)
- Parameters:
moveScope- not null- Returns:
- true if accepted
-
stepEnded
public void stepEnded(LocalSearchStepScope stepScope)
- Specified by:
stepEndedin interfaceLocalSearchPhaseLifecycleListener- Overrides:
stepEndedin classLocalSearchPhaseLifecycleListenerAdapter
-
phaseEnded
public void phaseEnded(LocalSearchPhaseScope phaseScope)
- Specified by:
phaseEndedin interfaceLocalSearchPhaseLifecycleListener- Overrides:
phaseEndedin classLocalSearchPhaseLifecycleListenerAdapter
-
solvingEnded
public void solvingEnded(DefaultSolverScope solverScope)
- Specified by:
solvingEndedin interfaceSolverLifecycleListener- Overrides:
solvingEndedin classSolverLifecycleListenerAdapter
-
-