Examples of MaxIter


Examples of org.apache.commons.math3.optim.MaxIter

        double[] objFunctionCoeff = new double[33];
        objFunctionCoeff[3] = 1;
        LinearObjectiveFunction f = new LinearObjectiveFunction(objFunctionCoeff, 0);
        SimplexSolver solver = new SimplexSolver(1e-4, 10, 1e-6);
       
        PointValuePair solution = solver.optimize(new MaxIter(1000), f, new LinearConstraintSet(constraints),
                                                  GoalType.MINIMIZE, new NonNegativeConstraint(true));
        Assert.assertEquals(0.3752298, solution.getValue(), 1e-4);
    }
View Full Code Here

Examples of org.apache.commons.math3.optim.MaxIter

       
        Assert.assertNull(callback.getSolution());
        Assert.assertFalse(callback.isSolutionOptimal());

        try {
            solver.optimize(new MaxIter(3), f, new LinearConstraintSet(constraints),
                            GoalType.MAXIMIZE, new NonNegativeConstraint(true), callback);
            Assert.fail("expected TooManyIterationsException");
        } catch (TooManyIterationsException ex) {
            // expected
        }
View Full Code Here

Examples of org.apache.commons.math3.optim.MaxIter

        double[] objFunctionCoeff = new double[33];
        objFunctionCoeff[3] = 1;
        LinearObjectiveFunction f = new LinearObjectiveFunction(objFunctionCoeff, 0);
        SimplexSolver solver = new SimplexSolver(1e-4, 10, 1e-6);
       
        PointValuePair solution = solver.optimize(new MaxIter(1000), f, new LinearConstraintSet(constraints),
                                                  GoalType.MINIMIZE, new NonNegativeConstraint(true));
        Assert.assertEquals(0.3752298, solution.getValue(), 1e-4);
    }
View Full Code Here

Examples of org.apache.commons.math3.optim.MaxIter

        double[] objFunctionCoeff = new double[33];
        objFunctionCoeff[3] = 1;
        LinearObjectiveFunction f = new LinearObjectiveFunction(objFunctionCoeff, 0);
        SimplexSolver solver = new SimplexSolver(1e-4, 10, 1e-6);
       
        PointValuePair solution = solver.optimize(new MaxIter(1000), f, new LinearConstraintSet(constraints),
                                                  GoalType.MINIMIZE, new NonNegativeConstraint(true));
        Assert.assertEquals(0.3752298, solution.getValue(), 1e-4);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.