Originally posted by: AlCPLEX
Hello GGR, thanks for your quick answer.
To be sure i really understand :
The formulation 1) is an exclusive disjunction as presenceOf can only take a value in {0,1}, so in the right hand side either "(a==1)" is true or "(a==2)*(b==1)".
Whereas is formulation 2), "(a==1)" and " (a==2) && (b==1) " could be true as a logical "or" is used.
So the propagation does not realize that in formulation 2) "(a==1)" and " (a==2) && (b==1) " cannot be simultaneously true as the variable "a" can have only one value (and not be equal to 1 and to 2 simultaneously).
As the first formulation is a disjunction and is in general more constraining (though not in this case because of the specific values), the algorithm coded behind propagates better.
Is that it?
Thanks a lot
#ConstraintProgramming-General#DecisionOptimization