Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to express this constraints?

    Posted 12/07/10 12:51 AM

    Originally posted by: zyf2998


    Hi, guys!
    I have a problem to express the following constraint:

    x is a real variable, which is greater or equal to 0(x >=0), y is a binary variable,
    the relationship between x and y is : if x = 0, y = 0, if x > 0, y = 1.
    How to represent y?

    Thanks!
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: How to express this constraints?

    Posted 12/07/10 01:27 AM

    Originally posted by: Prateep


    Hi,

    Assume M as a big number.

    y >= x/M
    y <= x*M

    where x is a non negative real variable and y is a binary variable

    I hope this will help you.

    Thanks
    Prateep
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: How to express this constraints?

    Posted 12/09/10 05:21 AM
    Hi,

    you can also write

    dvar float+ x;
    dvar boolean y;
     
    subject to
    {
      y == 1-(x==0); 
    }
    


    Alex
    #DecisionOptimization
    #OPLusingCPLEXOptimizer