Workflow of Stop Criterial with NMSearch or Brent

Home 21090308 Forums Numerical Method Optimization Workflow of Stop Criterial with NMSearch or Brent

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #1900


    I am planing to use your toolbox (the optimisation part) during my research and requested an academic license which I already received. Thank you for this fast response. Currently I am just testing all the function etc. I am a bit confused generally about the “tol” and “iteration” parameter of the search command, currently I tested Brent and NM search.

    Here my code:

    UnivariateRealFunction r = new UnivariateRealFunction() {
    private int i = 1;
    public double evaluate(double x) {
    double r = (x – 1) * (x – 1);
    System.out.println(String.format(“Iter: %3dtX: %-19sttValue: %-19s”, i, x, r));
    return r;

    Brent instance = new Brent();
    instance.solve(r, 1e-5, 100);
    double xmin = instance.search(-100, 100);
    double fmin = r.evaluate(xmin);

    Actually I am really confused how do you use the “iteration” and “tol” parameter. Could you explain to me, where you are using this in the algorithm? Another example, if I am using the NMSearch with this code:

    NelderMead nm = new NelderMead();
    nm.solve(f2, 1e-5, 40);

    I would expect maximal 40 or 43 iteration, with my three initial values. But the algorithms is calculating 82. Very confusing for me right now.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.