Originally posted by: dcraven
I apologize if this has already been answered elsewhere, I've been unable to find the information I need.
I am using CPLEX Optimization Studio Version: 12.7.1.0, and am using CP in my model.
I have one constraint that is:
(sum (k in k) sum (p in p) max (SU[p][k]-A1[p][k] || 0)) <= ((1-omega) * sum (k in k) sum (p in p) SU [p][k]);
With the max function, my goal is that it gives either SU-A1, or, in the case SU-A1 is negative, it gives 0. It does this for each k/p combination, and then adds them all up.
My max function returns an error that says syntax error, unexpected ')', expecting in. If I understand the max function correctly, this is because it only finds the maximum within an array, and not the maximum of two values? Is there a formulation that can give me what I need?
Thank you for your assistance.
#DecisionOptimization#OPLusingCPOptimizer