Originally posted by: rdumeur
>
> Dear community, I'm confronted with an ILOG OPL issue, regarding the syntax of OPL. I would like to model a mathematical equation as constraint(s), which can be described as follows: max(A;B;C)+min(0;F+G-1)=1. Verbally expressed, the equation means: The minimum of A or B or C plus the minimum of 0 or F+G-1 must be equal 1.
>
> Do you guys know an OPL-syntax-conform command or do you have some clever idea, which enables me to express the descibed equation correctly??
>
> Many many thanks for your capabile answers in advance!! John
Dear OptiLog,
Here is a small model which express the constraint you want:
using CP;
dvar int A;
dvar int B;
dvar int C;
dvar int F;
dvar int G;
subject to {
maxl(A, maxl(B,C))+ minl(0,F+G-1) == 1;
};
I hope it helps.
Cordially,
#DecisionOptimization#OPLusingCPOptimizer