Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to model this constraint?

    Posted 10/26/11 12:20 PM

    Originally posted by: y82li


    If y[t]=1 and yt+1=0, then xt+1=1, xt+2=1, xt+3=1;
    or xt+1=1, xt+2=1, xt+3=1, xt+4=1, xt+5=1, xt+6=1;
    or xt+1=1, xt+2=1, xt+3=1, xt+4=1, xt+5=1, xt+6=1, xt+7=1, xt+8=1, xt+9=1.

    if y[t]=0, then xt+1=0.

    x,y are binary variables

    Thank you!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How to model this constraint?

    Posted 10/26/11 10:03 PM

    Originally posted by: Eumpfenbach


    working this through as a type but hopefully it will be clear.

    introduce a new variable y(new). Constrain it as such:

    y(new1) + 1 >= y(t) + (1 - y(t+1))
    y(new1) <= y(t)
    y(new1) <= (1 - y(t+1))

    y(new1) is equal to 1 if y(t) = 1 and y(t+1) = 0.

    Now create 3 more binary variables y(new2), y(new3), y(new4).

    Constrain y(new1) = y(new2) + y(new3) + y(new4)

    now

    xt+1 + xt+2 + xt+3 = 3 * y(new2)
    xt+1 + xt+2 + xt+3 + xt+4 + xt+5 + xt+6 = 6 * y(new3)
    xt+1 + xt+2 + xt+3 + xt+4 + xt+5 + xt+6 + xt+7 + xt+8 +, xt+9 = 9 * y(new4)

    Might not be the most efficient way to do this, but I think it should work.
    #CPLEXOptimizers
    #DecisionOptimization