一、获取代码方式
获取代码方式1:
完整代码已上传我的资源:【优化算法】人工大猩猩部队优化算法(GTO)【含Matlab源码 1798期】
二、部分源代码
clear all
close all
clc
% Population size and stoppoing condition
pop_size=30;
max_iter=100;
% Define your objective function's details here
fobj = @ObjectiveFunction;
variables_no=10;
lower_bound=-100; % can be a vector too
upper_bound=100; % can be a vector too
[Silverback_Score,Silverback,convergence_curve]=GTO(pop_size,max_iter,lower_bound,upper_bound,variables_no,fobj);
figure
% Best optimal values for the decision variables
subplot(1,2,1)
parallelcoords(Silverback)
xlabel('Decision variables')
ylabel('Best estimated values ')
box on
% Best convergence curve
subplot(1,2,2)
plot(convergence_curve);
title('Convergence curve of GTO')
xlabel('Current_iteration');
ylabel('Objective value');
box on
三、运行结果
四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1] 包子阳,余继周,杨杉.智能优化算法及其MATLAB实例(第2版)[M].电子工业出版社,2016.
[2]张岩,吴水根.MATLAB优化算法源代码[M].清华大学出版社,2017.