Open paulstapor opened 7 years ago
This is how I had it implemented till 4-5 years ago. My experience is that indeed the current implementation is more efficient. As an error is the objective function evaluation in fmincon.m is caught by setting the objective function to infinity, it usually takes many iterations to reject an infeasible starting point.
fmincon should immediately terminate the optimization if the evaluation fails (or returns inf) at the initial point. We could avoid one objective function evaluation + derivatives for every optimization run. The objective function cutoff could then be implemented in the output_fcn. When this is fixed, we should also change the recording of the evaluation time for failed optimization. At the moment they are counted as "free" i.e t_cpu = 0.
It might be beneficial not to evaluate the initial point before starting the optimization, but moving the fmincon call into a try-catch-section. This could save computation time when doing many multistarts and also make Pesto more stable in the case that fmincon throws an error. (Which can happen for trust-region-based optimization)