fmincon stops at initial point saying the optimization has been accomplished

Hi everyone! Doing a non linear constraint optimization, fmincon finds the optimum value at the initia given point, which is surely not the minimum. The code is the following:
plotfunction={@optimplotx @optimplotfval @optimplotconstrviolation};
options = optimoptions('fmincon','Display','iter-detailed','Algorithm','sqp',...
'DiffminChange',0.01, 'DiffmaxChange',0.1,'FunValCheck','on','MaxFunEvals',1000,...
'PlotFcns',plotfunction,'Tolx',1e-6,'TolCon',1e-1,'TolFun',1e-3);
And the output is:
Norm of First-order
Iter F-count f(x) Feasibility Steplength step optimality
0 53 2.160003e+05 0.000e+00 0.000e+00
Optimization completed: The final point is the initial point.
The first-order optimality measure, 0.000000e+00, is less than
options.TolFun = 1.000000e+00, and the maximum constraint
violation, 0.000000e+00, is less than options.TolCon = 1.000000e-01.
Optimization Metric Options
first-order optimality = 0.00e+00 TolFun = 1e+00 (selected)
max(constraint violation) = 0.00e+00 TolCon = 1e-01 (selected)
The values of design vector are around the unity, while the values of the function are in the order of 10^5. Could it be a mistake of tolerances, maybe? Thank you!

 Accepted Answer

It appears that the gradient of your objective function is zero at the initial point, as far as fmincon can determine. And the initial point is feasible. So it seems that you start at a feasible, locally stationary point, which means that fmincon is not going to move.
I also wonder why you set nondefault tolerances. Usually, people do that after they find that the defaults do not work well. So can you tell us why you set them the way you did? If you don't have a compelling reason to set them a certain way, I suggest that you leave them at the default values.
Alan Weiss
MATLAB mathematical toolbox documentation

More Answers (3)

Could it be a mistake of tolerances, maybe?
The tolerance values all look very large. They look like they would tolerate almost anything. Like Alan, I'm wondering what happened when you used the default values.
My guess is that your objective function is piece-wise constant. Therefore, every initial point is a local minimum, where fmincon is happy to remain. When you saw that fmincon would not move off of the initial point with the default tolerances, you started tinkering with them in an effort to force it to take artificially larger steps.
Ah well, since this is for a univeristary assignment and they told us to decide the tolerances, I thought that for such high values of the objective function those were very small. But from your answer I now guess that the tolerance is relative, not absolute, right?
No, that was not the problem because it is still not going over the initial point. any ther idea?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!