Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Can if else contain decision variables?

    Posted 01/13/11 10:43 PM

    Originally posted by: newuser2010


    Hi, I have a decision variable x[t], if (x[t]==1 && xt-1==0) {...}. But there is an error "decision variable not allowed". But when I use help, it says "Implications of constraints can be used instead when conditions contain decision variables". What can I do? Thank you very much.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Can if else contain decision variables?

    Posted 01/14/11 11:18 AM
    Hi

    instead of writing

    if (x[t]==1 && x[t-1]==0) { y[t]==2; }
    


    you should for instance write

    (x[t]==1 && x[t-1]==0) =>  (y[t]==2);
    


    Regards

    Alex
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Can if else contain decision variables?

    Posted 01/14/11 12:30 PM

    Originally posted by: newuser2010


    Can I use loop after =>?
    For example, (x[t]==1 && xt-1==0) => (forall (t in 1..nbTime) {y[t]==2})
    Thank you.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer