Originally posted by: Rym
Hi,
I have the following ILP model.
If I give enough quantity of PDCWB for the first constraint, the model is solved successfully . But if i give insufficient resources for the parameter PDCBW, the model can't be solved. Normally, if there is no enough resources of PDCBW, the model is solved and the result (objective fucntion) is ZERO. Could you help me to solve my problem, please. My be i have wrong constraints
I explain a little the model:
I'm looking to maximize the number of accepted VDC requtes. To satisfy a VDC request, we should satisfy all its links' bandwidth requirements, which is represented by the array LR. in other words, an LR of a VDC request takes the form of
LR=[<1,2>,<1,3>,<1,4>,<2,1>,<2,3>,<2,4>,<3,1>,<3,2>,<3,4>,<4,1>,<4,2>,<4,3>];
**the decision variable lumdabw[N][liaisonp][ND][ND] prensents if the virtual link "l(liaisonp)" of the ith VDC request(N)" is embedded in the physical link "i,j(ND,ND)".
The model is:
int n=1;
int p=4;
range N=1..n;
int nd=8;
range ND=1..nd;
range P=1..p;
// the physical link relations
int PDC[1..nd][1..nd]=[
[0,0,0,0,1,0,0,0],
[0,0,0,0,1,0,0,0],
[0,0,0,0,0,1,0,0],
[0,0,0,0,0,1,0,0],
[1,1,0,0,0,0,1,1],
[0,0,1,1,0,0,1,1],
[0,0,0,0,1,1,0,0],
[0,0,0,0,1,1,0,0]
];
;
int pi[i in N]=3;
tuple edge // link definition
{
int i;
int j;
}
{edge} liaisonp = { <i,j> | i in 1..p,j in 1..p:i!=j};
int LR[N][liaisonp]= [[0, 0, 48, 0, 0, 0, 0, 0, 0, 48, 0, 0]];
int LRb[N][liaisonp]=[[0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0]];
int PDCBW=10;
//Definition of the model
dvar boolean lumdabw[N][liaisonp][ND][ND];
dvar boolean Vd[N];
dexpr int lumdij[i in ND][j in ND]=sum(f in N,l in liaisonp)lumdabw[f][l][i][j]*LR[f][l];
dexpr int maxbw=max(i,j in ND)lumdij[i][j];
dexpr int o= sum(f in N) Vd[f];
maximize o;;
subject to
{
//capacity pyhical link constraint
clc:
forall (i in ND, j in ND)
sum(f in N,l in liaisonp)(lumdabw[f][l][i][j])*LR[f][l]<=PDCBW;
//flow constraint
//flc:
forall(f in N,l in liaisonp,i in ND)
{ (i==l.i) => ((sum(j in ND) (lumdabw[f][l][i][j])- sum(j in ND) (lumdabw[f][l][j][i]))==LRb[f][l]);
(i==l.j) => ((sum(j in ND) (lumdabw[f][l][i][j])- sum(j in ND) (lumdabw[f][l][j][i]))==-LRb[f][l]);
((i!=l.i)&&(i!=l.j)) => ((sum(j in ND) (lumdabw[f][l][i][j])- sum(j in ND) (lumdabw[f][l][j][i]))==0);
}
//A virtual link can be embedded into only one physical path(a set of physical links, insplitted paths)
forall(f in N,l in liaisonp,i in ND)
sum(j in ND)(lumdabw[f][l][i][j])<=1;
// a virtual link can be embedded into only a existing physical link
forall(f in N, l in liaisonp,i,j in ND)
lumdabw[f][l][i][j]<=PDC[i][j];
forall(f in N,l in liaisonp,i,j in ND)
lumdabw[f][l][i][j]<=LRb[f][l];
// A VDC requests can be satisfied if only all its links' bw requirements are satisfied
forall(f in N,l in liaisonp)
sum(j in ND)lumdabw[f][l][l.i][j]<= Vd[f];
}
execute xss
{
writeln("max=\n",o);
writeln("Vd",Vd);
}
#DecisionOptimization#OPLusingCPLEXOptimizer