MATLAB: How to understand if the optimization getting stuck in local optima

fminconlinear constrained optimization fminconoptimization

HI i am new bie in matlab optimization . I am optimizing 944 variable using fmincon and algorithm sqp. I am bit concerned if my program is getting stuck with local optima. How can i determine if i have problem with my result? I am attaching the output form fmincon of the iterative display
thanks in advance for the support

Best Answer

Your objective function or nonlinear constraints might be nonsmooth, or at least very sharply curved, because the first-order optimality does not seem to be decreasing. fmincon is decreasing the objective function, and maintaining feasibility, but does not seem to be converging to an optimum as far as the first-order optimality measure.
This is different than the question you asked, which is about multiple local solutions. You cannot tell if there are multiple local solutions by one run of the solver. To check for multiple local solutions, start fmincon from multiple initial points.
Alan Weiss
MATLAB mathematical toolbox documentation