Package org.apache.commons.math3.optimization

Examples of org.apache.commons.math3.optimization.InitialGuess


    /** {@inheritDoc} */
    public PointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
                                   double[] startPoint,
                                   double[] lower, double[] upper) {
        return super.optimizeInternal(maxEval, f, goalType,
                                      new InitialGuess(startPoint),
                                      new SimpleBounds(lower, upper));
    }
View Full Code Here


                                                  0, new MersenneTwister(), false, null);
        final double[] lB = boundaries == null ? null : boundaries[0];
        final double[] uB = boundaries == null ? null : boundaries[1];
        PointValuePair result = boundaries == null ?
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint),
                           new CMAESOptimizer.Sigma(inSigma),
                           new CMAESOptimizer.PopulationSize(lambda)) :
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint),
                           new SimpleBounds(lB, uB),
                           new CMAESOptimizer.Sigma(inSigma),
                           new CMAESOptimizer.PopulationSize(lambda));
        // System.out.println("sol=" + Arrays.toString(result.getPoint()));
        Assert.assertEquals(expected.getValue(), result.getValue(), fTol);
View Full Code Here

        final double[] uB = boundaries == null ? null : boundaries[1];
        final int numIterpolationPoints = 2 * dim + 1 + additionalInterpolationPoints;
        BOBYQAOptimizer optim = new BOBYQAOptimizer(numIterpolationPoints);
        PointValuePair result = boundaries == null ?
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint)) :
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint),
                           new SimpleBounds(lB, uB));
//        System.out.println(func.getClass().getName() + " = "
//              + optim.getEvaluations() + " f(");
//        for (double x: result.getPoint())  System.out.print(x + " ");
//        System.out.println(") = " +  result.getValue());
View Full Code Here

        }

        return optimizeInternal(maxEval, f,
                                new Target(t),
                                new Weight(w),
                                new InitialGuess(startPoint));
    }
View Full Code Here

                                                  0, new MersenneTwister(), false, null);
        final double[] lB = boundaries == null ? null : boundaries[0];
        final double[] uB = boundaries == null ? null : boundaries[1];
        PointValuePair result = boundaries == null ?
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint),
                           new CMAESOptimizer.Sigma(inSigma),
                           new CMAESOptimizer.PopulationSize(lambda)) :
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint),
                           new SimpleBounds(lB, uB),
                           new CMAESOptimizer.Sigma(inSigma),
                           new CMAESOptimizer.PopulationSize(lambda));
        // System.out.println("sol=" + Arrays.toString(result.getPoint()));
        Assert.assertEquals(expected.getValue(), result.getValue(), fTol);
View Full Code Here

        final double[] uB = boundaries == null ? null : boundaries[1];
        final int numIterpolationPoints = 2 * dim + 1 + additionalInterpolationPoints;
        BOBYQAOptimizer optim = new BOBYQAOptimizer(numIterpolationPoints);
        PointValuePair result = boundaries == null ?
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint)) :
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint),
                           new SimpleBounds(lB, uB));
//        System.out.println(func.getClass().getName() + " = "
//              + optim.getEvaluations() + " f(");
//        for (double x: result.getPoint())  System.out.print(x + " ");
//        System.out.println(") = " +  result.getValue());
View Full Code Here

                                         final double[] startPoint) {
        return optimizeInternal(maxEval,
                                FunctionUtils.toMultivariateDifferentiableVectorFunction(f),
                                new Target(target),
                                new Weight(weights),
                                new InitialGuess(startPoint));
    }
View Full Code Here

                                         final double[] target, final double[] weights,
                                         final double[] startPoint) {
        return optimizeInternal(maxEval, f,
                                new Target(target),
                                new Weight(weights),
                                new InitialGuess(startPoint));
    }
View Full Code Here

        final double[] uB = boundaries == null ? null : boundaries[1];
        final int numIterpolationPoints = 2 * dim + 1 + additionalInterpolationPoints;
        BOBYQAOptimizer optim = new BOBYQAOptimizer(numIterpolationPoints);
        PointValuePair result = boundaries == null ?
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint)) :
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint),
                           new SimpleBounds(lB, uB));
//        System.out.println(func.getClass().getName() + " = "
//              + optim.getEvaluations() + " f(");
//        for (double x: result.getPoint())  System.out.print(x + " ");
//        System.out.println(") = " +  result.getValue());
View Full Code Here

    /** {@inheritDoc} */
    @Override
    public PointValuePair optimize(int maxEval, FUNC f, GoalType goalType,
                                   double[] startPoint) {
        return super.optimizeInternal(maxEval, f, goalType,
                                      new InitialGuess(startPoint));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.math3.optimization.InitialGuess

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.