this repo has no description
at develop 743 B view raw
1%-----------------------------------------------------------------------------% 2% A 'table' constraint table(x, T) represents the constraint x in T where we 3% consider each row in T to be a tuple and T as a set of tuples. 4% 5% Linear version. 6% 7% See also the equality encoding of the 'element' constraint. 8%-----------------------------------------------------------------------------% 9 10predicate fzn_table_int(array[int] of var int: x, array[int, int] of int: t) = 11 let { set of int: it = index_set_1of2(t), 12 array[it] of var 0..1: lambda } 13 in 14 sum(lambda) = 1 15 /\ 16 forall(j in index_set(x))( sum(i in it)( t[i,j]*lambda[i] ) = x[j] ); 17 18%-----------------------------------------------------------------------------%