# An objective has already been supplied for this problem

I need to solve the following problem: only etaa is variable

I have proved this SINR(k) is a concave function. so min SINR(k) also is concave function. Since the log function is concave and not decreasing, t it is still a concave function after compounding. So I write the cvx code.
cvx_begin
variable cauy(M,K)
for k=1:K
maximize (log(sum((etaa(:,k).^0.5).*alpha(:,k))))
subject to
for m=1:M
(etaa(m,:)).*alpha(m, :) == 1;
end
end
cvx_end

But it does not work. Can you help me?

I modify my code,but it doesnot work.
as follows:
cvx_begin
variable cauy(M,K)
value = cvx(zeros(1,K));

for k=1:K
value(k) = log(sum((cauy(:,k).^0.5).*Gammaa(:,k)));
end
min_value = min(value(:));
maximize (min_value)
subject to
for m=1:M
(cauy(m,:)).*Gammaa(m,:) == 1;
end
cvx_end
Anyone who can help me？ Is my code wrong?
I will appreciate it.

Your problem executes and produces an answer with the made up data I used ( Gammaa = ones(3,2) ). . I have no idea what the relation is between your code and the problem depicted in the graphic.

Sorry Stone. It’s my bad. After I modified my code, I did not modify my question, sorry. Because I am running my second code with my experiment data，the result is NAN, and I want to ask is that my second code is correct? Really really thank you

How do I know whether your code is correct? I have idea no idea what optimization problem you are trying to solve.

When I ran it your code on made up data it produced an answer. It was also successful with several matrices created with positive multiples of rand. Perhaps on your experiment data CVX’s successive approximation failed, as can happen, even if your code is “correct” http://cvxr.com/cvx/doc/advanced.html#the-successive-approximation-method .

You can try specifying a different solver and see whether that succeeds. Alternatively, you can use CVX 3.0beta and install and specify ecos or scs (with high enough max iterations) as the solver, either of which will avoid CVX’s successive approximation method, and may succeed even when CVX’s successive approximation method fails.

Dear Stone,thank you for your patience. In my previous code, the constraints were wrong. Then I found out that I could not use the log function, since the overall SINR is positive and I can max-min sqrt (SINR), but under cvx 2.1,based on my experimental data, I use SDPT3 the result is nan, using Mosek and SeDuMi, the result is inf, then I test the random number,it can be solved, this is because my experimental data can not be used CVX to solve?

Please show us the outputs from running the various solvers and for the “random number”.

Perhaps the Gammaa in your experiment data makes the problem unbounded, whereas random data does not. If so, you need to reconsider the formulation of your model.

Dear Stone，my code as fallows：

clc
clear all
format long
M = 60; K = 20; tau = 20; B = 20;

noise_p = 10^((-203.975+10log10(B10^6)+9)/10); %noise power
Pp=Pd/2;%pilot power: 100 mW

%% --------------------------------------------------------------CVX
cvx_begin
variable etaa(M,K)
SINRR = cvx(zeros(1,K));
for k=1:K
SINRR(k) = sum((etaa(:,k).^0.5) .* Gammaa(:,k)) / (( 1/Pd + sum(BETAA(:,k))) ^0.5);
end
min_SINR = min(SINRR);

``````maximize (min_SINR)
subject to
for m=1:M
sum((etaa(m,:)).*Gammaa(m,:)) == 1;
end
``````

cvx_end
%% ---------------------------------------------------------------------
Both BETAA and Gammaa are positive numbers.
When I use CVX 2.1 based on my experiment data : SDPT3, it shows sqlp stop: primal or dual is diverging, 7.0e+17
Mosek: Status: Infeasible Optimal value (cvx_optval): -Inf
SeDuMi No sensible solution found.
When I using Gammaa = 10^(-7).*rand(M,K) instead of my experiment data( some Gammaa value equal 10^(-19)) ,it can be solved.
But when I run it in CVX3.0,they both show(based on my experiment data) Status: Infeasible Optimal value (cvx_optval): -Inf

You changed your program again. Now there is no use of log. Therefore, CVX’s successive approximation method will not be used, and my comments about that can be ignored.

