Reference no: EM133258707
Question: Given the weights and values of N items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. Maximize the linear Greedy Linear Knapsack problem via maximizing the penalty function (R) using the iterative improvement local search (IILS).
Items as (value, weight) pairs:
array = [Item(2, 7), Item(6, 3), Item(8, 3), Item(7, 5), Item(3, 4), Item(4, 7), Item(6, 5),
Item(5, 4), Item(10, 15), Item(9, 10), Item(8, 17), Item(11, 3), Item(12, 6), Item(15, 11), Item(6, 6),
Item(8, 14), Item(13, 4), Item(14, 8), Item(15, 9), Item(16, 10), Item(26, 24)]
Knapsack Capacity, W = 30, Penalty Parameter, R=25.