Cardinality constraints
[Using finite domain integers]
Detailed Description
- Note:
- Domain consistency on the extended cardinality variables of the Global Cardinality Propagator is only obtained if they are bounds consistent, otherwise the problem of enforcing domain consistency on the cardinality variables is NP-complete as proved by Qumiper et. al. in Improved Algorithms for the Global Cardinality Constraint"
Functions | |
void | Gecode::count (Space *home, const IntVarArgs &x, int n, IntRelType r, int m, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
Post propagator for ![]() | |
void | Gecode::count (Space *home, const IntVarArgs &x, IntVar y, IntRelType r, int m, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
Post propagator for ![]() | |
void | Gecode::count (Space *home, const IntVarArgs &x, const IntArgs &y, IntRelType r, int m, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
Post propagator for ![]() | |
void | Gecode::count (Space *home, const IntVarArgs &x, int n, IntRelType r, IntVar z, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
Post propagator for ![]() | |
void | Gecode::count (Space *home, const IntVarArgs &x, IntVar y, IntRelType r, IntVar z, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
Post propagator for ![]() | |
void | Gecode::count (Space *home, const IntVarArgs &x, const IntArgs &y, IntRelType r, IntVar z, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
Post propagator for ![]() | |
void | Gecode::count (Space *home, const IntVarArgs &x, const IntVarArgs &c, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
Posts a global count (cardinality) constraint. | |
void | Gecode::count (Space *home, const IntVarArgs &x, const IntSetArgs &c, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
Posts a global count (cardinality) constraint. | |
void | Gecode::count (Space *home, const IntVarArgs &x, const IntVarArgs &c, const IntArgs &v, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
Posts a global count (cardinality) constraint. | |
void | Gecode::count (Space *home, const IntVarArgs &x, const IntSetArgs &c, const IntArgs &v, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
Posts a global count (cardinality) constraint. | |
void | Gecode::count (Space *home, const IntVarArgs &x, const IntSet &c, const IntArgs &v, IntConLevel icl=ICL_DEF, PropKind pk=PK_DEF) |
Posts a global count (cardinality) constraint. |
Function Documentation
void Gecode::count | ( | Space * | home, | |
const IntVarArgs & | x, | |||
int | n, | |||
IntRelType | r, | |||
int | m, | |||
IntConLevel | icl = ICL_DEF , |
|||
PropKind | pk = PK_DEF | |||
) |
void Gecode::count | ( | Space * | home, | |
const IntVarArgs & | x, | |||
IntVar | y, | |||
IntRelType | r, | |||
int | m, | |||
IntConLevel | icl = ICL_DEF , |
|||
PropKind | pk = PK_DEF | |||
) |
void Gecode::count | ( | Space * | home, | |
const IntVarArgs & | x, | |||
const IntArgs & | y, | |||
IntRelType | r, | |||
int | m, | |||
IntConLevel | icl = ICL_DEF , |
|||
PropKind | pk = PK_DEF | |||
) |
Post propagator for .
Supports domain consistent propagation only.
Throws an exception of type Int::ArgumentSizeMismatch, if x and y are of different size.
void Gecode::count | ( | Space * | home, | |
const IntVarArgs & | x, | |||
int | n, | |||
IntRelType | r, | |||
IntVar | z, | |||
IntConLevel | icl = ICL_DEF , |
|||
PropKind | pk = PK_DEF | |||
) |
void Gecode::count | ( | Space * | home, | |
const IntVarArgs & | x, | |||
IntVar | y, | |||
IntRelType | r, | |||
IntVar | z, | |||
IntConLevel | icl = ICL_DEF , |
|||
PropKind | pk = PK_DEF | |||
) |
void Gecode::count | ( | Space * | home, | |
const IntVarArgs & | x, | |||
const IntArgs & | y, | |||
IntRelType | r, | |||
IntVar | z, | |||
IntConLevel | icl = ICL_DEF , |
|||
PropKind | pk = PK_DEF | |||
) |
Post propagator for .
Supports domain consistent propagation only.
Throws an exception of type Int::ArgumentSizeMismatch, if x and y are of different size.
void Gecode::count | ( | Space * | home, | |
const IntVarArgs & | x, | |||
const IntVarArgs & | c, | |||
IntConLevel | icl = ICL_DEF , |
|||
PropKind | pk = PK_DEF | |||
) |
Posts a global count (cardinality) constraint.
Posts the constraint that and
(no other value occurs).
Supports value (icl = ICL_VAL, default), bounds (icl = ICL_BND), and domain consistency (icl = ICL_DOM).
Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply.
void Gecode::count | ( | Space * | home, | |
const IntVarArgs & | x, | |||
const IntSetArgs & | c, | |||
IntConLevel | icl = ICL_DEF , |
|||
PropKind | pk = PK_DEF | |||
) |
Posts a global count (cardinality) constraint.
Posts the constraint that and
(no other value occurs).
Supports value (icl = ICL_VAL, default), bounds (icl = ICL_BND), and domain consistency (icl = ICL_DOM).
Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply.
void Gecode::count | ( | Space * | home, | |
const IntVarArgs & | x, | |||
const IntVarArgs & | c, | |||
const IntArgs & | v, | |||
IntConLevel | icl = ICL_DEF , |
|||
PropKind | pk = PK_DEF | |||
) |
Posts a global count (cardinality) constraint.
Posts the constraint that and
(no other value occurs).
Supports value (icl = ICL_VAL, default), bounds (icl = ICL_BND), and domain consistency (icl = ICL_DOM).
Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply.
Throws an exception of type Int::ArgumentSizeMismatch, if cards and values are of different size.
void Gecode::count | ( | Space * | home, | |
const IntVarArgs & | x, | |||
const IntSetArgs & | c, | |||
const IntArgs & | v, | |||
IntConLevel | icl = ICL_DEF , |
|||
PropKind | pk = PK_DEF | |||
) |
Posts a global count (cardinality) constraint.
Posts the constraint that and
(no other value occurs).
Supports value (icl = ICL_VAL, default), bounds (icl = ICL_BND), and domain consistency (icl = ICL_DOM).
Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply.
Throws an exception of type Int::ArgumentSizeMismatch, if cards and values are of different size.
void Gecode::count | ( | Space * | home, | |
const IntVarArgs & | x, | |||
const IntSet & | c, | |||
const IntArgs & | v, | |||
IntConLevel | icl = ICL_DEF , |
|||
PropKind | pk = PK_DEF | |||
) |
Posts a global count (cardinality) constraint.
Posts the constraint that and
(no other value occurs).
Supports value (icl = ICL_VAL, default), bounds (icl = ICL_BND), and domain consistency (icl = ICL_DOM).
Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply.
Throws an exception of type Int::ArgumentSizeMismatch, if cards and values are of different size.