1.背景
2020年,Hashim等人受到阿基米德定律启发,提出了阿基米德优化算法(Archimedes Optimization Algorithm,AOA)。
2.算法原理
2.1算法思想
AOA模仿了完全或部分浸没在流体中的物体发生碰撞时所受浮力的关系,在迭代过程中不断调整个体密度、体积和加速度,从而使个体达到平衡状态,适应度值优的个体引导种群收敛到最优位置。
2.2算法过程
AOA 的种群个体是浸入流体中的物体,通过调整物体的密度、体积和加速度来实现种群位置的更新。
AOA算法根据物体是否与液体发生碰撞,将其分为全局探索和局部搜索阶段。如果未发生碰撞,则算法执行全局探索阶段;反之,则执行局部开发阶段。AOA通过转移因子TF实现算法从全局探索切换到局部开发的过程。
初始阶段:
AOA 初始化个体的密度( den) 、体积( vol) 、加速度( acc) ,选出当前最优适应度个体( xbest ) 、最优密度( den) 、最优体积( vol) 以及最优加速度( acc):
T F = exp ( t − t max t max ) (1) TF=\exp(\frac{t-t_{\max}}{t_{\max}})\tag{1} TF=exp(tmaxt−tmax)(1)
d t + 1 = exp ( t m a x − t t m a x ) − ( t t m a x ) d e n i t + 1 = d e n t i + r a n d × ( d e n b e s t − d e n i t ) v o l i t + 1 = v o l t i + r a n d × ( v o l b e s t − v o l i t ) (2) \begin{gathered} d^{t+1}=\exp(\frac{t_{max}-t}{t_{max}})-(\frac{t}{t_{max}}) \\ den_{i}^{t+1}=den_{t}^{i}+rand\times(den_{best}-den_{i}^{t}) \\ vol_{i}^{t+1}=vol_{t}^{i}+rand\times(vol_{best}-vol_{i}^{t}) \end{gathered}\tag{2} dt+1=exp(tmaxtmax−t)−(tmaxt)denit+1=denti+rand×(denbest−denit)volit+1=volti+rand×(volbest−volit)(2)
全局探索阶段:
当 TF<=0.5 时,算法进行全局探索阶段,个体的加速度更新:
a c c i t + 1 = d e n m r + v o l m r + a c c m r d e n i t + 1 × v o l i t + 1 (3) acc_i^{t+1}=\frac{den_{mr}+vol_{mr}+acc_{mr}}{den_i^{t+1}\times vol_i^{t+1}}\tag{3} accit+1=denit+1×volit+1denmr+volmr+accmr(3)
对加速度进行标准化处理,用来更新碰撞个体位置:
a c c i → n o r m t + 1 = u × a c c i t + 1 + min ( a c c ) max ( a c c ) × min ( a c c ) + l (4) acc_{i\rightarrow norm}^{t+1}=u\times\frac{acc_{i}^{t+1}+\min(acc)}{\max(acc)\times\min(acc)}+l\tag{4} acci→normt+1=u×max(acc)×min(acc)accit+1+min(acc)+l(4)
碰撞个体的位置更新:
x i t + 1 = x i t + c 1 × r a n d × a c c i − n o r m t + 1 × d × ( x r a n d − x i t ) (5) x_{i}^{t+1}=x_{i}^{t}+c_{1}\times rand\times acc_{i-norm}^{t+1}\times d\times(x_{rand}-x_{i}^{t})\tag{5} xit+1=xit+c1×rand×acci−normt+1×d×(xrand−xit)(5)
局部开发阶段:
当 TF >0.5 时,算法处于局部开发阶段,个体加速度更新:
a c c i t + 1 = d e n b e s t + v o l b e s t + a c c b e s t d e n i t + 1 × v o l i t + 1 (6) acc_i^{t+1}=\frac{den_{best}+vol_{best}+acc_{best}}{den_i^{t+1}\times vol_i^{t+1}}\tag{6} accit+1=denit+1×volit+1denbest+volbest+accbest(6)
对加速度进行标准化处理,用来更新平衡个体位置:
x i t + 1 = x b e s t t + F × c 2 × r a n d × a c c i − n o r m t + 1 × d × ( T × x b e s t − x i i ) (7) x_i^{t+1}=x_{best}^{t}+F\times c_2\times rand\times acc_{i-norm}^{t+1}\times d\times(T\times x_{best}-x_i^{i})\tag{7} xit+1=xbestt+F×c2×rand×acci−normt+1×d×(T×xbest−xii)(7)
F 是改变个体移动方向的标志,用于决定个体位置更新的方向:
F = { + 1 if p ⩽ 0.5 − 1 if p > 0.5 (8) \left.F=\left\{\begin{array}{ll}+1&\text{if}p\leqslant0.5\\-1&\text{if}p>0.5\end{array}\right.\right.\tag{8} F={+1−1ifp⩽0.5ifp>0.5(8)
伪代码:
3.结果展示
4.参考文献
[1] Hashim F A, Hussain K, Houssein E H, et al. Archimedes optimization algorithm: a new metaheuristic algorithm for solving optimization problems[J]. Applied intelligence, 2021, 51: 1531-1551.