|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
! h F8 _: u* H4 p2 [9 i$ l( n
一、源代码
, C# M+ U8 ~, N: u, f
% d# h( X7 l' G- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
- % 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)
" S) C* x, K; b! s. ?2 L. } s
* K% _: E8 w( U6 p! ^/ D* H
1 a# M$ I2 ^: q
: O& f6 i ?8 L9 o7 ~8 @0 l- x二、运行结果/ ^& k6 P; r. I+ @7 I! b# m; R
2 F- W! L( [; ^" ^# {- y0 Q e, T& h
|
|