basics.algo
Class VariationCoefficientBreaker

java.lang.Object
  extended by basics.algo.VariationCoefficientBreaker
All Implemented Interfaces:
AlgorithmStartsListener, IterationEndsListener, IterationStartsListener, PrematureAlgorithmBreaker, VehicleRoutingAlgorithmListener

public class VariationCoefficientBreaker
extends java.lang.Object
implements PrematureAlgorithmBreaker, IterationStartsListener, AlgorithmStartsListener, IterationEndsListener


Constructor Summary
VariationCoefficientBreaker(int nuOfIterations, double variationCoefficientThreshold)
           
 
Method Summary
 void informAlgorithmStarts(VehicleRoutingProblem problem, VehicleRoutingAlgorithm algorithm, java.util.Collection<VehicleRoutingProblemSolution> solutions)
           
 void informIterationEnds(int i, VehicleRoutingProblem problem, java.util.Collection<VehicleRoutingProblemSolution> solutions)
           
 void informIterationStarts(int i, VehicleRoutingProblem problem, java.util.Collection<VehicleRoutingProblemSolution> solutions)
           
 boolean isPrematureBreak(SearchStrategy.DiscoveredSolution discoveredSolution)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariationCoefficientBreaker

public VariationCoefficientBreaker(int nuOfIterations,
                                   double variationCoefficientThreshold)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isPrematureBreak

public boolean isPrematureBreak(SearchStrategy.DiscoveredSolution discoveredSolution)
Specified by:
isPrematureBreak in interface PrematureAlgorithmBreaker

informAlgorithmStarts

public void informAlgorithmStarts(VehicleRoutingProblem problem,
                                  VehicleRoutingAlgorithm algorithm,
                                  java.util.Collection<VehicleRoutingProblemSolution> solutions)
Specified by:
informAlgorithmStarts in interface AlgorithmStartsListener

informIterationEnds

public void informIterationEnds(int i,
                                VehicleRoutingProblem problem,
                                java.util.Collection<VehicleRoutingProblemSolution> solutions)
Specified by:
informIterationEnds in interface IterationEndsListener

informIterationStarts

public void informIterationStarts(int i,
                                  VehicleRoutingProblem problem,
                                  java.util.Collection<VehicleRoutingProblemSolution> solutions)
Specified by:
informIterationStarts in interface IterationStartsListener