智能优化算法:非洲秃鹫优化算法-附代码

智能优化算法:非洲秃鹫优化算法


摘要:非洲秃鹫优化算法(African vultures optimization algorithm, AVOA))是于2021年提出的新型智能优化算法。该算法主要通过模拟非洲秃鹫的觅食和航行行为来问题进行寻优,具有寻优能力强,收敛速度快等特点。

1.算法原理

1.1第一阶段:确定组内最优秃鹰

初始化种群后,计算种群适应度值,将适应度最佳的作为第一组最佳秃鹰,适应度次之的作为第二组最佳秃鹰,其他解使用式(1)向第一组和第二组的最佳解移动。在每次适应度迭代中,将重新计算整个总体。
R ( i ) = { B e s t V u l t u r e 1 , i f   p i = L 1 B e s t V u l t u r e 2 , i f   p i = L 2 (1) R(i)=\begin{cases} BestVulture_1,if\,p_i=L_1\\ BestVulture_2,if\,p_i=L_2 \end{cases}\tag{1} R(i)={BestVulture1,ifpi=L1BestVulture2,ifpi=L2(1)
在式(1)中,计算了其他秃鹰向最佳秃鹰位置移动的概率,其中 L 1 L_1 L1 L 2 L_2 L2为搜索操作之前给定的参数,其值介于0和1之间,且两个参数之和为1。使用轮盘赌轮(式(2))获得选择最佳解的概率,并为每组选择每个最佳解。
p i = F i / ∑ i = 1 n F i (2) p_i=F_i/\sum_{i=1}^nF_i \tag{2} pi=Fi/i=1nFi(2)

1.2 第二阶段:秃鹫的饥饿率

秃鹫经常在寻找食物,如果它们感到饱足的话,它们会有很高的能量,这使得它们可以走更长的距离去寻找食物,但是如果它们饿了,它们就没有足够的能量长时间飞行,在强壮的秃鹫旁边寻找食物,并且在饥饿时变得咄咄逼人。受其启发使用式(4)进行数学建模。
t = h ( s i n w ( π I t e r a t i o n i 2 ∗ m a x i t e r a t i o n s ) + c o s ( π I t e r a t i o n i 2 ∗ m a x i t e r a t i o n s − 1 ) (3) t=h(sin^w(\frac{\pi Iteration_i}{2*maxiterations})+cos(\frac{\pi Iteration_i}{2*maxiterations}-1) \tag{3} t=h(sinw(2maxiterationsπIterationi)+cos(2maxiterationsπIterationi1)(3)

F = ( 2 ∗ r a n d 1 + 1 ) ∗ z ∗ ( 1 − I t e r a t i o n i m a x i t e r a t i o n s ) + t (4) F=(2*rand_1+1)*z*(1-\frac{Iteration_i}{maxiterations})+t \tag{4} F=(2rand1+1)z(1maxiterationsIterationi)+t(4)

其中, F F F表示秃鹫已经吃饱, I t e r a t i o n i Iteration_i Iterationi表示当前迭代次数, m a x i t e r a t i o n s maxiterations maxiterations表示最大迭代次数, z z z是介于-1到1并且每次迭代都变化的随机数, h h h是介于-2到2之间的随机数, r a n d 1 rand_1 rand1是介于0到1之间的随机数。当 z z z值降到0以下时,表示秃鹫饿了,如果 z z z值增加到0,则表示秃鹫吃饱了。秃鹫总数的比例在下降,而且随着每次重复,下降的幅度更大。当 ∣ F ∣ |F| F的值大于1时,秃鹫在不同区域寻找食物,AVOA进入探索阶段;如果 ∣ F ∣ |F| F的值小于1,AVOA进入开发阶段,秃鹫在最佳解的附近寻找食物。

1.3第三阶段:探索

秃鹰采用式(5)进行探索:
P ( i + 1 ) = { R ( i ) − D ( i ) ∗ F , i f   P 1 ≥ r a n d P 1 R ( i ) − F + r a n d 2 ∗ ( ( u b − l b ) ∗ r a n d 3 + l b ) , e l s e (5) P(i+1)=\begin{cases} R(i)-D(i)*F,if \, P_1\geq rand_{P1}\\ R(i)-F+rand_2*((ub-lb)*rand_3+lb),else \end{cases}\tag{5} P(i+1)={R(i)D(i)F,ifP1randP1R(i)F+rand2((ublb)rand3+lb),else(5)

D ( i ) = ∣ X ∗ R ( i ) − P ( i ) ∣ (6) D(i)=|X*R(i)-P(i)| \tag{6} D(i)=XR(i)P(i)(6)

其中 r a n d P 1 rand_{P_1} randP1是[0,1]之间的随机数,P1为预设的探索参数,用于控制探索策略。 P ( i + 1 ) P(i+1) P(i+1)是下一次迭代中的秃鹫位置向量, F F F是当前迭代中使用式(4)获得的秃鹫饱腹率, R ( i ) R(i) R(i)是最佳秃鹫之一。 r a n d 2 rand_2 rand2 r a n d 3 rand_3 rand3均为[0,1]之间的随机数。 l b lb lb u b ub ub分别为寻优的上下边界。

1.4第四阶段:开发

1.4.1 开发(第一阶段)

当值 ∣ F 1 ∣ |F1| F1介于0.5和1之间时,AVOA进入开发阶段的第一阶段。在第一阶段,执行两种不同的旋转飞行和围攻策略。策略的选择根据 P 2 P_2 P2进行选择。j具体过程可以用式(7)进行表示:
P ( i + 1 ) = { { D ( i ) ∗ ( F + r a n d 4 ) − d ( t ) d ( t ) = R ( i ) − P ( i ) , i f   P 2 ≥ r a n d P 2 { S 1 = R ( i ) ∗ ( r a n d 5 ∗ P i 2 π ) ∗ c o s ( P ( i ) ) S 2 = R ( i ) ∗ ( r a n d 5 ∗ P i 2 ∗ π ) ∗ s i n ( P ( i ) ) R ( i ) − ( S 1 + S 2 ) , e l s e (7) P(i+1)=\begin{cases} \begin{cases}D(i)*(F+rand_4)-d(t)\\d(t)=R(i)-P(i) \end{cases},if\,P_2\geq rand_{P_2}\\ \begin{cases} S_1=R(i)*(\frac{rand_5*P_i}{2\pi})*cos(P(i))\\ S_2=R(i)*(\frac{rand_5*P_i}{2*\pi})*sin(P(i))\\ R(i)-(S_1+S_2)\end{cases},else \end{cases}\tag{7} P(i+1)={D(i)(F+rand4)d(t)d(t)=R(i)P(i),ifP2randP2S1=R(i)(2πrand5Pi)cos(P(i))S2=R(i)(2πrand5Pi)sin(P(i))R(i)(S1+S2)else(7)
其中 r a n d P 2 , r a n d 4 , r a n d 5 rand_{P2},rand_4,rand_5 randP2,rand4,rand5,均为[0,1]之间的随机数, F F F是当前迭代中使用式(4)获得的秃鹫饱腹率, R ( i ) R(i) R(i)是最佳秃鹫之一。

1.4.2 开发(第二阶段)

如果 ∣ F ∣ |F| F小于0.5,则执行算法的此阶段。两只秃鹫的行动在食物源上聚集了几种类型的秃鹫,并展开了围攻和争夺食物的侵略斗争。不同策略依据 P 3 P_3 P3进行选择。具体过程如式(8)所示:
P ( i + 1 ) = { { A 1 + A 2 2 A 1 = B e s t V u l t r u r e 1 ( i ) − B e s t V u l t u r e 1 ( i ) ∗ P ( i ) B e s t V u l t u r e 1 ( i ) − P ( i ) 2 ∗ F A 2 = B e s t V u l t r u r e 2 ( i ) − B e s t V u l t u r e 2 ( i ) ∗ P ( i ) B e s t V u l t u r e 2 ( i ) − P ( i ) 2 ∗ F , i f   P 3 ≥ r a n d P 3 { R ( i ) − ∣ d ( t ) ∣ ∗ F ∗ L e v y ( d ) d ( t ) = R ( i ) − P ( i ) , e l s e (8) P(i+1)=\begin{cases} \begin{cases}\frac{A1+A2}{2}\\A_1=BestVultrure_1(i)-\frac{BestVulture_1(i)*P(i)}{BestVulture_1(i)-P(i)^2}*F\\A2=BestVultrure_2(i)-\frac{BestVulture_2(i)*P(i)}{BestVulture_2(i)-P(i)^2}*F\end{cases},if\,P_3\geq rand_{P_3}\\ \begin{cases} R(i)-|d(t)|*F*Levy(d)\\d(t)=R(i)-P(i)\end{cases},else \end{cases}\tag{8} P(i+1)=2A1+A2A1=BestVultrure1(i)BestVulture1(i)P(i)2BestVulture1(i)P(i)FA2=BestVultrure2(i)BestVulture2(i)P(i)2BestVulture2(i)P(i)F,ifP3randP3{R(i)d(t)FLevy(d)d(t)=R(i)P(i)else(8)
其中 B e s t V u l t u r e 1 ( i ) BestVulture_1(i) BestVulture1(i)是当前迭代中第一组的最佳秃鹫, B e s t V u l t u r e 2 ( i ) BestVulture_2(i) BestVulture2(i)是当前迭代中第二组的最佳秃鹫, F F F是秃鹫饱腹率,使用式(4)计算, P ( i ) P(i) P(i)是秃鹫的当前位置向量。 d ( t ) d(t) d(t)表示秃鹫与两组中最好的秃鹫之间的距离。

算法伪代码

Algorithm 1: AVOA
1: Inputs: The population size N and maximum number of iterations T
2: Outputs: The location of Vulture and its fitness value
3: Initialize the random population P i (i = 1,2,...,N)
4: while (stopping condition is not met) do
5:  Calculate the fitness values of Vulture
6:  Set P BestVulture 1  as the location of Vulture (First best location Best Vulture
Category 1)
7:  Set P BestVulture 2  as the location of Vulture (Second best location Best Vulture
(continued on next column)
(continued)
Algorithm 1: AVOA
Category 2)
8:  for (each Vulture (P i )) do
9:  Select R(i) using Eq. (1)
10:  Update the F using Eq. (4)
11:  if (|F| ≥ 1) then
12:   Update the location Vulture using Eq. (5)
16:  if (|F| < 1) then
17:  if (|F| ≥ 0.5) then
18:   Update the location Vulture using Eq. (7)
19:   else
20:   Update the location Vulture using Eq. (8)
Return P BestVulture 1

2.实验结果

请添加图片描述

3.参考文献

[1] Benyamin Abdollahzadeh, Farhad Soleimanian Gharehchopogh, Seyedali Mirjalili. African vultures optimization algorithm: A new nature-inspired metaheuristic algorithm for global optimization problems[J]. Computers & Industrial Engineering, 2021, 158: 107408.

4.Matlab代码

  • 6
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

智能算法研学社(Jack旭)

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值