Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Minimum of a Array

    Posted 04/25/08 12:12 PM

    Originally posted by: SystemAdmin


    [dansch said:]

    Hallo everybody,

    I have a problem in programming a constraint in OPL.

    I have a tuple [b]rT[P][L][T][/b] type [i]int[/i] ([b]P[/b] is type [i]string[/i], [b]L[/b] is type [i]string[/i], [b]T[/b] is type [i]int[/i]) and I want create a tuple [b]rTmin[P][L][/b], in this stand [b]for each P and L[/b] the minimum [b]over all T[/b] .

    Can someone tell me how I do this, please?

    Thanke you.

    dansch


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: Minimum of a Array

    Posted 04/25/08 02:24 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    This code should do it (tested with OPL 5.5)



    {string} P = {"a","b","c"};
    {string} L = {"foo", "bar"};
    range T = 1..10;

    int rT[p in P][s in L][t in T] = rand(100);


    int rTmin[p in P][l in L] = min(t in T) rT[p][l][t];


    Didier.
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: Minimum of a Array

    Posted 04/25/08 04:32 PM

    Originally posted by: SystemAdmin


    [dansch said:]

    Hi Didier,

    Thank you, it run.
    #DecisionOptimization
    #OPLusingCPOptimizer