Hi,
I wonder how can I compute the total number of function evaluations (N) in the
algorithm so that I will know when the algorithm stop ( opt.maxeval < N) ?
For example, in the following optimization problem
minimize f(x1,x2,...,xp)
subject to { Xmin <= X <= Xmax }
I use an algorithm , e.g. NLOPT_LD_LBFGS. The input for each iteration is [
f(X) , df(X) ] . I use the "Central difference approximation" method to compute
the gradient vector df(X).
So I count the number of function evaluations like this:
- In each iteration of the algorithm: n = 1 + 2*p (1 evaluation for f(X), and
2*p evaluations for df(X))
- The total number of function evaluations with M iterations: N = M * (1+2*p)
and the process will stop when { opt.maxeval < M * (1+2*p) }
Is that right ?
Thanks_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss