MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (1) of matrix 'A'

Lmin1 = 1e5;
Lmin2 = Lnin2;
Emax1 = 1;
Emax2 = Emax1;
T_max = 1;
em1 =10^(-28);
em2 = em1;
Cm1 =1000;
Cm2 = 1000;
eta = 0.1;

cvx_begin
variable fm1;
variable fm2;
expression r_opt1;
r_opt1=((T_max * fm1)/Cm1+(T_max * fm2)/Cm2-eta
* (em1 * pow_p(fm1,3) * T_max+em2 * pow_p(fm2,3) * T_max));
maximize (r_opt1);
subject to
r_opt1>=0;
em1 * pow_p(fm1,3) * T_max<=Emax1;
em2 * pow_p(fm1,3) * T_max<=Emax2;
(T_maxfm1)/Cm1>=Lmin1;
(T_max
fm2)/Cm2>=Lmin2;
cvx_end

EE = ((T_max * fm1)/Cm1+(T_max * fm2)/Cm2)/
(em1 * pow_p(fm1,3) * T_max+em2 * pow_p(fm2,3) * T_max));

Calling Mosek 9.1.9: 29 variables, 10 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 © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (1) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (2) of matrix ‘A’.
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 10
Cones : 8
Scalar variables : 29
Matrix variables : 0
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 started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries : 2 time : 0.00
Lin. dep. - tries : 1 time : 0.02
Lin. dep. - number : 0
Presolve terminated. Time: 0.02
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 10
Cones : 8
Scalar variables : 29
Matrix variables : 0
Integer variables : 0

Optimizer - threads : 8
Optimizer - solved problem : the primal
Optimizer - Constraints : 6
Optimizer - Cones : 8
Optimizer - Scalar variables : 27 conic : 24
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 : 11 after factor : 11
Factor - dense dim. : 0 flops : 1.23e+02
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.0e+00 5.5e+08 5.0e+00 0.00e+00 4.000000000e+00 0.000000000e+00 1.0e+00 0.03
1 1.9e-01 1.0e+08 2.2e+00 -1.00e+00 -3.171390333e-01 1.149462981e-11 1.9e-01 0.08
2 2.2e-02 1.2e+07 7.4e-01 -1.00e+00 -4.125160478e+01 3.144677845e-11 2.2e-02 0.08
3 4.3e-03 2.4e+06 1.1e+00 -1.00e+00 -2.158197645e+02 5.926207086e-11 4.3e-03 0.09
4 4.2e-04 2.3e+05 1.8e-01 -1.00e+00 -2.398504135e+03 1.214997294e-10 4.2e-04 0.09
5 2.1e-04 1.1e+05 1.3e-01 -1.00e+00 -4.820043246e+03 1.785122580e-10 2.1e-04 0.09
6 6.4e-05 3.5e+04 7.1e-02 -1.00e+00 -1.552158857e+04 1.052654549e-10 6.4e-05 0.09
7 1.2e-05 6.5e+03 3.0e-02 -1.00e+00 -8.461762521e+04 2.345142750e-10 1.2e-05 0.09
8 2.3e-06 1.2e+03 1.3e-02 -1.00e+00 -4.443833441e+05 7.334770817e-10 2.3e-06 0.11
9 4.2e-07 2.3e+02 5.7e-03 -1.00e+00 -2.409991557e+06 1.393833977e-09 4.2e-07 0.11
10 5.2e-08 2.8e+01 2.0e-03 -1.01e+00 -2.017783630e+07 2.104659796e-09 5.2e-08 0.11
11 1.2e-08 6.7e+00 1.0e-03 -1.06e+00 -9.641735492e+07 3.714037225e-09 1.2e-08 0.11
Optimizer terminated. Time: 0.13

Interior-point solution summary
Problem status : DUAL_INFEASIBLE
Solution status : DUAL_INFEASIBLE_CER
Primal. obj: -1.0509320264e+00 nrm: 7e+08 Viol. con: 4e-08 var: 0e+00 cones: 8e-09
Optimizer summary
Optimizer - time: 0.13
Interior-point - iterations : 11 time: 0.11
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

1 Like

It means your data are too small or too big, like em1=10^(-28), solver cann’t handle them stably. How about change of variables? Let fm1_new=log(fm1) and fm2 _new=log(fm2) ,then reformulate your problem ? I don’t know, maybe Geometric programming can help GP mode of CVX . About Geometric programming, you can check the book convex optimization by Boyd.

Thank you for your suggestion, let me try it. Regarding the fm1 and fm2 variables, it seems that because the minimum Lmin1 and Lmin2 constraints are set, the code will report an error the first time it runs

I don’t know what you meaned, post your complete code ( Lnin2 is missing ) on here if convenient. Use a Markdown format by placing your code on between “```matlab” and “```”.

Thank you very much for your help, my initial question has been modified