Use of `etaa(:,k).^0.5` is constraining all elements of etaa to be non-negative. Perhaps not all elements of your experiment data Gammaa are really positive, or they have very extreme magnitudes (very large or close to 0), thereby causing numerical difficulties. What are the range of exponents on the elements of Gammaa?

Please show the actual output from running CVX, including all solver output, not just your summary.

I put gamma data in the form of pictures,

just as you say, they have very extreme magnitudes (very close to 0),
The following is my result, under cvx2.1

————————————————————————————————————————————————

## Calling SDPT3 4.0: 3621 variables, 1280 equality constraints

num. of constraints = 1280
dim. of sdp var = 2400, num. of sdp blk = 1200
dim. of linear var = 20
dim. of free var = 1 *** convert ublk to lblk
number of nearly dependent constraints = 60
To remove these constraints, re-run sqlp.m with OPTIONS.rmdepconstr = 1.

SDPT3: Infeasible path-following algorithms

## number of iterations = 2 Total CPU time (secs) = 1.33 CPU time per iteration = 0.67 termination code = 3 DIMACS: 1.6e+02 0.0e+00 1.5e+04 0.0e+00 1.0e+00 8.7e-06

Status: Failed
Optimal value (cvx_optval): NaN

## Calling Mosek 8.0.0.60: 3621 variables, 1280 equality constraints

MOSEK Version 8.0.0.60 (Build date: 2017-3-1 13:09:33)
Platform: Windows/64-X86

MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (0) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (3) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (6) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (9) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (12) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (15) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (21) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (24) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (27) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (30) of matrix ‘A’.
Warning number 710 is disabled.
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 1280
Cones : 1200
Scalar variables : 3621
Matrix variables : 0
Integer variables : 0

Optimizer started.
Conic interior-point optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator - tries : 0 time : 0.00
Lin. dep. - tries : 1 time : 0.02
Lin. dep. - number : 0
Presolve terminated. Time: 0.03
Interior-point optimizer terminated. Time: 0.11.

MOSEK PRIMAL INFEASIBILITY REPORT.

Problem status: The problem is primal infeasible

Optimizer terminated. Time: 0.17

Interior-point solution summary
Problem status : PRIMAL_INFEASIBLE
Solution status : PRIMAL_INFEASIBLE_CER
Dual. obj: 1.0000000000e+000 nrm: 1e+000 Viol. con: 0e+000 var: 5e-011 cones: 0e+000
Optimizer summary
Optimizer - time: 0.17
Interior-point - iterations : 0 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

## Calling SeDuMi 1.34: 3621 variables, 1280 equality constraints

SeDuMi 1.34 (beta) by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
Split 1 free variables
eqs m = 1280, order n = 2423, dim = 3623, blocks = 1201
nnz(A) = 6060 + 0, nnz(ADA) = 8860, nnz(L) = 5070
it : by gap delta rate t/tP t/tD* feas cg cg prec
0 : 8.36E-03 0.000
1 : -2.23E+05 2.79E-03 0.000 0.3340 0.9000 0.9000 -1.00 1 1 5.0E+00
2 : -3.36E+05 1.14E-03 0.000 0.4071 0.9000 0.9000 -1.00 19 19 5.0E+00
3 : -1.49E+05 2.23E-04 0.000 0.1958 0.0000 0.9000 -1.00 21 21 5.0E+00
4 : -1.72E+05 9.45E-05 0.000 0.4246 0.9121 0.9000 -1.00 20 20 5.0E+00
Run into numerical problems.

iter seconds digits cx by
4 1.9 -0.0 3.9627965484e+01 -1.7206323965e+05
|Ax-b| = 6.4e+01, [Ay-c]_+ = 1.8E+00, |x|= 1.5e+03, |y|= 1.5e+11
No sensible solution found.

## Detailed timing (sec) Pre IPM Post 5.540E-01 1.280E+00 7.900E-02 Max-norms: ||b||=1, ||c|| = 1, Cholesky |add|=1, |skip| = 11, ||L.L|| = 1.

Status: Failed
Optimal value (cvx_optval): NaN

really really thank you

