Originally posted by: meletis13forever
Hello,
I am newbie in Ilog and I can not find a solution to my problem.
You don't have to look all my model. As you can see in the beggining of my model I have terminals, macroBS( like telecommunication antenna) and femtocells. I give coordinates for femtos and macroBS in the data file but I want to give random coordinates to the terminals and to be in the coverage area (covBS) of the macroBS. I want to write something like this:
do{
xterm=random;
yterm=random;
}while((xbs-xterm)^2 + (ybs-yterm)^2>=covBS)
This is my model:
{string} terminal =...;
{string} macroBS =...;
{string} femto =...;
tuple positionBS{
int xbs;
int ybs;
}
positionBS posBS
macroBS =...;
tuple positionfemto{
int xfem;
int yfem;
}
positionfemto posfemto
femto=...;
int covBS =...;
int BW
terminal =...;
int capfemto
femto=...;
int capBS
macroBS=...;
int power
femto=...;
int NbPL=...;
range PL = 0..NbPL-1;
float l
PL=...;
dvar boolean x
terminalmacroBS union femto;
dvar boolean y
PLfemto;
dvar boolean N
terminalfemtoPL;
dexpr int load
j in femto union macroBS = sum(i in terminal) x[i][j] * BW[i];
dexpr float Cp
PLj in femto = sum(k in PL) y[k][j] * l[k] * power[j];
dexpr float cov
j in femto, k in PL = 10^((Cp[k][j]/20) + 1.96);
minimize
sum(j in femto, k in PL) Cp[k][j] +
sum(j in femto, j2 in femto : j2!=j) (load[j] - load
j2)^2 +
sum(i in terminal, j in macroBS union femto) x[i][j] * d[i][j] +
sum(j in macroBS union femto) load[j];
subject to{
forall(i in terminal)
sum(j in macroBS union femto)
x[i][j] == 1;
forall(j in femto)
sum(k in PL)
y[k][j] == 1;
forall(i in terminal, j in femto, k in PL)
N[i][j][k] <= y[k][j];
forall(i in terminal, j in femto, k in PL)
x[i][j] <= N[i][j][k] * y[k][j];
forall(j in femto union macroBS)
load[j] <= capBS[j];
}
And my data file:
terminal = { "terminal1", "terminal2", "terminal3", "terminal4","terminal5", "terminal6", "terminal7", "terminal8", "terminal9", "terminal10","terminal11", "terminal12", "terminal13", "terminal14", "terminal15","terminal16", "terminal17", "terminal18", "terminal19", "terminal20"};
macroBS = { "macroBS1"};
femto = { "femto1", "femto2", "femto3", "femto4","femto5", "femto6", "femto7", "femto8" };
posBS = <
885,278>;
posfemto = <
835,211,
326,426,
825,298,
927,334,
933,222,
869,358,
938,275,
881,276>;
covBS = 500;
BW =
http://64, 256, 12.2, 12.2, 128, 384, 64, 64, 12.2, 512, 128, 12.2, 64, 64, 1024, 128, 64, 12.2, 512, 384;
capfemto =
10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000;
capBS =
3700;
power =
http://0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12;
NbPL = 6;
l =
http://0.5, 0.6, 0.7, 0.8, 0.9, 1;
Please can you help me?
#DecisionOptimization#MathematicalProgramming-General