Generated on Thu Mar 22 10:39:49 2012 for Gecode by doxygen 1.6.3

Linear constraints over Boolean variables
[Using finite domain integers]

Functions

void Gecode::linear (Home home, const BoolVarArgs &x, IntRelType r, int c, IntConLevel icl=ICL_DEF)
 Post propagator for $\sum_{i=0}^{|x|-1}x_i\sim_r c$.
void Gecode::linear (Home home, const BoolVarArgs &x, IntRelType r, int c, BoolVar b, IntConLevel icl=ICL_DEF)
 Post propagator for $\left(\sum_{i=0}^{|x|-1}x_i\sim_r c\right)\Leftrightarrow b$.
void Gecode::linear (Home home, const BoolVarArgs &x, IntRelType r, IntVar y, IntConLevel icl=ICL_DEF)
 Post propagator for $\sum_{i=0}^{|x|-1}x_i\sim_r y$.
void Gecode::linear (Home home, const BoolVarArgs &x, IntRelType r, IntVar y, BoolVar b, IntConLevel icl=ICL_DEF)
 Post propagator for $\left(\sum_{i=0}^{|x|-1}x_i\sim_r y\right)\Leftrightarrow b$.
void Gecode::linear (Home home, const IntArgs &a, const BoolVarArgs &x, IntRelType r, int c, IntConLevel icl=ICL_DEF)
 Post propagator for $\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r c$.
void Gecode::linear (Home home, const IntArgs &a, const BoolVarArgs &x, IntRelType r, int c, BoolVar b, IntConLevel icl=ICL_DEF)
 Post propagator for $\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r c\right)\Leftrightarrow b$.
void Gecode::linear (Home home, const IntArgs &a, const BoolVarArgs &x, IntRelType r, IntVar y, IntConLevel icl=ICL_DEF)
 Post propagator for $\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r y$.
void Gecode::linear (Home home, const IntArgs &a, const BoolVarArgs &x, IntRelType r, IntVar y, BoolVar b, IntConLevel icl=ICL_DEF)
 Post propagator for $\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r y\right)\Leftrightarrow b$.

Detailed Description

All variants for linear constraints over Boolean variables share the following properties:

  • Bounds consistency (over the real numbers) is supported for all constraints (actually, for disequlities always domain consistency is used as it is cheaper).
  • Variables occurring multiply in the argument arrays are replaced by a single occurrence: for example, $ax+bx$ becomes $(a+b)x$.
  • If in the above simplification the value for $(a+b)$ (or for $a$ and $b$) exceeds the limits for integers as defined in Int::Limits, an exception of type Int::OutOfLimits is thrown.
  • Assume the constraint $\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r c$. If $|c|+\sum_{i=0}^{|x|-1}a_i\cdot x_i$ exceeds the limits for integers as defined in Int::Limits, an exception of type Int::OutOfLimits is thrown.
  • In all other cases, the created propagators are accurate (that is, they will not silently overflow during propagation).

Function Documentation

void Gecode::linear ( Home  home,
const BoolVarArgs &  x,
IntRelType  r,
int  c,
IntConLevel  icl 
)

Post propagator for $\sum_{i=0}^{|x|-1}x_i\sim_r c$.

void Gecode::linear ( Home  home,
const BoolVarArgs &  x,
IntRelType  r,
int  c,
BoolVar  b,
IntConLevel  icl 
)

Post propagator for $\left(\sum_{i=0}^{|x|-1}x_i\sim_r c\right)\Leftrightarrow b$.

void Gecode::linear ( Home  home,
const BoolVarArgs &  x,
IntRelType  r,
IntVar  y,
IntConLevel  icl 
)

Post propagator for $\sum_{i=0}^{|x|-1}x_i\sim_r y$.

void Gecode::linear ( Home  home,
const BoolVarArgs &  x,
IntRelType  r,
IntVar  y,
BoolVar  b,
IntConLevel  icl 
)

Post propagator for $\left(\sum_{i=0}^{|x|-1}x_i\sim_r y\right)\Leftrightarrow b$.

void Gecode::linear ( Home  home,
const IntArgs &  a,
const BoolVarArgs &  x,
IntRelType  r,
int  c,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r c$.

Throws an exception of type Int::ArgumentSizeMismatch, if a and x are of different size.

void Gecode::linear ( Home  home,
const IntArgs &  a,
const BoolVarArgs &  x,
IntRelType  r,
int  c,
BoolVar  b,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r c\right)\Leftrightarrow b$.

Throws an exception of type Int::ArgumentSizeMismatch, if a and x are of different size.

void Gecode::linear ( Home  home,
const IntArgs &  a,
const BoolVarArgs &  x,
IntRelType  r,
IntVar  y,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r y$.

Throws an exception of type Int::ArgumentSizeMismatch, if a and x are of different size.

void Gecode::linear ( Home  home,
const IntArgs &  a,
const BoolVarArgs &  x,
IntRelType  r,
IntVar  y,
BoolVar  b,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r y\right)\Leftrightarrow b$.

Throws an exception of type Int::ArgumentSizeMismatch, if a and x are of different size.