Hi,

 

This is not really a Gecode question but a modeling question. This group should 
be really focused on Gecode.

 

Best

Christian

 

--

Christian Schulte, Professor of Computer Science, KTH, www.gecode.org/~schulte/

 

From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of 
Chd Orti
Sent: Thursday, October 16, 2014 10:52 AM
To: users@gecode.org
Subject: [gecode-users] Question about one type of constraint

 

Hello,

I have an array (size 10) of positive integers which can also take the value 0;

I have a constraint on the sum of these numbers for example 10;

Here is a solution for example :

1 2 0 0 5 1 0 0 0 1

I want to add a constraint : the sum of the 2 first integers with value 
different to 0 equals 4.

How could I do that?

Cheers,

Richard

_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to