Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  SOS1 instead of binary variables

    Posted 12/05/17 11:38 AM

    Originally posted by: yanzhiping


    I have a problem with storage modeling. we want to use SOS1 type of variables to deal with charge/discharge instead of two binaries at each t (one for charging, another for discharging).

    Previously, we use two binary variables x_chrg(t) and x_dischrg(t) to model the operational characteristics of energy storage, as indicated in Eq 4 and Eq5.

    In the equations Eq1 and Eq2, P_chrg(t) and P_dischrg(t) are continuous decision variables indicating charging and discharging output from storage, P_Chrg(max,t ) and P_dischrg(max,t) are parameters indicating the max output amount for charging and discharging.

    Eq3 means at any time period t, either x_chrg(t) =1 or   x_dischrg(t)=1 or both are zeros.

     

    Eq1: P_chrg(t) <= x_chrg(t) * P_Chrg(max,t)

    Eq2: P_dischrg(t)<= x_dischrg(t)*P_dischrg(max,t)

    Eq3: x_chrg(t) + x_dischrg(t)<=1

    Eq4: x_chrg(t) = {0,1}

    Eq5: x_dischrg(t)={0,1}

     

    Alternatively, we can model x_chrg(t) and x_dischrg(t) as SOS1 type of variables, meaning at most one of them is nonzero. This method uses nonzero positive value to indicate charging/discharging instead of binary values. In this way we don't need Eq4 or Eq 5. With Eq 3, x_chrg(t) and x_dischrg(t) can be any value between 0 and 1. When x_chrg(t) is nonzero, x_dischrg(t) is certainly zero; similarly, when x_dischrg(t) is nonzero, x_chrg(t) is certainly zero. This means charging/discharging cannot happen at the same period. When x_chrg(t)=1, that means charging reached its max limit, when 0<x_chrg(t)<1, it means storage charges at a percentage of its charging limit.  

       

    Eq1: P_chrg(t) <= x_chrg(t) * P_Chrg(max,t)

    Eq2: P_dischrg(t)<= x_dischrg(t)*P_dischrg(max,t)

    Eq3: x_chrg(t) + x_dischrg(t)<=1

     
    Do you think SOS1 would improve the computational performance in this problem? I have no weights for any SOS1 variables.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: SOS1 instead of binary variables

    Posted 01/03/18 09:12 AM

    If the SOS has only two elements then I don't see a fundamental difference to binary variables: a solver will still have to do the same two branches: one has the first element fixed to 0, the other has the second element fixed to 0. So I would expect a speedup here, especially since you don't have priorities.

    Depending on the exact structure of your model you may be able to replace

    x_chrg(t) + x_dischrg(t) <= 1

    by

    x_chrg(t) + x_dischrg(t) == 1

    Then you could substitute x_chrg(t) = 1-x_dischrg(t) everywhere. That may or may not help a solver.


    #CPLEXOptimizers
    #DecisionOptimization