org.drools.planner.core.localsearch.termination
Class AndCompositeTermination

java.lang.Object
  extended by org.drools.planner.core.localsearch.termination.AbstractTermination
      extended by org.drools.planner.core.localsearch.termination.AbstractCompositeTermination
          extended by org.drools.planner.core.localsearch.termination.AndCompositeTermination
All Implemented Interfaces:
LocalSearchSolverAware, LocalSearchSolverLifecycleListener, Termination

public class AndCompositeTermination
extends AbstractCompositeTermination


Field Summary
 
Fields inherited from class org.drools.planner.core.localsearch.termination.AbstractCompositeTermination
terminationList
 
Fields inherited from class org.drools.planner.core.localsearch.termination.AbstractTermination
localSearchSolver, logger
 
Constructor Summary
AndCompositeTermination()
           
 
Method Summary
 double calculateTimeGradient(LocalSearchStepScope localSearchStepScope)
          Calculates the minimum timeGradient of all Terminations.
 boolean isTerminated(LocalSearchStepScope localSearchStepScope)
          Called by the LocalSearchSolver after every step to determine if the search should stop.
 
Methods inherited from class org.drools.planner.core.localsearch.termination.AbstractCompositeTermination
beforeDeciding, setLocalSearchSolver, setTerminationList, solvingEnded, solvingStarted, stepDecided, stepTaken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndCompositeTermination

public AndCompositeTermination()
Method Detail

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 all the Terminations are 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 minimum timeGradient of the Terminations.


Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.