# How can I deal with: Status: Infeasible Optimal value (cvx_optval): +Inf

I have wrote an iterative optimization program with CVX-1 and CVX-2. And CVX-1 run successfully andvariables (y, p, b) was generated.
When I put them into CVX-2 (shows below) and tries several ways in forum, output are always: Status: Infeasible; Optimal value (cvx_optval): +Inf.
My model of CVX-2 and code have been shown below.

My objective function is constant (1) just to find a feasible variable(l).
Thanks!

And my code of CVX-2 is:

``````        cvx_begin
variable l(node_num, node_num,q_num) nonnegative;
expression sumt(q_num);
t0=cvx(zeros(node_num,node_num,q_num));
t1=cvx(zeros(node_num,node_num,q_num));
minimize  1
subject to
l>=0;
l<=5e8;
for qi = 1:q_num
for n = 1:node_num
for m = 1:node_num
if n~=m && y(qi,n,m,1)~=0
t0(n,m,qi)=lq(qi)*y(qi,n,m,1)*inv_pos(l(n,m,qi));
t1(n,m,qi)=lq(qi)*y(qi,n,m,2)*inv_pos(l(n,m,qi));
end
end
end
sumt(qi)=sum(sum(t0(:,:,qi)+t1(:,:,qi)));
sumt(qi)<=tqi(qi);
end
for n = 1:bs_num
for m = 1:node_num
if m<=bs_num
sum(yt(n,m,:).*l(n,m,:))<=lg1; % constrain-11-a
else
sum(yt(n,m,:).*l(n,m,:))<=lg2/3;% constrain-11-b
end
end
end
for n = 1:uav_num
for m = 1:node_num
sum(yt(n+4,m,:).*l(n+4,m,:))<=-rel_entr(b(n,m), b(n,m) + p(n,m)*H(n,m)/cigma)/log(2); % constrain-12   x*f(y/x) = -rel_entr(x,x+y)
end
end
cvx_end``````

its output is:

``````    Calling Mosek 9.1.9: 3686 variables, 1210 equality constraints
``````

## For improved efficiency, Mosek is solving the dual problem.

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Platform: Windows/64-X86

MOSEK warning 57: A large value of 5.0e+08 has been specified in c for variable ‘’ (980).
MOSEK warning 57: A large value of 5.0e+08 has been specified in c for variable ‘’ (981).
MOSEK warning 57: A large value of 5.0e+08 has been specified in c for variable ‘’ (982).
MOSEK warning 57: A large value of 5.0e+08 has been specified in c for variable ‘’ (983).
MOSEK warning 57: A large value of 5.0e+08 has been specified in c for variable ‘’ (984).
MOSEK warning 57: A large value of 5.0e+08 has been specified in c for variable ‘’ (985).
MOSEK warning 57: A large value of 5.0e+08 has been specified in c for variable ‘’ (986).
MOSEK warning 57: A large value of 5.0e+08 has been specified in c for variable ‘’ (987).
MOSEK warning 57: A large value of 5.0e+08 has been specified in c for variable ‘’ (988).
MOSEK warning 57: A large value of 5.0e+08 has been specified in c for variable ‘’ (989).
Warning number 57 is disabled.
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 1210
Cones : 720
Scalar variables : 3686
Matrix variables : 0
Integer variables : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 10
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries : 2 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 : 1210
Cones : 720
Scalar variables : 3686
Matrix variables : 0
Integer variables : 0

Optimizer - solved problem : the primal
Optimizer - Constraints : 1038
Optimizer - Cones : 720
Optimizer - Scalar variables : 2898 conic : 2160
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 0.00 dense det. time : 0.00
Factor - ML order time : 0.00 GP order time : 0.00
Factor - nonzeros before factor : 2.59e+04 after factor : 6.86e+04
Factor - dense dim. : 0 flops : 9.30e+06
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.0e+00 1.0e+09 1.0e+00 0.00e+00 1.414887465e-02 0.000000000e+00 1.0e+00 0.03
1 4.3e-01 4.3e+08 6.7e-01 -1.00e+00 -1.289910007e+00 0.000000000e+00 4.3e-01 0.09
2 1.6e-01 1.6e+08 4.0e-01 -1.00e+00 -5.285331171e+00 0.000000000e+00 1.6e-01 0.11
3 4.6e-02 4.6e+07 2.2e-01 -1.00e+00 -2.060139145e+01 0.000000000e+00 4.6e-02 0.11
4 5.8e-03 5.8e+06 7.7e-02 -1.00e+00 -1.726063627e+02 0.000000000e+00 5.8e-03 0.11
5 3.1e-04 3.1e+05 1.8e-02 -1.00e+00 -3.260717553e+03 0.000000000e+00 3.1e-04 0.13
6 8.2e-06 8.2e+03 2.9e-03 -1.00e+00 -1.221613156e+05 0.000000000e+00 8.2e-06 0.13
7 5.6e-08 5.6e+01 2.3e-04 -9.99e-01 -1.720052249e+07 0.000000000e+00 5.6e-08 0.13
8 6.1e-11 6.1e-02 1.4e-06 -9.19e-01 -3.814854646e+08 0.000000000e+00 6.1e-11 0.13
Optimizer terminated. Time: 0.16

Interior-point solution summary
Problem status : DUAL_INFEASIBLE
Solution status : DUAL_INFEASIBLE_CER
Primal. obj: -9.2023749927e-01 nrm: 7e+00 Viol. con: 3e-07 var: 9e-11 cones: 0e+00
Optimizer summary
Optimizer - time: 0.16
Interior-point - iterations : 8 time: 0.13
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: Infeasible
Optimal value (cvx_optval): +Inf

As you can see from the warnings after CVX dualized the problem some huge numbers appeared in the objective, hence the numerical problems leading to the unbounded status. Your original model must have some huge bounds that should be scaled.

Of course it can also be that your model really in fact is infeasible.

Thank you. Indeed the variable (l) should be 1e7 or more to be optimal in my previous model. I will update it right now.