git-subtree-dir: software/mza git-subtree-split: f970a59b177c13ca3dd8aaef8cc6681d83b7e813
7 lines
365 B
MiniZinc
7 lines
365 B
MiniZinc
%-----------------------------------------------------------------------------%
|
|
% Requires exactly 'n' variables in 'x' to take the value 'v'.
|
|
%-----------------------------------------------------------------------------%
|
|
|
|
predicate fzn_exactly_set(int: n, array[int] of var set of int: x, set of int: v) =
|
|
n == sum(i in index_set(x)) ( bool2int(x[i] == v) );
|