二、部分源代码
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Golden Eagle Optimizer (GEO) source codes version 1.0
%
% To use this code in your own project
% remove the line for 'GetFunctionDetails' function
% and define the following parameters:
% fun : function handle to the .m file containing the objective function
% the .m file you define should accept the whole population 'x'
% as input and return a column vector containing objective function
% values of all of the population members
% nvars : number of decision/design variables
% lb : lower bound of decision variables (must be of size 1 x nvars)
% ub : upper bound of decision variables (must be of size 1 x nvars)
%
% GEO will return the following:
% x : best solution found
% fval : objective function value of the found solution
%
%% Inputs
FunctionNumber = 1; % 1-23
options.PopulationSize = 50;
options.MaxIterations = 1000;
%% Run Multi-Objective Golden Eagle Optimizer
[fun,nvars,lb,ub] = GetFunctionDetails (FunctionNumber);
options.AttackPropensity = [0.5 , 2];
options.CruisePropensity = [1 , 0.5];
[x,fval,ConvergenceCurve] = GEO (fun,nvars,lb,ub, options);
%% Plot results
PlotResults (fun,lb,ub, FunctionNumber,ConvergenceCurve)
三、运行结果
四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1] 包子阳,余继周,杨杉.智能优化算法及其MATLAB实例(第2版)[M].电子工业出版社,2016.
[2]张岩,吴水根.MATLAB优化算法源代码[M].清华大学出版社,2017.