[gecode-users] How to specify a constraint of weighted sum of bool variable array
Dongrui She
sarevokcc at gmail.com
Mon Jun 27 15:41:15 CEST 2011
Hi All,
I am new to gecode and I have a question about how to model a constraint:
sum{a_i*b_i}
where a is an integer variable array and b is a bool variable array.
Basically I want to constrain the sum of some elements in a.
It seems that I cannot directly specify such constraint. Right now what I
can
think of is to use channel constraint to create an integer array with the
same
value as b and use it to specify the constraint I want.
Is this the right way to go?
Thanks~
--
Regards,
Dongrui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20110627/785d83f8/attachment-0001.htm>
More information about the users
mailing list