sqlp / sedumi

SeDuMi: A linear/quadratic/semidefinite solver for Matlab and Octave
http://sedumi.ie.lehigh.edu/
GNU General Public License v2.0
238 stars 90 forks source link

SOCP runs into numerical problems #12

Open mcg1969 opened 10 years ago

mcg1969 commented 10 years ago

SeDuMi fails to converge for this problem. Code using CVX is attached; this data file contains the actual inputs to SeDuMi for testing without CVX.

e0 = [1;0];
e1 = [0;1];
ep = [1;1]/sqrt(2);
em = [1;-1]/sqrt(2);
R00 = e0 * e0';
R01 = e1 * e1';
R10 = ep * ep';
R11 = em * em';
R00 = (R00 + R00')/2;
R01 = (R01 + R01')/2;
R10 = (R10 + R10')/2;
R11 = (R11 + R11')/2;
dim = 2;
cvx_solver sedumi
cvx_begin sdp
    %#ok<*VUNUS>    % suppress MATLAB warnings for equality checks in CVX
    %#ok<*EQEFF>    % suppress MATLAB warnings for inequality checks in CVX     
    %cvx_precision best

    variable X000(dim,dim) symmetric
    variable X001(dim,dim) symmetric
    variable X010(dim,dim) symmetric
    variable X011(dim,dim) symmetric
    variable X100(dim,dim) symmetric
    variable X101(dim,dim) symmetric
    variable X110(dim,dim) symmetric
    variable X111(dim,dim) symmetric

    variable W0(dim,dim) symmetric
    variable W1(dim,dim) symmetric

    variable lambda

    minimize lambda

    X000 + X000 == R00/2;
    X001 + X001 == R01/2;
    X110 + X110 == R10/2;
    X111 + X111 == R11/2;

    X000 + X001 >= 0;
    X001 + X000 >= 0;

    X110 + X111 >= 0;
    X111 + X110 >= 0;

    X010 + X100 >= 0;
    X010 + X101 >= 0;
    X011 + X100 >= 0;
    X011 + X101 >= 0;

    X100 + X010 >= 0;
    X100 + X011 >= 0;
    X101 + X010 >= 0;
    X101 + X011 >= 0;

    W0 >= X000 + X010;
    W0 >= X001 + X011;
    W1 >= X100 + X110;
    W1 >= X101 + X111;

    W0 >= 0;
    W1 >= 0;

    lambda * eye(dim) >= W0 + W1 + W0 + W1;
 cvx_end
mcg1969 commented 10 years ago

Note that this problem is converted to an SOCP by CVX, even though it consists entirely of LMIs. I haven't yet determined whether disabling this conversion process fixes the problem.

mcg1969 commented 10 years ago

I've confirmed that solving the SDP version of this problem causes no issues.

mcg1969 commented 10 years ago

One more observation: when solving the SDP version---the dual, actually---SeDuMi reports "Detected 4 diagonal SDP block(s) with 8 linear variables". It's quite possible that this geometry is causing numerical issues for the equivalent SOCP constraints.