Binpack

Common bin-packing heuristics.

Latest on Hackage:0.4.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Björn B. Brandenburg
Maintained by [email protected]

An implementation of the first-fit, modified-first-fit, last-fit, best-fit, sum-of-squares-fit, worst-fit, and almost-last-fit bin packing heuristics. Items can be packed in order of both decreasing and increasing size (and, of course, in unmodified order).

The module supports both the standard (textbook) minimization problem (How many bins do I need?) and the more practical fitting problem (I've got n bins; which items can I take?).

The API is simple and the module is documented with Haddock (complete with examples). The implementation of the above-mentioned heuristics is complete and partially tested with QuickCheck. However, note that speed has not been a primary concern to date.

Patches and feedback are very welcome.