[ library(gfd) | Reference Manual | Alphabetic Index ]

<ConsistencyModule:> and(+ConX,+ConY,Bool)

Bool is the reified truth of both constraints ConX and ConY being true.
ConX
Constraint
ConY
Constraint
Bool
Reified truth value of the constraint (array notation accepted)

Description

Equivalent to BX #= (ConX), BY #= (ConY), Bool #= (BX + BY #= 2)

The two constraints are reified in such a way that Bool reflects the truth of both being true. ConX and ConY must be constraints that have a corresponding reified form.

ConsistencyModule is the optional module specification to give the consistency level for the propagation for this constraint: gfd_bc for bounds consistency, and gfd_gac for domain (generalised arc) consistency.

This constraint is implemented using Gecode's MiniModel's rel() for both integer and boolean expressions, with sub-expressions/constraints not supported by MiniModel factored out and posted as auxiliary constraints.

A more restricted version of this constraint is defined in the global constraint catalog as 'and', in that the reified truth value is the logical conjunctions of 0/1 variables rather than constraints.

Modules

This predicate is sensitive to its module context (tool predicate, see @/2).

See Also

and / 2, neg / 2, or / 3, xor / 3, => / 3, <=> / 3, suspend : and / 3, ic : and / 3