Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Setting Priorities with SOS Type 1

    Posted 06/06/14 12:17 PM

    Originally posted by: USMC


    I have multiple sets of  SOS type 1 in my model.  I would like to prioritize which sets are branched on first and which variables in each set are branched on.

    For example(assuming I have entered this correctly in lp format)

    S1::X(1)(1)(1):1 X(1)(1)(2):2 X(1)(1)(3):3 
    S1::X(1)(2)(1):1 X(1)(2)(2):2 X(1)(2)(3):3 

    I would like to make sure the solver branches on the first set first and then the second set.  Additionally, within each set I would like to branch in the order I have them listed.

     

    What do I need to do to the weights to accomplish both of these objectives?

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Setting Priorities with SOS Type 1

    Posted 06/06/14 01:20 PM

    Hi,

    have you had a look at example ilomipex3.cpp ?

    The constructor

    public IloSOS1(const IloEnv env, const IloNumVarArray vars, const IloNumArray vals, const char * name=0)

    This constructor creates a special ordered set of type 1 (SOS1). The set includes the variables specified in the array vars. The corresponding value in vals specifies the weight of each variable in vars.

    should help

    Regards

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Setting Priorities with SOS Type 1

    Posted 06/06/14 03:21 PM

    Originally posted by: USMC


    Alex,

    I am using OPL and then scripting to cut and paste my SOS into the resulting .lp file.

    So, I don't need help creating them, I just cant' find much documentation on how to control which ones the optimizer looks at first.

    So, in the example given, for Set 1, does bigger numbers give higher priority or smaller?

    And if I want to branch on Set 1 before Set 2, do I set all the numbers in Set 1 bigger or smaller than Set 2?

    thanx,

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Setting Priorities with SOS Type 1

    Posted 06/23/14 05:27 AM

    What you want to do cannot be achieved with priorities/weights only. Within a single SOS the weights or branching priorities can be used to control on which variables CPLEX branches first (variables with higher priorities/weights are preferred over others).

    To make CPLEX branch on set 1 before branching on set 2 you will have to use a branch callback and make that decision yourself.


    #CPLEXOptimizers
    #DecisionOptimization