[gecode-users] Limiting some combinations of variables
Pascal Francq (Mailing lists)
mailing-list at francq.info
Thu Jun 6 19:13:16 CEST 2013
Hi,
I have a question regarding how to avoid some combinations of variables
to test. I give here a simple example:
1. I have four IntVar a,b,c and d.
2. I want to allow a=2*b=2*c only if a==1 and d==0.
If have try to encode this constraint with a code that looks like:
BoolVar tmp;
tmp=expr(home,(a!=1)&&(a==2*b)&&(a==2*c)&&(d==0));
rel(home,!tmp);
But it seems that it does not try the only combination allowed.
Is this the correct way ?
Thanks.
--
Dr. Pascal Francq
Belgium
More information about the users
mailing list