Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

rounding

  • 1.  rounding

    Posted Mon July 14, 2014 11:28 AM

    Originally posted by: MMM12


    How can I round the final value of continuous decision variable to an integer value?

    tanx


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: rounding

    Posted Mon July 14, 2014 12:58 PM

    Hi

    dvar float x in 0..2;

    subject to
    {
    x==1.8;
    }

    int r=ftoi(round(x));

    execute
    {
    writeln(r);
    }

    gives

    2

     

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer