# How to interpret “Status: Inaccurate/Infeasible Optimal value (cvx_optval): -Inf”?

I have convex problem and I solve it by CVX.
The outcome is
Status: Inaccurate/Infeasible
Optimal value (cvx_optval): -Inf
Any interpretation what’s wrong with my problem here?
Thanks so much!
Full output attached:

``````  for iter = 1:Nloop
xi= zeros(F,K);
u_2D= zeros(Mr,F*Nloop);
for f=1:F
for n=1:Mr
u_2D(n,f)=exp(1j*(rand(1,1)*2*pi));
end
end
a1=u_2D(n,f);
for f=1:F
for k=1:K
xi(f,k)=2;
end
end
cvx_begin
cvx_solver SeDuMi
variable u(Mr,F)
expression    IN_gain1_sub1(F,K);
expression    IN_gain1_sub2(F,K);
expression    IN_gain2(F,K);
expression    IN_gain3(F,K);
maximize(-xi(f,k)-2*sum(real(u_2D(n,(iter-1)*F+f)*(u(n,f)-u_2D(n,(iter-1)*F+f)))));
subject to
for f=1:F
for k=1:K
for kk=1:K
if kk~=k
IN_gain1_sub1(f,k)=sum(sum_square_abs(G_f_k(:,:,f,kk)*diag(H_f(:,:,f)*V(:,f))*u(:,f))*P(f,kk));
end
end
end
end

for f=1:F
for k=1:K
for jj=1:F
if jj~=f
for kkk=1:K
IN_gain1_sub2(f,k)=sum(sum_square_abs(W_f_k(:,:,jj,kkk)*V(:,jj)+G_f_k(:,:,jj,kkk)*diag(H_f(:,:,jj)*V(:,jj))*u(:,jj))*P(jj,kkk));
end
end
end
end
end

