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

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

Bool is the reified truth of at least one of the constraints ConX or 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 #>= 1)

The two constraints are reified in such a way that Bool reflects the truth of at least one 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 'or', in that the reified truth value is the logical disjunction of 0/1 variables rather than constraints.

Modules

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

See Also

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