B=10^3;

d_iA=20;

d_im=20;

a=3;

b_1=0.0001;

h_iA=b_1*d_iA^(-a);
g_im=b_1*d_iA^(-a);

n2_m=0.01;

n_A=0.0090909;

f_AP=4

*10^6;*

f_i=0.410^6;

f_i=0.4

L_i=2

*10^5;*

D_i=0.6;

C_AP=106;

D_i=0.6;

C_AP=10

C_i=10^3;

c=0.1;

p_maxi=2;

s=10^(-28);

a_i=0.5;

l_i=8

*10^4;*

t_AP=(C_AP(L_i-l_i))/f_AP;

t_AP=(C_AP

A_5=f_AP*(L_i-l_i);

A_6=B*(D_i

*f_AP-C_AP*(L_i-l_i));

B_2=(2^(A_5/A_6)-1)

*n2_m;*

B_3=h_iA-(2^(A_5/A_6))(1-c)

B_3=h_iA-(2^(A_5/A_6))

*h_iA;*

B_1=B_2/B_3;

Max=max(B_1,0);

cvx_begin

variables p_i

A_1=sC_i

B_1=B_2/B_3;

Max=max(B_1,0);

cvx_begin

variables p_i

A_1=s

*l_i*f_i^2

*D_i*a_i

*r_iA;*

A_2=D_ip_i

A_2=D_i

*a_i*(L_i-l_i);

A_3=(1-a_i)

*s*C_i

*L_i*f_i^2

*t_AP*r_iA;

A_4=(1-a_i)

*s*C_i

*L_i*f_i^2*(L_i-l_i);

R_on=s

*C_i*L_i

*f_i^2*D_i

*r_iA;*

R_um=A_1+A_2+A_3+A_4;

F=0.1;

R_i=R_um-FR_on;

R_um=A_1+A_2+A_3+A_4;

F=0.1;

R_i=R_um-F

minimize(R_i);

subject to

p_i >= Max

p_i <= p_maxi

r_iA==B

*log2((n_A*n2_m+n2_m

*h_iA*p_i)/(n_A

*n2_m+n_A*g_im*p_i))

cvx_end