org.drools.planner.core.localsearch.termination
Class OrCompositeTermination
java.lang.Object
org.drools.planner.core.localsearch.termination.AbstractTermination
org.drools.planner.core.localsearch.termination.AbstractCompositeTermination
org.drools.planner.core.localsearch.termination.OrCompositeTermination
- All Implemented Interfaces:
- LocalSearchSolverAware, LocalSearchSolverLifecycleListener, Termination
public class OrCompositeTermination
- extends AbstractCompositeTermination
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrCompositeTermination
public OrCompositeTermination()
isTerminated
public boolean isTerminated(LocalSearchStepScope localSearchStepScope)
- Description copied from interface:
Termination
- Called by the LocalSearchSolver after every step to determine if the search should stop.
- Parameters:
localSearchStepScope
- never null
- Returns:
- true if any of the Termination is terminated.
calculateTimeGradient
public double calculateTimeGradient(LocalSearchStepScope localSearchStepScope)
- Calculates the minimum timeGradient of all Terminations.
Not supported timeGradients (-1.0) are ignored.
- Parameters:
localSearchStepScope
- never null
- Returns:
- the maximum timeGradient of the Terminations.
Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.