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