Functions | |
| void | Gecode::linear (Home home, const IntVarArgs &x, IntRelType irt, int c, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(\sum_{i=0}^{|x|-1}x_i\sim_{irt} c\). | |
| void | Gecode::linear (Home home, const IntVarArgs &x, IntRelType irt, IntVar y, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(\sum_{i=0}^{|x|-1}x_i\sim_{irt} y\). | |
| void | Gecode::linear (Home home, const IntVarArgs &x, IntRelType irt, int c, Reify r, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(\left(\sum_{i=0}^{|x|-1}x_i\sim_{irt} c\right)\equiv r\). | |
| void | Gecode::linear (Home home, const IntVarArgs &x, IntRelType irt, IntVar y, Reify r, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(\left(\sum_{i=0}^{|x|-1}x_i\sim_{irt} y\right)\equiv r\). | |
| void | Gecode::linear (Home home, const IntArgs &a, const IntVarArgs &x, IntRelType irt, int c, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_{irt} c\). | |
| void | Gecode::linear (Home home, const IntArgs &a, const IntVarArgs &x, IntRelType irt, IntVar y, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_{irt} y\). | |
| void | Gecode::linear (Home home, const IntArgs &a, const IntVarArgs &x, IntRelType irt, int c, Reify r, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_{irt} c\right)\equiv r\). | |
| void | Gecode::linear (Home home, const IntArgs &a, const IntVarArgs &x, IntRelType irt, IntVar y, Reify r, IntPropLevel ipl=IPL_DEF) |
| Post propagator for \(\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_{irt} y\right)\equiv r\). | |
Detailed Description
All variants for linear constraints over integer 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). Domain consistency is supported for all non-reified constraint. As bounds consistency for inequalities coincides with domain consistency, the only real variation is for linear equations. Domain consistent linear equations have exponential complexity, so use with care!
- If the integer propagation level IPL_DEF is used as argument (hence, default propagation) and the linear constraint is sufficiently simple (two variables with unit coefficients), the domain consistent propagation is used.
- 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_{irt} c\). If \(|c|+\sum_{i=0}^{|x|-1}a_i\cdot x_i\) exceeds the maximal available precision (at least \(2^{48}\)), 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
◆ linear() [1/8]
| void Gecode::linear | ( | Home | home, |
| const IntVarArgs & | x, | ||
| IntRelType | irt, | ||
| int | c, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \(\sum_{i=0}^{|x|-1}x_i\sim_{irt} c\).
Definition at line 41 of file linear-int.cpp.
◆ linear() [2/8]
| void Gecode::linear | ( | Home | home, |
| const IntVarArgs & | x, | ||
| IntRelType | irt, | ||
| IntVar | y, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \(\sum_{i=0}^{|x|-1}x_i\sim_{irt} y\).
Definition at line 97 of file linear-int.cpp.
◆ linear() [3/8]
| void Gecode::linear | ( | Home | home, |
| const IntVarArgs & | x, | ||
| IntRelType | irt, | ||
| int | c, | ||
| Reify | r, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \(\left(\sum_{i=0}^{|x|-1}x_i\sim_{irt} c\right)\equiv r\).
Definition at line 54 of file linear-int.cpp.
◆ linear() [4/8]
| void Gecode::linear | ( | Home | home, |
| const IntVarArgs & | x, | ||
| IntRelType | irt, | ||
| IntVar | y, | ||
| Reify | r, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \(\left(\sum_{i=0}^{|x|-1}x_i\sim_{irt} y\right)\equiv r\).
Definition at line 127 of file linear-int.cpp.
◆ linear() [5/8]
| void Gecode::linear | ( | Home | home, |
| const IntArgs & | a, | ||
| const IntVarArgs & | x, | ||
| IntRelType | irt, | ||
| int | c, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_{irt} c\).
Throws an exception of type Int::ArgumentSizeMismatch, if a and x are of different size.
Definition at line 67 of file linear-int.cpp.
◆ linear() [6/8]
| void Gecode::linear | ( | Home | home, |
| const IntArgs & | a, | ||
| const IntVarArgs & | x, | ||
| IntRelType | irt, | ||
| IntVar | y, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_{irt} y\).
Throws an exception of type Int::ArgumentSizeMismatch, if a and x are of different size.
Definition at line 141 of file linear-int.cpp.
◆ linear() [7/8]
| void Gecode::linear | ( | Home | home, |
| const IntArgs & | a, | ||
| const IntVarArgs & | x, | ||
| IntRelType | irt, | ||
| int | c, | ||
| Reify | r, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \(\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_{irt} c\right)\equiv r\).
Throws an exception of type Int::ArgumentSizeMismatch, if a and x are of different size.
Definition at line 82 of file linear-int.cpp.
◆ linear() [8/8]
| void Gecode::linear | ( | Home | home, |
| const IntArgs & | a, | ||
| const IntVarArgs & | x, | ||
| IntRelType | irt, | ||
| IntVar | y, | ||
| Reify | r, | ||
| IntPropLevel | ipl = IPL_DEF ) |
Post propagator for \(\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_{irt} y\right)\equiv r\).
Throws an exception of type Int::ArgumentSizeMismatch, if a and x are of different size.
Definition at line 173 of file linear-int.cpp.
