SaitoTsutomu / knapsack

Apache License 2.0
5 stars 1 forks source link

knapsack is a package for solving knapsack problem.

Usage

import knapsack
size = [21, 11, 15, 9, 34, 25, 41, 52]
weight = [22, 12, 16, 10, 35, 26, 42, 53]
capacity = 100
knapsack.knapsack(size, weight).solve(capacity)

See also https://pypi.org/project/ortoolpy/

Requirements

Setup

$ pip install knapsack

History