I have tried this problem for weeks but still could not do it. Please give me some advice, thanks in advance!
for example, I know how to add condition of each index in the "forall", but how to add condition for combination of index in the "forall", for example, (I, j) != (r, s), such as (2, 3) != (2, 4).
range i = 0..5;
range j = 0..3;
range r = 0..5;
range s = 0..3;
forall(ci in i, cr in r, cj in j:cj!=0 && cj!=ci, cs in s:cs!=0, ck in k)
EliminateSubtour2:
W[cj][cs][ck] >= W[ci][cr][ck] + 1 - (N*H*(1 - X[ci][cr][cj][cs][ck]));
The final goal is to add this constraint,
W[cj][cs][ck] >= W[ci][cr][ck] + 1 - (N*H*(1 - X[ci][cr][cj][cs][ck])); when (I,r) != (j,s)
I tried using tuple but the system says tuple could not be used for indexing. Thanks in advance!