[gecode-users] Disjunctions in gecode

Mikael Zayenz Lagerkvist zayenz at gmail.com
Thu Sep 21 08:31:45 CEST 2006


On 9/21/06, Dhananjay Thiruvady <drthi1 at student.monash.edu> wrote:
> Hi All,
>
> I have a problem with the disjunctions in gecode. If I have a variable x (0...5) and I post the following constraint:
> tt(x>2 || x>3)
>
> I would expect now x (3...5), but the domains do not change.

When posting disjunctions in Gecode, they are handled via reification.
Reified constraints typically have very weak propagation, in many
cases the propagation will not amount to more than checking that the
constraint does in fact hold.

There are techniques, such as constructive disjunction for example,
for stronger propagation of disjunctions, but these are not available
currently in Gecode. Also, these techniques are typically not very
efficient.


> Also is
> there a way to say:
> b1 = 1 if x>2
> b2 = 1 if x>3,
>
> then I could use operator||(b1,b2) and reduce the domain to x(3...5).

This would only be an explicit way of creating the reified constraints
show above, so there would be no difference in propagation.

Hope this helps,
Mikael

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




More information about the gecode-users mailing list