# Why is the problem within LMI constraints failed?

I want to use the generalized benders decomposition algorithm to jointly optimize the antenna position and the transmit power. In the code, the antenna position is represented by the B matrix, the transmit matrix is W, and the first cvx_begin is to minimizes the transmit power within fixed. B under the constraint of satisfied SINR, but bigmatrix == [U X B; ctranspose(X) V ctranspose(W);B’ W I] ; seems to make it failed.
But the second cvx is solved with the even same constraints and different target, why does the first cvx faild? Could anyone give me any suggesstion? Thanks a lot!!

My code is here

``````clc;clear all;
cvx_solver Mosek
numM = 4;   % 有4个MA元件
numK = 4;   % 有4个单天线用户
numN = 16;  % MA元件有16个可能位置
% 其它常量参数
%gamak = [0 2 4 6 8 10]  % 最小SINR
gamak = 10^(8/10);
sigmak = 1.0e-4;                     % 噪音方差 根据-80dBm算出来的

% 原始问题需要的固定值是B和y
B = zeros(numK*numN,numK);     % 维度是(numK*numN)*numK 每列由numM个N长的列向量组成 矩阵的非零列向量表示元件所在位置

B(1,1) = 1;
B(numN+3,2) = 1;
B(numN*2+13,3) = 1;
B(numN*3+16,4) =1;

