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.

4 lines
215 B
MiniZinc

predicate fzn_sum_set_reif(array[int] of int: vs, array[int] of int: ws,
var set of int: x, var int: s, var bool: b) =
b <-> s == sum(j in index_set(vs)) ( bool2int(j in x) * ws[j] );