Hi!
Nicolas BERGER wrote:
Are catalog (compatibility) constraints such as (x,y,z) \in
{(1,2,3),(4,4,4),(8,6,9)} allowed in Gecode ? How to represent them ?
In the released version of Gecode (1.3.1), we don't have a special
propagator for this kind of constraint. You can, however, express
them using the regular constraint. Your example would look like this:
REG reg = (REG(1)+REG(2)+REG(3)) | (REG(4)+REG(4)+REG(4)) | (REG(8)
+REG(6)+REG(9));
DFA dfa = reg;
IntVarArgs xs(3);
xs[0] = x; xs[1] = y; xs[2] = z;
regular(this, xs, dfa);
However, the resulting DFAs may become big, so this may not be a good
solution for all applications. The next version of Gecode will come
with a specialized propagator for this constraint.
Cheers,
Guido
--
Guido Tack
Programming Systems Lab, Saarland University, Germany
http://www.ps.uni-sb.de/~tack
_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users