Improved mayfly optimization algorithm based on anti-attraction velocity update mechanism
-
摘要:
针对蜉蝣算法(MA)前期收敛速度较慢、后期寻优精度不高等问题,提出一种基于反吸引速度更新机制的改进蜉蝣算法(MMOA)。采用改进型Tent混沌序列初始化蜉蝣种群,使蜉蝣分布更加均匀,提升了种群的多样性;结合MA的特点,引入反吸引速度更新机制指导蜉蝣速度更新,平衡算法的全局搜索和局部寻优能力,进而提升算法的收敛性能;对全局最优蜉蝣进行逐维的重心反向学习变异,降低各维度间的干扰,帮助算法跳出局部最优并加速收敛。基于12个标准测试函数和部分CEC2017测试函数进行对比仿真实验,结果表明:MMOA较灰狼优化(GWO)算法、MA等算法在收敛速度、寻优精度和稳定性等方面都具有明显优势。
Abstract:To address the problem that the mayfly optimization algorithm (MA) has a slow convergence speed in the early stage and not high accuracy in the later stage of the search, a modified mayfly optimization algorithm (MMOA) based on the anti-attraction speed update mechanism is proposed. Firstly, an improved Tent chaotic sequence is used to initialize the mayfly population, which makes the mayfly distribution more uniform and improves the diversity of the population. Secondly, in order to enhance the algorithm’s convergence performance, an anti-attraction speed update mechanism is presented to direct the mayfly speed update depending on the properties of the MA. Finally, the dimension-by-dimension centroid opposition-based learning strategy is performed on the global best mayfly, which reduces the interference between dimensions, helps the algorithm jump out of the local optimum and accelerates the convergence. Based on a comparison of simulation experiments using 12 conventional test functions and a few CEC2017 test functions, the findings indicate that MMOA clearly outperforms algorithms such as grey wolf optimizer (GWO) and MA in terms of convergence speed, stability, and optimization accuracy.
-
表 1 寻优结果对比
Table 1. Comparison of optimization results
函数 固定寻优值 迭代次数 MA OMA Sphere 1.00×10−5 428 37 Schwefel’s 1.2 25 550 26 Rosenbrock’s 10 586 17 Quartic 1.00×10−10 430 32 Ackely’s 5 459 11 Penalized1 1.00×10−15 833 66 表 2 标准测试函数
Table 2. Standard test functions
类型 函数 函数名称 取值范围 最优解 单峰函数 f1 Sphere [−100,100] 0 f2 Schwefel’s 2.22 [−10,10] 0 f3 Schwefel’s 1.2 [−100,100] 0 f4 Schwefel’s 2.21 [−100,100] 0 f5 Rosenbrock’s [−30,30] 0 f6 Step [−100,100] 0 f7 Quartic [−1.28,1.28] 0 多峰函数 f8 Rastrigin’s [−5.12,5.12] 0 f9 Ackely’s [−32,32] 0 f10 Griewank’s [−600,600] 0 f11 Penalized1 [−50,50] 0 f12 Penalized2 [−50,50] 0 表 3 部分CEC2017测试函数
Table 3. Some CEC2017 test functions
函数 特征 取值范围 最优解 CEC03 UN [−100,100] 300 CEC06 MN [−100,100] 600 CEC09 MN [−100,100] 900 CEC12 HF [−100,100] 1200 CEC15 HF [−100,100] 1500 CEC18 HF [−100,100] 1800 CEC21 CF [−100,100] 2100 CEC24 CF [−100,100] 2400 CEC27 CF [−100,100] 2700 注:UN表示单峰函数,MN表示简单多峰函数,HF表示混合函数,CF表示组合函数。 表 4 不同策略寻优结果
Table 4. Optimal results of different strategies
函数 算法 平均值 标准差 d=10 d=50 d=100 d=10 d=50 d=100 f1 MA 5.53×10−36 2.78×10−2 1.38×102 9.57×10−36 5.17×10−2 1.53×102 TMA 8.42×10−38 3.96×10−5 7.87×101 1.52×10−37 1.96×10−4 8.57×101 VMA 4.38×10−13 2.76×10−2 1.93×101 4.77×10−13 4.57×10−2 7.57×101 OMA 2.30×10−120 8.09×10−96 7.93×10−95 3.55×10−120 1.41×10−95 1.08×10−94 MMOA 0 0 0 0 0 0 f4 MA 3.50×10−4 1.79×101 2.98×101 5.91×10−4 4.75×101 3.96×101 TMA 1.22×10−4 1.85 3.19 1.39×10−4 4.55 5.07 VMA 4.97×10−1 2.69×101 3.65×101 1.06 3.95×101 4.29×101 OMA 4.15×10−49 5.06×10−48 9.41×10−48 2.19×10−48 2.39×10−48 3.45×10−48 MMOA 7.02×10−300 1.14×10−284 8.99×10−288 0 3.25×10−284 9.35×10−288 f8 MA 3.16 6.32×101 1.54×102 4.83 8.83 3.71×101 TMA 1.06 3.28×101 1.39×102 2.52 4.13 2.75×101 VMA 1.46 4.54×101 1.28×102 1.67 5.82 2.11×101 OMA 0 0 0 0 0 0 MMOA 0 0 0 0 0 0 f12 MA 1.10×10−3 4.26×10−2 1.68 3.41×10−3 1.05×10−1 2.95 TMA 3.66×10−4 1.42×10−2 1.31 2.01×10−3 7.63×10−2 1.86 VMA 1.51×10−3 8.80×10−3 3.91×10−1 3.80×10−3 2.21×10−2 2.57×10−1 OMA 1.35×10−32 1.35×10−32 1.35×10−32 5.57×10−48 5.57×10−48 5.57×10−48 MMOA 1.35×10−32 1.35×10−32 1.35×10−32 5.57×10−48 5.57×10−48 5.57×10−48 CEC03 MA 3.00×102 3.01×105 7.46×105 8.54×10−12 9.68×104 1.66×105 TMA 3.00×102 2.75×105 6.71×105 7.54×10−14 9.21×104 1.68×105 VMA 3.00×102 7.68×104 3.90×105 6.68×10−14 4.42×104 1.33×105 OMA 3.00×102 2.53×105 5.09×105 7.01×10−14 7.95×104 1.76×105 MMOA 3.00×102 5.57×104 2.56×105 3.50×10−14 2.27×104 4.95×104 CEC09 MA 1.01×103 1.17×104 2.41×104 1.24×102 2.09×103 2.96×103 TMA 9.84×102 1.10×104 2.29×104 6.76×101 1.59×103 2.23×103 VMA 9.53×102 1.12×104 2.31×104 5.49×101 2.14×103 2.47×103 OMA 9.42×102 1.07×104 2.03×104 4.31×101 1.51×103 1.71×103 MMOA 9.05×102 9.57×103 1.79×104 3.25×101 7.41×102 1.42×103 CEC15 MA 1.84×103 8.33×103 1.03×104 1.56×103 3.05×103 7.19×103 TMA 1.72×103 6.94×103 9.53×103 4.57×102 2.61×103 6.59×103 VMA 1.66×103 5.83×103 8.82×103 3.64×102 3.88×103 6.24×103 OMA 1.56×103 5.77×103 8.21×103 1.17×102 3.45×103 6.43×103 MMOA 1.52×103 5.38×103 8.05×103 3.11×101 1.89×103 5.66×103 表 5 标准测试函数下寻优结果
Table 5. Optimal results under standard test functions
函数 算法 最优值 平均值 标准差 函数 算法 最优值 平均值 标准差 f1 GWO 3.23×10−35 3.17×10−33 3.42×10−33 f7 GWO 1.48×10−62 8.37×10−60 4.30×10−59 PSO 5.17×103 1.26×104 4.26×103 PSO 1.49×101 1.48×101 7.25 SOA 6.31×10−15 3.63×10−13 8.53×10−13 SOA 1.94×10−27 4.85×10−28 8.91×10−28 HHO 2.86×10−112 2.92×10−98 1.57×10−97 HHO 5.38×10−209 6.22×10−198 6.58×10−198 MA 8.99×10−7 2.49×10−5 3.68×10−5 MA 5.18×10−10 1.44×10−10 3.39×10−10 MMOA 0 0 0 MMOA 0 0 0 f2 GWO 9.88×10−21 8.08×10−20 6.12×10−20 f8 GWO 7.42 2.26 3.40 PSO 4.83×101 1.67×103 4.27×103 PSO 3.35×102 3.12×102 2.83×101 SOA 3.74×10−10 4.52×10−9 5.85×10−9 SOA 2.10×10−12 1.78 7.02 HHO 1.89×10−54 2.84×10−53 1.09×10−52 HHO 0 0 0 MA 4.55×10−5 7.90×10−3 2.03×10−2 MA 2.59×101 2.70×101 9.02 MMOA 0 3.39×10−306 7.32×10−306 MMOA 0 0 0 f3 GWO 8.52×10−12 1.92×10−8 4.43×10−8 f9 GWO 6.13×10−14 4.35×10−14 5.75×10−15 PSO 2.70×104 4.40×104 8.20×103 PSO 1.89×101 1.62×101 1.45 SOA 1.08×10−8 2.31×10−6 3.82×10−6 SOA 1.99×101 1.99×101 1.70×10−3 HHO 1.31×10−86 5.35×10−85 2.89×10−84 HHO 4.44×10−15 7.64×10−15 1.08×10−15 MA 8.79×10−1 1.74×101 2.28×101 MA 6.23 4.93 1.22 MMOA 0 0 0 MMOA 8.88×10−16 8.88×10−16 0 f4 GWO 2.58×10−8 2.32×10−8 1.82×10−8 f10 GWO 0 3.20×10−3 6.80×10−3 PSO 5.77×101 5.86×101 5.02 PSO 1.44×102 1.09×102 3.31×101 SOA 1.01×10−4 3.24×10−4 3.37×10−4 SOA 1.01×10−12 1.78×10−2 2.71×10−2 HHO 2.85×10−53 2.73×10−51 1.25×10−50 HHO 0 0 0 MA 5.28 6.76 3.15 MA 5.60×10−2 4.44×10−1 6.66×10−1 MMOA 2.85×10−305 3.02×10−297 8.52×10−297 MMOA 0 0 0 f5 GWO 1.71×10−14 6.83×10−2 3.35×10−1 f11 GWO 2.014×10−32 1.87×10−32 1.36×10−33 PSO 9.32×103 1.95×104 1.04×104 PSO 5.79 7.29 1.83 SOA 1.54×10−12 7.53×10−11 1.87×10−10 SOA 4.75×10−17 1.15×10−16 2.69×10−16 HHO 0 0 0 HHO 1.57×10−32 1.57×10−32 5.57×10−48 MA 7.53×101 4.89×101 3.51×101 MA 4.49×10−8 3.46×10−2 7.38×10−2 MMOA 0 0 0 MMOA 1.57×10−32 1.57×10−32 5.57×10−48 f6 GWO 2.87×10−31 2.76×10−31 8.11×10−32 f12 GWO 4.06×10−32 9.39×10−32 1.40×10−31 PSO 1.28×104 1.26×104 4.26×103 PSO 5.79 6.75 2.16 SOA 2.00×10−13 3.63×10−13 8.53×10−13 SOA 4.26×10−17 1.96×10−16 2.55×10−16 HHO 0 0 0 HHO 1.35×10−32 1.35×10−32 5.57×10−48 MA 1.14×10−5 2.49×10−5 3.68×10−5 MA 9.58×10−8 5.50×10−3 9.40×10−3 MMOA 0 0 0 MMOA 1.35×10−32 1.35×10−32 5.57×10−48 表 6 Wilcoxon秩和检验$p$值
Table 6. Wilcoxon rank sum test $p$-value
函数 MMOA & GWO MMOA & PSO MMOA & SOA MMOA & HHO MMOA & MA f1 1.21×10−12 1.21×10−12 1.21×10−12 1.21×10−12 1.21×10−12 f2 2.86×10−11 2.86×10−11 2.86×10−11 2.63×10−11 2.86×10−11 f3 1.21×10−12 1.21×10−12 1.21×10−12 1.21×10−12 1.21×10−12 f4 3.02×10−11 3.02×10−11 3.02×10−11 3.02×10−11 3.02×10−11 f5 1.21×10−12 1.21×10−12 1.21×10−12 N/A 1.21×10−12 f6 1.20×10−12 1.21×10−12 1.21×10−12 N/A 1.21×10−12 f7 1.21×10−12 1.21×10−12 1.21×10−12 1.21×10−12 1.21×10−12 f8 4.87×10−11 1.21×10−12 1.21×10−12 N/A 1.21×10−12 f9 8.77×10−13 1.21×10−12 1.21×10−12 6.12×10−14 1.21×10−12 f10 1.10×10−2 1.21×10−12 1.21×10−12 N/A 1.21×10−12 f11 1.20×10−12 1.21×10−12 1.21×10−12 N/A 1.21×10−12 f12 1.20×10−12 1.21×10−12 1.21×10−12 N/A 1.21×10−12 注:N/A表示两者之间无法比较,性能相当。 表 7 MIWMA和MMOA性能对比
Table 7. Performance comparison of MIWMA and MMOA algorithms
函
数最优值 平均值 标准差 MIWMA MMOA MIWMA MMOA MIWMA MMOA f1 3.81×10−143 0 1.40×10−135 0 6.50×10−134 0 f2 3.42×10−69 9.06×10−253 2.05×10−60 9.55×10−242 9.61×10−60 2.26×10−241 f3 3.15×10−135 0 2.55×10−113 0 1.70×10−112 0 f4 5.55×10−70 3.16×10−240 1.88×10−60 3.34×10−234 1.17×10−59 7.28×10−234 f7 4.17×10−7 0 5.62×10−5 0 4.08×10−5 0 f8 0 0 0 0 0 0 f9 8.88×10−16 8.88×10−16 8.88×10−16 8.88×10−16 0 0 f10 0 0 0 0 0 0 f11 5.45×10−14 1.57×10−32 6.43×10−13 1.57×10−32 6.72×10−13 5.53×10−48 表 8 CEC2017测试函数下寻优结果
Table 8. Optimal results under CEC2017 test functions
函数 算法 平均值 标准差 CEC03 AFSMA 4.80×104 1.44×104 EGSWA 8.39×104 6.63×103 IGWO 1.84×104 3.46×103 HHO 5.59×104 8.15×103 MA 1.35×105 6.39×104 MMOA 1.09×104 3.41×103 CEC06 AFSMA 6.24×102 1.02×101 EGSWA 6.83×102 1.21×101 IGWO 7.02×102 1.11×102 HHO 6.69×102 9.50 MA 6.67×102 7.48 MMOA 6.19×102 5.84 CEC09 AFSMA 5.05×103 1.56×103 EGSWA 1.08×104 1.32×103 IGWO 1.14×103 3.32×103 HHO 8.78×103 1.37×103 MA 6.03×103 1.25×103 MMOA 4.10×103 4.99×102 CEC12 AFSMA 3.37×106 3.13×106 EGSWA 2.02×109 8.57×108 IGWO 4.86×106 4.14×106 HHO 1.09×108 1.37×108 MA 1.43×107 1.55×107 MMOA 1.85×106 1.57×106 CEC15 AFSMA 1.33×104 1.33×104 EGSWA 7.88×107 8.33×107 IGWO 6.04×104 4.06×104 HHO 1.17×105 6.78×104 MA 2.23×104 1.82×104 MMOA 2.29×103 4.75×103 CEC18 AFSMA 2.45×106 2.72×106 EGSWA 1.84×107 1.82×107 IGWO 4.56×105 2.91×105 HHO 4.49×106 8.33×106 MA 2.02×105 1.96×105 MMOA 1.58×105 1.52×105 CEC21 AFSMA 2.45×103 3.67×101 EGSWA 2.67×103 5.12×101 IGWO 3.21×103 1.31×102 HHO 2.73×103 9.21×101 MA 2.58×103 5.01×101 MMOA 2.43×103 3.59×101 CEC24 AFSMA 2.98×103 4.81×101 EGSWA 3.44×103 1.16×102 IGWO 2.74×103 6.83×102 HHO 3.54×103 1.69×102 MA 3.73×103 1.75×102 MMOA 3.27×103 1.40×102 CEC27 AFSMA 3.25×103 2.09×101 EGSWA 3.20×103 1.80×10−9 IGWO 3.21×103 7.02×102 HHO 3.58×103 2.12×102 MA 4.55×103 7.31×102 MMOA 3.32×103 1.93×102 -
[1] MIRJALILI S, MIRJALILI S M, LEWIS A. Grey wolf optimizer[J]. Advances in Engineering Software, 2014, 69: 46-61. [2] MIRJALILI S, GANDOMI A H, MIRJALILI S Z, et al. Salp swarm algorithm[J]. Advances in Engineering Software, 2017, 114: 163-191. doi: 10.1016/j.advengsoft.2017.07.002 [3] ARORA S, SINGH S. Butterfly optimization algorithm: A novel approach for global optimization[J]. Soft Computing, 2019, 23(3): 715-734. doi: 10.1007/s00500-018-3102-4 [4] DHIMAN G, KUMAR V. Seagull optimization algorithm: Theory and its applications for large-scale industrial engineering problems[J]. Knowledge-Based Systems, 2019, 165: 169-196. doi: 10.1016/j.knosys.2018.11.024 [5] FARAMARZI A, HEIDARINEJAD M, STEPHENS B, et al. Equilibrium optimizer: A novel optimization algorithm[J]. Knowledge-Based Systems, 2020, 191: 105190. doi: 10.1016/j.knosys.2019.105190 [6] ZERVOUDAKIS K, TSAFARAKIS S. A mayfly optimization algorithm[J]. Computers & Industrial Engineering, 2020, 145: 106559. [7] 王尔申, 贾超颖, 曲萍萍, 等. 基于混沌粒子群优化的北斗/GPS组合导航选星算法[J]. 北京航空航天大学学报, 2019, 45(2): 259-265.WANG E S, JIA C Y, QU P P, et al. BDS /GPS integrated navigation satellite selection algorithm based on chaos particle swarm optimization[J]. Journal of Beijing University of Aeronautics and Astronautics, 2019, 45(2): 259-265(in Chinese). [8] 王志华, 王浩帆, 程漫漫. 基于启发式遗传算法的模糊测试样本集优化方案[J]. 北京航空航天大学学报, 2022, 48(2): 217-224.WANG Z H, WANG H F, CHENG M M. Fuzzing testing sample set optimization scheme based on heuristic genetic algorithm[J]. Journal of Beijing University of Aeronautics and Astronautics, 2022, 48(2): 217-224(in Chinese). [9] 刘景森, 毛艺楠, 李煜. 具有振荡约束的自然选择萤火虫优化算法[J]. 控制与决策, 2020, 35(10): 2363-2371.LIU J S, MAO Y N, LI Y. Natural selection firefly optimization algorithm with oscillation and constraint[J]. Control and Decision, 2020, 35(10): 2363-2371(in Chinese). [10] ABD ELAZIZ M, SENTHILRAJA S, ZAYED M E, et al. A new random vector functional link integrated with mayfly optimization algorithm for performance prediction of solar photovoltaic thermal collector combined with electrolytic hydrogen production system[J]. Applied Thermal Engineering, 2021, 193: 117055. [11] HU A H, DENG Z L, YANG H, et al. An optimal geometry configuration algorithm of hybrid semi-passive location system based on mayfly optimization algorithm[J]. Sensors, 2021, 21(22): 7484. doi: 10.3390/s21227484 [12] SHAHEEN M A M, HASANIEN H M, EL MOURSI M S, et al. Precise modeling of PEM fuel cell using improved chaotic mayfly optimization algorithm[J]. International Journal of Energy Research, 2021, 45(13): 18754-18769. [13] LIU Y H, CHAI Y, LIU B W, et al. Bearing fault diagnosis based on energy spectrum statistics and modified mayfly optimization algorithm[J]. Sensors, 2021, 21(6): 2245. doi: 10.3390/s21062245 [14] 李浩, 杨海潇, 张兰, 等. 改进离散蜉蝣算法的多目标动态网络社区发现[J]. 计算机科学与探索, 2023, 17(4): 942-952.LI H, YANG H X, ZHAMG L, et al. Improved discrete mayfly algorithm for multi-objective dynamic network community detection[J]. Journal of Frontiers of Computer Science and Technology, 2023, 17(4): 942-952(in Chinese). [15] 邵瑞凝, 杨博, 束洪春, 等. 基于改进蜉蝣算法的光伏阵列最优重构方法[J]. 电力系统自动化, 2022, 46(11): 142-150.SHAO R N, YANG B, SHU H C, et al. Improved mayfly algorithm for optimal PV array reconfiguration[J]. Automation of Electric Power Systems, 2022, 46(11): 142-150(in Chinese). [16] 张娜, 赵泽丹, 包晓安, 等. 基于改进的Tent混沌万有力搜索算法[J]. 控制与决策, 2020, 35(4): 893-900.ZHANG N, ZHAO Z D, BAO X A, et al. Gravitational search algorithm based on improved Tent chaos[J]. Control and Decision, 2020, 35(4): 893-900(in Chinese). [17] 罗强, 季伟东, 徐浩天, 等. 一种最优粒子逐维变异的粒子群优化算法[J]. 小型微型计算机系统, 2020, 41(2): 259-263.LUO Q, JI W D, XU H T, et al. Particle swarm optimization with global best particle dimension-by-dimension mutation[J]. Journal of Chinese Computer Systems, 2020, 41(2): 259-263(in Chinese). [18] 王义, 张达敏, 邹诚诚. 增强全局搜索和自适应蜉蝣算法[J]. 哈尔滨工业大学学报, 2022, 54(11): 137-150.WANG Y, ZHANG D M, ZOU C C. Enhance global search and adaptive mayfly algorithm[J]. Journal of Harbin Institute of Technology, 2022, 54(11): 137-150(in Chinese). [19] ABDEL-BASSET M, MOHAMED R, CHAKRABORTTY R K, et al. An efficient binary slime mould algorithm integrated with a novel attacking-feeding strategy for feature selection[J]. Computers & Industrial Engineering, 2021, 153(11): 107078. [20] 肖子雅, 刘升. 精英反向黄金正弦鲸鱼算法及其工程优化研究[J]. 电子学报, 2019, 47(10): 2177-2186. doi: 10.3969/j.issn.0372-2112.2019.10.020XIAO Z Y, LIU S. Study on elite opposition-based golden-sine whale optimization algorithm and its application of project optimization[J]. Acta Electronica Sinica, 2019, 47(10): 2177-2186(in Chinese). doi: 10.3969/j.issn.0372-2112.2019.10.020 [21] NADIMI-SHAHRAKI M H, TAGHIAN S, MIRJALILI S. An improved grey wolf optimizer for solving engineering problems[J]. Expert Systems with Applications, 2021, 166: 113917. doi: 10.1016/j.eswa.2020.113917