Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Derived Ranges

    Posted 07/29/08 07:17 PM

    Originally posted by: SystemAdmin


    [UDOPS said:]

    What is wrong with this range syntax?

    b in min(r.origin, r.destination)+1..max(r.origin, r.destination)-1

    It is used in a set constructor.

    I tried adding parentheses and brackets, no improvement.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Derived Ranges

    Posted 07/29/08 07:28 PM

    Originally posted by: SystemAdmin


    [UDOPS said:]

    I think I found it. I was expecting the range to iterate over a slice, but apparently slicing is not happening.

    The full statement was

    <various elements> | r in Trains, b in min(r.origin, r.destination)+1..max(r.origin, r.destination)-1

    OPL was trying to find the min/max over all elements of Trains, not the current slice.

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Derived Ranges

    Posted 07/29/08 07:41 PM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Try :

    tuple Train {
      int origin;
      int destination;
      }
     
    {Train} Trains ={<10,20>,<30,40>};

    {int} c = {b | r in Trains, b in minl(r.origin, r.destination)+1..maxl(r.origin, r.destination)-1};

    execute {
    writeln(c);
    }

    min is for aggregate minimum
    and minl is for minimum in an explicit list.

    Alain
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Derived Ranges

    Posted 07/30/08 09:03 PM

    Originally posted by: SystemAdmin


    [UDOPS said:]

    Very useful, thank you!
    #DecisionOptimization
    #OPLusingCPLEXOptimizer