Originally posted by: SystemAdmin
here is an example:
tuple T { int a; int b; int c; int d; };
{T} setOfT = {<a,b,c,d> | a in 1..5, b in 1..5, c in 1..5, d in 1..5};
dvar boolean x[setOfT];
subject to {
x[<1,2,3,5>] == 1;
x[<2,3,4,5>] == 1;
}
{T} oneIndices = {t | t in setOfT : x[t] == 1};
execute {
writeln(oneIndices);
}
Regards,
Faisal
#DecisionOptimization#OPLusingCPLEXOptimizer