Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Evaluating an expression

    Posted 05/13/16 02:45 AM

    Originally posted by: anahana


    Good morning guys,

    This is a really simple question and I am a bit embarrassed to ask it, but I can't find an answer to it. I have a number of equations stored in instances of IloExpr. Each expression depends on multiple variables. I need to evaluate the expressions for a set of variable values that I specify. What I am doing now is writing the expression(s) again while substituting the variables with the values I want. This is hectic since the expressions are long and evaluate them often. 

    Is there an "evaluate" method, or a "get" method, where I pass an expression and an array of variable values, and it returns the evaluation? I looked around and didn't find anything. If it is not there, I can just write one. 

    Regards, 


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Evaluating an expression

    Posted 05/17/16 04:40 AM

    Originally posted by: ol


    Hello,

    there is no such a feature. As a general approach, rewriting the expression with constant expressions instead of variables is probably the best thing to do. 

    Regards,

    Olivier


    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: Evaluating an expression

    Posted 05/17/16 08:07 AM

    Originally posted by: anahana


    Thanks. It seems I wasn't missing out on anything after all.


    #CPOptimizer
    #DecisionOptimization