• 大小: 19.88MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-13
  • 语言: 其他
  • 标签: ALO  

资源简介

寻优精度高,调节参数少,不受对象约束的特点

资源截图

代码片段和文件信息

%___________________________________________________________________%
%  Ant Lion Optimizer (ALO) source codes demo version 1.0           %
%                                                                   %
%  Developed in MATLAB R2011b(7.13)                                 %
%                                                                   %
%  Author and programmer: Seyedali Mirjalili                        %
%                                                                   %
%         e-Mail: ali.mirjalili@gmail.com                           %
%                 seyedali.mirjalili@griffithuni.edu.au             %
%                                                                   %
%       Homepage: http://www.alimirjalili.com                       %
%                                                                   %
%   Main paper:                                                     %
%                                                                   %
%   S. Mirjalili The Ant Lion Optimizer                            %
%   Advances in Engineering Software  in press2015                %
%   DOI: http://dx.doi.org/10.1016/j.advengsoft.2015.01.010         %
%                                                                   %
%___________________________________________________________________%

% You can simply define your cost in a seperate file and load its handle to fobj 
% The initial parameters that you need are:
%__________________________________________
% fobj = @YourCostFunction
% dim = number of your variables
% Max_iteration = maximum number of generations
% SearchAgents_no = number of search agents
% lb=[lb1lb2...lbn] where lbn is the lower bound of variable n
% ub=[ub1ub2...ubn] where ubn is the upper bound of variable n
% If all the variables have equal lower bound you can just
% define lb and ub as two single number numbers

% To run ALO: [Best_scoreBest_poscg_curve]=ALO(SearchAgents_noMax_iterationlbubdimfobj)

function [Elite_antlion_fitnessElite_antlion_positionConvergence_curve]=ALO(NMax_iterlbubdimfobj)

% Initialize the positions of antlions and ants
antlion_position=initialization(Ndimublb);
ant_position=initialization(Ndimublb);

% Initialize variables to save the position of elite sorted antlions 
% convergence curve antlions fitness and ants fitness
Sorted_antlions=zeros(Ndim);
Elite_antlion_position=zeros(1dim);
Elite_antlion_fitness=inf;
Convergence_curve=zeros(1Max_iter);
antlions_fitness=zeros(1N);
ants_fitness=zeros(1N);

% Calculate the fitness of initial antlions and sort them
for i=1:size(antlion_position1)
    antlions_fitness(1i)=fobj(antlion_position(i:)); 
end

[sorted_antlion_fitnesssorted_indexes]=sort(antlions_fitness);
    
for newindex=1:N
     Sorted_antlions(newindex:)=antlion_position(sorted_indexes(newindex):);
end
    
Elite_antlion_position=Sorted_antlions(1:);
Elite_antlion_fitness=

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-03-04 07:07  ALO\
     文件        5844  2015-02-20 12:06  ALO\ALO.m
     文件      150992  2015-03-04 06:56  ALO\ALO.png
     文件        3597  2015-02-20 13:21  ALO\func_plot.m
     文件        7708  2015-02-20 12:07  ALO\Get_Functions_details.m
     文件        1881  2015-02-20 13:17  ALO\initialization.m
     文件        1318  2014-11-12 16:07  ALO\license.txt
     文件        3105  2015-02-20 12:52  ALO\main.m
     文件        2932  2015-02-20 17:11  ALO\Random_walk_around_antlion.m
     文件        2199  2015-02-20 13:21  ALO\RouletteWheelSelection.m
     文件     2967555  2015-11-11 06:57  ALO.pdf
     文件     3779487  2015-05-29 20:31  DA.pdf
     文件     4355134  2015-03-21 23:17  GWO.pdf
     文件     3247436  2015-10-19 12:08  MFO.pdf
     文件     1702717  2016-07-31 22:56  MOALO.pdf
     文件     1077008  2016-01-10 18:42  MOGWO.pdf
     文件     1726085  2015-11-11 06:56  MVO.pdf
     文件     3333680  2016-02-03 19:12  SCA.pdf
     文件     1841081  2016-02-27 17:00  WOA.pdf

评论

共有 条评论