MATLAB: Quadprog for a non-linear convex problem returns “Solution status = No feasible solution found”

quadprog

Hi,
I want to minimize a quadratic function of 12 variables and I am using the quadprog function of Matlab.
I have inequality constraints (Aineq, Bineq), equality constraints (Aeq, Beq) and lb and ub. For certains values of Beq the minimun is found. However when I start to change some values in Beq, I get the message "Solution status = No feasible solution found. quadprog stopped because it was unable to find a point that satisfies the constraints within the default value of the constraint tolerance."
Is it normal that quadprog find the minimum for the convex problem for certains values of Beq but not for others ?
What can I do to be guarantee to have always a solution for my problem.
Thank you.

Best Answer

Suppose you asked to find the minimum of the very simple objective
z = x^2 + y^2
subject to the constraint that x and y live in a square region, [-1,1]x[-1,1]. No problem, the solution is of course at (0,0).
But now add in an equality constraint (as you have.) Suppose we chose
x + y == 1
Again, no problem, a solution exists, and quadprog will find the solution (0.5,0.5) with no problem at all.
But now change the equality constraint.
x + y == 3
Hey, a simple wee little modification. But now no solution exists.
Is it normal? Of course. It is trivial to pose a problem with no solution, as I just showed.
Is it common? Probably not, as when I formulate an optimization, I would do so for a system that is well posed, where a solution will exist. I don't know about you, or others.
What can you do here? Use a better choice of constraints. Take more care in what problems you try to solve.
Related Question