Arrays need to have a fixed size. What you can do is to say that the sum of the array is 10, but that only the first n entries are different from 0 (you will need to express this using constraints). This is not really a Gecode question though, it's a general problem when modelling for most constraint solvers.
Cheers, Guido On 14 Aug 2014, at 1:35 am, Chd Orti <richard.port...@gmail.com> wrote: > Hello, > I have an array of integers with unknown size, with an easy constraint for > example : > Sum of array integers = 10; > It could be 1,9, or 3,3,4, or 1,1,1,7, etc ... > Is there a way gecode can handle that ? > Cheers, > Richard > > _______________________________________________ > 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