Hhat = [0.000633335302728001 - 0.000625188820726448i,0.000868984404594656 - 0.000191939500400954i,0.000837831796388210 + 0.000300020912944084i,0.000549812922322842 + 0.000699771689688653i,0.000885548324595286 + 8.81976873244292e-05i,0.000702498809963174 + 0.000546324161321116i,0.000303797762812344 + 0.000836469716459067i,-0.000187925646494373 + 0.000869861264014307i,0.000497671122318411 + 0.000737765627589975i,2.80762132784197e-05 + 0.000889486589831933i,-0.000449933874530754 + 0.000767811289180252i,-0.000789605202499378 + 0.000410485433881415i,-0.000249788712882626 + 0.000854154708562411i,-0.000666575891431619 + 0.000589619579224637i,-0.000878216931641577 + 0.000143908610656036i,-0.000819995717617011 - 0.000345805856417527i,0.000633335302728001 - 0.000625188820726448i,0.000868984404594656 - 0.000191939500400954i,0.000837831796388210 + 0.000300020912944084i,0.000549812922322842 + 0.000699771689688653i,0.000885548324595286 + 8.81976873244292e-05i,0.000702498809963174 + 0.000546324161321116i,0.000303797762812344 + 0.000836469716459067i,-0.000187925646494373 + 0.000869861264014307i,0.000497671122318411 + 0.000737765627589975i,2.80762132784197e-05 + 0.000889486589831933i,-0.000449933874530754 + 0.000767811289180252i,-0.000789605202499378 + 0.000410485433881415i,-0.000249788712882626 + 0.000854154708562411i,-0.000666575891431619 + 0.000589619579224637i,-0.000878216931641577 + 0.000143908610656036i,-0.000819995717617011 - 0.000345805856417527i,0.000633335302728001 - 0.000625188820726448i,0.000868984404594656 - 0.000191939500400954i,0.000837831796388210 + 0.000300020912944084i,0.000549812922322842 + 0.000699771689688653i,0.000885548324595286 + 8.81976873244292e-05i,0.000702498809963174 + 0.000546324161321116i,0.000303797762812344 + 0.000836469716459067i,-0.000187925646494373 + 0.000869861264014307i,0.000497671122318411 + 0.000737765627589975i,2.80762132784197e-05 + 0.000889486589831933i,-0.000449933874530754 + 0.000767811289180252i,-0.000789605202499378 + 0.000410485433881415i,-0.000249788712882626 + 0.000854154708562411i,-0.000666575891431619 + 0.000589619579224637i,-0.000878216931641577 + 0.000143908610656036i,-0.000819995717617011 - 0.000345805856417527i,0.000633335302728001 - 0.000625188820726448i,0.000868984404594656 - 0.000191939500400954i,0.000837831796388210 + 0.000300020912944084i,0.000549812922322842 + 0.000699771689688653i,0.000885548324595286 + 8.81976873244292e-05i,0.000702498809963174 + 0.000546324161321116i,0.000303797762812344 + 0.000836469716459067i,-0.000187925646494373 + 0.000869861264014307i,0.000497671122318411 + 0.000737765627589975i,2.80762132784197e-05 + 0.000889486589831933i,-0.000449933874530754 + 0.000767811289180252i,-0.000789605202499378 + 0.000410485433881415i,-0.000249788712882626 + 0.000854154708562411i,-0.000666575891431619 + 0.000589619579224637i,-0.000878216931641577 + 0.000143908610656036i,-0.000819995717617011 - 0.000345805856417527i;-4.72693952194818e-05 - 3.64852222181876e-05i,-1.58618723308520e-05 - 5.75670754067449e-05i,2.19072641886951e-05 - 5.55485277977087e-05i,5.08845850107604e-05 - 3.12462185393497e-05i,-3.82747447474042e-05 - 4.58324238857946e-05i,-3.05473327832660e-06 - 5.96341828930722e-05i,3.33878011760083e-05 - 4.95057764039454e-05i,5.64325202040374e-05 - 1.95176286507100e-05i,-2.74793690230773e-05 - 5.30136910884315e-05i,9.89034846984251e-06 - 5.88875892856142e-05i,4.32878608881650e-05 - 4.11306244111729e-05i,5.93154056686607e-05 - 6.87385009207482e-06i,-1.53945006136188e-05 - 5.76938169614681e-05i,2.23631870976968e-05 - 5.53665515230948e-05i,5.11431713898783e-05 - 3.08211483386268e-05i,5.94012227736407e-05 + 6.08784836558957e-06i,-4.72693952194818e-05 - 3.64852222181876e-05i,-1.58618723308520e-05 - 5.75670754067449e-05i,2.19072641886951e-05 - 5.55485277977087e-05i,5.08845850107604e-05 - 3.12462185393497e-05i,-3.82747447474042e-05 - 4.58324238857946e-05i,-3.05473327832660e-06 - 5.96341828930722e-05i,3.33878011760083e-05 - 4.95057764039454e-05i,5.64325202040374e-05 - 1.95176286507100e-05i,-2.74793690230773e-05 - 5.30136910884315e-05i,9.89034846984251e-06 - 5.88875892856142e-05i,4.32878608881650e-05 - 4.11306244111729e-05i,5.93154056686607e-05 - 6.87385009207482e-06i,-1.53945006136188e-05 - 5.76938169614681e-05i,2.23631870976968e-05 - 5.53665515230948e-05i,5.11431713898783e-05 - 3.08211483386268e-05i,5.94012227736407e-05 + 6.08784836558957e-06i,-4.72693952194818e-05 - 3.64852222181876e-05i,-1.58618723308520e-05 - 5.75670754067449e-05i,2.19072641886951e-05 - 5.55485277977087e-05i,5.08845850107604e-05 - 3.12462185393497e-05i,-3.82747447474042e-05 - 4.58324238857946e-05i,-3.05473327832660e-06 - 5.96341828930722e-05i,3.33878011760083e-05 - 4.95057764039454e-05i,5.64325202040374e-05 - 1.95176286507100e-05i,-2.74793690230773e-05 - 5.30136910884315e-05i,9.89034846984251e-06 - 5.88875892856142e-05i,4.32878608881650e-05 - 4.11306244111729e-05i,5.93154056686607e-05 - 6.87385009207482e-06i,-1.53945006136188e-05 - 5.76938169614681e-05i,2.23631870976968e-05 - 5.53665515230948e-05i,5.11431713898783e-05 - 3.08211483386268e-05i,5.94012227736407e-05 + 6.08784836558957e-06i,-4.72693952194818e-05 - 3.64852222181876e-05i,-1.58618723308520e-05 - 5.75670754067449e-05i,2.19072641886951e-05 - 5.55485277977087e-05i,5.08845850107604e-05 - 3.12462185393497e-05i,-3.82747447474042e-05 - 4.58324238857946e-05i,-3.05473327832660e-06 - 5.96341828930722e-05i,3.33878011760083e-05 - 4.95057764039454e-05i,5.64325202040374e-05 - 1.95176286507100e-05i,-2.74793690230773e-05 - 5.30136910884315e-05i,9.89034846984251e-06 - 5.88875892856142e-05i,4.32878608881650e-05 - 4.11306244111729e-05i,5.93154056686607e-05 - 6.87385009207482e-06i,-1.53945006136188e-05 - 5.76938169614681e-05i,2.23631870976968e-05 - 5.53665515230948e-05i,5.11431713898783e-05 - 3.08211483386268e-05i,5.94012227736407e-05 + 6.08784836558957e-06i;0.000958407821217691 - 7.73502034857776e-05i,0.000957151504889215 + 9.15947729886562e-05i,0.000926471303694684 + 0.000257253822480455i,0.000867552393586340 + 0.000414585877874711i,0.000638889476417611 + 0.000718574173397127i,0.000503192421080416 + 0.000819344856039117i,0.000352388983425327 + 0.000894623166540526i,0.000191223707765384 + 0.000942317409018316i,-0.000188846045720983 + 0.000942796784448314i,-0.000351084532222302 + 0.000895135887440996i,-0.000502059331875417 + 0.000820039653326193i,-0.000637237574332740 + 0.000720039498645080i,-0.000866315952423246 + 0.000417163368870682i,-0.000926017741760128 + 0.000258881725303284i,-0.000957010106558761 + 9.30605270505261e-05i,-0.000958582813588980 - 7.51504839796014e-05i,0.000958407821217691 - 7.73502034857776e-05i,0.000957151504889215 + 9.15947729886562e-05i,0.000926471303694684 + 0.000257253822480455i,0.000867552393586340 + 0.000414585877874711i,0.000638889476417611 + 0.000718574173397127i,0.000503192421080416 + 0.000819344856039117i,0.000352388983425327 + 0.000894623166540526i,0.000191223707765384 + 0.000942317409018316i,-0.000188846045720983 + 0.000942796784448314i,-0.000351084532222302 + 0.000895135887440996i,-0.000502059331875417 + 0.000820039653326193i,-0.000637237574332740 + 0.000720039498645080i,-0.000866315952423246 + 0.000417163368870682i,-0.000926017741760128 + 0.000258881725303284i,-0.000957010106558761 + 9.30605270505261e-05i,-0.000958582813588980 - 7.51504839796014e-05i,0.000958407821217691 - 7.73502034857776e-05i,0.000957151504889215 + 9.15947729886562e-05i,0.000926471303694684 + 0.000257253822480455i,0.000867552393586340 + 0.000414585877874711i,0.000638889476417611 + 0.000718574173397127i,0.000503192421080416 + 0.000819344856039117i,0.000352388983425327 + 0.000894623166540526i,0.000191223707765384 + 0.000942317409018316i,-0.000188846045720983 + 0.000942796784448314i,-0.000351084532222302 + 0.000895135887440996i,-0.000502059331875417 + 0.000820039653326193i,-0.000637237574332740 + 0.000720039498645080i,-0.000866315952423246 + 0.000417163368870682i,-0.000926017741760128 + 0.000258881725303284i,-0.000957010106558761 + 9.30605270505261e-05i,-0.000958582813588980 - 7.51504839796014e-05i,0.000958407821217691 - 7.73502034857776e-05i,0.000957151504889215 + 9.15947729886562e-05i,0.000926471303694684 + 0.000257253822480455i,0.000867552393586340 + 0.000414585877874711i,0.000638889476417611 + 0.000718574173397127i,0.000503192421080416 + 0.000819344856039117i,0.000352388983425327 + 0.000894623166540526i,0.000191223707765384 + 0.000942317409018316i,-0.000188846045720983 + 0.000942796784448314i,-0.000351084532222302 + 0.000895135887440996i,-0.000502059331875417 + 0.000820039653326193i,-0.000637237574332740 + 0.000720039498645080i,-0.000866315952423246 + 0.000417163368870682i,-0.000926017741760128 + 0.000258881725303284i,-0.000957010106558761 + 9.30605270505261e-05i,-0.000958582813588980 - 7.51504839796014e-05i;-4.13383305962258e-05 + 0.000533723113498756i,-0.000223640543839205 + 0.000486368303460036i,-0.000378140077711536 + 0.000378918594275343i,-0.000485838180210828 + 0.000224789862112862i,-0.000408316149836592 + 0.000346189458594439i,-0.000502964711682227 + 0.000183291348027404i,-0.000535317308902182 - 2.14435281947750e-06i,-0.000501537768539306 - 0.000187160589302081i,-0.000533303313215254 - 4.64413132127139e-05i,-0.000484166594869936 - 0.000228367965948248i,-0.000375149351905040 - 0.000381879802064101i,-0.000219873706693753 - 0.000488082751758386i,-0.000342391326116138 - 0.000411506256647115i,-0.000178533875612112 - 0.000504673037439298i,7.29377304298338e-06 - 0.000535271912521184i,0.000192064873852971 - 0.000499680201419999i,-4.13383305962258e-05 + 0.000533723113498756i,-0.000223640543839205 + 0.000486368303460036i,-0.000378140077711536 + 0.000378918594275343i,-0.000485838180210828 + 0.000224789862112862i,-0.000408316149836592 + 0.000346189458594439i,-0.000502964711682227 + 0.000183291348027404i,-0.000535317308902182 - 2.14435281947750e-06i,-0.000501537768539306 - 0.000187160589302081i,-0.000533303313215254 - 4.64413132127139e-05i,-0.000484166594869936 - 0.000228367965948248i,-0.000375149351905040 - 0.000381879802064101i,-0.000219873706693753 - 0.000488082751758386i,-0.000342391326116138 - 0.000411506256647115i,-0.000178533875612112 - 0.000504673037439298i,7.29377304298338e-06 - 0.000535271912521184i,0.000192064873852971 - 0.000499680201419999i,-4.13383305962258e-05 + 0.000533723113498756i,-0.000223640543839205 + 0.000486368303460036i,-0.000378140077711536 + 0.000378918594275343i,-0.000485838180210828 + 0.000224789862112862i,-0.000408316149836592 + 0.000346189458594439i,-0.000502964711682227 + 0.000183291348027404i,-0.000535317308902182 - 2.14435281947750e-06i,-0.000501537768539306 - 0.000187160589302081i,-0.000533303313215254 - 4.64413132127139e-05i,-0.000484166594869936 - 0.000228367965948248i,-0.000375149351905040 - 0.000381879802064101i,-0.000219873706693753 - 0.000488082751758386i,-0.000342391326116138 - 0.000411506256647115i,-0.000178533875612112 - 0.000504673037439298i,7.29377304298338e-06 - 0.000535271912521184i,0.000192064873852971 - 0.000499680201419999i,-4.13383305962258e-05 + 0.000533723113498756i,-0.000223640543839205 + 0.000486368303460036i,-0.000378140077711536 + 0.000378918594275343i,-0.000485838180210828 + 0.000224789862112862i,-0.000408316149836592 + 0.000346189458594439i,-0.000502964711682227 + 0.000183291348027404i,-0.000535317308902182 - 2.14435281947750e-06i,-0.000501537768539306 - 0.000187160589302081i,-0.000533303313215254 - 4.64413132127139e-05i,-0.000484166594869936 - 0.000228367965948248i,-0.000375149351905040 - 0.000381879802064101i,-0.000219873706693753 - 0.000488082751758386i,-0.000342391326116138 - 0.000411506256647115i,-0.000178533875612112 - 0.000504673037439298i,7.29377304298338e-06 - 0.000535271912521184i,0.000192064873852971 - 0.000499680201419999i];

