[gecode-users] unknown system size

Guido Tack tack at gecode.org
Thu Aug 14 02:30:00 CEST 2014


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.portell at 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 at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list