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 compare 2 ICumulFunctionExpr

  • 1.  How to compare 2 ICumulFunctionExpr

    Posted 03/03/16 01:48 AM

    Originally posted by: Kyle_Wang


    Hi 

       i have created 2 ICumulFunctionExpr Resource and Usage to represent the total available resource and actual usage. the actual usage has to less than total resource. But seems cp.le is working on 3 ICumulFunctionExpr.  Can some expert to suggest alternative way to do this? thanks!  

     

    ICumulFunctionExpr resource = new ICumulFunctionExpr();
    ICumulFunctionExpr usage = new ICumulFunctionExpr();
    cp.Le(usage,resource)
    

     


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: How to compare 2 ICumulFunctionExpr

    Posted 03/07/16 02:34 AM

    Originally posted by: Petr Vilím


    Hello,

    this could be a bit awkward, but cumulative expressions cannot be compared using < or <= operator. Those operators work only with a constant on one of the sides.

    However if you want to write something like expr1 <= expr2 then you can rewrite it as expr2-expr1 >= 0. Note that expr1-expr2 <= 0 is not a good idea because direclty constrained cumulative expression cannot be negative.

    Best, Petr


    #CPOptimizer
    #DecisionOptimization