int dim = startPoint.length;
final int numIterpolationPoints = 2 * dim + 1 + additionalInterpolationPoints;
BOBYQAOptimizer optim = new BOBYQAOptimizer(numIterpolationPoints);
PointValuePair result = boundaries == null ?
optim.optimize(new MaxEval(maxEvaluations),
new ObjectiveFunction(func),
goal,
SimpleBounds.unbounded(dim),
new InitialGuess(startPoint)) :
optim.optimize(new MaxEval(maxEvaluations),
new ObjectiveFunction(func),
goal,
new InitialGuess(startPoint),
new SimpleBounds(boundaries[0],
boundaries[1]));
// System.out.println(func.getClass().getName() + " = "