cvx_begin
variable W(numM, numK) complex     % 基站的线性波束成形矩阵 numM*numK维  原始问题的目标函数是W矩阵的每一列的二范数的平方和
variable X(numM*numN, numK) complex
variable U(numM*numN, numM*numN) complex semidefinite  % 约束是半正定矩阵
variable V(numK, numK) complex semidefinite
variable I(numM, numM)
variable genhaoxia(numK,numK) complex
variable cal(numK,1)
%variable gama
expression tem
variable bigmatrix(numM*numN+numK+numM,numM*numN+numK+numM) complex semidefinite

dual variables d1 d2 d3 d4 d5 d6 d7 d8
minimize( sum(sum_square_abs(W)))   % conj( x ) .* x  square_abs( x )

subject to
tem = conj(Hhat)*X;
for i=1:numK
imag(tem(i,i)) == 0;  % 约束C1b
end

%for i=1:numK
d1:norm([tem(1,:) sigmak]) - real(tem(1,1))*sqrt(1+1/gamak) <= 0 ;            % 约束C1a
d2:norm([tem(2,:) sigmak]) - real(tem(2,2))*sqrt(1+1/gamak) <= 0 ;            % 约束C1a
d3:norm([tem(3,:) sigmak]) - real(tem(3,3))*sqrt(1+1/gamak) <= 0 ;            % 约束C1a
d4:norm([tem(4,:) sigmak]) - real(tem(4,4))*sqrt(1+1/gamak) <= 0 ;           % 约束C1a
%end

