question about a QP problem

77 views
Skip to first unread message

Yuan Hu

unread,
Oct 26, 2014, 12:15:47 PM10/26/14
to yal...@googlegroups.com
    As is known to all, if the objective function of QP can be formulated as X’ *Q*X+B*X+C, where Q is a positive semi-definite matrix, and the constraints is linear equality and inequality, it must be a convex optimization problem. However, when I use the CPLEX as the solver, sometimes the output information displays that "it is not converge", which means that it fails to find the optimal solution. After changing some elements in matrix B, I got the optimal solution. Dose the matrix B correspond to the optimal solution of QP or the CPLEX may fail to work when encountering some special model?  Is there anyone met this situation ever before?  I

Johan Löfberg

unread,
Oct 26, 2014, 1:28:26 PM10/26/14
to yal...@googlegroups.com
Most likely you simply have an ill-conditioned problem. What kind of numbers (very large/small?) do you have in B, which you replace

Erling D. Andersen

unread,
Oct 27, 2014, 1:57:29 AM10/27/14
to yal...@googlegroups.com
Some times changing some numbers may bring you better luck with the rounding errors and not really solve the underlying reason for the problems. 
Some reasons for the underlying issues you experience might be:
  • If either the optimal primal or dual solution is very large norm then that means you problem bad is badly conditioned.
  • It could be your Q matrix is ill conditioned. 
  • It could be your problem is nearly primal or dual infeasible.
  • Linear dependencies in the constraint matrix can give optimizer a  hard time.

Yuan Hu

unread,
Oct 27, 2014, 4:28:35 AM10/27/14
to yal...@googlegroups.com
    Thank you for your rapid reply and your contribution to yalmip platform, which makes the modeling process in reserch work easier. 
    To describe the problem clearly, I have uplaod a document in the attached file. In this document, when relax the constraints 2 in test3.m, the obtained value of objective function becomes worse compared with the solution of  the original problem. Since this is a minimization problem, the relaxasion of constraints will lead to a better solution. So I think the CPLEX solver must  not find the optimal solution.  
    After changing the first element in vector Pg0 (replace 0.44 by 0.33), it seems that the optimal soluton is obtained. And the final solution of the relaxed problem is better than the orignal problem.
    If the objective function of QP is  formulated as X’ *Q*X+B*X+C, the changing of Pg0 only influence the value of matrix B, but it seems that wheather the the final optimal solution can be found is also influenced.
    By the way, can you tell me some other method to judge wheather the final solution is optimal directly? 
   Thank you!
test3.m

Johan Löfberg

unread,
Oct 27, 2014, 4:30:56 AM10/27/14
to yal...@googlegroups.com
Undefined function or variable 'case24c1'.
 
>>


Yuan Hu

unread,
Oct 27, 2014, 9:54:45 AM10/27/14
to yal...@googlegroups.com
       Thank you for your kindly help.
       Because the size of the uploaded file is limited, so I will send a complete file to your email, joh...@isy.liu.se. Please check.

Johan Löfberg

unread,
Oct 29, 2014, 2:38:08 AM10/29/14
to yal...@googlegroups.com
Yuan was concerned about a model where the initial model gave the objective epsilon1 while adding some constraint gave the objective epsilon2 where epsilon2<epsilon1. However, the epsilons where in the order of 10^-8, i.e., below any tolerance and termination criteria used by the solver, so no major surprise here.
Reply all
Reply to author
Forward
0 new messages