✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
⛄ 内容介绍
洲秃鹫觅食和导航行为启发而提出的一种新型元启发式优化算法,具有寻优能力强、收敛速度快等优点。AVOA是受非洲秃鹫觅食和导航行为启发提出的一种元启发式优化算法。AVOA数学描述如下。
a avoa通过通过所有适应度适应度适应度适应度炙鹤移动。
式中Ri(t) —除最优、次优蒸鹇外的其他蒸鹱位置; BestV1 、 BestV2 —最优蒸鹛和次优蒸鹛位置; L1 、 L2 —于0和1之间待测量为1 ; pi —选择最佳蒸鹇的概率; fi —其他蒸鹛合适度; t —当前代次数;其他参数含义相同。
b)秃鹫秃鹫觅食,若经常觅食状态状态状态状态状态状态状态状态状态状态能量能量能量能量能量能量能量能量能量能量能量能量能量能量能量能量能量更强壮的猎鹰附近察觉食物。食物率数据描述为:
式中F —秭兔饲料食用率; T —最大延迟次数; z — 1和1之间的随机数; h — 2和2之间的随机数; rand1 — 0和1之间的随机数; w —控制探索过程序参数,随着w值增加,计算进入研究阶段的概率增加大,反知概率减少。
c)探索阶段。炙鹤工具具有很高的视觉能力和很好的嗅觉能力。在AVOA中,炙鹤通式(5)随机搜索不同域。
式中Pi(t+1)—第t+1次迭代秃鹫位置;Pi(t)—第t次迭代秃鹫位置;X—秃鹫随机移动的地方,以保护食物免受其他秃鹫夺取,X=2×rand,rand表示0和1之间的随机数;P1—探索阶段选择参数;rand2、rand3、randP1—0和1之间的随机数;ub、lb—搜索空间上、下限值;其他参数意义同上。
d)开发阶段。AVOA中,开发阶段分为开发一阶段和开发二阶段2种策略,并通过开发阶段选择参数P2、P3决定采用何种策略进行位置更新。开发第一阶段秃鹫位置更新描述如下:
式中rand4、rand5、rand6、randP2—0和1之间的随机数;P2—开发第一阶段更新策略选择参数;其他参数意义同上。
开发第二阶段秃鹫位置更新描述如下:
式中BestV1(t)、BestV2(t)—第t次迭代最优、次优秃鹫位置;randP3—0和1之间的随机数;P3—开发第二阶段更新策略选择参数;Levy(d)—随即游走,其每一步方向完全随机而各向同性,步长为重尾分布;其他参数意义同上。
⛄ 部分代码
function [fMin , bestX, Convergence_curve ] = DBO(XC,N, Max_iteration,lb,ub,dim,fobj )
% [DBO_Best_score(cnt), DBO_Best_pos(cnt, :), DBO_Curve]=DBO(XC,N,Max_iteration,lb,ub,dim,fobj);
P_percent = 0.2; % The population size of producers accounts for "P_percent" percent of the total population size
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
pNum = round( N * P_percent ); % The population size of the producers
lb= lb.*ones( 1,dim ); % Lower limit/bounds/ a vector
ub= ub.*ones( 1,dim ); % Upper limit/bounds/ a vector
%Initialization
for i = 1 : N
x( i, : ) = lb + (ub - lb) .* rand( 1, dim );
fit( i ) = fobj( x( i, : ) ) ;
end
pFit = fit;
pX = x;
XX=pX;
[ fMin, bestI ] = min( fit ); % fMin denotes the global optimum fitness value
bestX = x( bestI, : ); % bestX denotes the global optimum position corresponding to fMin
% Start updating the solutions.
for t = 1 : Max_iteration
[fmax,B]=max(fit);
worse= x(B,:);
r2=rand(1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i = 1 : pNum
if(r2<0.9)
r1=rand(1);
a=rand(1,1);
if (a>0.1)
a=1;
else
a=-1;
end
b = rand();
x( i , : ) = pX( i , :)+b*abs(pX(i , : )-worse)+a*0.1*(XX( i , :)); % Equation (1)
else
aaa= randperm(180,1);
if ( aaa==0 ||aaa==90 ||aaa==180 )
x( i , : ) = pX( i , :);
end
theta= aaa*pi/180;
x( i , : ) = pX( i , :)+tan(theta).*abs(pX(i , : )-XX( i , :)); % Equation (2)
end
x( i , : ) = Bounds( x(i , : ), lb, ub );
fit( i ) = fobj( x(i , : ) );
end
[ fMMin, bestII ] = min( fit ); % fMin denotes the current optimum fitness value
bestXX = x( bestII, : ); % bestXX denotes the current optimum position
R=1-t/Max_iteration; %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Xnew1 = bestXX.*(1-R);
Xnew2 =bestXX.*(1+R); %%% Equation (3)
Xnew1= Bounds( Xnew1, lb, ub );
Xnew2 = Bounds( Xnew2, lb, ub );
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Xnew11 = bestX.*(1-R);
Xnew22 =bestX.*(1+R); %%% Equation (5)
Xnew11= Bounds( Xnew11, lb, ub );
Xnew22 = Bounds( Xnew22, lb, ub );
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i = ( pNum + 1 ) :12 % Equation (4)
x( i, : )=bestXX+((rand(1,dim)).*(pX( i , : )-Xnew1)+(rand(1,dim)).*(pX( i , : )-Xnew2));
x(i, : ) = Bounds( x(i, : ), Xnew1, Xnew2 );
fit(i ) = fobj( x(i,:) ) ;
end
for i = 13: 19 % Equation (6)
x( i, : )=pX( i , : )+((randn(1)).*(pX( i , : )-Xnew11)+((rand(1,dim)).*(pX( i , : )-Xnew22)));
x(i, : ) = Bounds( x(i, : ),lb, ub);
fit(i ) = fobj( x(i,:) ) ;
end
for j = 20 : N % Equation (7)
x( j,: )=bestX+randn(1,dim).*((abs(( pX(j,: )-bestXX)))+(abs(( pX(j,: )-bestX))))./2;
x(j, : ) = Bounds( x(j, : ), lb, ub );
fit(j ) = fobj( x(j,:) ) ;
end
% Update the individual's best fitness vlaue and the global best fitness value
XX=pX;
for i = 1 : N
if ( fit( i ) < pFit( i ) )
pFit( i ) = fit( i );
pX( i, : ) = x( i, : );
end
if( pFit( i ) < fMin )
% fMin= pFit( i );
fMin= pFit( i );
bestX = pX( i, : );
% a(i)=fMin;
end
end
Convergence_curve(t)=fMin;
end
% Application of simple limits/bounds
function s = Bounds( s, Lb, Ub)
% Apply the lower bound vector
temp = s;
I = temp < Lb;
temp(I) = Lb(I);
% Apply the upper bound vector
J = temp > Ub;
temp(J) = Ub(J);
% Update this new move
s = temp;
function S = Boundss( SS, LLb, UUb)
% Apply the lower bound vector
temp = SS;
I = temp < LLb;
temp(I) = LLb(I);
% Apply the upper bound vector
J = temp > UUb;
temp(J) = UUb(J);
% Update this new move
S = temp;
%---------------------------------------------------------------------------------------------------------------------------
⛄ 运行结果
⛄ 参考文献
[1]李旭东, 杨威嘉, 赵志高,等. 基于多目标混合非洲秃鹫优化算法的多能系统调度方法:.
[2]王忠义, 崔东文. 基于小波包分解-非洲秃鹫优化算法-深度极限学习机的水文预报模型及其应用[J]. 水电能源科学, 2022(008):040.