Originally posted by: bornee
hello, in order to caclulate the lower bound for the distance for each vehicul :
R[i][v] represents either if the city i is visited by the vehicle v or not (c1 and c2)
c1 : forall (v in V, i in I )
( sum (j in J: j!=i) Xijv[i][j][v] >=1 ) => (R[i][v]==1);
c2 : forall (v in V, i in I )
( sum (j in J: j!=i) Xijv[i][j][v] ==0 ) => (R[i][v]==0);
Wi = the distance between citie i and the dépôt (c3)
c3 : forall (v in V, i in I, j in ID2:i!=j)
(R[i][v]==1) => ( W[i]== item(DIJ,<i.i,j.j>).valeur) ;
lets D[v] is the cost of routing a vehicle, it must be larger than the sum of the radial distances of the furthest two customers from the depot visitided by the same vehicule v. i difine this constraint like (c4) :
dvar boolean y;
c4 : forall (v in V, i in I, j in J: i!=j)
( W[i] - W[j] * y >= 0 && W[i]- W[j]*(1-y) <= 0 ) => ( D[v] == 2*( y *( W[i]*R[i][v]) + (1-y)*(W[j]*R[j][v])));
i dont know if with this constraint true or not (if this constraint calculate the sum of the distance of the 2 furthest customers from the depot visitided by the same vehicule v ). in cplex i have 2 errors :
1) CPLEX(default) ne peut pas extraire le modèle : IloAlgorithm cannot extract extractable. Modèle1PDPT Inconnu Problème OPL
2) CPLEX(default) ne peut pas extraire lexpression : {1}. Modèle1PDPT.mod /Modèle1PDPT 203:16-204:115 C:\Users\HENI\Desktop\Modèle1PDPT\Modèle1PDPT.mod Problème OPL
i try with this second methode :
c4 : forall (v in V, i in I, j in J: i!=j)
( R[i][v] == 1 && R[j][v]==1 && W[i]- W[j] * y >= 0 && W[i]- W[j](1-y) <= 0 ) => ( D[v] == 2*( y * W[i] + (1-y)*W[j]));
or this methode
c4: forall (v in V, i in I, j in J: i!=j)
( R[i][v] == 1 && R[j][v]==1 && W[i]- W[j] * y >= 0 && W[i]- W[j](1-y) <= 0 ) => ( D[v] == 2 *( W[i] + W[j]));
i have an error :
Le type dvar int+ ne peut pas être utilisé pour userFunction. Modèle1PDPT.mod /Modèle1PDPT 204:8-81 C:\Users\HENI\Desktop\Modèle1PDPT\Modèle1PDPT.mod Problème OPL
???????
Best regards
#DecisionOptimization#OPLusingCPLEXOptimizer