Originally posted by: Anjikum
Hello,
Following constraint formulation can help:
x1a=selecting feature 1 from group A
x1b=selecting feature 1 from group B and similarly other variables
ya = variable indicating selection of atleast one feature from group A
yb = variable indicating selection of atleast one feature from group B
x1a+x2a+x3a <= 3*ya
x1b+x2b <= 2*yb
ya+yb<=1
x1a,x2a,x3z,x1b,x2b,ya,yb belongs to {0,1}
Above formulation might lead to none getting seleceted. If you want to ensure that, change ya+yb<=1 to ya+yb =1.
Best Wishes.
#CPLEXOptimizers#DecisionOptimization