蚁狮优化算法解决多目标优化问题MOALO

Posted 这是一个很随便的名字

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了蚁狮优化算法解决多目标优化问题MOALO相关的知识,希望对你有一定的参考价值。

[Matlab源码]

蚂蚁狮子优化器(ALO)模仿自然界中蚂蚁的狩猎机制。实现了蚂蚁随机游走、建立陷阱、诱捕陷阱中的蚂蚁、捕捉猎物和重建陷阱等五个主要捕猎步骤。

使用 ALO 解决多目标问题,多目标蚂蚁狮子优化器(MOALO)

代码:


clc;
clear;
close all;

% Change these details with respect to your problem%%%%%%%%%%%%%%
ObjectiveFunction=@ZDT1;
dim=5;
lb=0;
ub=1;
obj_no=2;

if size(ub,2)==1
    ub=ones(1,dim)*ub;
    lb=ones(1,dim)*lb;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Initial parameters of the MODA algorithm
max_iter=100;
N=100;
ArchiveMaxSize=100;

Archive_X=zeros(100,dim);
Archive_F=ones(100,obj_no)*inf;

Archive_member_no=0;

r=(ub-lb)/2;
V_max=(ub(1)-lb(1))/10;

Elite_fitness=inf*ones(1,obj_no);
Elite_position=zeros(dim,1);

Ant_Position=initialization(N,dim,ub,lb);
fitness=zeros(N,2);

V=initialization(N,dim,ub,lb);
iter=0;

position_history=zeros(N,max_iter,dim);

for iter=1:max_iter
    
    for i=1:N %Calculate all the objective values first
        Particles_F(i,:)=ObjectiveFunction(Ant_Position(:,i)');
        if dominates(Particles_F(i,:),Elite_fitness)
            Elite_fitness=Particles_F(i,:);
            Elite_position=Ant_Position(:,i);
        end
    end
    
    [Archive_X, Archive_F, Archive_member_no]=UpdateArchive(Archive_X, Archive_F, Ant_Position, Particles_F, Archive_member_no);
    
    if Archive_member_no>ArchiveMaxSize
        Archive_mem_ranks=RankingProcess(Archive_F, ArchiveMaxSize, obj_no);
        [Archive_X, Archive_F, Archive_mem_ranks, Archive_member_no]=HandleFullArchive(Archive_X, Archive_F, Archive_member_no, Archive_mem_ranks, ArchiveMaxSize);
    else
        Archive_mem_ranks=RankingProcess(Archive_F, ArchiveMaxSize, obj_no);
    end
    
    Archive_mem_ranks=RankingProcess(Archive_F, ArchiveMaxSize, obj_no);
    
    % Chose the archive member in the least population area as arrtactor
    % to improve coverage
    index=RouletteWheelSelection(1./Archive_mem_ranks);
    if index==-1
        index=1;
    end
    Elite_fitness=Archive_F(index,:);
    Elite_position=Archive_X(index,:)';
    
    Random_antlion_fitness=Archive_F(1,:);
    Random_antlion_position=Archive_X(1,:)';
    
    for i=1:N
        
        index=0;
        neighbours_no=0;
        
        RA=Random_walk_around_antlion(dim,max_iter,lb,ub, Random_antlion_position',iter);
        
        [RE]=Random_walk_around_antlion(dim,max_iter,lb,ub, Elite_position',iter);
        

运行结果:

 

 获取完整代码:https://ai.52learn.online/code/18

以上是关于蚁狮优化算法解决多目标优化问题MOALO的主要内容,如果未能解决你的问题,请参考以下文章

优化算法多目标蚁狮优化算法(MOALO)含Matlab源码 1598期

WSN布局优化基本蚁狮算法实现WSN节点优化部署matlab代码

Matlab智能优化算法_蚁狮优化算法ALO

基本蚁狮算法实现WSN节点优化部署matlab代码

优化算法蚁狮优化算法(ALO)含Matlab源码 1307期

优化求解基于优选策略的自适应蚁狮优化算法matlab源码