Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Tuples OPL Cplex

  • 1.  Tuples OPL Cplex

    Posted Tue April 24, 2018 08:15 AM

    Originally posted by: zizobahou


    Hello
    I have a problem with this tuple below:

    tuple Chaine 
    { key int id;
     float X[Horizon];
      }
    {Chaine}Chaines=...;

     

    I do not see how to declare the data in the file. dat to define Chaines .

    thanks you 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Tuples OPL Cplex

    Posted Wed April 25, 2018 02:52 AM

    Hi,

    let me give you a tiny example:

    .mod

    range Horizon=1..2;

    tuple Chaine
    { key int id;
     float X[Horizon];
      }
    {Chaine}Chaines=...;

    execute
    {
    writeln(Chaines);
    }

    .dat

    Chaines={<1,[1,2]>};

    gives

    {<1 [1 2]>}

    regards

     

    PS:

    https://www.linkedin.com/pulse/how-opl-alex-fleischer/


    #DecisionOptimization
    #OPLusingCPLEXOptimizer