Hi,

 

Please look up the dom constraint (Section 4.4.1 in MPG).

 

Cheers

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, September 11, 2014 3:40 PM
To: users@gecode.org
Subject: [gecode-users] interval domains at run time

 

Dear all,

I have the following problem:

Array of 100 numbers with sum = 500;

At run time, the user can decide in how many intervals he cuts the 100 numbers. 
Lets say 4 for the example.

For all the parts, he can give a domain for example :

>From 0 to 24 ->  the integers can only take values 0 or 1

>From 25 to 49 ->  the integers can only take values 5, 6 or 1,

etc ...

I can't find a good way to restrict the domain by intervals, I guess I am 
missing something here ...

Thanks for your help,

Best regards,

Richard

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

Reply via email to