Package com.artelys.kalis
Class KOptimalityToleranceChecker
- java.lang.Object
-
- com.artelys.kalis.KOptimalityToleranceChecker
-
- Direct Known Subclasses:
KAbsoluteToleranceOptimalityChecker
,KIntegerObjectiveOptimalityChecker
,KNumObjectiveOptimalityChecker
,KRelativeToleranceOptimalityChecker
public class KOptimalityToleranceChecker extends java.lang.Object
This interface sets a framework for objects providing method to check if the
current solution is close enough to the optimum, and, if not, to give a new
bound to set on the objective variable.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
swigCMemOwn
-
Constructor Summary
Constructors Modifier Constructor Description protected
KOptimalityToleranceChecker(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
protected void
finalize()
protected static long
getCPtr(KOptimalityToleranceChecker obj)
boolean
isGoodEnough(double bestSolutionObj, double bestBound)
Check for the optimality tolearance
double
nextBoundToTry(double bestSolutionObj)
Returns a bound to set on the objective, in order to look for solution which are not too close from the
current best known solution.
-
-
-
Method Detail
-
getCPtr
protected static long getCPtr(KOptimalityToleranceChecker obj)
-
finalize
protected void finalize()
- Overrides:
finalize
in classjava.lang.Object
-
delete
public void delete()
-
isGoodEnough
public boolean isGoodEnough(double bestSolutionObj, double bestBound)
Check for the optimality tolearance
- Parameters:
bestSolutionObj
-bestBound
-- Returns:
- true is the best solution is close enough - for some criteria - to the optimum
-
nextBoundToTry
public double nextBoundToTry(double bestSolutionObj)
Returns a bound to set on the objective, in order to look for solution which are not too close from the
current best known solution. This prevent from storing too many solutions which are very similar.
- Parameters:
bestSolutionObj
- the best objective value of already found solutions.- Returns:
- a bound to set on the objective.
-
-