Optimization for a resource allocation problem


(TangRan) #1

Hi,i am using cvx to solve a resource allocation problem.With given alpha_value,result P should be 0 if alpha_value is 0 ,but the results are weird.
N_relate=1;
N0=1e-10;
m=4;
k=20;
Pt=20;
R2MU=8;
B=1000*ones(m,k)/N_relate;
band_small=1e07;
band_big=1e08;
d_rrh2cp=[40;51;60;51];

b=1000*ones(k,1);
l_upper=zeros(100,100);
L_low=zeros(100,100);
obj_optimi=zeros(1,100);
Tf=zeros(1,100);
alpha_value=[1 0 0 0 0 0 1 0 0 0 1 0 0 1 1 0 0 0 1 0
0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 0
0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1];

dx=-20+40rand(1,k);
dy=-20+40
rand(1,k);
d_rrh2u=[sqrt((dx).^2+(dy-10).^2);sqrt((dx-10).^2+(dy).^2);sqrt((dx).^2+(dy+10).^2);sqrt((dx+10).^2+(dy).^2)];
hm=0.001d_rrh2cp.^-3;
hmk=0.01
1/sqrt(2)d_rrh2u.^-2.(randn(m,k).^2+randn(m,k).^2);
g=0.01*1/sqrt(2)d_rrh2u.^-2.(randn(m,k).^2+randn(m,k).^2);
datat(CIR)=struct(‘dx’,dx,‘dy’,dy,‘d_rrh2u’,d_rrh2u,‘hm’,hm,‘hmk’,hmk,‘g’,g);

cvx_solver SeDumi
cvx_precision MEDIUM
cvx_begin
variables P(m,k) T(m,k) pEnergy(m) pD(m) tD(m) tE;
minimize(ones(1,m)Tones(k,1)+ones(1,m)*tD+tE);
dual variables umk uk um
subject to
P>=0;
pEnergy>=0;
pD>=0;
tD>=0;
T>=0;
tE>=0;
B>=0;
b-(alpha_value.*B).'ones(m,1)<=0: uk;
sum(alpha_value.B,2) +band_bigrel_entr(tD,tD+hm.pD/(N0band_big)) <=0 :um;
alpha_value.B+band_smallrel_entr(T,T+hmk/(N0
band_small).*P) <=0 :umk;
sum§-sum(g.*repmat(pEnergy,1,k))<=0;
pEnergy+pD-(tE+tD)*10^(Pt/10)<=0;
cvx_end

P =

Columns 1 through 8

0.0937    0.0110    0.0888    0.0248    0.4434    0.0000    0.0934    0.1046
0.0942    0.0073    0.0892    0.0297    0.4935    0.1470    0.1040    0.1120
0.1001    0.0160    0.0965    0.0158    0.6015    0.0000    0.0990    0.1066
0.1028    0.0091    0.1019    0.0276    0.5511    0.0000    0.0984    0.1154

Columns 9 through 16

0.0517    0.1007    0.0359    0.0242    0.0394    0.0236    0.6440    0.0446
0.0579    0.0952    0.0375    0.0254    0.0473    0.0181    0.0975    0.0599
0.0634    0.1040    0.0354    0.0264    0.0485    0.0187    0.1064    0.0530
0.0701    0.1108    0.0296    0.0229    0.0536    0.0171    0.1023    0.0486

Columns 17 through 20

0.1237    0.0160    0.0573    0.0119
0.1359    0.0497    0.0576    0.0108
0.1378    0.0151    0.0603    0.0060
0.1310    0.0155    0.0610    0.0197