fmincon stops at initial point saying the optimization has been accomplished
Show older comments
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
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.
Giacomo Mingardo
on 28 Oct 2015
0 votes
Giacomo Mingardo
on 28 Oct 2015
0 votes
Categories
Find more on Choose a Solver in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!