[gecode-users] counting constraint with BoolVarArgs
Philippe
aqwzsxaqwzsx at orange.fr
Wed Aug 7 15:51:15 CEST 2013
Hi Guido,
Thanks for your help. I've first used :
linear(*this, fpr.row(i), IRT_EQ, _NFPR[i])
which works as expected. Now, I use :
rel(*this, sum(fpr.row(i)) == _NFPR[i]);
which is more readable thanks to minimodel.
I was confused, because p44 i've read :
"A Boolean variable is not an integer variable with a domain
that is included in {0, 1}."
So i thought that it was not possible to sum boolean variables.
However, p46 we can read :
"The only difference between integer and Boolean variables is that
Boolean variables can only take the values 0 or 1"
Thanks again,
Cheers,
Philippe
More information about the users
mailing list