$ $ Knapsack model in Essence'. $ $ Simple knapsack problem in Essence'. $ $ Model created by Hakan Kjellerstrand, hakank@bonetmail.com $ See also my Tailor/Essence' page: http://www.hakank.org/minion_tailor $ ESSENCE' 1.0 given n : int given num_entries : int given values : matrix indexed by [int(1..num_entries)] of int(1..100) given weights : matrix indexed by [int(1..num_entries)] of int(1..100) find x : matrix indexed by [int(1..num_entries)] of bool find z : int(0..10000) $ This should be a parameter file maximising z such that z = sum i : int(1..num_entries) . x[i]*values[i], (sum i : int(1..num_entries) . x[i]*weights[i] ) <= n