But in CVX3.0 ，the result as follows：

## Calling SDPT3 4.0: 3621 variables, 1280 equality constraints

num. of constraints = 1280
dim. of socp var = 3600, num. of socp blk = 1200
dim. of linear var = 20
dim. of free var = 1
*** convert ublk to linear blk

SDPT3: homogeneous self-dual path-following algorithms

## number of iterations = 10 residual of primal infeasibility certificate (y,Z) = 1.35e-08 reldist to infeas. <= 6.13e-13 Total CPU time (secs) = 0.53 CPU time per iteration = 0.05 termination code = 1 DIMACS: 5.6e+00 0.0e+00 1.7e+01 0.0e+00 -9.9e-01 9.0e+00

Status: Infeasible
Optimal value (cvx_optval): -Inf

## Calling Mosek 8.0.0.60: 3621 variables, 1280 equality constraints

MOSEK Version 8.0.0.60 (Build date: 2017-3-1 13:09:33)
Platform: Windows/64-X86

MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (46) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (47) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (120) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (121) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (122) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (123) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (124) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (125) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (127) of matrix ‘A’.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col ‘’ (128) of matrix ‘A’.
Warning number 710 is disabled.
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 1280
Cones : 1200
Scalar variables : 3621
Matrix variables : 0
Integer variables : 0

Optimizer started.
Conic interior-point optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator - tries : 0 time : 0.00
Lin. dep. - tries : 1 time : 0.00
Lin. dep. - number : 0
Presolve terminated. Time: 0.01
Interior-point optimizer terminated. Time: 0.05.

MOSEK PRIMAL INFEASIBILITY REPORT.

Problem status: The problem is primal infeasible

Optimizer terminated. Time: 0.11

Interior-point solution summary
Problem status : PRIMAL_INFEASIBLE
Solution status : PRIMAL_INFEASIBLE_CER
Dual. obj: 1.0000000000e+000 nrm: 1e+000 Viol. con: 0e+000 var: 2e-012 cones: 0e+000
Optimizer summary
Optimizer - time: 0.11
Interior-point - iterations : 0 time: 0.05
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

## Calling SeDuMi 1.34: 3621 variables, 1280 equality constraints

SeDuMi 1.34 (beta) by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
Split 1 free variables
eqs m = 1280, order n = 2423, dim = 3623, blocks = 1201
nnz(A) = 6060 + 0, nnz(ADA) = 8860, nnz(L) = 5070
it : by gap delta rate t/tP t/tD* feas cg cg prec
0 : 8.36E-03 0.000
1 : 4.29E+05 2.95E-03 0.000 0.3535 0.9000 0.9000 -1.00 1 1 5.0E+00
2 : 4.79E+05 8.83E-04 0.000 0.2989 0.9000 0.9000 -1.00 9 9 5.0E+00
3 : 4.06E+05 1.41E-04 0.000 0.1596 0.7018 0.9000 -1.00 20 20 5.0E+00
4 : 3.83E+05 3.68E-05 0.000 0.2613 0.9411 0.9000 -1.00 19 19 5.0E+00
Run into numerical problems.

Primal infeasible, dual improving direction found.
iter seconds |Ax| [Ay]_+ |x| |y|
4 1.9 6.6e-01 4.4e-06 7.1e+01 4.1e+05

## Detailed timing (sec) Pre IPM Post 1.500E-01 5.690E-01 2.200E-02 Max-norms: ||b||=1, ||c|| = 1, Cholesky |add|=1, |skip| = 7, ||L.L|| = 1.

Status: Infeasible
Optimal value (cvx_optval): -Inf

Are all elements of Gammaa in the range of roughly 1 e-11 to 1e-17? MOSEK is warning you about the nearly zero elements, which I suspect are causing difficulties, and its failure to find a feasible solution. SDPT3 mentions nearly dependent constraints.

Can you try to re-scale data to be closer in magnitude to 1? You may also want to look at the scaling of the denominator in SINRR. It would be good to have SINRR come out within a small number of orders of magnitude of 1.

Dear Stone. Thank you for your advices, I will try it. Thank you!

SO did you solve the issue at the end?