✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
⛄ 内容介绍
本文提出了一种新的基于种群的优化方法,称为 Aquila Optimizer (AO),它是灵感来自天鹰座在捕捉猎物过程中的自然行为。因此,优化所提出的AO算法的程序用四种方法表示;按高选择搜索空间垂直俯冲翱翔,通过短滑翔攻击的轮廓飞行在发散的搜索空间内探索,通过低速飞行和慢速下降攻击在收敛搜索空间内利用,并通过步行和俯冲抓住猎物。
⛄ 部分代码
close all;
clear ;
clc;
%%
% TestProblem测试问题说明:
%一共46个多目标测试函数,详情如下:
%1-5:ZDT1、ZDT2、ZDT3、ZDT4、ZDT6
%6-12:DTLZ1-DTLZ7
%13-22:wfg1-wfg10
%23-32:uf1-uf10
%33-42:cf1-cf10
%43-46:Kursawe、Poloni、Viennet2、Viennet3
%%
TestProblem=3;%1-46
MultiObj = GetFunInfo(TestProblem);
MultiObjFnc=MultiObj.name;%问题名
% Parameters
params.Np = 200; % Population size
params.Nr = 200; % Repository size
params.maxgen =300; % Maximum number of generations
params.ngrid = 30; % Number of grids in each dimension
params.maxvel = 5; % Maxmium vel in percentage
% MOAO
REP = MOAO(params,MultiObj);
%% 画结果图
figure(2)
if(size(REP.pos_fit,2)==2)
h_rep = plot(REP.pos_fit(:,1),REP.pos_fit(:,2),'or'); hold on;
if(isfield(MultiObj,'truePF'))
h_pf = plot(MultiObj.truePF(:,1),MultiObj.truePF(:,2),'.k'); hold on;
legend('MOAO','RealPareto');
else
legend('MOAO');
end
grid on; xlabel('f1'); ylabel('f2');
end
if(size(REP.pos_fit,2)==3)
h_rep = plot3(REP.pos_fit(:,1),REP.pos_fit(:,2),REP.pos_fit(:,3),'or'); hold on;
if(isfield(MultiObj,'truePF'))
h_pf = plot3(MultiObj.truePF(:,1),MultiObj.truePF(:,2),MultiObj.truePF(:,3),'.k'); hold on;
legend('MOAO','RealPareto');
else
legend('MOAO');
end
grid on; xlabel('f1'); ylabel('f2'); zlabel('f3');
end
title(MultiObjFnc)
%%
% Display info
disp('Repository fitness values are stored in REP.pos_fit');
disp('Repository particles positions are store in REP.pos');
%% Metric Value
M_IGD=IGD(REP.pos_fit,MultiObj.truePF);
M_GD=GD(REP.pos_fit,MultiObj.truePF);
M_HV=HV(REP.pos_fit,MultiObj.truePF);
M_Spacing=Spacing(REP.pos_fit,MultiObj.truePF);
M_Spread=Spread(REP.pos_fit,MultiObj.truePF);
M_DeltaP=DeltaP(REP.pos_fit,MultiObj.truePF);
display(['The IGD Metric obtained by MOAO is : ', num2str(M_IGD)]);
display(['The GD Metric obtained by MOAO is : ', num2str(M_GD)]);
display(['The HV Metric obtained by MOAO is : ', num2str(M_HV)]);
display(['The Spacing Metric obtained by MOAO is : ', num2str(M_Spacing)]);
display(['The Spread Metric obtained by MOAO is : ', num2str(M_Spread)]);
display(['The DeltaP Metric obtained by MOAO is : ', num2str(M_DeltaP)]);
⛄ 运行结果
⛄ 参考文献
Abualigah, L., Yousri, D., Elaziz, M.A., Ewees, A.A., A. Al-qaness, M.A., Gandomi,A.H., Aquila Optimizer: A novel meta-heuristic optimization Algorithm, Computers & Industrial Engineering