Very small feasibility value but very large first-order optimality value
14 views (last 30 days)
Show older comments
Chaitanya Awasthi
on 7 Apr 2022
Commented: Chaitanya Awasthi
on 10 Apr 2022
I am solving a large-scale optimzation problem (over 8000 decision variables) with fmincon using interior-point algorithm. My problem consists of a nonlinear objective function and linear as well as nonlinear equality constraints. Upon termination, I get a solution which satisfies all my constraints, but has really poor first-order optimality. Upon further digging, I found the large optimality value is due to the lagrange multipliers (for both the linear and nonlinear equality constraints) having very large values themselves (over 1e28).
Can somebody please help me understand why is this the case? And is there any way to improve the first-order optimality value here? I will appreciate any pointers in this regard. I have attached a screenshot to show the aforementioned problem. Thank you for your time.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/958445/image.png)
Best,
Chaitanya
0 Comments
Accepted Answer
Alan Weiss
on 8 Apr 2022
This is a very interesting issue; I have never seen anything quite like it before. Apparently, you are providing gradients for both the objective and nonlinear constraints. I would first look there to see whether those nonlinear functions are correct--it is notoriously difficult to get them correct without using a symbolic approach.
If everything is correct, then you might try rerunning the optimization from the solution point but this time with modified options. I'd try HessianApproximation = 'finite-difference' and maybe try setting ScaleProblem to true. And certainly set CheckGradients to true.
Alan Weiss
MATLAB mathematical toolbox documentation
1 Comment
More Answers (1)
Matt J
on 9 Apr 2022
That can happen if your objective function or constraints are not continuously differentiable, e.g.,
fmincon(@(x)sqrt(abs(x)),1,[],[],[],[],[],[],[],...
optimoptions('fmincon','Display','iter','Algorithm','interior-point'))
3 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!