Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Inserting SOS type 1 using callable function Cplex with C++

    Posted 11/20/15 07:22 AM

    Originally posted by: Zele


    Hi all, 

    I am using CPXaddsos() to add some SOS type 1 constraints in my model.

    Mi question is: should I suppose that this SOS type 1 is, for example, for constraints type x1+x2+x3+x4=1 (only with equal)? If the answer is yes, my second question is: is there any function (o whatever) to introduce a SOS type 1 with constraints type x1+x2+x3+x4 <=1 (with lower or equal), or the only way is introducing slack 0-1 variables in the model for those constraints?

    Thanks in advance.

    Bests

    Maria C.

     

     

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Inserting SOS type 1 using callable function Cplex with C++

    Posted 11/22/15 03:29 AM

    An SOS 1 constraint only says that at most one of the variables can be non-zero. By itself it allows all variables to be 0, it does not force any variable to non-zero.

    Assuming that all your xi are binary, then an SOS1 implies x1+x2+x3+x4<=1. If you need '=1' (i.e. exactly one variable must be 1) then you must add the equality constraint explicitly.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Inserting SOS type 1 using callable function Cplex with C++

    Posted 11/23/15 04:40 AM

    Originally posted by: Zele


    Thanks, Daniel. 
    So, if I don't say they are binary,  (for example, I say they are >=0), I understand, from above, that they could take fractional values?
    Thanks in advance 
    Maria C.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Inserting SOS type 1 using callable function Cplex with C++

    Posted 11/24/15 05:29 AM

    Correct, if the variables are not binary/integer then they can assume fractional values. An SOS constraint only limits the "non-zero" property of the variables. It does not limit their values in any other way (values could in general also be larger than 1 as long as there is only one variable with non-zero value in an SOS).


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Inserting SOS type 1 using callable function Cplex with C++

    Posted 11/24/15 06:05 AM

    Originally posted by: Zele


    Ok.

    Thanks, Daniel.

     


    #CPLEXOptimizers
    #DecisionOptimization