Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Formulating Groups

  • 1.  Formulating Groups

    Posted 05/02/18 03:44 PM

    Originally posted by: michael_in_Boston


    Hello,

    I am trying to do create groups from which I pick features (one or more), but the feature(s) can only originate from one single group.

     

    Example:

    Group A = {feature1_A, feature2_A, feature3_A}

    Group B = {feature1_B, feature2_B}

    Group A + Group B <=1

     

    So I would like to pick 1 or more features that belong either to A or B but not both.

    How could I formulate such constraints in CPLEX? 

     

    Much appreciate any hints or examples.

     

    Best,

    Michael

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Formulating Groups

    Posted 05/03/18 12:13 AM

    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