Hi, it's simply a different type (in the C++ sense), but linear and sum provide overloaded versions for both IntVar and BoolVar.
Cheers, Guido On 07/08/2013, at 11:51 PM, Philippe <aqwzsxaqw...@orange.fr> wrote: > 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 > > > _______________________________________________ > Gecode users mailing list > users@gecode.org > https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users