Error using Mosek Solver with binary constraints

I am trying to solve the following optimization problem with binary variables using a Mosek solver in MATLAB R2012b and Windows 10 OS.
variable x(n1,n1) diagonal binary
minimize lambda_max(AxA’)
subject to

And I get the following 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 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 doesn’t 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;
variable x(n1,n1) diagonal nonnegative
minimize lambda_max(AxA’)
subject to

I found a way to solve the above problem using YALMIP. I came to know that, CVX with Mosek solver (academic license) cannot handle binary semidefinite variables. Below given is the mosek error displayed in matlab.
Mosek error: MSK_RES_ERR_GLOBAL_INV_CONIC_PROBLEM (The global optimizer can only be applied to problems without semidefinite variables.)

Whereas YALMIP can handle binary semidefinite variables. I have solved using the following code.

x = diag(binvar(n1,1));
F = [sum(sum(x))==n2];
h = lambda_max(AxA’);
sol = value(x)

See Mixed Integer SDPs which are not Mixed Integer SOCPs .

Yalmip has implemented its own B&B to my knowledge. That is why Yalmip can solve it.

For Mosek error: MSK_RES_ERR_GLOBAL_INV_CONIC_PROBLEM (The global optimizer can only be applied to problems without semidefinite variables.)

The reason behind that is, you are trying to implement a mixed integer solution along with normal Semidefinite Program, which Mosek doesn’t allow. So try to remove the line:


Removing this, I got my solution, though I had to solve the Mixed Integer part through the Second Order Cone Program and thereby used those values accordingly to solve my Semidefinite Program.

I have faced similar problem and I cannot understand why mosek doesn’t allow, according to CVX 7th and later versions of MOSEK should allow.
and I did not understand where should I remove the line “prob.ints.sub”

MOSEK, even the forthcoming version 9.0, does not natively handle mixed-integer SDPs, but does handle mixed-integer SOCPs (among other things). Read the link Mixed Integer SDPs which are not Mixed Integer SOCPs provided above.

i want to write a mixed-integer SDP.
is there any toolbox to do that in cvx?

There is no way of solving mixed-integer SDPs in CVX. Mosek can handle mixed-integer combined with all cone types, except semidefiinite. Depending on the code, CVX can actually send something to Mosek, but Mosek would produce an error message.

Mixed-integer SDP can done in YALMIP, using either

  1. YALMIP’s BNB solver, with Mosek or other semidefinite solver as uppersolver.
  2. YALMIP"s cutsdp, combined with MILP solver

thank you so much for answering

There is sort of an exception. If CVX can convert the semidefinite constraints into SOCP constraints, as for instance with any 2 by 2 semidefinite constraints, then it would pass the problem to Mosek as an MISOCP, and MOsek could solve it.

For instance,

cvx_solver mosek
variable X(2,2) integer symmetric
X >=2

CVX 2.2 disallows declaration of semidefinite and (integer or binary).

Here is an old post on the subject from the CVX developer

it worked for me when dimensions were (2,2) but change to (3,3) caused error.
unfortunately bnb with mosek or other semidefinite solvers as uppersolver didn’t work for me.
but I didn’t understand your meaning about combined cutsdp with MILP solver.
can you guide me?

I know how to do it, but this is not the appropriate forum for that.

You need to read , and then seek any further help at .

thanks for your help