Modeling and Solving the Knapsack Problem with a Multi-Objective Equilibrium Optimizer Algorithm Based on Weighted Congestion Distance
Abstract
:1. Introduction
2. Related Work
3. Multi-Objective Knapsack Combination Optimization Problem
3.1. Objective Functions
3.2. Constraint Condition
3.3. Evaluation Metric
4. Multi-Objective Knapsack Combination Optimization Based on MOEO-WCD Algorithm
4.1. Equilibrium Optimizer
4.2. MOEO-WCD Algorithm Process
4.3. Random Concentration Knapsack Generation Mechanism in Equilibrium Pool
4.4. Weighted Crowding Distance
4.5. Discretization of Solution Space
Algorithm 1. MOEO_WCD | |
Input: Population size ; maximum number of iterations ; individual value range of the population lb, ub | |
Output: Best individual ; fitness of | |
1 | Initialize the particle population , |
2 | Initializes the control parameters |
3 | While |
4 | Calculate the contemporary weighted congestion distance weight |
# Calculate the crowding distance weight | |
5 | For |
6 | Calculate fitness |
7 | Calculate decision space distance |
# Calculate the distance in the decision space | |
8 | Calculate object space distance |
#Calculate the distance in the objective space | |
9 | End for |
10 | Identify three particles based on a random concentration strategy |
11 | Calculate particles |
12 | Construct the equilibrium pool by Formula (14) |
13 | Calculate |
14 | For |
15 | Randomly choose one candidate from the equilibrium pool |
# Random concentration selection strategy | |
16 | Generate randomly vector |
17 | Generate , , , |
18 | Update particle population |
19 | End(for) |
20 | = round () # Discretization of solutions in the decision space |
31 | |
32 | End while |
5. Experiment
5.1. Experimental Setup
- Comparative algorithms: MODE, MO_PSO_MM, MO_Ring_PSO_SCD, NSGA-II, DN_NSGA-II, and MOEO_WCD;
- Number of runs: 50 independent runs;
- Population size NP: 400;
- Maximum number of evaluations (Max_FES): 10,000.
Experimental Plan
5.2. Experimental Results
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Kellerer, H.; Pferschy, U.; Pisinger, D.; Kellerer, H.; Pferschy, U.; Pisinger, D. Multidimensional Knapsack Problems; Springer: Berlin/Heidelberg, Germany, 2004. [Google Scholar]
- Perry, T.C.; Hartman, J.C. An Approximate Dynamic Programming Approach to Solving a Dynamic, Stochastic Multiple Knapsack Problem. Int. Trans. Oper. Res. 2009, 16, 347–359. [Google Scholar] [CrossRef]
- Kan, A.R.; Stougie, L.; Vercellis, C. A Class of Generalized Greedy Algorithms for the Multi-Knapsack Problem. Discret. Appl. Math. 1993, 42, 279–290. [Google Scholar]
- Bhattacharjee, K.K.; Sarmah, S.P. Modified Swarm Intelligence Based Techniques for the Knapsack Problem. Appl. Intell. 2017, 46, 158–179. [Google Scholar] [CrossRef]
- Zhang, T.; Ding, B.; Zhao, X.; Yue, Q. A Fast Feature Selection Algorithm Based on Swarm Intelligence in Acoustic Defect Detection. IEEE Access 2018, 6, 28848–28858. [Google Scholar] [CrossRef]
- Rezoug, A.; Bader-El-Den, M.; Boughaci, D. Guided Genetic Algorithm for the Multidimensional Knapsack Problem. Memetic Comput. 2018, 10, 29–42. [Google Scholar] [CrossRef]
- Shin, Y.-B.; Kita, E. Solving Two-Dimensional Packing Problem Using Particle Swarm Optimization. Comput. Assist. Methods Eng. Sci. 2017, 19, 241–255. [Google Scholar]
- Kong, M.; Tian, P.; Kao, Y. A New Ant Colony Optimization Algorithm for the Multidimensional Knapsack Problem. Comput. Oper. Res. 2008, 35, 2672–2683. [Google Scholar] [CrossRef]
- Nand, R.; Sharma, P. Iteration Split with Firefly Algorithm and Genetic Algorithm to Solve Multidimensional Knapsack Problems. In Proceedings of the 2019 IEEE Asia-Pacific Conference on Computer Science and Data Engineering (CSDE), Melbourne, Australia, 9–11 December 2019; pp. 1–7. [Google Scholar]
- Tian, Y.; Cheng, R.; Zhang, X.; Li, M.; Jin, Y. Diversity Assessment of Multi-Objective Evolutionary Algorithms: Performance Metric and Benchmark Problems. IEEE Comput. Intell. Mag. 2019, 14, 61–74. [Google Scholar] [CrossRef]
- Mansour, I.B.; Basseur, M.; Saubion, F. A Multi-Population Algorithm for Multi-Objective Knapsack Problem. Appl. Soft Comput. 2018, 70, 814–825. [Google Scholar] [CrossRef]
- Van Veldhuizen, D.A.; Lamont, G.B. Multiobjective Evolutionary Algorithm Research: A History and Analysis; Citeseer: Princeton, NJ, USA, 1998. [Google Scholar]
- Deb, K.; Pratap, A.; Agarwal, S.; Meyarivan, T. A Fast and Elitist Multiobjective Genetic Algorithm: NSGA-II. IEEE Trans. Evol. Comput. 2002, 6, 182–197. [Google Scholar] [CrossRef]
- Rahman, C.M.; Mohammed, H.M.; Abdul, Z.K. Multi-Objective Group Learning Algorithm with a Multi-Objective Real-World Engineering Problem. Appl. Soft Comput. 2024, 166, 112145. [Google Scholar] [CrossRef]
- Yang, X.-S. Firefly Algorithms for Multimodal Optimization. In Proceedings of the International Symposium on Stochastic Algorithms, Sapporo, Japan, 26–28 October 2009; pp. 169–178. [Google Scholar]
- Blum, C.; Roli, A. Metaheuristics in Combinatorial Optimization: Overview and Conceptual Comparison. ACM Comput. Surv. (CSUR) 2003, 35, 268–308. [Google Scholar] [CrossRef]
- Mahrach, M.; Miranda, G.; León, C.; Segredo, E. Comparison Between Single and Multi-Objective Evolutionary Algorithms to Solve the Knapsack Problem and the Travelling Salesman Problem. Mathematics 2020, 8, 2018. [Google Scholar] [CrossRef]
- Zouache, D.; Moussaoui, A.; Abdelaziz, F.B. A Cooperative Swarm Intelligence Algorithm for Multi-Objective Discrete Optimization with Application to the Knapsack Problem. Eur. J. Oper. Res. 2018, 264, 74–88. [Google Scholar] [CrossRef]
- Deb, K.; Tiwari, S. Omni-optimizer: A Generic Evolutionary Algorithm for Single and Multi-Objective Optimization. Eur. J. Oper. Res. 2008, 185, 1062–1087. [Google Scholar] [CrossRef]
- Hernández Castellanos, C.I.; Schütze, O.; Sun, J.-Q.; Ober-Blöbaum, S. Non-Epsilon Dominated Evolutionary Algorithm for the Set of Approximate Solutions. Math. Comput. Appl. 2020, 25, 3. [Google Scholar] [CrossRef]
- Li, Z.; Wang, Q. An Improved Multi-Objective Evolutionary Algorithm for Multi-Objective 0/1 Knapsack Problem. Int. J. Multimed. Ubiquitous Eng. 2015, 10, 383–394. [Google Scholar] [CrossRef]
- Faramarzi, A.; Heidarinejad, M.; Stephens, B.; Mirjalili, S. Equilibrium Optimizer: A Novel Optimization Algorithm. Knowl. -Based Syst. 2020, 191, 105190. [Google Scholar]
- Xue, F.; Sanderson, A.C.; Graves, R.J. Multi-Objective Differential Evolution-Algorithm, Convergence Analysis, and Applications. In Proceedings of the 2005 IEEE Congress on Evolutionary Computation, Edinburgh, UK, 2–5 September 2005; pp. 743–750. [Google Scholar]
- Feng, Q.; Li, Q.; Quan, W.; Pei, X.-M. Overview of Multiobjective Particle Swarm Optimization Algorithm. Chin. J. Eng. 2021, 43, 745–753. [Google Scholar]
- Wang, Y.; Yang, Z.; Guo, Y.; Zhu, J.; Zhu, X. A Novel Multi-Objective Competitive Swarm Optimization Algorithm for Multi-Modal Multi Objective Problems. In Proceedings of the 2019 IEEE Congress on Evolutionary Computation (CEC), Wellington, New Zealand, 10–13 June 2019; pp. 271–278. [Google Scholar]
Number of Knapsacks | Knapsack Capacity | Weight and Value of Items | Number of Items | |
---|---|---|---|---|
Q1 | 3 | 15,20,25 | weight: 5,3,7,2,6,4,9,8,1,10,2,3 value: 10,8,6,9,5,7,3,4,2,1,4,8 | 12 |
Q2 | 3 | 10,15,20 | weight: 5,3,7,2,6,4,9,8,1,10,2,3 value: 10,8,6,9,5,7,3,4,2,1,4,8 | 12 |
Q3 | 3 | 15,20,25 | weight: 3,3,1,2,2,4,9,8,1,10,2,3 value: 10,17,6,5,5,7,3,4,2,1,4,8 | 12 |
Q4 | 2 | 15,20 | weight: 5,3,7,2,6,4,9,8,1,10,2,3 value: 10,8,6,9,5,7,3,4,2,1,4,8 | 12 |
Q5 | 1 | 25 | weight: 5,3,7,2,6,4,9,8,1,10,2,3 value: 10,8,6,9,5,7,3,4,2,1,4,8 | 12 |
Q6 | 5 | 8,10,6,7,13 | weight: 5,3,7,2,6,4,9,8,1,10,2,3 value: 10,8,6,9,5,7,3,4,2,1,4,8 | 12 |
Q7 | 3 | 15,20,25 | weight: 5,3,7,2,6,4,9,8,1,10,2,3,4,7,3 value: 10,8,6,9,5,7,3,4,2,1,4,8,6,9,2 | 15 |
Q8 | 3 | 15,20,25 | weight: 5,3,7,2,6,4,9,8 value: 10,8,6,9,5,7,3,4 | 8 |
Q9 | 3 | 15,20,25 | weight: 8,3,4,9,17,11,8,10,7,6,5,3 value: 2,9,3,2,3,6,9,5,8,1,3,1 | 12 |
Algorithm | Q1 | Q2 | Q3 | Q4 | Q5 | Q6 | Q7 | Q8 | Q9 | |
---|---|---|---|---|---|---|---|---|---|---|
MODE | weight | 50,10 | 41,2 | 48,4 | 33,7 | 25,2 | 33,2 | 47,2 | 44,2 | 54,3 |
value | 66,21 | 63,9 | 72,23 | 59,19 | 51,9 | 59,9 | 76,9 | 52,9 | 41,9 | |
MO_PSO_MM | weight | 50,10 | 41,15 | 48,11 | 33,4 | 25,1 | 33,15 | 55,17 | 44,6 | 59,15 |
value | 66,21 | 63,38 | 72,30 | 59,13 | 51,2 | 59,38 | 80,40 | 52,5 | 46,20 | |
MO_Ring_PSO_SCD | weight | 51,15 | 38,15 | 48,11 | 31,10 | 24,2 | 27,26 | 48,13 | 44,6 | 52,33 |
value | 64,32 | 55,39 | 72,33 | 55,29 | 49,9 | 48,39 | 71,17 | 52,16 | 38,30 | |
NSGAII | weight | 50,26 | 41,12 | 38,11 | 31,6 | 24,3 | 32,27 | 49,34 | 44,11 | 47,30 |
value | 66,44 | 63,30 | 71,39 | 51,19 | 49,11 | 48,37 | 73,62 | 52,26 | 40,17 | |
DN_NSGAII | weight | 41,16 | 39,11 | 48,15 | 31,3 | 15,4 | 30,15 | 49,34 | 44,6 | 48,37 |
value | 63,24 | 52,24 | 72,53 | 46,11 | 32,13 | 40,25 | 73,62 | 52,16 | 39,30 | |
MOEO_WCD | weight | 50,3 | 43,3 | 48,6 | 27,2 | 25,1 | 25,1 | 55,12 | 44,15 | 51,12 |
value | 66,8 | 66,8 | 72,17 | 54,9 | 51,2 | 51,2 | 80,27 | 52,29 | 44,11 |
Algorithm | Q1 | Q2 | Q3 | Q4 | Q5 | Q6 | Q7 | Q8 | Q9 |
---|---|---|---|---|---|---|---|---|---|
MODE | 17.89% ±0.0739 | 46.26% ±0.0666 | 14.9% ±0.0141 | 26.98% ±0.0700 | 55.86% ±0.0755 | 56.69% ±0.0755 | 56.69% ±0.0460 | 12.2% ±0.0126 | 69.09% ±0.0543 |
MO_PSO_MM | 33.83% ±0.0259 | 39.44% ±0.0674 | 39.6% ±0.0314 | 65.60% ±0.0320 | 59.49% ±0.0947 | 24.47% ±0.0947 | 24.47% ±0.0530 | 43.7% ±0.0337 | 13.19% ±0.0389 |
MO_Ring_PSO_SCD | 1.11% ±0.0558 | 1.80% ±0.0769 | 1.54% ±0.0154 | 1.52% ±0.0529 | 22.88% ±0.0714 | 2.70% ±0.0714 | 2.7% ±0.0515 | 2.40% ±0.0127 | 2.23% ±0.0079 |
NSGAll | 0.90% ±0.0035 | 1.39% ±0.0053 | 1.30% ±0.0033 | 1.17% ±0.0040 | 20.44% ±0.0568 | 2.24% ±0.0568 | 2.24% ±0.0075 | 3.13% ±0.0054 | 1.36% ±0.0061 |
DN_NSGAll | 0.91% ±0.0026 | 1.29% ±0.0050 | 1.26% ±0.0031 | 1.24% ±0.0023 | 11.39% ±0.0393 | 1.99% ±0.0393 | 1.99% ±0.0059 | 3.11% ±0.0050 | 1.34% ±0.0055 |
MOEO_WCD | 35.62% ±0.0027 | 10.07% ±0.0044 | 40.4% ±0.0025 | 12.24% ±0.0034 | 59.56% ±0.0328 | 11.91% ±0.0328 | 11.91% ±0.0053 | 43.7% ±0.0054 | 13.33% ±0.0529 |
HV | Repoint | MODE | MO_PSO_MM | MO_Ring_PSO_SCD | NSGAll | DN_NSGAII | MOEO_WCD |
---|---|---|---|---|---|---|---|
Q1 | 66,3 | 3481 | 3115 | 2737 | 2804 | 2999 | 3451 |
Q2 | 66,2 | 3329 | 3095 | 2743 | 2824 | 2654 | 3233 |
Q3 | 72,4 | 4630 | 4396 | 4239 | 4003 | 4086 | 4559 |
Q4 | 59,2 | 2737 | 2714 | 2285 | 2233 | 1951 | 2569 |
Q5 | 51,1 | 2137 | 2095 | 1795 | 1837 | 1901 | 2137 |
Q6 | 59,1 | 2770 | 2419 | 1485 | 1320 | 1782 | 2338 |
Q7 | 80,2 | 4778 | 4407 | 3559 | 3452 | 3423 | 4719 |
Q8 | 52,2 | 2031 | 1918 | 1768 | 1892 | 1816 | 2031 |
Q9 | 59,3 | 1892 | 1502 | 971 | 792 | 1034 | 1757 |
Friedman mean rank | 1 | 2.78 | 5 | 5.11 | 4.89 | 2.22 | |
Rank | 1 | 3 | 5 | 6 | 4 | 2 |
Algorithm | R+ | R− | p Value | + | − |
---|---|---|---|---|---|
MOEO_WCD vs. MODE | 0 | 28 | 0.018 | 0 | 7 |
MOEO_WCD vs. MO_PSO_MM | 38 | 7 | 0.074 | 7 | 2 |
MOEO_WCD vs. MO_Ring_PSO_SCD | 45 | 0 | 0.004 | 9 | 0 |
MOEO_WCD vs. NSGAII | 45 | 0 | 0.004 | 9 | 0 |
MOEO_WCD vs. DN_NSGAII | 45 | 0 | 0.004 | 9 | 0 |
Algorithm | Option | Weight | Value | Count | |
---|---|---|---|---|---|
MODE | Option 1 | Bag1: 1,2,6,12 Bag2: 3,7,9 Bag3: 4,5,8,11 | 50 | 66 | 154 |
Option 2 | Bag3: 4 | 2 | 9 | ||
Option 3 | Bag1: 1,7 Bag2: 3,5 Bag3: 2,4,6,8,9,11,12 | 50 | 66 | ||
MO_PSO_MM | Option 1 | Bag1: 2,4,10 Bag2: 7,8,12 Bag3: 1,3,5,6,9,11 | 60 | 67 | 355 |
Option 2 | Bag1: 1,11 Bag2: 4,9 Bag3: 6 | 14 | 32 | ||
Option 3 | Bag 1: 8,12 Bag2: 1,2,6,9 Bag3: 3,4,5,11 | 41 | 63 | ||
MO_Ring_PSO_SCD | Option 1 | Bag2: 11 Bag3: 3,6 | 13 | 17 | 8 |
Option 2 | Bag1: 2,6 Bag2: 7,9 Bag3: 1,3,4,5,11 | 42 | 62 | ||
Option 3 | Bag1: 2,3,11 Bag2: 1,12 Bag3: 4,6,8,9 | 35 | 58 | ||
NSGAII | Option 1 | Bag1: 5,12 Bag2: 1,4,11 Bag3: 2,3,6,8,9 | 41 | 63 | 11 |
Option 2 | Bag1: 3,6,11 Bag2: 4,8,12 Bag3: 1,2,5,9 | 41 | 63 | ||
Option 3 | Bag1: 2,9 Bag2: 1,4,11 Bag3: 8,12 | 35 | 58 | ||
DN_NSGAII | Option 1 | Bag1: 2,3,4,12 Bag2: 1,5,6,11 Bag3: 9 | 33 | 59 | 11 |
Option 2 | Bag1: 5,6 Bag2: 4,7,8 Bag3: 1,2,3,11,12 | 49 | 64 | ||
Option 3 | Bag1: 6,8 Bag2: 2 Bag3: 4,11,12 | 22 | 40 | ||
MOEO_WCD | Option 1 | Bag1: 1,2,4,6 Bag2: 3,8,11 Bag3: 5,7,12 | 49 | 64 | 399 |
Option 2 | Bag1: 1,2,3 Bag2: 3,8,11 Bag3: 5,7,12 | 50 | 66 | ||
Option 3 | Bag1: 11,12 Bag3: 9 | 6 | 14 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wang, Z.; Huang, X.; Zhang, Y.; Lv, D.; Li, W.; Zhu, Z.; Dong, J. Modeling and Solving the Knapsack Problem with a Multi-Objective Equilibrium Optimizer Algorithm Based on Weighted Congestion Distance. Mathematics 2024, 12, 3538. https://doi.org/10.3390/math12223538
Wang Z, Huang X, Zhang Y, Lv D, Li W, Zhu Z, Dong J. Modeling and Solving the Knapsack Problem with a Multi-Objective Equilibrium Optimizer Algorithm Based on Weighted Congestion Distance. Mathematics. 2024; 12(22):3538. https://doi.org/10.3390/math12223538
Chicago/Turabian StyleWang, Ziqian, Xin Huang, Yan Zhang, Danju Lv, Wei Li, Zhicheng Zhu, and Jian’e Dong. 2024. "Modeling and Solving the Knapsack Problem with a Multi-Objective Equilibrium Optimizer Algorithm Based on Weighted Congestion Distance" Mathematics 12, no. 22: 3538. https://doi.org/10.3390/math12223538
APA StyleWang, Z., Huang, X., Zhang, Y., Lv, D., Li, W., Zhu, Z., & Dong, J. (2024). Modeling and Solving the Knapsack Problem with a Multi-Objective Equilibrium Optimizer Algorithm Based on Weighted Congestion Distance. Mathematics, 12(22), 3538. https://doi.org/10.3390/math12223538