my code:
function [pBest,numOfLoop,Tafter,Tbefore] = functionPowerOptimization_maxSumRate_refine_1(N,a,b,p,beta,Pmax,tau_p,Tbefore,tau_c)
L= size(beta,1);
%Extract the number of UEs
K = size(beta,2);
dl_power=(K/L)*(Pmax/K)*ones(L,K);
x=zeros(K,1);
Tafter=1e6;
%%%Set the accuracy of the bisection
delta =1e-8;
numOfLoop=0;
while norm((Tafter - Tbefore)/Tbefore) > delta
numOfLoop=numOfLoop+1;
if numOfLoop==1
[signal,interf,perUserSE] = functionComputePerUserSE_DL(a,b,K,N,beta,p,tau_p,tau_c,dl_power);
x=signal./(signal+interf);
pBest = functionFeasibilityProblemP1(L,K,N,beta,Pmax,p,a,b,tau_p,x);
Tbefore=sum(perUserSE);
Tafter = functionComputeSumSE_DL(a,b,K,N,beta,p,tau_p,tau_c,pBest);
else
[signal,interf,perUserSE] = functionComputePerUserSE_DL(a,b,K,N,beta,p,tau_p,tau_c,pBest);
x=signal./(signal+interf);
Tbefore=Tafter;
pBest = functionFeasibilityProblemP1(L,K,N,beta,Pmax,p,a,b,tau_p,x);
Tafter = functionComputeSumSE_DL(a,b,K,N,beta,p,tau_p,tau_c,pBest);
end
end
end
function nuSolution = functionFeasibilityProblemP1(L,K,N,beta,Pmax,p,a,b,tau_p,x)
cvx_begin gp
variable nu(L,K); %Power allocation
expression proSINR
% expressions SINR(K,1) numerator(K,1) denominator1(K,1) denominator2(K,1) denominator2s(K,1);
proSINR=1;
for k=1:K
proSINR=proSINR*(NNLL(prod(sqrt(nu(:,k)))prod(a(:,k)))^(2/L)/((Nsum(nu(:,k).a(:,k).beta(:,k)))+(tau_ptau_pNpsum(sum(nu(:,[1:k-1 k+1:end]).*b(:,[1:k-1 k+1:end]).^2.*beta(:,[1:k-1 k+1:end]).repmat(beta(:,k),[1 K-1]))))+(Nsum(sum(nu(:,[1:k-1 k+1:end]).*b(:,[1:k-1 k+1:end]).^2.*repmat(beta(:,k),[1 K-1]))))+1))^x(k)
end
maximize proSINR
subject to
for l = 1:L
% exp(nu(l,:))>=0;
% sum(exp(nu(l,:))) <= (K/L)*Pmax; %%%%% 逐行相加
nu(l,:)>=0;
sum(nu(l,:)) <= (K/L)*Pmax; %%%%% 逐行相加
end
cvx_end
nuSolution = nu;
cvx_optval
end
When I use this function to get the solution of the optimization problem,matlab command window output:
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
proSINR =
cvx log-concave expression (scalar)
Calling Mosek 9.1.9: 12739 variables, 4479 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
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 4479
Cones : 4220
Scalar variables : 12739
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.05
Lin. dep. - number : 0
Presolve terminated. Time: 0.25
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 4479
Cones : 4220
Scalar variables : 12739
Matrix variables : 0
Integer variables : 0
Optimizer - threads : 2
Optimizer - solved problem : the primal
Optimizer - Constraints : 4420
Optimizer - Cones : 4220
Optimizer - Scalar variables : 12670 conic : 12660
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 0.53 dense det. time : 0.05
Factor - ML order time : 0.19 GP order time : 0.00
Factor - nonzeros before factor : 2.12e+04 after factor : 2.86e+04
Factor - dense dim. : 90 flops : 1.14e+06
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.6e+02 2.4e+01 5.4e+04 0.00e+00 5.393775126e+04 0.000000000e+00 1.0e+00 1.33
1 8.8e+01 1.3e+01 3.1e+04 -4.59e-01 4.386239375e+04 2.601048414e+00 5.5e-01 2.03
Optimizer terminated. Time: 2.20
Interior-point solution summary
Problem status : PRIMAL_INFEASIBLE
Solution status : PRIMAL_INFEASIBLE_CER
Dual. obj: 1.7437028082e+00 nrm: 2e+00 Viol. con: 0e+00 var: 6e-01 cones: 0e+00
Optimizer summary
Optimizer - time: 2.20
Interior-point - iterations : 1 time: 2.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: Solved
Optimal value (cvx_optval): +Inf
cvx_optval =
Inf
The optimization variables are all large numbers and do not meet the limiting conditions given by me. The optimal solution is positive infinity. Why does this happen?