Example of a one-dimensional (constraint) knapsack problem: which books should be chosen to maximize the amount of money while still keeping the overall weight under or equal to 15 kg? A multiple-constrained problem could consider both the weight and volume of the books. (Solution: if any number of each book is available, then three yellow books and three grey books; if only the shown books are available, then all except for the green book.) 1 |
The knapsack problem, in its simplest form, has only one constraint and is easily solvable. However, for an extension of it, with more than one constraint
There are many MKDP versions, which you can look at Cacchiani et al. (2022).
To design a predictor for solving the following class of knapsack optimization problems, Dynamic Multidimensional Knapsack Problem (DMKP), using methods other than commercial solvers:
Python, Random Forest (RF), XGBoost, Neural Network (NN), Naive Bayesian (NB), and Support Vector Machine (SVM)
- Dataset
- Feature Selection
- ML Algorithms
- Performance Comparison
- References (references)
I used the dataset described in the work of Skackauskas and Kalganova (2022). The raw datasets are accessible from the authors' GitHub page or this forked page.
Cacchiani, V., Iori, M., Locatelli, A. and Martello, S., 2022. Knapsack problems—An overview of recent advances. Part II: Multiple, multidimensional, and quadratic knapsack problems. Computers & Operations Research, 143, p.105693.
Skackauskas, Jonas, and Tatiana Kalganova. "Dynamic Multidimensional Knapsack Problem benchmark datasets." Systems and Soft Computing 4 (2022): 200041.
Footnotes
-
The image and its description are from Knapsack problem Wikipedia page. ↩