Originally posted by: AshishS
Thanks, Alex, for the prompt reply! What you suggest is a neat idea -- using an arbitrary possibleSet to index into a dvar boolean array. Presumably, one would then model set operations such as union, intersection, subset, etc., explicitly by "flattening out" the dvar boolean array representation of the set (e.g., A == B union C would be written as: forall (i in possibleSet) a[i] == b[i] || c[i]).
However, this won't quite serve my current need, I think, as the possible set I have is very large (1..10000). This means that every single set constraint I want to model will flatten out to 10000 or more individual constraints, which is what I wanted to avoid in the first place.
The other issue is that for many set constraints, it is known that propagating them as an actual set (with, say, bounds consistency) filters much more than propagating their decomposed/flattened version.
Hopefully there will be a better solution for set variables in OPL.
Ashish
#CPOptimizer#DecisionOptimization