When one of the parameters is increased, the result cannot be calculated. The result is +inf，and the status is unbounded. I don’t know how to solve the problem, please help. And, when this parameter is small, the result can be obtained. Looking forward to your reply, thank you very much。

We need more information, such as seeing your code, and perhaps input data in order to offer specific guidance.

However, you can start by following the advice at https://yalmip.github.io/debuggingunbounded , which also applies to CVX.

I want to solve this convex problem. when S is increased. For exampple ,S =15000000. The result can not be obtained. Thank you so much for replying.

In the future please copy and paste your code using the Preformattedt text icon, rather than posting an image.

Having input numbers many orders of magnitude from 1 is a recipe for numerical troubles and unreliability. Your input numbers are horrible.(numerical garbage).

Your first step is to improve scaling so that all non-zero input numbers are within a small number of orders of magnitude of 1.

I am not even clear whether the problem was reported unbounded or infeasible. You said result is +inf. That corresponds to unbounded if maximizing, or infeasible if minimizing. But your program has minimize. To cover all possibilities, also read all but section 1 of https://yalmip.github.io/debugginginfeasible .

Thank you for your reply. But, I don’t know, how to improve scaling? Can you elaborate on it?

I do need to solve the problem urgently, so I’m sorry to bother you so much.`h(1)=1.0e-6*0.5057; h(2)=1.0e-6*0.3757; n=2; sigma= 10 * 10^(-10); w=1000000; P_max=3.2; S=150000; cvx_begin variables t(n) y(n); minimize(100*y(1)+100*y(2)) subject to t(1)+t(2)<=1+1.0*10e-14 rel_entr(t(1),t(1)+h(1)/sigma*y(1))/log(2)+S/w <= 0 rel_entr(t(2),t(2)+h(2)/sigma*y(2))/log(2)+S/w <= 0 y(1)-3.2*t(1) <= 0 y(1)>= 0+1.0*10e-14 y(2)-3.2*t(2) <= 0 y(2)>=0+1.0*10e-14 t(1)>=0+1.0*10e-14 t(1)<=1+1.0*10e-14 t(2)>=0+1.0*10e-14 t(2)<=1+1.0*10e-14 cvx_end `

```
h(1)=1.0e-6*0.5057;
h(2)=1.0e-6*0.3757;
n=2;
sigma= 10 * 10^(-10);
w=1000000;
P_max=3.2;
S=150000;
cvx_begin
variables t(n) y(n);
minimize(100*y(1)+100*y(2))
subject to
t(1)+t(2)<=1+1.0*10e-14
rel_entr(t(1),t(1)+h(1)/sigma*y(1))/log(2)+S/w <= 0
rel_entr(t(2),t(2)+h(2)/sigma*y(2))/log(2)+S/w <= 0
y(1)-3.2*t(1) <= 0
y(1)>= 0+1.0*10e-14
y(2)-3.2*t(2) <= 0
y(2)>=0+1.0*10e-14
t(1)>=0+1.0*10e-14
t(1)<=1+1.0*10e-14
t(2)>=0+1.0*10e-14
t(2)<=1+1.0*10e-14
cvx_end
indent preformatted text by 4 spaces
```

I have sent the code, please help me to see how to modify it, thank you

You need to change units so that all input numbers are within a small number of orders of magnitude of 1. Otherwise, the solver may not work reliably.

Mosek solved this “as is”.

At best, all of the 1e-14 are meaningless to the solver, and at worst, can screw it up, and should be eliminated. I don’t think it made a difference in this case using Mosek, because the result was the same when I eliminated them.

`S/w = 0.15`

and is the only use made of either `S`

or `w`

, so that is probably o.k. (with these values). That leaves `h(1)/sigma = h(2)/sigma = 5.06e+02`

as the only place `h`

or `sigma`

are used, so that is probably o.k. However, it is better not to have these “extreme” numbers, because you can’t be certain that transformations by CVX will always be in terms of these “net” numbers., unless the divisions are in parentheses, whereby the division occurs before CVX ever sees the individual numbers).

## Calling Mosek 9.3.6: 17 variables, 6 equality constraints

For improved efficiency, Mosek is solving the dual problem.

MOSEK Version 9.3.10 (Build date: 2021-11-5 08:42:07)

Copyright © MOSEK ApS, Denmark. WWW: mosek.com

Platform: Windows/64-X86

Problem

Name :

Objective sense : min

Type : CONIC (conic optimization problem)

Constraints : 6

Cones : 2

Scalar variables : 17

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 - tries : 1 time : 0.00

Lin. dep. - tries : 1 time : 0.01

