1
0
This repository has been archived on 2025-03-06. You can view files and clone it, but cannot push or open issues or pull requests.

7 lines
289 B
MiniZinc

predicate fzn_sum_pred_reif(var int: i, array[int] of set of int: sets,
array[int] of int: cs, var int: s, var bool: b) =
let {
array[index_set(sets)] of int: sums = [ sum(i in sets[j])(cs[i]) | j in index_set(sets) ];
} in b <-> sums[i] = s;