Error using Mosek Solver and CVX with binary constraints

312 views
Skip to first unread message

csred...@gmail.com

unread,
Apr 13, 2016, 3:20:48 AM4/13/16
to mosek



I am trying to solve the following optimization problem with binary variables using a Mosek solver and CVX toolbox in Matlab R2012b and Windows 10 OS


n1=6; n2=3

A=rand(n1,n1)
cvx_begin
  variable x(n1,n1) diagonal binary
  minimize lambda_max(A*x*A')
    subject to
   sum(sum(x))==n2
cvx_end



And I get the following error

Error:
Reference to non-existent field 'sol'.
Error in G:\Other Stuff\Softwares\cvx\shims\cvx_mosek.p>solve
(line 490)

Error in cvxprob/solve (line 428)
[ x, status, tprec, iters ] = shim.solve( At, b, c,
cones, quiet, prec, solv.settings, eargs{:} );

Error in cvx_end (line 87)
solve( prob );



First, the above problem gives a optimum solution for n1=2 and n2=1. For n1>=3 the above given error is displayed. Later I attempted to solve the problem by reformulating in the below given way to get a solution which is binary (0 or 1). I am able to run the cvx without any errors. But it doesnot return a binary solution x for every matrix A. Any suggestions to solve the above given problem using binary restrictions on variables?




n1=6; n2=3;
cvx_begin
  variable x(n1,n1) diagonal nonnegative
  minimize lambda_max(A*x*A')
  subject to
    sum(sum(x))==n2
    norm(x,Inf)<=1
cvx_end

edadk

unread,
Apr 13, 2016, 8:42:48 AM4/13/16
to mosek, csred...@gmail.com
Please ask on the CVX forum. The problem is most likely caused by something cvx does.

Or  use for instance MOSEK Fusion instead of CVX.

edadk

unread,
Apr 18, 2016, 5:00:29 AM4/18/16
to mosek, csred...@gmail.com
We do not do support on CVX. It could be CVX is somehow broken for mixed-integer problems when solved with MOSEK.

We can help uou if you call MOSEK directly. It should be that hard given your relative simple model.


Den onsdag den 13. april 2016 kl. 09.20.48 UTC+2 skrev csred...@gmail.com:

Erling D. Andersen

unread,
Apr 26, 2016, 1:14:30 AM4/26/16
to mosek, csred...@gmail.com
Btw as of March 2016 then MOSEK cannot solve mixed-integer SDPs. That could be a cause of the issue.

MOSEK can solve mixed integer conic quadratic problems (aka. SOCPs).
Reply all
Reply to author
Forward
0 new messages