Closed abrahamnunes closed 6 years ago
Just increment a global counter in your objective function. (Or if you don't want to use a global, pass in the counter via a closure.)
I guess we could provide a function to get this from opt
, but it would have to be added in the underlying C library first.
Many thanks!
please, could you publish sample how to get the iterations number? I cannot find a relevant method in nlopt '2.5.0'.
you can try (recent git version only):
opt.get_numevals()
please, could you inform when are you going to release new nlopt version, which will include the method?
A release is long overdue, but @stevengj is busy.
Hi all,
Sorry if this is the wrong place to post this question. Let me know, and if so I will move as necessary.
I'm running an experiment where I'm using BOBYQA from the nlopt package, I need to return the number of function evaluations and the number of iterations taken until solution. Perhaps I'm missing something somewhere in the documentation, but I can't seem to find out how to get these values with the Python interface.
Here is a simple demo program:
Any help will be much appreciated.
Cheers,
Abe