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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExecutionAlgorithm
(String exectutionAlgo) Defines where theOptimization
can be stopped by theConverger
.onConverged
(IOptimization opti) void
onDone
(IOptimization opti) void
setConvergenceThreshold
(int numProgressSteps) Sets the convergence threshold X.void
setOnConvergedTimeOut
(long onConvergedtimeout, TimeUnit onConvergedTimeUnit) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.dna.jopt.util.costconverger.ICostConverger
getConvergenceCost
-
Constructor Details
-
AbstractCostConverger
-
-
Method Details
-
setOnConvergedTimeOut
- Specified by:
setOnConvergedTimeOut
in interfaceICostConverger
-
setConvergenceThreshold
public void setConvergenceThreshold(int numProgressSteps) Description copied from interface:ICostConverger
Sets the convergence threshold X. If the convergence cost did not change for X iterations in % the converger stops the optimizations.- Specified by:
setConvergenceThreshold
in interfaceICostConverger
- Parameters:
numProgressSteps
- the new convergence threshold
-
addExecutionAlgorithm
Description copied from interface:ICostConverger
Defines where theOptimization
can be stopped by theConverger
. For implementation example please seeICostConverger
.Possible values are
"GeneticEvolution"
and"SimulatedAnnealing"
.- Specified by:
addExecutionAlgorithm
in interfaceICostConverger
- Parameters:
exectutionAlgo
- the string of the algorithm in which the optimization can be stopped safely
-
onDone
- Specified by:
onDone
in interfaceICostConverger
-
onConverged
- Specified by:
onConverged
in interfaceICostConverger
-