I am minimizing a nonlinear constrained problem using
FindMinimum. The problem involves about 200 variables and the function is a black-box which cannot be compiled/optimized (I have set the Method as Automatic).
During evaluations, I collect the value of the objective function at intermediate evaluations using
EvaluationMonitor option. I have a
Monitor statement enclosing the
FindMinimum which plots the objectiveFunction against the number of function evaluations. This was the picture.
Is there an option to (gracefully) terminate the
nMax number of function evaluations, returning the best solution of those so far evaluated (like position 25 in the image)? (
MaxIterations does not achieve it, since it is a bound on the number of steps taken and not the function evaluations).