Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Function in CPLEX that returns maximum integer in a list

  • 1.  Function in CPLEX that returns maximum integer in a list

    Posted 01/07/09 10:26 PM

    Originally posted by: SystemAdmin


    [pmarley2 said:]

    Hi everyone,

    Quick question. What is the function that returns the maximum number in a list of numbers? I know the syntax when that list is some data in an array, but in my case, I have a decision variable in the list.

    For example, if I have the following block:

    forall (t in 0..time) {
            (Output[t] - Output[t-1]) <= max(Dvar[t],3);<br />}

    I want "max(Dvar[t],3)" to give me the larger number of the two numbers in the parens, but Dvar is a decision variable, as is Output.

    When I use the syntax above, I get an error. Is this because there is not function like this is CPLEX, or is there one that I can use here?

    Thanks in advance

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Function in CPLEX that returns maximum integer in a list

    Posted 01/08/09 11:39 AM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Hi,

    did you try with maxl ?

    Alain
    #DecisionOptimization
    #OPLusingCPLEXOptimizer