Originally posted by: SystemAdmin
Your modelling approach only captures
(a+b == 0) -> (c==0)
The constraints you want to model is
dvar boolean c;
dvar float+ a;
dvar float+ b;
(c==0) -> (a==0 && b == 0);
(c==1) -> (a!=0 || b != 0);
What you could do is use some kind of big-M-modelling
Suppose M is some "big number": Then you have
a <= M*c
b <= M*c
a+b >= c*1/M
i.e., when c==0 you get
a <= 0
b <= 0
a+b >= 0
(i.e. all three variables have to be 0)
For c == 1 you get
a <= M
b <= M
a+b >= 1/M
(i.e. a+b take a slightly positive value)
There might as well be other ways to lineralize the constraints.
Typlically the big-M-terms make the model numerically more difficult to solve ...
Hope this will help
Regards
Norbert
#DecisionOptimization#OPLusingCPLEXOptimizer