A discrete optimization solver for efficient bin allocation, open-source and freely available for developers to use.
Knapsack is an open-source library designed to solve combinatorial optimization problems known as bin packing or knapsack problems. It enables developers to pack items of given weights or values into a finite number of bins or knapsacks so that the total weight or value is optimized.
The knapsack problem is a popular computer science challenge where a set of items with certain weights/values need to be packed into container(s) with limited capacity. The goal is to maximize the total value of items packed without exceeding the capacity. It has many real-world applications like cargo loading, project scheduling, budget allocation etc.
Knapsack provides implementations of algorithms like greedy, dynamic programming, branch & bound etc to solve knapsack problems efficiently. It is written in Java and has a simple API allowing users to define bins, items, constraints and solve problems programatically. The output gives the optimal selection and assignment of items. It also provides utility functions like input builders, validators and formatters.
The library is open-source, actively maintained and well-documented. With its customizable solvers and utility functions, Knapsack aims to be the go-to library for solving knapsack optimization challenges for developers and researchers.
Here are some alternatives to Knapsack:
Suggest an alternative ❐