Decision Optimization

Decision Optimization

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

 View Only
  • 1.  float in tuples

    Posted Sat March 12, 2016 05:10 AM

    Originally posted by: sandeepsinghchauhan


    range C = 1..5;

    range D = 1..10;

    float IN[C][D]= matrix having float values

    {int} E[C][D] =
    [[{1,2,3,4,5},{1,2,3,4,5,6,7,8,9,10}]];

    tuple t
    {
    int c;
    int d;
    int e;

    float k;
    }

    {t} s={<c,d,e,k> | c in C,d in D, e in E[c,d],k in IN[c,d]};


    execute {

    writeln(s);
    }

     

    ERROR
    Cannot use the type float with "in". 

    please help


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: float in tuples

    Posted Sat March 12, 2016 05:20 AM

    Originally posted by: Stanko_86


    Instead 
    
    
    {t} s={<c,d,e,k> | c in C,d in D, e in E[c,d],k in IN[c,d]};
    
    try this:
    
    {t} s={<c,d,e,IN[c,d]> | c in C,d in D, e in E[c,d]};
    

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer