A solver for the bounded knapsack problem