Quadprog - Sometimes non-convex, somtimes convex
Show older comments
I want to maximize the function x'Hx. For that I multiply H by -1 and use quadprog to minimize the resulting problem. I do this for several times using different data. However, Matlab reports that for some runs the problem is non-convex. Now I am wondering how a problem can be convex at one point in time but non-convex at another, as only the input data changes but not the problem itself? Also, in case of a non-convex problem, is Matlab always returning a local minima?
3 Comments
John D'Errico
on 15 Mar 2017
You said that you did it with different data. The thing is, there is NO data used by quadprog, except the matrix H. So if you have changed H on the different runs, the problem has not stayed the same.
DW
on 31 May 2017
I have noticed the same behavior, but have been unable to figure out why. Sometimes, multiplying H by -1 results in MATLAB reporting the the problem is non-convex and sometimes it does not and reports a solution. The linear equality constraints are different, but the H is always -1*eye(9).
What is more puzzling is that after updating to MATLAB 2017a (from 2016b), some problems which were previously reported as non-convex now find a solution. The documentation states that the interior-point-convex algorithm must be used if a problem has both linear equality constraints and bounds (which mine does), so I assume that is being used. But that algorithm should only work for a problem with positive definite H. Yet I am able to sometimes get a solution. If anyone has any insight into this behavior, it would be greatly appreciated.
Moritz Hesse
on 25 Nov 2017
This is happening to me as well. A problem which under 2016b was apparently non-convex is suddenly convex after upgrading to 2017b.
As above, any help on this behaviour would be appreciated.
Answers (0)
Categories
Find more on Quadratic Programming and Cone Programming 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!