Originally posted by: GrauJack
I have this decision variable as
dvar float DemMax[1..12];
where each input is the maximum "Power Demand" for each month of the year (12 values).
I need to use the maximum value and second largest value of that array on my objective function.
The largest value is no problem with
max(i in 1..12) DemMaxHP[i]
but I have not been able to get the second largest value.
Any simple way for doing this?
I attach my code if helpful.
Thanks!
#DecisionOptimization#OPLusingCPLEXOptimizer