Solving the Binary Integer Quadratic (BIQ) problem with Mosek


(Meysam) #1

Hello,

I am trying to solve " the Binary Integer Quadratic (BIQ) problem" with Mosek. Here is my code. But I face the following error (You can see the error after the code). There is no error whenever I remove the keyword “binary” in these lines: " variable x(m) binary" and “variable X(m,m) symmetric binary”. Could you help me how to solve this problem?


                                             "Code"

clc;
clear;

% Problem Data (Parameters)

load bqp100.1.txt; % Importing data from the sparse file downloaded from the BIQMAC library
Q = spconvert(bqp100_1);
m = size(Q,1);
for i = 1 : m
for j = i+1:m
Q(j,i) = Q (i,j);
end
end

% Mathematical model

cvx_begin SDP

cvx_solver Mosek
cvx_precision best

variable x(m) binary
variable X(m,m) symmetric binary 

minimize ( trace(Q*X) )
    subject to:
        diag(X)- x == 0   % we define this constraint because we want to use trace(Q*X) instead of X'*Q*X
        [1 x';x X] <In> semidefinite(m+1)

cvx_end


                                                           "Error"

Reference to non-existent field ‘sol’.

Error in cvx_mosek

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

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

Error in BIQ_V0 (line 33)
cvx_end


(Erling D.Andersen) #2

MOSEK cannot solve mixed integer SDPs.


(Meysam) #3

Thank you for your answer. So, how can I solve this problem?


(Michael C. Grant) #4

Unfortunately no solvers that CVX supports can handle this.