Class ApacheCommonsCMAESOptimizer

    • Field Detail

      • populationSize

        private int populationSize
        Population size
      • maxIterations

        private int maxIterations
        Maximal number of iterations.
      • stopFitness

        private double stopFitness
        Whether to stop if objective function value is smaller than stopFitness.
      • isActiveCMA

        private boolean isActiveCMA
        Chooses the covariance matrix update method.
      • diagonalOnly

        private int diagonalOnly
        Number of initial iterations, where the covariance matrix remains diagonal.
      • checkFeasableCount

        private int checkFeasableCount
        Determines how often new random objective variables are generated in case they are out of bounds.
      • precision

        private double precision
        The precision of the optimization
    • Constructor Detail

      • 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 Detail

      • solve

        public java.util.Map<Variable,​Term> solve​(ConstraintSatisfactionProblem problem)
                                                 throws GeneralMathException
        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 java.util.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 java.lang.UnsupportedOperationException
        Throws:
        java.lang.UnsupportedOperationException