Sébastien Laigre wrote:
I'm starting with gecode, and it's a bit difficult for me.
I have 3 conditions, one of them must be true. So i want to put them
in an BoolArray. But I do not know how to do that.
For example, I would like to do
array[0] = x < y;
array[1] = a < b;
array[2] = c < d;
and that one (at least) condition of the array is true.


You'd have to use something like the following:
BoolVarArray b(this, 3, 0, 1);
rel(this, x, IRT_LE, y, b[0]);
rel(this, a, IRT_LE, b, b[1]);
rel(this, c, IRT_LE, d, b[2]);
rel(this, BOT_OR, b, 1);

(this isn't tested, but you should get the idea)

Cheers,
        Guido

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Gecode users mailing list
[EMAIL PROTECTED]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to