Genetic Algorithm - 0/1 Multidimensional Knapsack Problem
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
cmultiknapsack.cpp
data.zip

README.md

Genetic Algorithm - 0/1 Multi-Constraint (Multidimensional) Knapsack Problem

Shalin Shah

A genetic algorithm implementation for the multidimensional knapsack problem. The multi-constraint (or multidimensional) knapsack problem is a generalization of the 0/1 knapsack problem. The multi-constraint knapsack problem has m constraints and one objective function to be maximized while all the m constraints are satisfied.

The implementation is similar to the one described in this paper "A Genetic Algorithm for the Multiconstraint Knapsack Problem" by Beasley and Chu, but its significantly different. It uses Lagrangian multipliers as constraint weights and compared to the paper, it finds close to optimum solutions much faster. (Convergence can be controlled using the parameters).


Cited By:

  • Jovanovic, Dragana, "Solution of multidimensional problems by application of genetic algorithm" (2012).
  • Yoon, Yourim, Yong-Hyuk Kim, and Byung-Ro Moon. "A theoretical and empirical investigation on the Lagrangian capacities of the 0-1 multidimensional knapsack problem." European Journal of Operational Research 218.2 (2012): 366-376.

The algorithm was run on a few benchmark instances:

Instance Optimum Found - Best Found - Worst Time (s)
Weing1 141278 141278 141278 0
Weing2 130883 130883 130883 1
Weing3 95677 95677 95677 1
Weing4 119337 119337 119337 0
Weing5 98796 98796 98796 0
Weing6 130623 130623 130623 0
Weing7 1095445 1095445 1095445 2
Weing8 624319 624319 624319 4
Sento1 7772 7772 7772 1
Sento2 8722 8722 8722 0
Weish01 4554 4554 4554 0
Weish02 4536 4536 4536 0
Weish03 4115 4115 4115 0
Weish04 4561 4561 4561 0
Weish05 4514 4514 4514 0
Weish06 5557 5557 5557 0
Weish07 5567 5567 5567 0
Weish08 5605 5605 5605 0
Weish09 5246 5246 5246 0
Weish10 6339 6339 6339 0
Weish11 5643 5643 5643 0
Weish12 6339 6339 6339 0
Weish13 6159 6159 6159 0
Weish14 6954 6954 6954 0
Weish15 7486 7486 7486 1
Weish16 7289 7289 7289 0
Weish17 8633 8633 8633 0
Weish18 9580 9580 9580 0
Weish19 7698 7698 7698 0
Weish20 9450 9450 9450 0
Weish21 9074 9074 9074 1
Weish22 8947 8947 8947 1
Weish23 8344 8344 8344 0
Weish24 10220 10220 10220 2
Weish25 9939 9939 9939 1
Weish26 9584 9584 9584 0
Weish27 9819 9819 9819 0
Weish28 9492 9492 9492 0
Weish29 9410 9410 9410 0
Weish30 11191 11191 11191 0
PB1 3090 3090 3076 9
PB2 3186 3186 3186 2
PB4 95168 95168 95168 1
PB5 2139 2139 2139 2
PB6 776 776 776 0
PB7 1035 1035 1035 0
HP1 3418 3404 3404 0
HP2 3186 3186 3186 4