Class ApacheCommonsCMAESOptimizer

java.lang.Object
org.tweetyproject.math.opt.solver.Solver
org.tweetyproject.math.opt.solver.ApacheCommonsCMAESOptimizer

public class ApacheCommonsCMAESOptimizer extends Solver
This class is a wrapper for the Apache Commons Math3 CMAES optimizer (https://commons.apache.org/proper/commons-math/).
Author:
Matthias Thimm
  • Constructor Details

    • ApacheCommonsCMAESOptimizer

      public ApacheCommonsCMAESOptimizer(int populationSize, int maxIterations, double stopFitness, boolean isActiveCMA, int diagonalOnly, int checkFeasableCount, double precision)
      Parameters from org.apache.commons.math3.optim.nonlinear.scalar.noderiv.CMAESOptimizer:
      Parameters:
      populationSize - the population size
      maxIterations - Maximal number of iterations.
      stopFitness - Whether to stop if objective function value is smaller than stopFitness.
      isActiveCMA - Chooses the covariance matrix update method.
      diagonalOnly - Number of initial iterations, where the covariance matrix remains diagonal.
      checkFeasableCount - Determines how often new random objective variables are generated in case they are out of bounds.
      precision - the precision of the optimization
  • Method Details

    • solve

      Description copied from class: Solver
      Computes a solution to the given constraint satisfaction or optimization problem, i.e. a mapping from variables of the problem to terms.
      Specified by:
      solve in class Solver
      Parameters:
      problem - the actual problem
      Returns:
      a mapping from variables of the problem to terms.
      Throws:
      GeneralMathException - if something went wrong.
    • solve

      public Map<Variable,Term> solve(Term t, int optimization_type) throws GeneralMathException
      Returns the variable assignment that maximizes/minimizes the given term (which only contains variables with defined upper and lower bounds).
      Parameters:
      t - the term to be evaluated
      optimization_type - one of OptimizationProblem.MAXIMIZE, OptimizationProblem.MINIMIZE
      Returns:
      the optimal variable assignment
      Throws:
      GeneralMathException - if there is some issue in the computation
    • isInstalled

      public static boolean isInstalled() throws UnsupportedOperationException
      Returns:
      if it is installed
      Throws:
      UnsupportedOperationException - UnsupportedOperationException