[gecode-users] BoolExpr example

Mikael Zayenz Lagerkvist zayenz at gmail.com
Thu Nov 20 07:43:19 CET 2008


Hi,

The symmetry-breaking in examples/black-hole.cc constructs an
expression of the form
    ((X1 < X2) & (Y1 < Y2) & (X2 < X3) & (Y2 < Y3)) -> (X2 < Y2)
which might give you some inspiration.

In general, the BoolExprs in Gecode are designed to be used in
post-expressions (using operator overloading), while the BExprs in
Gecode/J were designed to construct the expressions explicitly. It
should be possible to use the BoolExprs in Gecode to build an
expression incrementally, but I have never tried it, so I can't help
with that.

Hope this helps,
Mikael

On Thu, Nov 20, 2008 at 7:16 AM, Malcolm Ryan <malcolmr at cse.unsw.edu.au> wrote:
> Can you provide an example for using BoolExprs in C++? Do they
> correspond to BExprs in Gecode/J? I want to construct long expressions
> as:
>
> ((A0 == B0) & (A1 == B1) & ... & (An == Bn)) --> ((B0 == C0) & (B1 ==
> C1) & ... & (Bn == Cn))
>
> Malcolm
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>



-- 
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/




More information about the gecode-users mailing list