Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Converting integers to boolean

    Posted 01/21/09 07:21 PM

    Originally posted by: SystemAdmin


    [took_pippin said:]

    Hi,
    Am a newbie to OPL, and modeling a problem where an integer value needs to be captured into a boolean variable, based on whether the integer is greater than zero or not. Could someone suggest a way to do that?
    Thanks!
    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: Converting integers to boolean

    Posted 01/21/09 09:03 PM

    Originally posted by: SystemAdmin


    [jfk said:]

    Hello,
    let's summarize what I understand:
    1. you have an integer variable x say in {0,10}, and you have a integer variable y in {0,1}
    2. y=0 <=> x=0
      y=1 <=> x!=0

    if I can assume the above then I suppose you can describe no1,2 with the following constraints:
    x<=10*y, y<=x<br />
    I hope it helps

    cheers


    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: Converting integers to boolean

    Posted 01/21/09 10:03 PM

    Originally posted by: SystemAdmin


    [took_pippin said:]

    Yes, thank you very much!
    #ConstraintProgramming-General
    #DecisionOptimization