Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

max and min function in execute initialization

  • 1.  max and min function in execute initialization

    Posted Tue August 14, 2018 10:09 AM

    Originally posted by: Eliosa


    Hello,

    Once again, thank you for the help provided. I have

    float A[Port][Vessel];
    float B[Port][Vessel];
    float C[Port][Vessel];
    
    execute Ini{
    
    for (var p in Port)
     for (var vs in Vessel)
     
     A = maxl(B[p][vs],C[p][vs]);
    
    }
    

    But ILOG CPLEX Optimization Studio tells me :

    Description Resource Path Location Type
    Scripting runtime error: Element "maxl" does not exist in OPL model.. Optimisation.mod /Optimisation 200:0 C:\Users\jtricon\Documents\Optimisation\Optimisation\Optimisation.mod OPL Problem Marker

     

    Not sure what I am doing wrong on this one.

     

    Thanks

    J


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: max and min function in execute initialization

    Posted Tue August 14, 2018 12:34 PM

    Hi

    in scripting you need to use Opl. to get opl functions so you should try

    Opl.maxl

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer