Originally posted by: guvenc
Hello;
I have problems about extracting the required information from an array of sets.
I have such an array of set,
{int} Pa
i in z = {...};
//i=1 3,4,5
//i=2 3,4
...
What i want to do is that I must look at every i, in z to find and eleminate possible subsets of any set.
For example
//i=1 3,4,5
//i=2 3,4 -->this must be eleminated because it is a subset of i=1
or
//i=10 12,13
//i=z 12,15
Any of those sets will not be eleminated.
To do so i thought about a simple algorithm which checks every sets with each other to find out and eleminate subsets.However, in execute script, i couldnt write a code consisting "symdiff, diff,union" operations of sets.(opl does not accept)
pseudocode may be
for(a in z)
for(b in z)
if (card(Pa[a] difference P[b] == 0)//if the difference is empty set then Pa[a] C Pa[b]
eleminate subset
Thanks for your help...
#DecisionOptimization#OPLusingCPLEXOptimizer