This software package primarily aims at research in the areas of operations research and optimization. It serves as a testbed that provides a way of quickly implementing and testing new algorithms to solve the quadratic multiple knapsack problem (QMKP) and compare it with existing solutions.
The goal is to encourage researchers and developers to share their algorithms and make them publicly available.
The QMKP is defined as the following combinatorial optimization problem
This describes an assignment problem where one wants to assign
The set of items which are assigned to knapsack
The objective of the above problem is to maximize the total profit such that each item is assigned to at most one knapsack and such that the weight capacity constraints of the knapsacks are not violated.
Remark: The profits
- Quick and simple creation of QMKP instances
- Saving/loading of problem instances for a simple creation and use of reference datasets
- Easy implementation of novel algorithms to solve the QMKP
- High reproducibility and direct comparison between different algorithms
The benefit of enabling a simple and direct way of implementing novel
algorithms is highlighted by an example in the provided Jupyter notebook in
examples/Custom
Algorithm.ipynb.
The package can easily be installed via pip. Either from the PyPI
pip3 install qmkpy
or from the GitHub repository
git clone https://github.com/klb2/qmkpy.git
cd qmkpy
git checkout dev # optional for the latest development version
pip3 install -r requirements.txt
pip3 install .
pip3 install pytest # optional if you want to run the unit tests
In order to test the installation and get an idea of how to use the QMKPy
package, you can take a look at the examples/
directory.
It contains some standalone scripts that can be executed and perform some
simple tasks.
More detailed descriptions of the implemented algorithms and a documentation of the API can be found in the documentation.
A collection of reference datasets can be found at https://github.com/klb2/qmkpy-datasets.
Please see CONTRIBUTING.md for guidelines on how to contribute to this project. In particular, novel algorithms are always welcome. Please check out the documentation for a brief overview on how to implement new algorithms for the QMKPy framework.