# Why Status: Infeasible Optimal value (cvx_optval): -Inf

%% cvx
cvx_clear
cvx_begin %quiet
cvx_solver Mosek
variable A(N,K)
variable C(K,1)
variables solu;
variables Rs(N,K);
variables pai(N,K);
expression f(K,1);
maximize(solu)%
subject to:
%%
%%
A>=0;
A<=1;
C>=0;
C<=1;
for n=1:N
sum(A(n,:))<=1;
end
for n=1:N
for k=1:K
A(n,k)<=C(k,1);
end
end
%%
for k=1:K
for n=1:N
delta_tB(log(fai1(n,k)*Pl(n,k)+fai2+fai3(n,k)*Pl(n,k)+fai4)/log(2)+((fai1(n,k)*Pl(n,k)+fai3(n,k)*Pl(n,k))/((fai1(n,k)*Pl(n,k)+fai2+fai3(n,k)Pl(n,k)+fai4)log(2)))(pai(n,k)-pail(n,k))-log(fai2+fai3(n,k)exp(pai(n,k))+fai4)/log(2))>=Rs(n,k);
f(k,1)=f(k,1)+(R(n,k)+Ar(n,k))
(Rs(n,k)+A(n,k))-pow_pos(R(n,k)+Ar(n,k),2)/2-(pow_pos(Rs(n,k),2)+pow_pos(A(n,k),2))/2;
end
f(k,1)delta_t>=SkC(k,1);
end
%%
for k=1:K
for n=1:N
exp(pai(n,k))>=1;
exp(pai(n,k))<=Pmax
C(k,1);
end
end
cvx_end

## Calling Mosek 9.1.9: 15130 variables, 6010 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 1.3e+08 has been specified in c for variable ‘’ (6130).
MOSEK warning 57: A large value of 1.2e+08 has been specified in c for variable ‘’ (6730).
MOSEK warning 57: A large value of 1.2e+08 has been specified in c for variable ‘’ (7330).
MOSEK warning 57: A large value of 1.0e+08 has been specified in c for variable ‘’ (7930).
MOSEK warning 57: A large value of 1.0e+08 has been specified in c for variable ‘’ (8530).
MOSEK warning 57: A large value of 1.2e+08 has been specified in c for variable ‘’ (9130).
MOSEK warning 57: A large value of 1.1e+08 has been specified in c for variable ‘’ (9730).
MOSEK warning 57: A large value of 1.2e+08 has been specified in c for variable ‘’ (10330).
MOSEK warning 57: A large value of 1.2e+08 has been specified in c for variable ‘’ (10930).
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 6010
Cones : 3000
Scalar variables : 15130
Matrix variables : 0
Integer variables : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 2010
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries : 2 time : 0.00
Lin. dep. - tries : 1 time : 0.01
Lin. dep. - number : 0
Presolve terminated. Time: 0.05
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 6010
Cones : 3000
Scalar variables : 15130
Matrix variables : 0
Integer variables : 0

Optimizer - solved problem : the primal
Optimizer - Constraints : 4000
Optimizer - Cones : 3000
Optimizer - Scalar variables : 13120 conic : 9000
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 : 1.55e+04 after factor : 2.64e+04
Factor - dense dim. : 30 flops : 4.43e+05
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.0e+00 1.3e+08 7.9e+08 0.00e+00 7.919122912e+08 0.000000000e+00 1.0e+00 0.08
1 2.6e-01 3.3e+07 4.1e+08 -1.00e+00 7.919070689e+08 2.716312345e-05 2.6e-01 0.17
2 4.3e-02 5.3e+06 1.6e+08 -1.00e+00 7.918632752e+08 4.822893260e-04 4.3e-02 0.17
3 1.2e-02 1.5e+06 8.6e+07 -1.00e+00 7.916676459e+08 2.829391717e-03 1.2e-02 0.19
4 3.4e-03 4.2e+05 4.6e+07 -9.99e-01 7.907586761e+08 1.380760372e-02 3.4e-03 0.19
5 8.4e-04 1.1e+05 2.3e+07 -9.97e-01 7.868085836e+08 6.137121374e-02 8.4e-04 0.20
6 2.2e-04 2.8e+04 1.2e+07 -9.86e-01 7.702923067e+08 2.615154749e-01 2.2e-04 0.22
7 7.0e-05 8.8e+03 6.2e+06 -9.46e-01 7.290025504e+08 7.650594660e-01 7.0e-05 0.22
8 3.0e-05 3.8e+03 3.7e+06 -8.39e-01 6.580324103e+08 1.636126681e+00 3.0e-05 0.23
9 9.1e-06 1.1e+03 1.5e+06 -6.65e-01 4.771418128e+08 3.874501711e+00 9.1e-06 0.25
10 5.1e-06 6.4e+02 8.9e+05 -2.94e-01 3.919720099e+08 4.955524003e+00 5.1e-06 0.25
11 2.5e-06 3.1e+02 4.4e+05 -1.47e-01 2.871518954e+08 6.291071618e+00 2.5e-06 0.27
12 8.7e-07 1.1e+02 2.0e+05 -2.11e-01 2.305375779e+08 7.034297223e+00 8.7e-07 0.28
13 1.5e-07 1.9e+01 8.3e+04 -7.31e-01 2.507622438e+08 6.780615111e+00 1.5e-07 0.30
14 8.8e-10 1.1e-01 6.3e+03 -9.52e-01 1.749062379e+08 6.696274176e+00 8.8e-10 0.30
15 2.0e-11 8.9e-08 1.1e+01 -1.00e+00 -1.023289256e+14 6.710988251e+00 7.1e-16 0.31
Optimizer terminated. Time: 0.38

Interior-point solution summary
Problem status : DUAL_INFEASIBLE
Solution status : DUAL_INFEASIBLE_CER
Primal. obj: -2.2430381534e-01 nrm: 9e+01 Viol. con: 7e-08 var: 0e+00 cones: 0e+00
Optimizer summary
Optimizer - time: 0.38
Interior-point - iterations : 15 time: 0.31
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

see

And your problem status is DUAL_INFASIBLE, maybe searching “DUAL_INFASIBLE” on this forum helps you.

By the way, it seems that many of inseasible/failed problems were caused by the bad scaling of data, which means the data are too big or too small (close to zero but not zero). It would be good if CVX can track the bad data back to the original constraints that produced them, and tell us which of them caused that, Because the modeling process can be too complicated (for me) to track by hand. I don’t know if this is possible. Please forgive my lack of background.

Mosek does provide warning of large input data values. So such values are somewhere in your model. Fix the scaling first, then re-run Mosek. If it is still reported as infeasible, follow the advice in the link.

Note that Mosek reported dual infeasible, but it was provided the dual problem by CVX, so that corresponds to primal infeasible, which is what CVX reported.

I’ve got it. I’m sorry for my oversight