Help for knapsack

Description

knapsack implements a solution for the 0/1 Knapsack Problem as described here.
Given a total budget as input, with data containing each potential item's cost and value, knapsack returns the maximum possible total value that can be purchased using the budget.
If generate() is specified, a new variable is created containing 1 if the item is in the optimal set and 0 if it is not.

Syntax

knapsack budget , price(varname) value(varname) [generate(newvarname)]

Author

Benjamin Daniels
bbdaniels@gmail.com

Contributing

knapsack is open for development on GitHub.
Submit bugs and feature requests here.
If you like knapsack, be sure to visit my homepage
and Stata boilerplate code.