Decision Optimization

 View Only
  • 1.  Math division

    Posted Wed April 23, 2008 05:08 PM

    Originally posted by: SystemAdmin


    [nibe said:]

    Hi ,
    I'm trying to write a constraint that follow this function x*(x-|x|)/2x. Where x is my decision variable.
    I don't know exactly how to make the math division in a IloNumExpr.


    Anybody can please help me?
    thanks a lot for any useful comment and advice

    nibe
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Math division

    Posted Wed April 23, 2008 05:11 PM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Hi,

    In Concert, you can use IloAbs() for absolute value, and simply * and /. 

    So it would be something like :

    IloNumExpr e = x*(x-IloAbs(x))/(2*x);

    However, I think,  CPLEX will not be able to extract (i.e. interpret) and solve this non linear function.


    Alain
    #CPLEXOptimizers
    #DecisionOptimization