new ObjectiveFunction(fitnessFunction),
GoalType.MINIMIZE,
new CMAESOptimizer.PopulationSize(5),
new CMAESOptimizer.Sigma(sigma),
new InitialGuess(start),
new SimpleBounds(lower, upper));
final double resNearLo = result.getPoint()[0];
// Optimum is near the upper bound.
lower[0] = -5e16;
upper[0] = 20;
result = optimizer.optimize(new MaxEval(100000),
new ObjectiveFunction(fitnessFunction),
GoalType.MINIMIZE,
new CMAESOptimizer.PopulationSize(5),
new CMAESOptimizer.Sigma(sigma),
new InitialGuess(start),
new SimpleBounds(lower, upper));
final double resNearHi = result.getPoint()[0];
// System.out.println("resNoBound=" + resNoBound +
// " resNearLo=" + resNearLo +
// " resNearHi=" + resNearHi);