用于 0/1 多维背包问题的遗传算法
Genetic Algorithm for the 0/1 Multidimensional Knapsack Problem
Genetic Algorithm for the 0/1 Multidimensional Knapsack Problem
@misc{shah2019genetic,
title = {Genetic Algorithm for the 0/1 Multidimensional Knapsack Problem},
author = {Shalin Shah},
year = {2019},
eprint = {1908.08022},
archivePrefix = {arXiv},
primaryClass = {cs.NE},
url = {https://arxiv.org/abs/1908.08022}
}
Shah, S. (2019). Genetic Algorithm for the 0/1 Multidimensional Knapsack Problem [Preprint]. arXiv. https://doi.org/10.48550/arXiv.1908.08022
SHAH S. Genetic Algorithm for the 0/1 Multidimensional Knapsack Problem[EB/OL]. (2019-07-20)[2026-11-30]. https://arxiv.org/abs/1908.08022.
摘要
0/1 多维背包问题是在具有 m 个约束条件的 0/1 背包问题基础上扩展而来的,这使得传统方法(如动态规划或分支定界算法)难以求解。我们提出了一种用于多维背包问题的遗传算法,并提供了 Java 和 C++ 代码,能够在极短的计算时间内解决公开可用的实例。该算法利用迭代计算的拉格朗日乘子作为约束权重,以增强多维背包问题的贪心算法,并将这些信息用于遗传算法中的贪心交叉操作。该算法还使用多个超参数,这些参数可在代码中设置以控制收敛过程。与 Chu 和 Beasley 提出的算法相比,我们的算法能够更快地收敛到最优解或接近最优解。
The 0/1 multidimensional knapsack problem is the 0/1 knapsack problem with m constraints which makes it difficult to solve using traditional methods like dynamic programming or branch and bound algorithms. We present a genetic algorithm for the multidimensional knapsack problem with Java and C++ code that is able to solve publicly available instances in a very short computational duration. Our algorithm uses iteratively computed Lagrangian multipliers as constraint weights to augment the greedy algorithm for the multidimensional knapsack problem and uses that information in a greedy crossover in a genetic algorithm. The algorithm uses several other hyperparameters which can be set in the code to control convergence. Our algorithm improves upon the algorithm by Chu and Beasley in that it converges to optimum or near optimum solutions much faster.