Originally posted by: tjnelso
I have a tupleset like the following one:
tuple exampleRow {string a; string b; string c;};
{exampleRow} exampleSet = {
<"One", "Square", "A">
<"Two", "Square", "B">
<"One", "Circle", "A">
<"Two", "Triangle", "C">
};
I would like to create a new tupleset from this one which removes rows that have duplicate entries in the 'b' field. In this example, that means removing the first two tuples because field 'b' is "Square" for both of them. I would then like to use the filtered version of this tupleset in a forall() constraint.
tuple exampleRow {string a; string b; string c;};
{exampleRow} filteredExampleSet = {
<"One", "Circle", "A">
<"Two", "Triangle", "C">
};
forall(<a,b,c> in filteredExampleSet)
{
...
}
I've tried to use the card() function but am not able to find a formulation that gives me what I need. I've also looked into the count() function without luck, since it accepts only integers. Thank you.
#DecisionOptimization#OPLusingCPLEXOptimizer