Simple relation constraints over Boolean variables
Functionality by programming task » Programming models » Using integer variables and constraints

## Functions

void | Gecode::rel (Home home, BoolVar x0, IntRelType irt, BoolVar x1, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for .
void | Gecode::rel (Home home, BoolVar x0, IntRelType irt, BoolVar x1, Reify r, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for .
void | Gecode::rel (Home home, const BoolVarArgs &x, IntRelType irt, BoolVar y, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for for all .
void | Gecode::rel (Home home, BoolVar x, IntRelType irt, int n, IntPropLevel ipl=IPL_DEF)
| Propagates .
void | Gecode::rel (Home home, BoolVar x, IntRelType irt, int n, Reify r, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for .
void | Gecode::rel (Home home, const BoolVarArgs &x, IntRelType irt, int n, IntPropLevel ipl=IPL_DEF)
| Propagates for all .
void | Gecode::rel (Home home, const BoolVarArgs &x, IntRelType irt, const BoolVarArgs &y, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for relation between x and y.
void | Gecode::rel (Home home, const BoolVarArgs &x, IntRelType irt, const IntArgs &y, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for relation between x and y.
void | Gecode::rel (Home home, const IntArgs &x, IntRelType irt, const BoolVarArgs &y, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for relation between x and y.
void | Gecode::rel (Home home, const BoolVarArgs &x, IntRelType irt, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for relation between elements in x.
void | Gecode::rel (Home home, BoolVar x0, BoolOpType o, BoolVar x1, BoolVar x2, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for Boolean operation on x0 and x1.
void | Gecode::rel (Home home, BoolVar x0, BoolOpType o, BoolVar x1, int n, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for Boolean operation on x0 and x1.
void | Gecode::rel (Home home, BoolOpType o, const BoolVarArgs &x, BoolVar y, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for Boolean operation on x.
void | Gecode::rel (Home home, BoolOpType o, const BoolVarArgs &x, int n, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for Boolean operation on x.
void | Gecode::clause (Home home, BoolOpType o, const BoolVarArgs &x, const BoolVarArgs &y, BoolVar z, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for Boolean clause with positive variables x and negative variables y.
void | Gecode::clause (Home home, BoolOpType o, const BoolVarArgs &x, const BoolVarArgs &y, int n, IntPropLevel ipl=IPL_DEF)
| Post domain consistent propagator for Boolean clause with positive variables x and negative variables y.
void | Gecode::ite (Home home, BoolVar b, IntVar x, IntVar y, IntVar z, IntPropLevel ipl=IPL_DEF)
| Post propagator for if-then-else constraint.
void | Gecode::ite (Home home, BoolVar b, BoolVar x, BoolVar y, BoolVar z, IntPropLevel ipl=IPL_DEF)
| Post propagator for if-then-else constraint.

## Detailed Description

## Function Documentation

## rel() [1/14]

void Gecode::rel | ( | Home | home,
|  | BoolVar | x0,
|  | IntRelType | irt,
|  | BoolVar | x1,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for .

Definition at line 40 of file bool.cpp.

## rel() [2/14]

void Gecode::rel | ( | Home | home,
|  | BoolVar | x0,
|  | IntRelType | irt,
|  | BoolVar | x1,
|  | Reify | r,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for .

Definition at line 113 of file bool.cpp.

## rel() [3/14]

void Gecode::rel | ( | Home | home,
|  | const BoolVarArgs & | x,
|  | IntRelType | irt,
|  | BoolVar | y,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for for all .

Definition at line 370 of file bool.cpp.

## rel() [4/14]

void Gecode::rel | ( | Home | home,
|  | BoolVar | x,
|  | IntRelType | irt,
|  | int | n,
|  | IntPropLevel | ipl = IPL_DEF )

Propagates .

Throws an exception of type Int::NotZeroOne, if n is neither 0 or 1.

Definition at line 73 of file bool.cpp.

## rel() [5/14]

void Gecode::rel | ( | Home | home,
|  | BoolVar | x,
|  | IntRelType | irt,
|  | int | n,
|  | Reify | r,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for .

Throws an exception of type Int::NotZeroOne, if n is neither 0 or 1.

Definition at line 208 of file bool.cpp.

## rel() [6/14]

void Gecode::rel | ( | Home | home,
|  | const BoolVarArgs & | x,
|  | IntRelType | irt,
|  | int | n,
|  | IntPropLevel | ipl = IPL_DEF )

Propagates for all .

Throws an exception of type Int::NotZeroOne, if n is neither 0 or 1.

Definition at line 416 of file bool.cpp.

## rel() [7/14]

void Gecode::rel | ( | Home | home,
|  | const BoolVarArgs & | x,
|  | IntRelType | irt,
|  | const BoolVarArgs & | y,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for relation between x and y.

Note that for the inequality relations this corresponds to the lexical order between x and y.

Note that the constraint is also defined if x and y are of different size. That means that if x and y are of different size, then if r = IRT_EQ the constraint is false and if r = IRT_NQ the constraint is subsumed.

Definition at line 521 of file bool.cpp.

## rel() [8/14]

void Gecode::rel | ( | Home | home,
|  | const BoolVarArgs & | x,
|  | IntRelType | irt,
|  | const IntArgs & | y,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for relation between x and y.

Note that for the inequality relations this corresponds to the lexical order between x and y.

Note that the constraint is also defined if x and y are of different size. That means that if x and y are of different size, then if r = IRT_EQ the constraint is false and if r = IRT_NQ the constraint is subsumed.

Definition at line 590 of file bool.cpp.

## rel() [9/14]

void Gecode::rel | ( | Home | home,
|  | const IntArgs & | x,
|  | IntRelType | irt,
|  | const BoolVarArgs & | y,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for relation between x and y.

Note that for the inequality relations this corresponds to the lexical order between x and y.

Note that the constraint is also defined if x and y are of different size. That means that if x and y are of different size, then if r = IRT_EQ the constraint is false and if r = IRT_NQ the constraint is subsumed.

Definition at line 650 of file bool.cpp.

## rel() [10/14]

void Gecode::rel | ( | Home | home,
|  | const BoolVarArgs & | x,
|  | IntRelType | irt,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for relation between elements in x.

States that the elements of x are in the following relation:

- if r = IRT_LE, r = IRT_LQ, r = IRT_GR, or r = IRT_GQ, then the elements of x are ordered with respect to r.
- if r = IRT_EQ, then all elements of x must be equal.
- if r = IRT_NQ, then not all elements of x must be equal.

Definition at line 468 of file bool.cpp.

## rel() [11/14]

void Gecode::rel | ( | Home | home,
|  | BoolVar | x0,
|  | BoolOpType | o,
|  | BoolVar | x1,
|  | BoolVar | x2,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for Boolean operation on x0 and x1.

Posts propagator for

Definition at line 656 of file bool.cpp.

## rel() [12/14]

void Gecode::rel | ( | Home | home,
|  | BoolVar | x0,
|  | BoolOpType | o,
|  | BoolVar | x1,
|  | int | n,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for Boolean operation on x0 and x1.

Posts propagator for

Throws an exception of type Int::NotZeroOne, if n is neither 0 or 1.

Definition at line 696 of file bool.cpp.

## rel() [13/14]

void Gecode::rel | ( | Home | home,
|  | BoolOpType | o,
|  | const BoolVarArgs & | x,
|  | BoolVar | y,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for Boolean operation on x.

Posts propagator for

Throws an exception of type Int::TooFewArguments, if and o is BOT_IMP, BOT_EQV, or BOT_XOR.

Definition at line 772 of file bool.cpp.

## rel() [14/14]

void Gecode::rel | ( | Home | home,
|  | BoolOpType | o,
|  | const BoolVarArgs & | x,
|  | int | n,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for Boolean operation on x.

Posts propagator for

Throws an exception of type Int::NotZeroOne, if n is neither 0 or 1.

Throws an exception of type Int::TooFewArguments, if and o is BOT_IMP, BOT_EQV, or BOT_XOR.

Definition at line 835 of file bool.cpp.

## clause() [1/2]

void Gecode::clause | ( | Home | home,
|  | BoolOpType | o,
|  | const BoolVarArgs & | x,
|  | const BoolVarArgs & | y,
|  | BoolVar | z,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for Boolean clause with positive variables x and negative variables y.

Posts propagator for

Throws an exception of type Int::IllegalOperation, if o is different from BOT_AND or BOT_OR.

Definition at line 955 of file bool.cpp.

## clause() [2/2]

void Gecode::clause | ( | Home | home,
|  | BoolOpType | o,
|  | const BoolVarArgs & | x,
|  | const BoolVarArgs & | y,
|  | int | n,
|  | IntPropLevel | ipl = IPL_DEF )

Post domain consistent propagator for Boolean clause with positive variables x and negative variables y.

Posts propagator for

Throws an exception of type Int::NotZeroOne, if n is neither 0 or 1.

Throws an exception of type Int::IllegalOperation, if o is different from BOT_AND or BOT_OR.

Definition at line 904 of file bool.cpp.

## ite() [1/2]

void Gecode::ite | ( | Home | home,
|  | BoolVar | b,
|  | IntVar | x,
|  | IntVar | y,
|  | IntVar | z,
|  | IntPropLevel | ipl = IPL_DEF )

Post propagator for if-then-else constraint.

Posts propagator for

Supports both bounds (ipl = IPL_BND) and domain consistency (ipl = IPL_DOM, default).

Definition at line 991 of file bool.cpp.

## ite() [2/2]

void Gecode::ite | ( | Home | home,
|  | BoolVar | b,
|  | BoolVar | x,
|  | BoolVar | y,
|  | BoolVar | z,
|  | IntPropLevel | ipl = IPL_DEF )

Post propagator for if-then-else constraint.

Posts propagator for

Definition at line 1005 of file bool.cpp.