# Bounded objective; unbounded solution

Hi,

I’m trying to solve the following problem with CVX. It says the problem is unbounded and gives +inf as the answer. However, the r_1 and r_2 (and lambda_1 and lambda_2) are both upper-bounded. Could someone explain to me why this is happening please?

``````cvx_solver mosek %sdpt3 % mosek %%sedumi
cvx_begin %sdp quiet

variable W_1( dim, dim, no_chan ) complex hermitian; % matrix has complex elements and is hermitian
variable W_2( dim, dim, no_chan ) complex hermitian; % matrix has complex elements and is hermitian
variables lambda_1 lambda_2 ;
variables r_1( no_chan ) r_2( no_chan );
variables gamma_1( no_chan ) gamma_2( no_chan );
variables P_1 P_2;
variables sum_rate_1 sum_rate_2;

power_1 = 0;
power_2 = 0;
rate_1 = 0;
rate_2 = 0;
maximize( lambda_1 + lambda_2 )

subject to

for c = 1:no_chan
W_1( :, :, c ) == hermitian_semidefinite( dim ); % matrix is psd
W_2( :, :, c ) == hermitian_semidefinite( dim ); % matrix is psd

r_1( c ) <= se * ( 1.0 * gamma_1( c )^0.36 + 0.3 );
r_2( c ) <= se * ( 1.0 * gamma_2( c )^0.36 + 0.3 );
r_1( c ) <= se * 6.88; %snr_cap;
r_2( c ) <= se * 6.88; %snr_cap;
r_1( c ) >= 0;
r_2( c ) >= 0;

gamma_1( c ) == trace( real( H_1' * U_r_1 * H_1 * W_1( :, :, c ) ) ) / noise_power ;
gamma_2( c ) == trace( real( H_2' * U_r_2 * H_2 * W_2( :, :, c ) ) ) / noise_power ;
gamma_1( c ) >= 0;
gamma_2( c ) >= 0;

for o = 1:no_interfered_BS
( trace( real( h_1( :, o ) * h_1( :, o )' * W_1( :, :, c ) ) ) + trace( real( h_2( :, o ) * h_2( :, o )' * W_2( :, :, c ) ) )  ) / int_thresh <= 1;
end

power_1 = power_1 + trace( real( W_1( :, :, c ) ) );
power_2 = power_2 + trace( real( W_2( :, :, c ) ) );

rate_1 = rate_1 + r_1( c );
rate_2 = rate_2 + r_2( c );
end

P_1 == power_1;
P_2 == power_2;

P_1 <= P_plane ;
P_2 <= P_plane ;

sum_rate_1 == rate_1;
sum_rate_2 == rate_2;

lambda_1 == sum_rate_1;
lambda_2 == sum_rate_2;
lambda_1 >= 0;
lambda_2 >= 0;

cvx_end``````

I don’t know. You haven’t provided a reproducible problem with input data.

It looks like the upper bounds on lambda_1 and lambda_2 flow through sum_rate_1, sun_rate_2, to rate_1, rate_2, to r_1 and r_2, which appear to be upper bounded. Is `se` finite? What is its value?

What version of CVX are you using? Do not use CVX 3.0beta, which is riddled with bugs, and does not always handle constraints correctly.

How do I upload the inputs .mat file here?

Yes. se = 168000.

I’m using version 2.

That is a very large numerical value (upper bound on r_1, r_2 is > 1e6) and may cause difficulties in the solver. Try improving the scaling of the model, for instance by changing units, so that input data is within a few orders of magnitude of 1.

1 Like

Thank you. I’ll try that.

I have another question .The value of int_thresh in the code is 10^-13. Could that cause issues as well?

Yes, that is a terrible number no matter what you do with it. You are dividing by it, so you are multiplying by 1e13.

You haven’t shown us the Mosek output. I suspect it issued warnings about input numbers. You should pay attention to those warnings.

I divided se by 10^6 and it’s working now. Here’s the output:

## Calling Mosek 9.1.9: 155460 variables, 14116 equality constraints

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:32:15)
Platform: MACOSX/64-X86

Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 14116
Cones : 1120
Scalar variables : 15460
Matrix variables : 224
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.10
Lin. dep. - number : 0
Presolve terminated. Time: 0.86
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 14116
Cones : 1120
Scalar variables : 15460
Matrix variables : 224
Integer variables : 0

Optimizer - solved problem : the primal
Optimizer - Constraints : 13442
Optimizer - Cones : 1120
Optimizer - Scalar variables : 15010 conic : 3360
Optimizer - Semi-definite variables: 224 scalarized : 285600
Factor - setup time : 5.46 dense det. time : 0.00
Factor - ML order time : 0.09 GP order time : 0.00
Factor - nonzeros before factor : 6.19e+05 after factor : 6.24e+05
Factor - dense dim. : 0 flops : 1.13e+10
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 5.6e+03 1.0e+00 1.1e+02 0.00e+00 2.589081600e+02 1.469081600e+02 1.0e+00 28.38
1 1.2e+03 2.2e-01 9.9e+00 1.36e+00 1.983560100e+02 1.778548695e+02 2.2e-01 43.72
2 3.7e+02 6.6e-02 8.7e-01 2.35e+00 2.156636941e+02 2.128949343e+02 6.6e-02 58.77
3 1.3e+02 2.3e-02 2.8e-01 8.45e-01 1.959355254e+02 1.944666680e+02 2.3e-02 73.25
4 5.2e+01 9.4e-03 1.1e-01 1.75e-01 1.744008353e+02 1.734272392e+02 9.4e-03 86.40
5 1.7e+01 3.1e-03 3.4e-02 2.31e-01 1.486647099e+02 1.481445325e+02 3.1e-03 116.56
6 5.9e+00 1.1e-03 1.3e-02 3.21e-02 1.083853847e+02 1.080250532e+02 1.1e-03 168.31
7 1.5e+00 2.6e-04 3.1e-03 1.02e-01 5.818023782e+01 5.801307399e+01 2.6e-04 209.93
8 5.2e-01 9.3e-05 1.1e-03 -1.74e-01 5.414886877e+00 5.312722072e+00 9.3e-05 236.46
9 3.6e-01 6.4e-05 4.1e-04 5.85e-01 1.840814514e+01 1.834980551e+01 6.4e-05 264.95
10 6.6e-02 1.2e-05 2.5e-05 7.77e-01 1.678889868e+00 1.667783742e+00 1.2e-05 292.78
11 1.1e-02 2.0e-06 1.1e-06 1.64e+00 1.179022296e-01 1.166777613e-01 2.0e-06 310.61
12 1.1e-03 2.0e-07 2.4e-08 1.44e+00 6.654284875e-03 6.555760200e-03 2.0e-07 336.80
13 1.7e-05 3.1e-09 3.3e-11 1.21e+00 6.105150180e-05 5.974233602e-05 3.1e-09 357.26
14 1.4e-09 7.7e-12 1.9e-18 1.03e+00 2.768274499e-11 1.472244548e-11 2.9e-14 381.16
Optimizer terminated. Time: 382.92

Interior-point solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: 2.7132074365e-11 nrm: 2e+02 Viol. con: 4e-06 var: 0e+00 barvar: 0e+00 cones: 0e+00
Dual. obj: 1.3458875098e-11 nrm: 1e+00 Viol. con: 0e+00 var: 3e-11 barvar: 1e-13 cones: 0e+00
Optimizer summary
Optimizer - time: 382.92
Interior-point - iterations : 14 time: 382.26
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): +258.908