Package com.dna.jopt.util.costconverger
Class AbstractCostConverger
java.lang.Object
com.dna.jopt.util.costconverger.AbstractCostConverger
- All Implemented Interfaces:
ICostConverger
- Direct Known Subclasses:
JoinedCostConverger,JoinedCostConvergerWithFinalAutoFilterStep
A converger allows to set after which amount of unchanged progress the
IOptimization is
stopped.- Since:
- 03/08/2019
- Version:
- 03/08/2019
- Author:
- DNA
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExecutionAlgorithm(String exectutionAlgo) Defines where theOptimizationcan be stopped by theConverger.onConverged(IOptimization opti) voidonDone(IOptimization opti) voidsetConvergenceThreshold(int numProgressSteps) Sets the convergence threshold X.voidsetOnConvergedTimeOut(long onConvergedtimeout, TimeUnit onConvergedTimeUnit) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.dna.jopt.util.costconverger.ICostConverger
getConvergenceCost
-
Constructor Details
-
AbstractCostConverger
-
-
Method Details
-
setOnConvergedTimeOut
- Specified by:
setOnConvergedTimeOutin interfaceICostConverger
-
setConvergenceThreshold
public void setConvergenceThreshold(int numProgressSteps) Description copied from interface:ICostConvergerSets the convergence threshold X. If the convergence cost did not change for X iterations in % the converger stops the optimizations.- Specified by:
setConvergenceThresholdin interfaceICostConverger- Parameters:
numProgressSteps- the new convergence threshold
-
addExecutionAlgorithm
Description copied from interface:ICostConvergerDefines where theOptimizationcan be stopped by theConverger. For implementation example please seeICostConverger.Possible values are
"GeneticEvolution"and"SimulatedAnnealing".- Specified by:
addExecutionAlgorithmin interfaceICostConverger- Parameters:
exectutionAlgo- the string of the algorithm in which the optimization can be stopped safely
-
onDone
- Specified by:
onDonein interfaceICostConverger
-
onConverged
- Specified by:
onConvergedin interfaceICostConverger
-