✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
⛄ 内容介绍
蜘蛛黄蜂优化器 (SWO) 是一种受自然启发的元启发式算法,它基于复制自然界中雌性蜘蛛黄蜂的狩猎、筑巢和交配行为。该算法具有多种独特的更新策略,使其适用于具有不同探索和开发要求的广泛优化问题。拟议的 SWO 在四个不同的基准上与九个新发布和完善的元启发式进行了比较:(1)标准基准,包括 23 个单峰和多峰测试函数;(2)CEC2017测试套件,(3)CEC2020测试套件,(4)CEC2014测试套件,验证其可靠性。此外,两个经典的工程设计问题,即焊接bean和压力容器设计,以及单二极管、双二极管的参数估计,和三二极管光伏模型用于进一步评估 SWO 在优化实际优化问题中的性能。实验结果表明,与四个经过验证的基准的最先进的元启发式方法相比,SWO 更具竞争力,并且优于所有观察到的现实世界优化问题。
⛄ 部分代码
clear all
close all
clc
N=100; % Number of search agents
Function_name='F2'; % Name of the test function, range from F1-F23
iter=200; % Maximum number of iteration times
% Load details of the selected benchmark function
[lb,ub,dim,fobj]=Get_Functions_details(Function_name);
lb=lb*ones(1,dim);
ub=ub*ones(1,dim);
[Destination_fitness,bestPositions,Convergence_curve]=SWO(N,iter,lb,ub,dim,fobj);
%Draw objective space
figure('Position',[500 500 660 290])
%Draw search space
subplot(1,2,1);
func_plot(Function_name);
title('Parameter space')
xlabel('x_1');
ylabel('x_2');
zlabel([Function_name,'( x_1 , x_2 )'])
%Draw objective space
subplot(1,2,2);
hold on
semilogy(Convergence_curve,'Color','b','LineWidth',2);
title('Convergence curve')
xlabel('Iteration');
ylabel('Best fitness obtained so far');
axis tight
grid on
box on
legend('SWO')
display(['The best location of SWO is: ', num2str(bestPositions)]);
display(['The best fitness of SWO is: ', num2str(Destination_fitness
⛄ 运行结果
⛄ 参考文献
Main paper: Abdel-Basset, M., Mohamed, R., Jameel, M., & Abouhawwash, M. (2023). Spider wasp optimizer: a novel meta-heuristic optimization algorithm. Artificial Intelligence Review.