Fitness-Based Acceleration Coefficients Binary Particle Swarm Optimization (FACBPSO) to Solve the Discounted Knapsack Problem
<p>Flowchart of FACBPSO.</p> "> Figure 2
<p>Comparative analysis of feasible solution time on SDKP instances.</p> "> Figure 3
<p>Comparative analysis of feasible solution time on WDKP instances.</p> "> Figure 4
<p>Comparative analysis of feasible solution time on UDKP instances.</p> "> Figure 5
<p>Comparative analysis of feasible solution time on IDKP instances.</p> ">
Abstract
:1. Introduction
2. The Core Concept Related to Discounted {0-1} KP
2.1. Mathematical Model of D{0-1}KP
2.1.1. Greedy Repair Optimization Algorithm
Algorithm 1 Structure of Greedy Repair Algorithm for D{0-1}KP |
START |
|
END |
2.1.2. PSO-DRGKP
Algorithm 2 Structure of PSO-GRDKP |
START |
INPUT: Instance I of D{0-1}KP, N = Population Size, T = Iterations, L = Lower bound, U = Upper bound, W = Inertia Weight, c1, c2 = Acceleration Coefficients. |
|
END |
3. Fitness-Based Acceleration Coefficient Binary Particle Swarm Optimization Algorithm for DKP (FACBPSO)
3.1. Procedure of FACBPSO
- Sorting: Sort the items with respect to their profit–weight ratio in descending order. All the sorted items are kept in an array H [0, 1, 2, …, 3n − 1] with their index value.
- Initialization: Initialize the populationrandomly.
- Fitness Calculation: Compute the fitness of every individual utilizing its present position. ,
- while doing (stopping criterion)
- Determine the pbest and gbest with respect to their fitness.
- Apply the greedy repair algorithm to repair the solution.
- Evaluate the fitness of the particles and record the gbest.
- Get the pbest by comparison of the fitness of each particle to its best fitness.
- Get the gbest by comparing of fitness of each particle to its best fitness within the population.
- Sort and rank all particles according to their fitness.
- Calculate the acceleration coefficients for each particle in terms of fitness using Equation (9).
- Update velocity and position of the particles using Equations (5) and (6).
- end while
- Output: The approximate solution G (T): The best results.
3.2. Flowchart of FACBPSO
4. Experimental Setup
4.1. Benchmark D{0-1}KP Instances
- Uncorrelated Instances (UDKP) used 10 datasets from UDKP1 to UDKP10, in which the value and weight coefficients are not related at all
- Weakly Correlated Instances (WDKP) used 10 datasets from WDKP1 to WDKP10, in which the value and weight coefficients of items are weakly correlated.
- Strongly Correlated Instances (SDKP) used 10 datasets from SDKP1 to SDKP10, in which the value and weight coefficients of items are strongly correlated.
- Inverse Correlated Instances (IDKP) used 10 datasets from IDKP1 to IDKP10, in which the value and weight coefficients of items are inversely correlated.
4.2. Parameters Settings
5. Experimental Results and Discussions
5.1. Comparison of FACBSPSO with PSO-GRDKP and NE-DKP on Four D{0-1}KP Instances
5.1.1. Experimental Results of Strongly Correlated Instances (SDKP)
5.1.2. Experimental Results of Weakly Correlated Instances (WDKP)
5.1.3. Experimental Results of Uncorrelated Instances (UDKP)
5.1.4. Experimental Results of Inverse Correlated Instances
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Wang, R.; Zhang, Z.; Ng, W.W.; Wu, W. An improved group theory-based optimization algorithm for discounted 0-1 knapsack problem. Adv. Comput. Intell. 2021, 1, 9. [Google Scholar] [CrossRef]
- Abdel-Basset, M.; Mohamed, R.; Mirjalili, S. A Binary Equilibrium Optimization Algorithm for 0–1 Knapsack Problems. Comput. Ind. Eng. 2021, 151, 106946. [Google Scholar] [CrossRef]
- Cho, M. The knapsack problem and its applications to the cargo loading problem. Anal. Appl. Math. 2019, 13, 48–63. [Google Scholar]
- Müller, S.; Al-Shatri, H.; Wichtlhuber, M.; Hausheer, D.; Klein, A. Computation offloading in wireless multi-hop networks: Energy minimization via multi-dimensional knapsack problem. In Proceedings of the 2015 IEEE 26th Annual International Symposium on Personal, Indoor, and Mobile Radio Communications (PIMRC), Hong Kong, China, 30 August–2 September 2015; pp. 1717–1722. [Google Scholar]
- Karaboghossian, T.; Zito, M. Easy knapsacks and the complexity of energy allocation problems in the smart grid. Optim. Lett. 2018, 12, 1553–1568. [Google Scholar] [CrossRef]
- Jacko, P. Resource capacity allocation to stochastic dynamic competitors: Knapsack problem for perishable items and index-knapsack heuristic. Ann. Oper. Res. 2016, 241, 83–107. [Google Scholar] [CrossRef]
- Zhang, X.; Chen, Y. Admissibility and robust stabilization of continuous linear singular fractional order systems with the fractional order α: The 0 <α<1 case. ISA Trans. 2018, 82, 42–50. [Google Scholar]
- Oppong, E.O.; Oppong, S.O.; Asamoah, D.; Abiew, N.A.K. Meta-heuristics approach to knapsack problem in memory management. Asian J. Res. Comput. Sci. 2019, 3, 1–10. [Google Scholar] [CrossRef]
- Tavana, M.; Keramatpour, M.; Santos-Arteaga, F.J.; Ghorbaniane, E. A fuzzy hybrid project portfolio selection method using data envelopment analysis, TOPSIS and integer programming. Expert Syst. Appl. 2015, 42, 8432–8444. [Google Scholar] [CrossRef]
- Zhang, J.-X.; Yang, G.-H. Low-complexity tracking control of strict-feedback systems with unknown control directions. IEEE Trans. Autom. Control 2019, 64, 5175–5182. [Google Scholar] [CrossRef]
- Khan, S.; Li, K.F.; Manning, E.G.; Akbar, M.M. Solving the knapsack problem for adaptive multimedia systems. Stud. Inform. Univ. 2002, 2, 157–178. [Google Scholar]
- Chan, H.; Tran-Thanh, L.; Wilder, B.; Rice, E.; Vayanos, P.; Tambe, M. Utilizing housing resources for homeless youth through the lens of multiple multi-dimensional knapsacks. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, New Orleans, LA, USA, 1–3 February 2018; pp. 41–47. [Google Scholar]
- Alfares, H.K.; Alsawafy, O.G. A Least-Loss Algorithm for a Bi-Objective One-Dimensional Cutting-Stock Problem. Int. J. Appl. Ind. Eng. (IJAIE) 2019, 6, 1–19. [Google Scholar] [CrossRef]
- Du, Y.; Xu, F. A hybrid multi-step probability selection particle swarm optimization with dynamic chaotic inertial weight and acceleration coefficients for numerical function optimization. Symmetry 2020, 12, 922. [Google Scholar] [CrossRef]
- Wang, R.; Zhang, Z. Set Theory Based Operator Design in Evolutionary Algorithms for Solving Knapsack Problems. IEEE Trans. Evol. Comput. 2021, 25, 1133–1147. [Google Scholar] [CrossRef]
- Kellerer, H.; Pferschy, U.; Pisinger, D. Multidimensional knapsack problems. In Knapsack Problems; Springer: Berlin/Heidleberg, Germany, 2004; pp. 235–283. [Google Scholar]
- Guldan, B. Heuristic and Exact Algorithms for Discounted Knapsack Problems. Master’s Thesis, University of Erlangen-Nürnberg, Erlangen, Germany, 2007. [Google Scholar]
- Rong, A.; Figueira, J.R.; Klamroth, K. Dynamic programming based algorithms for the discounted {0–1} knapsack problem. Appl. Math. Comput. 2012, 218, 6921–6933. [Google Scholar] [CrossRef]
- Saraç, T.; Sipahioglu, A. A genetic algorithm for the quadratic multiple knapsack problem. In International Symposium on Brain, Vision, and Artificial Intelligence; Springer: Berlin/Heidleberg, Germany, 2007; pp. 490–498. [Google Scholar]
- He, Y.; Zhang, X.; Li, W.; Li, X.; Wu, W.; Gao, S. Algorithms for randomized time-varying knapsack problems. J. Comb. Optim. 2016, 31, 95–117. [Google Scholar] [CrossRef]
- Ren, Z.-G.; Feng, Z.-R.; Zhang, A.-M. Fusing ant colony optimization with Lagrangian relaxation for the multiple-choice multidimensional knapsack problem. Inf. Sci. 2012, 182, 15–29. [Google Scholar] [CrossRef]
- Li, Y.; He, Y.; Liu, X.; Guo, X.; Li, Z. A novel discrete whale optimization algorithm for solving knapsack problems. Appl. Intell. 2020, 50, 3350–3366. [Google Scholar] [CrossRef]
- Wilbaut, C.; Todosijevic, R.; Hanafi, S.; Fréville, A. Heuristic and exact fixation-based approaches for the discounted 0-1 knapsack problem. arXiv 2021, arXiv:2106.03438. [Google Scholar]
- Wu, C.; Zhao, J.; Feng, Y.; Lee, M. Solving discounted {0-1} knapsack problems by a discrete hybrid teaching-learning-based optimization algorithm. Appl. Intell. 2020, 50, 1872–1888. [Google Scholar] [CrossRef]
- Mehmood, Y.; Shahzad, W. An accelerated convergent particle swarm optimizer (ACPSO) of multimodal functions. Intell. Autom. Soft Comput. 2019, 25, 91–103. [Google Scholar] [CrossRef]
- He, Y.-C.; Wang, X.-Z.; He, Y.-L.; Zhao, S.-L.; Li, W.-B. Exact and approximate algorithms for discounted {0-1} knapsack problem. Inf. Sci. 2016, 369, 634–647. [Google Scholar] [CrossRef]
- Feng, Y.-H.; Wang, G.-G. Binary moth search algorithm for discounted {0-1} knapsack problem. IEEE Access 2018, 6, 10708–10719. [Google Scholar] [CrossRef]
- Feng, Y.; Wang, G.-G. A binary moth search algorithm based on self-learning for multidimensional knapsack problems. Future Gener. Comput. Syst. 2022, 126, 48–64. [Google Scholar] [CrossRef]
- Feng, Y.; Wang, G.-G.; Li, W.; Li, N. Multi-strategy monarch butterfly optimization algorithm for discounted {0-1} knapsack problem. Neural Comput. Appl. 2018, 30, 3019–3036. [Google Scholar] [CrossRef]
- Yang, Y.; Dazhi, P.; Yi, L.; Dailun, T. New simplified model of discounted {0-1} knapsack problem and solution by genetic algorithm. J. Comput. Appl. 2019, 39, 656. [Google Scholar]
- Zhu, H.; He, Y.; Wang, X.; Tsang, E.C. Discrete differential evolutions for the discounted {0-1} knapsack problem. Int. J. Bio-Inspired Comput. 2017, 10, 219–238. [Google Scholar] [CrossRef]
- Zhou, H.; Wei, X. Particle swarm optimization based on a novel evaluation of diversity. Algorithms 2021, 14, 29. [Google Scholar] [CrossRef]
- Gómez-Montoya, R.A.; Cano, J.A.; Cortés, P.; Salazar, F. A discrete particle swarm optimization to solve the put-away routing problem in distribution centres. Computation 2020, 8, 99. [Google Scholar] [CrossRef]
- Mehmood, Y.; Sadiq, M.; Shahzad, W.; Amin, F. Fitness-based acceleration coefficients to enhance the convergence speed of novel binary particle swarm optimization. In Proceedings of the 2018 International Conference on Frontiers of Information Technology (FIT), Islamabad, Pakistan, 17–19 December 2018; pp. 355–360. [Google Scholar]
- Cipriani, E.; Fusco, G.; Patella, S.M.; Petrelli, M. A particle swarm optimization algorithm for the solution of the transit network design problem. Smart Cities 2020, 3, 541–555. [Google Scholar] [CrossRef]
- Kiani, A.T.; Nadeem, M.F.; Ahmed, A.; Khan, I.A.; Alkhammash, H.I.; Sajjad, I.A. An Improved Particle Swarm Optimization with Chaotic Inertia Weight and Acceleration Coefficients for Optimal Extraction of PV Models Parameters. Energies 2021, 14, 2980. [Google Scholar] [CrossRef]
S. No | Items | Profit Coefficient | Weight Coefficient |
---|---|---|---|
1 | 3i | p3i | w3i |
2 | 3i + 1 | p3i+1 | w3i+1 |
3 | 3i + 2 | p3i + p3i+1 = p3i+2 | w3i + w3i+1 = w3i+2 |
S. No | Parameters | Algorithms | |
---|---|---|---|
FACBPSO | PSO-GRDKP | ||
1 | w | 0.5 | 1 |
2 | c1 c2 | 1.5 − (1 − FR)2 0.01 × (1 − FR)3 | 2 2 |
3 | Population size | 50 | 50 |
4 | Dimensions (D) | 100 to 1000 | 100 to 1000 |
5 | Max iterations | 3*D | 3*D |
6 | Lower bound (L) Upper bound (U) | −5 5 | −5 5 |
sdkp | FACBPSO | PSO-GRDKP | NE-DKP | ||||||
---|---|---|---|---|---|---|---|---|---|
AppMean | Appstd | ExeTime | AppMean | Appstd | ExeTime | Appstd | Appstd | Exetime | |
sdkp1 | 339,017 | 2.58 | 0.003 | 351,973.4 | 25.6 | 0.137 | - | - | 0.781 |
sdkp2 | 518,158 | 1.65 | 0.010 | 545,235.5 | 4.5 | 0.504 | - | - | 2.765 |
sdkp3 | 927,217 | 3.2 | 0.026 | 985,786.0 | 101.3 | 1.112 | - | - | 6.140 |
sdkp4 | 118,481 | 3.22 | 0.045 | 124,678.6 | 206.3 | 1.941 | - | - | 10.626 |
sdkp5 | 163,909 | 2.63 | 0.077 | 1,758,543.2 | 91.0 | 3.031 | - | - | 17.016 |
sdkp6 | 167,687 | 3.85 | 0.093 | 1,795,270.6 | 78.4 | 4.416 | - | - | 23.642 |
sdkp7 | 211,077 | 2.67 | 0.129 | 2,263,803.8 | 127.0 | 5.997 | - | - | 33.001 |
sdkp8 | 209,624 | 2.10 | 0.116 | 2,236,318.8 | 150.3 | 7.863 | - | - | 42.581 |
sdkp9 | 282,149 | 2.59 | 0.202 | 3,033,813.0 | 347.3 | 9.963 | - | - | 54.174 |
sdkp10 | 2,709,746 | 3.12 | 0.277 | 2,915,883.2 | 108.4 | 12.325 | - | - | 66.706 |
wdkp | FACBPSO | PSO-GRDKP | NE-DKP | ||||||
---|---|---|---|---|---|---|---|---|---|
AppMean | Appstd | ExeTime | AppMean | Appstd | ExeTime | AppMean | Appstd | ExeTime | |
wdkp1 | 294,254 | 3.39 | 0.0032 | 310,790.2 | 18.1 | 0.137 | - | - | 0.721 |
wdkp2 | 476,538 | 2.70 | 0.0077 | 504,100.4 | 62.6 | 0.519 | - | - | 2.746 |
wdkp3 | 80,317 | 3.78 | 0.0237 | 840,573.8 | 28.4 | 1.149 | - | - | 5.891 |
wdkp4 | 969,313 | 2.36 | 0.0430 | 1,041,011.8 | 3.6 | 2.003 | - | - | 10.298 |
wdkp5 | 1,498,602 | 2.79 | 0.0715 | 1,606,332.0 | 0.0 | 3.106 | - | - | 15.797 |
wdkp6 | 1,752,400 | 2.31 | 0.0933 | 1,875,685.6 | 21.0 | 4.519 | - | - | 22.954 |
wdkp7 | 1,611,044 | 2.42 | 0.1211 | 1,726,648.2 | 11.7 | 6.134 | - | - | 30.923 |
wdkp8 | 2,412,892 | 1.68 | 0.1610 | 2,589,394.8 | 16.3 | 7.891 | - | - | 40.393 |
wdkp9 | 2,375,341 | 2.66 | 0.19551 | 2,551,918.4 | 8.5 | 10.203 | - | - | 50.252 |
wdkp10 | 2,525,263 | 2.71 | 0.25186 | 2,718,383.0 | 8.1 | 12.559 | - | - | 62.487 |
udkp | FACBPSO | PSO-GRDKP | NE-DKP | ||||||
---|---|---|---|---|---|---|---|---|---|
AppMean | Appstd | ExeTime | AppMean | Appstd | ExeTime | AppMean | Appstd | ExeTime | |
udkp1 | 249,855 | 1.88 | 0.00265 | 289,489.4 | 219.0 | 0.134 | - | - | 0.516 |
udkp2 | 449,389 | 2.01 | 0.01024 | 509,790.6 | 170.9 | 0.522 | - | - | 2.078 |
udkp3 | 686,812 | 3.48 | 0.02575 | 816,961.6 | 298.4 | 1.156 | - | - | 4.328 |
udkp4 | 929,189.2 | 2.45 | 0.0487 | 1,121,632.0 | 109.9 | 2.025 | - | - | 7.611 |
udkp5 | 1,051,734 | 2.03 | 0.0775 | 1,232,591.5 | 100.5 | 3.196 | - | - | 11.626 |
udkp6 | 1,198,582 | 1.80 | 0.0965 | 1,398,767.6 | 73.2 | 4.659 | - | - | 16.868 |
udkp7 | 1,513,478 | 2.38 | 0.1288 | 1,825,424.6 | 320.5 | 6.248 | - | - | 22.630 |
udkp8 | 1,646,012 | 2.68 | 0.1637 | 1,919,359.4 | 395.6 | 8.241 | - | - | 30.579 |
udkp9 | 2,006,496 | 2.22 | 0.2073 | 2,455,811.8 | 793.6 | 10.432 | - | - | 38.315 |
udkp10 | 2,363,387 | 2.26 | 0.3034 | 2,880,678 | 974.3 | 12.794 | - | - | 47.674 |
idkp | FACBPSO | PSO-GRDKP | NE-DKP | ||||||
---|---|---|---|---|---|---|---|---|---|
AppMean | Appstd | ExeTime | AppMean | Appstd | ExeTime | AppMean | Appstd | ExeTime | |
idkp 1 | 265,319 | 1.99 | 0.00345 | 277,633.0 | 4.2 | 0.138 | - | - | 0.696 |
idkp2 | 511,321 | 3.97 | 0.0106 | 541,683.8 | 32.9 | 0.527 | - | - | 2.753 |
idkp3 | 958,615 | 2.69 | 0.0252 | 1,016,500.4 | 22.5 | 1.137 | - | - | 6.150 |
idkp4 | 1,148,762 | 3.21 | 0.04477 | 1,220,317.0 | 10.9 | 2.046 | - | - | 11.078 |
idkp5 | 1,250,543 | 1.84 | 0.0686 | 1,342,446.6 | 4.5 | 3.184 | - | - | 16.938 |
idkp6 | 1,800,268 | 3.26 | 0.09468 | 1,922,420.4 | 17.0 | 4.534 | - | - | 23.173 |
idkp7 | 2,049,162 | 3.78 | 0.12535 | 2,190,733.2 | 18.6 | 6.128 | - | - | 32.439 |
idkp8 | 2,543,184 | 3.50 | 0.16104 | 2,719,851.4 | 22.3 | 8.200 | - | - | 42.408 |
idkp9 | 2,212,995 | 2.44 | 0.19327 | 2,377,586.6 | 35.5 | 10.28 | - | - | 53.253 |
Idk10 | 2,857,857 | 3.07 | 0.27177 | 3,123,373.2 | 27.3 | 12.53 | - | - | 64.519 |
S. No | Algorithms | Instances | |||
---|---|---|---|---|---|
SDKP | WDKP | UDKP | IDKP | ||
1 | Average of FACBPSO | 0.0978 | 0.097187 | 0.106454 | 0.099873 |
2 | Average of PSO-GRDKP | 4.7289 | 4.822 | 4.9407 | 4.8704 |
3 | Average of NE-DKP | 25.7432 | 242.462 | 18.225 | 25.3407 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Sulaiman, A.; Sadiq, M.; Mehmood, Y.; Akram, M.; Ali, G.A. Fitness-Based Acceleration Coefficients Binary Particle Swarm Optimization (FACBPSO) to Solve the Discounted Knapsack Problem. Symmetry 2022, 14, 1208. https://doi.org/10.3390/sym14061208
Sulaiman A, Sadiq M, Mehmood Y, Akram M, Ali GA. Fitness-Based Acceleration Coefficients Binary Particle Swarm Optimization (FACBPSO) to Solve the Discounted Knapsack Problem. Symmetry. 2022; 14(6):1208. https://doi.org/10.3390/sym14061208
Chicago/Turabian StyleSulaiman, Adel, Marium Sadiq, Yasir Mehmood, Muhammad Akram, and Ghassan Ahmed Ali. 2022. "Fitness-Based Acceleration Coefficients Binary Particle Swarm Optimization (FACBPSO) to Solve the Discounted Knapsack Problem" Symmetry 14, no. 6: 1208. https://doi.org/10.3390/sym14061208
APA StyleSulaiman, A., Sadiq, M., Mehmood, Y., Akram, M., & Ali, G. A. (2022). Fitness-Based Acceleration Coefficients Binary Particle Swarm Optimization (FACBPSO) to Solve the Discounted Knapsack Problem. Symmetry, 14(6), 1208. https://doi.org/10.3390/sym14061208