Lin. dep. - number : 0

Presolve terminated. Time: 0.03

Problem

Name :

Objective sense : min

Type : CONIC (conic optimization problem)

Constraints : 6

Cones : 2

Scalar variables : 17

Matrix variables : 0

Integer variables : 0

Optimizer - threads : 8

Optimizer - solved problem : the primal

Optimizer - Constraints : 4

Optimizer - Cones : 2

Optimizer - Scalar variables : 15 conic : 6

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 : 7 after factor : 7

Factor - dense dim. : 0 flops : 7.90e+01

ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME

0 1.0e+00 4.0e+00 8.3e-01 0.00e+00 -1.674162547e-01 0.000000000e+00 1.0e+00 0.06

1 1.9e-01 7.5e-01 7.0e-02 3.00e-01 -8.253068901e-01 -8.081031594e-01 1.9e-01 0.16

2 3.9e-02 1.5e-01 5.2e-03 1.51e+00 -2.230186035e-01 -2.267921025e-01 3.9e-02 0.16

3 6.9e-03 2.8e-02 3.8e-04 1.13e+00 -6.455245714e-02 -6.518045223e-02 6.9e-03 0.17

4 1.3e-03 5.3e-03 3.4e-05 1.00e+00 -5.879743404e-02 -5.886635862e-02 1.3e-03 0.17

5 1.5e-04 5.9e-04 1.3e-06 9.95e-01 -5.421801150e-02 -5.422412341e-02 1.5e-04 0.17

6 1.8e-05 7.0e-05 5.1e-08 9.98e-01 -5.365307705e-02 -5.365378774e-02 1.8e-05 0.19

7 1.9e-06 7.5e-06 1.8e-09 1.00e+00 -5.359284960e-02 -5.359292302e-02 1.9e-06 0.19

8 2.4e-07 9.7e-07 8.2e-11 1.00e+00 -5.358692995e-02 -5.358693935e-02 2.4e-07 0.19

9 8.9e-09 3.5e-08 5.9e-13 1.00e+00 -5.358629922e-02 -5.358629933e-02 8.9e-09 0.20

Optimizer terminated. Time: 0.27

Interior-point solution summary

Problem status : PRIMAL_AND_DUAL_FEASIBLE

Solution status : OPTIMAL

Primal. obj: -5.3586299223e-02 nrm: 1e+02 Viol. con: 1e-06 var: 2e-08 cones: 0e+00

Dual. obj: -5.3586299332e-02 nrm: 2e+00 Viol. con: 0e+00 var: 8e-09 cones: 0e+00

Optimizer summary

Optimizer - time: 0.27

Interior-point - iterations : 9 time: 0.20

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): +0.0535863

disp(t)

0.465510584602382

0.534487451108615disp(y)

1.0e-03 *

0.230370156931148

0.305492836586113

If you have available CVX 2.2 plus Mosek 9.x, use that, because it is the easiest and most reliable and robust solution option. Otherwise, use CVXQUAD as discussed in CVXQUAD: How to use CVXQUAD's Pade Approximant instead of CVX's unreliable Successive Approximation for GP mode, log, exp, entr, rel_entr, kl_div, log_det, det_rootn, exponential cone. CVXQUAD's Quantum (Matrix) Entropy & Matrix Log related functions .

Excuse me, I followed your method, but when I set S to 15000000, I still can’t get results. Can you help me solve it? I wish you a happy weekend, thank you very much, and I am still replying to my emails on the weekend.

```
h(1)=1.0e-6*0.5057;
h(2)=1.0e-6*0.3757;
n=2;
sigma= 10 * 10^(-10);
w=1000000;
P_max=3.2;
S=15000000;
h1_div_sigma=h(1)/sigma;
h2_div_sigma=h(2)/sigma;
s_div_w=S/w;
cvx_begin
variables t(n) y(n);
minimize(100*y(1)+100*y(2))
subject to
t(1)+t(2)<1
rel_entr(t(1),t(1)+h1_div_sigma*y(1))/log(2)+s_div_w <= 0
rel_entr(t(2),t(2)+h2_div_sigma*y(2))/log(2)+s_div_w <= 0
y(1)-3.2*t(1) <= 0
y(1)> 0
y(2)-3.2*t(2) <= 0
y(2)>0
t(1)>0
t(1)<1
t(2)>0
t(2)<1
cvx_end
```

Using Mosek as solver, CVX reports this as infeasible. It can become feasible with certain combinations of constraints removed.

I refer you to the link provided earlier: All but section 1 of https://yalmip.github.io/debugginginfeasible .