Originally posted by: nouira
Hello Alexis,
I need to define a subassembly of a range set N={1,..n} on opl such, Q is a subset or equal to N. it is about a subtour elimination in VRP problem.
I tried this
{int} s ={1,2,3,4,5,6};
range r=1.. ftoi(pow(2,card(s)));
{int} s2 [k in r] = {i | i in s: ((k div (ftoi(pow(2,(ord(s,i))))) mod 2) == 1)};
Subtour elimination constraint
forall (s2, k in Vehicles, d in Day)
sum (i,j in s)x[d][i][j][k]<=card(s)-1;
but it doesn't works
#CPLEXOptimizers#DecisionOptimization