Matlab MIP: Q matrix is not positive semi-definite (PSD)

74 views
Skip to first unread message

Michael

unread,
Aug 16, 2018, 4:51:47 AM8/16/18
to Gurobi Optimization
Hello,
after working with Gurobi and Mixed integer linear programming (MILP) in Matlab for a few month I have to use mixed integer quadratic programing now.
While working on a first, simple project I get the error: "
Q matrix is not positive semi-definite (PSD)" . 

The quadratic constraint causing this problem is a simple multiplication of  two variables (P = U*I) .
My code to create the matrices looks like that:

 for i = 1:n
      model.quadcon(i).Qc = sparse(zeros(n*leng,n*leng));
      model.quadcon(i).Qc(i, n+i) = 0.5;
      model.quadcon(i).Qc((n+i, i) = 0.5;
      
      model.quadcon(i).q = zeros(1,leng);
      model.quadcon(i).q(2*n+i) = -1;
      
      model.quadcon(i).rhs(1:n) = 0;
 end

I'm looking for a solution to this problem for some time now, but even though it looks like an easy task, I can't come up with a solution to turn this matrix postive semi-definite.

Is there any way I can solve this problem?

Thanks,
Michael

Johan Löfberg

unread,
Aug 16, 2018, 9:12:42 AM8/16/18
to Gurobi Optimization
U*I is bilinear, nonconvex and cannot be turned into a convex quadratic

Is any of the variables binary (or integer)?

Michael

unread,
Aug 16, 2018, 11:18:23 AM8/16/18
to Gurobi Optimization
No, unfortunately none of them is a integer variable.
Reply all
Reply to author
Forward
0 new messages