Class KNumObjectiveOptimalityChecker

java.lang.Object
com.artelys.kalis.KOptimalityToleranceChecker
com.artelys.kalis.KNumObjectiveOptimalityChecker

public class KNumObjectiveOptimalityChecker extends KOptimalityToleranceChecker
An OptimalityToleranceChecker to use with any type of
KNumVar objective, which use both a relative and absolute
difference criteria.
  • Constructor Details

    • KNumObjectiveOptimalityChecker

      protected KNumObjectiveOptimalityChecker(long cPtr, boolean cMemoryOwn)
    • KNumObjectiveOptimalityChecker

      public KNumObjectiveOptimalityChecker(boolean maximize, double absoluteTolerance, double relativeTolerance)
  • Method Details

    • getCPtr

      protected static long getCPtr(KNumObjectiveOptimalityChecker obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class KOptimalityToleranceChecker
    • delete

      public void delete()
      Overrides:
      delete in class KOptimalityToleranceChecker
    • isGoodEnough

      public boolean isGoodEnough(double bestSolutionObj, double bestBound)
      Description copied from class: KOptimalityToleranceChecker
      Check for the optimality tolearance

      Overrides:
      isGoodEnough in class KOptimalityToleranceChecker
      Parameters:
      bestSolutionObj -
      bestBound -
      Returns:
      true is the best solution is close enough - for some criteria - to the optimum
    • nextBoundToTry

      public double nextBoundToTry(double bestSolutionObj)
      Description copied from class: KOptimalityToleranceChecker
      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.

      Overrides:
      nextBoundToTry in class KOptimalityToleranceChecker
      Parameters:
      bestSolutionObj - the best objective value of already found solutions.
      Returns:
      a bound to set on the objective.