Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

How to get the maximum between to boolean variables??

  • 1.  How to get the maximum between to boolean variables??

    Posted 04/08/18 12:28 PM

    Originally posted by: Wahiba123


    Hello every one, 

    I want to get the maximum between two boolean decision variables. I am using the function :

    max(a, b);
    

    but i got an error:

    Function not available for dvar boolean

    How could I formulate it.

    Thanks.


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: How to get the maximum between to boolean variables??

    Posted 04/09/18 03:52 AM

    Hi

    dvar boolean a;
    dvar boolean b;
    dvar boolean c;

    subject to
    {
    c==maxl(a,b);
    }

    works fine

    regards


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: How to get the maximum between to boolean variables??

    Posted 04/09/18 05:34 AM

    Originally posted by: Wahiba123


    Thanks a lot


    #DecisionOptimization
    #OPLusingCPOptimizer