git-subtree-dir: software/minizinc git-subtree-split: 4f10c82056ffcb1041d7ffef29d77a7eef92cf76
14 lines
507 B
MiniZinc
14 lines
507 B
MiniZinc
predicate fzn_global_cardinality_low_up_closed(array[int] of var int: x,
|
|
array[int] of int: cover,
|
|
array[int] of int: lbound,
|
|
array[int] of int: ubound) =
|
|
forall(i in index_set(x))( x[i] in { d | d in array2set(cover) } )
|
|
/\
|
|
global_cardinality_low_up(x, cover, lbound, ubound)
|
|
/\
|
|
% Implied condition
|
|
length(x) in sum(lbound)..sum(ubound);
|
|
|
|
|
|
include "global_cardinality_low_up.mzn";
|