Bootstrap

改进的灰狼优化算法(GWO)(附完整matlab代码)

1.灰狼优化算法

灰狼优化算法作为一种高效率群体智能优化算法,其结构简单,收敛速度快,调节参数少,在时间序列预测,机械设计,结构设计,聚类分析等工程问题上都有着十分广泛的应用。但是在应用过程中发现,其存在种群多样性差,后期收敛速度缓慢,容易陷入局部最优以及局部搜索和全局搜索不均衡等问题,本代码基于反三角函数建立数学模型实现收敛目的,最后采取全新的位置更新方式更新下一代位置,提高搜索遍历性。

2.实验结果

3部分代码:

clear all 
clc

SearchAgents_no=30; % Number of search agents

Function_name='F1'; % Name of the test function that can be from F1 to F23 (Table 1,2,3 in the paper)

Max_iteration=500; % Maximum numbef of iterations

% Load details of the selected benchmark function
[lb,ub,dim,fobj]=Get_Functions_details(Function_name);

[Best_score,Best_pos,GWO_cg_curve]=GWO(SearchAgents_no,Max_iteration,lb,ub,dim,fobj);
[IBest_score,IBest_pos,IGWO_cg_curve]=IGWO(SearchAgents_no,Max_iteration,lb,ub,dim,fobj);
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);
semilogy(GWO_cg_curve,'Color','r')
hold on
semilogy(IGWO_cg_curve,'Color','C')
hold on
title('Objective space')
xlabel('Iteration');
ylabel('Best score obtained so far');
axis tight
grid on
box on
legend('GWO','IGWO')
set(gca,'Fontsize',12)
display(['The best solution obtained by GWO is : ', num2str(IBest_pos)]);
display(['The best optimal value of the objective funciton found by GWO is : ', num2str(IBest_score)]);


改进的灰狼优化算法(matlab完整源码)
1.MatlabR2018b及以上版本一键运行;
2.具有良好的编程习惯,程序均包含简要注释。
3.完整源码获取:https://mbd.pub/o/bread/ZpickpZw

悦读

道可道,非常道;名可名,非常名。 无名,天地之始,有名,万物之母。 故常无欲,以观其妙,常有欲,以观其徼。 此两者,同出而异名,同谓之玄,玄之又玄,众妙之门。

;