%d5:X == B*W;
d5:bigmatrix == [ U X B;ctranspose(X) V ctranspose(W);B' W I] ;% 约束C2a
% 约束C2b
d6:trace(U) - numM <=0   ;
I == eye(numM);          % 变量I是个单位阵

cvx_end

disp('feasibility check problem begin')
cvx_begin
variable W(numM, numK) complex
variable lambda
variable X(numM*numN, numK) complex
variable U(numM*numN, numM*numN) complex semidefinite  % 约束是半正定矩阵
variable V(numK, numK) complex semidefinite
variable I(numM, numM)
variable genhaoxia(numK,numK) complex
variable cal(numK,1)
variable bigmatrix(numM*numN+numK+numM,numM*numN+numK+numM) complex semidefinite

dual variables d1 d2 d3 d4 d5 d6 d7 d8
minimize( lambda)

subject to

tem = conj(Hhat)*X;
for i=1:numK
imag(tem(i,i)) == 0;  % 约束C1b
end
for i=1:numK
cal(i) == tem(i,i);
end
for i=1:numK
genhaoxia(i,:) == tem(i,:);
end

%for i=1:numK
d1:norm([tem(1,:) sigmak]) - real(tem(1,1))*sqrt(1+1/gamak) <= lambda;            % 约束C1a
d2:norm([tem(2,:) sigmak]) - real(tem(2,2))*sqrt(1+1/gamak) <= lambda ;            % 约束C1a
d3:norm([tem(3,:) sigmak]) - real(tem(3,3))*sqrt(1+1/gamak) <= lambda ;            % 约束C1a
d4:norm([tem(4,:) sigmak]) - real(tem(4,4))*sqrt(1+1/gamak) <= lambda ;           % 约束C1a
%end

%d5:X == B*W;
d5:bigmatrix == [ U X B;ctranspose(X) V ctranspose(W);B' W I] ;% 约束C2a
d6:trace(U) - numM <=0   ;                          % 约束C2b
-lambda <= 0;

I == eye(numM);          % 变量I是个单位阵

cvx_end

``````

my result is

``````Calling Mosek 9.1.9: 9385 variables, 4664 equality constraints
For improved efficiency, Mosek is solving the dual problem.
------------------------------------------------------------

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
Name                   :
Objective sense        : min
Type                   : CONIC (conic optimization problem)
Constraints            : 4664
Cones                  : 8
Scalar variables       : 89
Matrix variables       : 3
Integer variables      : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 1                 time                   : 0.00
Lin. dep.  - tries                  : 1                 time                   : 0.00
Lin. dep.  - number                 : 0
Presolve terminated. Time: 0.02
Problem
Name                   :
Objective sense        : min
Type                   : CONIC (conic optimization problem)
Constraints            : 4664
Cones                  : 8
Scalar variables       : 89
Matrix variables       : 3
Integer variables      : 0

Optimizer  - solved problem         : the primal
Optimizer  - Constraints            : 4660
Optimizer  - Cones                  : 9
Optimizer  - Scalar variables       : 86                conic                  : 85
Optimizer  - Semi-definite variables: 3                 scalarized             : 18732
Factor     - setup time             : 1.58              dense det. time        : 0.00
Factor     - ML order time          : 0.72              GP order time          : 0.00
Factor     - nonzeros before factor : 1.08e+07          after factor           : 1.08e+07
Factor     - dense dim.             : 10                flops                  : 3.41e+10
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME
0   4.0e+00  4.0e+00  9.0e+00  0.00e+00   8.000000000e+00   0.000000000e+00   1.0e+00  1.66
1   1.4e+00  1.4e+00  1.2e+00  6.86e-01   -1.479351771e-01  -2.925443890e+00  3.6e-01  3.38
2   1.8e-01  1.8e-01  1.4e-01  3.47e-01   -3.593565286e+00  -4.131933337e+00  4.5e-02  4.81
3   4.8e-04  4.8e-04  1.6e-05  1.00e+00   -3.998236798e+00  -3.999784159e+00  1.2e-04  6.16
4   8.7e-05  8.7e-05  4.5e-06  9.55e-01   -4.001791588e+00  -4.002210234e+00  2.2e-05  7.47
5   6.9e-06  6.9e-06  1.0e-06  -8.40e-01  -4.027156182e+00  -4.023734218e+00  1.7e-06  8.91
6   7.4e-07  7.4e-07  2.2e-07  -6.31e-01  -4.115617459e+00  -4.097925490e+00  1.8e-07  10.28
7   1.1e-07  1.1e-07  6.3e-08  -6.43e-01  -4.332919306e+00  -4.269218594e+00  2.7e-08  11.61
8   5.7e-08  5.6e-08  3.6e-08  -2.74e-01  -4.415895264e+00  -4.334144539e+00  1.4e-08  12.78
9   3.7e-08  3.6e-08  2.5e-08  -5.38e-01  -4.491125642e+00  -4.393931649e+00  9.1e-09  13.95
10  4.8e-09  4.8e-09  3.7e-09  -3.36e-01  -4.563248573e+00  -4.446349229e+00  1.2e-09  15.17
11  3.7e-09  3.7e-09  2.8e-09  -1.27e-01  -4.535276719e+00  -4.422829501e+00  9.2e-10  16.44
12  1.2e-09  1.2e-09  9.5e-10  7.15e-02   -4.554453789e+00  -4.436429337e+00  3.1e-10  17.67
13  3.7e-10  3.7e-10  3.2e-10  -1.09e-01  -4.678174667e+00  -4.533603389e+00  9.4e-11  18.95
14  1.3e-10  1.3e-10  1.1e-10  -6.21e-02  -4.706675322e+00  -4.554635171e+00  3.2e-11  20.20
15  4.0e-11  4.0e-11  3.6e-11  5.30e-02   -4.736182525e+00  -4.576239575e+00  1.0e-11  21.48
16  1.1e-11  8.2e-11  1.1e-11  -4.67e-02  -4.793406031e+00  -4.620759906e+00  2.9e-12  22.75
17  4.5e-12  1.0e-10  4.3e-12  2.15e-02   -4.818178433e+00  -4.638776487e+00  1.1e-12  24.02
18  1.5e-12  4.0e-10  1.5e-12  -2.28e-02  -4.853043709e+00  -4.665652157e+00  3.9e-13  25.28
19  8.6e-13  7.1e-10  8.4e-13  4.82e-02   -4.835966588e+00  -4.650453512e+00  2.2e-13  26.55
20  2.2e-13  3.4e-10  2.1e-13  1.41e-02   -4.866606840e+00  -4.675384398e+00  5.6e-14  27.89
21  1.0e-13  6.3e-10  9.6e-14  -4.89e-03  -4.857094129e+00  -4.666158784e+00  2.5e-14  29.20
22  2.8e-14  1.0e-09  2.8e-14  1.09e-02   -4.863906759e+00  -4.671160258e+00  7.1e-15  30.48
23  2.8e-14  1.0e-09  2.8e-14  1.49e-02   -4.863906759e+00  -4.671160258e+00  7.1e-15  31.94
24  2.8e-14  1.0e-09  2.8e-14  8.21e-03   -4.863906759e+00  -4.671160258e+00  7.1e-15  33.47
Optimizer terminated. Time: 34.91

Interior-point solution summary
Problem status  : ILL_POSED
Solution status : DUAL_ILLPOSED_CER
Primal.  obj: -9.7365893126e-07   nrm: 4e+00    Viol.  con: 4e-07    var: 0e+00    barvar: 0e+00    cones: 0e+00
Optimizer summary
Optimizer                 -                        time: 34.91
Interior-point          - iterations : 25        time: 34.88
Basis identification  -                        time: 0.00
Primal              - iterations : 0         time: 0.00
Dual                - iterations : 0         time: 0.00
Clean primal        - iterations : 0         time: 0.00
Clean dual          - iterations : 0         time: 0.00
Simplex                 -                        time: 0.00
Primal simplex        - iterations : 0         time: 0.00
Dual simplex          - iterations : 0         time: 0.00
Mixed integer           - relaxations: 0         time: 0.00

------------------------------------------------------------
Status: Failed
Optimal value (cvx_optval): NaN

feasibility check problem begin

Calling Mosek 9.1.9: 9346 variables, 4661 equality constraints
For improved efficiency, Mosek is solving the dual problem.
------------------------------------------------------------

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
Name                   :
Objective sense        : min
Type                   : CONIC (conic optimization problem)
Constraints            : 4661
Cones                  : 4
Scalar variables       : 50
Matrix variables       : 3
Integer variables      : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 1                 time                   : 0.00
Lin. dep.  - tries                  : 1                 time                   : 0.00
Lin. dep.  - number                 : 0
Presolve terminated. Time: 0.02
Problem
Name                   :
Objective sense        : min
Type                   : CONIC (conic optimization problem)
Constraints            : 4661
Cones                  : 4
Scalar variables       : 50
Matrix variables       : 3
Integer variables      : 0

Optimizer  - solved problem         : the primal
Optimizer  - Constraints            : 4657
Optimizer  - Cones                  : 5
Optimizer  - Scalar variables       : 47                conic                  : 45
Optimizer  - Semi-definite variables: 3                 scalarized             : 18732
Factor     - setup time             : 0.97              dense det. time        : 0.00
Factor     - ML order time          : 0.45              GP order time          : 0.00
Factor     - nonzeros before factor : 1.08e+07          after factor           : 1.08e+07
Factor     - dense dim.             : 10                flops                  : 3.41e+10
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME
0   4.0e+00  4.0e+00  9.0e+00  0.00e+00   8.000000000e+00   0.000000000e+00   1.0e+00  1.02
1   1.5e+00  1.5e+00  9.8e-01  9.35e-01   2.381249640e+00   -2.620778136e-01  3.8e-01  2.45
2   1.8e-01  1.8e-01  1.2e-01  3.36e-01   -4.028112570e-02  -5.353710603e-01  4.5e-02  3.78
3   8.0e-04  8.0e-04  2.1e-05  1.20e+00   1.503881370e-03   -6.495349995e-04  2.0e-04  5.28
4   7.2e-05  7.2e-05  4.8e-07  1.01e+00   7.504244854e-05   -1.003113284e-04  1.8e-05  6.74
5   9.4e-06  9.4e-06  3.7e-08  9.70e-01   -4.501707946e-05  -6.658722160e-05  2.4e-06  8.11
6   1.3e-06  1.3e-06  2.5e-09  4.40e-01   -2.643340571e-05  -3.029016551e-05  3.3e-07  9.63
7   3.5e-07  3.5e-07  5.7e-10  -3.97e-02  -1.769223571e-05  -1.918722849e-05  8.6e-08  11.05
8   2.0e-07  8.3e-08  1.3e-10  1.09e-01   -8.198316149e-06  -8.609175909e-06  2.1e-08  12.27
9   6.6e-08  1.2e-08  7.9e-12  2.04e-01   1.008301935e-07   6.544195486e-09   3.0e-09  13.64
10  5.2e-09  3.1e-09  1.1e-13  9.98e-01   -1.198472926e-08  -1.443905595e-08  1.5e-10  14.83
Optimizer terminated. Time: 14.86

Interior-point solution summary
Problem status  : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal.  obj: -1.1984724324e-08   nrm: 2e+01    Viol.  con: 3e-08    var: 0e+00    barvar: 0e+00    cones: 0e+00
Dual.    obj: -1.4439055951e-08   nrm: 4e+01    Viol.  con: 0e+00    var: 4e-09    barvar: 2e-08    cones: 0e+00
Optimizer summary
Optimizer                 -                        time: 14.86
Interior-point          - iterations : 10        time: 14.84
Basis identification  -                        time: 0.00
Primal              - iterations : 0         time: 0.00
Dual                - iterations : 0         time: 0.00
Clean primal        - iterations : 0         time: 0.00
Clean dual          - iterations : 0         time: 0.00
Simplex                 -                        time: 0.00
Primal simplex        - iterations : 0         time: 0.00
Dual simplex          - iterations : 0         time: 0.00
Mixed integer           - relaxations: 0         time: 0.00

------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +1.44391e-08

>>
``````

Comparing the two cases suggests that you are trying to solve a problem that is barely feasible, or at least the feasible set is extremely thin / degenerate (I mean the optimal lambda in the second problem is essentially 0) hence all the different issues with convergence. Increasing the right hand side in d1-d4 helps create a more robust feasible set.

1 Like