Hi, you can use the element constraint: http://www.gecode.org/doc-latest/reference/group__TaskModelIntElement.html#ga4d6854069f6e77baa1ac353f7cb46e47 <http://www.gecode.org/doc-latest/reference/group__TaskModelIntElement.html#ga4d6854069f6e77baa1ac353f7cb46e47>
So if you have BoolVarArray y and IntVar x, you can post element(*this, y, x, true); which simply states that y[x]=true. Cheers, Guido -- GUIDO TACK Senior Lecturer Information Technology Monash University Level 6, Room 6.40, Building H, Caulfield Campus 900 Dandenong Road Caulfield East VIC 3145 Australia T: +61 3 9903 1214 E: guido.t...@monash.edu <mailto:guido.t...@monash.edu> http://www.csse.monash.edu/~guidot/ <http://www.csse.monash.edu/~guidot/> > On 13 Feb 2016, at 6:32 PM, Juan Carlos Hernandez > <jchernandez.mad...@gmail.com> wrote: > > I am wondering if there is any native support for the following constraint > > x \in { i such that y[i]=TRUE } > > in Gecode. In other words, I would like to ensure that x is an index of a > true variable in the vector y. > > In the global constraint catalog, this looks like a domain_constraint, and > there is a reference to "in" in Gecode, but I cannot find a matching > definition of the "in" constraint. > > Am I overlooking something? > > Grateful for help, > JC > > _______________________________________________ > 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