for f=1:F
for k=1:K
IN_gain2(f,k)=sum_square_abs(W_f_k(:,:,f,k)*V(:,f)+G_f_k(:,:,f,k)*diag(H_f(:,:,f)*V(:,f))*u_2D(:,(iter-1)*F+f))*P(f,k);
IN_gain3(f,k)=2*real(conj(W_f_k(:,:,f,k)*V(:,f)+G_f_k(:,:,f,k)*diag(H_f(:,:,f)*V(:,f))*u_2D(:,(iter-1)*F+f)).'*G_f_k(:,:,f,k)*diag(H_f(:,:,f)*V(:,f))*u(:,f));
end
end
for f=1:F
for k=1:K
IN_gain3(f,k)-IN_gain2(f,k)>=xi(f,k)*(IN_gain1_sub1(f,k)+ IN_gain1_sub2(f,k)+sigma2_S(f,k));%约束2
IN_gain3(f,k)-IN_gain2(f,k)>=(2^Rs_th-1)*(IN_gain1_sub1(f,k)+ IN_gain1_sub2(f,k)+sigma2_S(f,k));%约束3
end
end
abs(u(n,f))<=1;%约束1
cvx_end
for f=1:F
Phi(:,:,f)=diag(u(:,f));
end
end
``````

## Calling SeDuMi 1.3.4: 30123 variables, 3193 equality constraints For improved efficiency, SeDuMi is solving the dual problem.

SeDuMi 1.3.4 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
eqs m = 3193, order n = 6124, dim = 30124, blocks = 3001
nnz(A) = 777965 + 0, nnz(ADA) = 204987, nnz(L) = 104460
it : by gap delta rate t/tP t/tD* feas cg cg prec
0 : 1.99E+00 0.000
1 : 2.01E+00 9.45E-01 0.000 0.4741 0.9000 0.9000 6.10 1 1 1.9E+00
2 : 1.87E+00 7.28E-01 0.000 0.7704 0.9000 0.9000 1.97 1 1 1.4E+00
3 : 1.90E+00 6.38E-01 0.000 0.8765 0.9000 0.9000 1.55 1 1 1.3E+00
4 : -1.88E-01 3.39E-01 0.000 0.5309 0.9000 0.9000 -0.00 1 1 2.7E+00
5 : -1.15E+00 1.38E-01 0.000 0.4070 0.9000 0.9000 -0.37 1 1 4.8E+00
6 : -1.39E+00 3.45E-02 0.000 0.2503 0.9000 0.9000 -0.72 1 1 1.4E+00
7 : -9.05E-01 1.32E-02 0.000 0.3814 0.9000 0.9000 -0.76 1 1 1.1E+00
8 : -4.37E-01 5.34E-03 0.000 0.4058 0.9000 0.9000 -0.60 1 1 7.5E-01
9 : -3.78E-01 4.23E-03 0.000 0.7911 0.9000 0.9000 -0.26 1 1 6.6E-01
10 : -3.11E-01 2.43E-03 0.000 0.5749 0.9000 0.9000 -0.33 1 1 5.8E-01
11 : -2.69E-01 1.77E-03 0.000 0.7298 0.9000 0.9000 -0.25 1 1 5.1E-01
12 : -2.17E-01 1.20E-03 0.000 0.6785 0.9000 0.9000 -0.34 3 3 4.5E-01
13 : -1.60E-01 1.26E-04 0.000 0.1048 0.0000 0.9000 -0.32 2 2 4.2E-01
14 : -1.35E-01 2.58E-05 0.279 0.2049 0.0000 0.9000 -0.09 7 7 4.0E-01
15 : -1.17E-01 3.52E-07 0.307 0.0136 0.0000 0.9000 0.02 9 9 3.9E-01
16 : -9.13E-02 2.45E-07 0.000 0.6970 0.4235 0.9000 0.12 14 13 3.2E-01
17 : -8.94E-02 2.30E-07 0.191 0.9384 0.0726 0.9000 0.06 22 20 3.1E-01
18 : -9.33E-02 1.95E-07 0.423 0.8475 0.9000 0.9000 -0.53 22 21 3.2E-01
19 : -6.36E-02 1.18E-07 0.000 0.6061 0.9000 0.9000 -0.78 19 19 3.5E-01
20 : -2.37E-02 2.66E-08 0.000 0.2246 0.9043 0.9000 -0.83 13 13 3.6E-01
21 : -1.58E-02 4.89E-09 0.000 0.1840 0.9248 0.9000 -0.95 12 13 3.1E-01
22 : -6.35E-03 9.45E-10 0.000 0.1934 0.9017 0.9000 -0.99 21 22 2.9E-01
23 : -5.38E-03 2.04E-10 0.000 0.2155 0.9000 0.8176 -1.00 37 25 2.9E-01
24 : -4.82E-03 4.59E-11 0.000 0.2256 0.9000 0.8004 -1.00 95 98 2.9E-01
Run into numerical problems.

Dual infeasible, primal improving direction found.
iter seconds |Ax| [Ay]_+ |x| |y|
24 21.8 2.9e-05 1.5e-06 2.7e+04 1.8e+02

## Detailed timing (sec) Pre IPM Post 1.500E-01 4.251E+00 8.006E-03 Max-norms: ||b||=1.999225e+00, ||c|| = 1.532240e+00, Cholesky |add|=94, |skip| = 0, ||L.L|| = 2.15512e+07.

Status: Inaccurate/Infeasible
Optimal value (cvx_optval): -Inf

1 Like

You have not provided the value of many input data variables, and the random number instantiation may also affect feasibility; therefore the problem is not reproducible.

I generated one instantiation of the random numbers, and set all the undefined input data equal to the scalar 1, including `Nloop`, which affects via `iter` the objective function and some constraints. . SeDuMi then produced `Infeasible`, as did Mosek. I ran Mosek with objective function removed, and it still reported infeasible.

It may be the case that your model is feasible, because your input data is different than mine. And it may be that the problem is feasible for some values of `iter` and not others. And feasibility may also depend on the random numbers instantiation.

You should also check the input data scaling to make sure that non-zero input data is within a small number of orders of magnitude of 1. Once the input data scaling is good, then you should follow the advice in https://yalmip.github.io/debugginginfeasible , all of which except for Section 1 also applies to CVX.

1 Like