Fireworks Algorithm for Optimization 烟花算法

合集下载

应用精英反向学习的多目标烟花爆炸算法

应用精英反向学习的多目标烟花爆炸算法

应用精英反向学习的多目标烟花爆炸算法谢承旺;许雷;赵怀瑞;夏学文;魏波【摘要】现实中的多目标优化问题越来越多,而且日益复杂.受混合多目标优化算法设计思想的启发,将烟花爆炸方法和精英反向学习机制引入至多目标优化领域,提出一种应用精英反向学习的多目标烟花爆炸算法(Multi-Ob-jective Fireworks Optimization Algorithm Using Elite Opposition-Based Learning,MOFAEOL).该算法利用精英反向学习策略加强算法的全局搜索能力,利用烟花爆炸方法增强算法的局部搜索能力并提高求解的精度.这两种搜索机制相互协同以更好地平衡算法的全局勘探和局部开采的能力.MOFAEOL 算法与另外5种代表性多目标优化算法一同在由 ZDT系列和 DTLZ 系列组成的测试集上进行性能比较.实验表明,MOFAEOL 算法在收敛性、多样性和稳定性方面均优于或部分优于其他对比算法.%More and more complex multi-objective optimization problems have emerged in the real world.Inspired by the idea of hybrid components of multi-objective optimization algorithms,a method of fireworks explosion optimization and a strategy of elite opposition-based learning were introduced into the field of multi-objective optimization.A multi-objective fireworks optimization algorithm using elite opposition-based learning (MOFAEOL)was proposed in the paper.The MO-FAEOL utilized the elite opposition-based learning strategy to strengthen the global search ability,and adopted the fireworks explosion optimization approach to improve the local search ability and the accuracy of the algorithm.These two learning mechanisms collaborated to balance the global exploration and the local exploitation,in order to solve some hardmulti-objec-tive optimization problems efficiently.The MOFAEOL was compared with other five typical multi-objective optimization al-gorithms on a benchmark test set including 1 2 multi-objective optimization test problems composed by ZDT and DTLZ series functions.Experimental results show that the MOFAEOL is superior or competitive to the other peer algorithms in conver-gence,diversity and stability.【期刊名称】《电子学报》【年(卷),期】2016(044)005【总页数】9页(P1180-1188)【关键词】烟花爆炸优化;精英反向学习;多目标优化算法【作者】谢承旺;许雷;赵怀瑞;夏学文;魏波【作者单位】华东交通大学软件学院,江西南昌 330013; 江西科技师范大学数学与计算机学院,江西南昌 330013;华东交通大学软件学院,江西南昌 330013;华东交通大学轨道交通学院,江西南昌 330013;华东交通大学软件学院,江西南昌330013;华东交通大学软件学院,江西南昌 330013【正文语种】中文【中图分类】TP301科学研究与工程实践中存在着大量需要同时优化多个目标函数的优化问题,它们通常被称为多目标优化问题(Multi-objective Optimization Problem,MOP).MOP 问题中各目标之间相互冲突,整体上一般不存在单个的最优解,而是一组Pareto 解的集合.MOP问题的复杂性导致经典的数学规划方法等一般难以凑效.有关MOP问题的研究得到了长足的发展并取得了丰富的成果,概括起来大致可分为3类:(1)基于进化算法(Evolutionary Algorithm,EA)的多目标优化方法.其中代表性的算法包括NSGA-II[1]、SPEA2[2]、PAES[3]、PESA[4]和PESA-II[5]等.这类算法基于群体进化的方式实现了搜索的多向性和全局性,能够在一次运行中获得一组解;其次,EA算法可以处理诸如不连续、非凸以及多峰等复杂的目标函数和约束条件.(2)基于新型进化机制的多目标优化算法.例如,基于粒子群优化(Particle Swarm Optimization,PSO)模型和新型占优机制的CMOPSO算法[6]和OMOPSO算法[7]等;基于分布估计算法提出的RM-MEDA算法[8]以及将传统的数学规划方法和进化算法相结合提出的MOEA/D算法[9]等.这些新型进化范例的引入提高了多目标优化算法解题的效率与效果,开辟了解决MOP问题的新途径.(3)混合多目标优化算法.例如,Molina等[10]将分散搜索和禁忌搜索结合以解决非线性多目标优化问题;Soliman等[11]将协同进化与局部搜索的思想融入到多目标差分进化算法中,以指导搜索进程朝Pareto最优解逼近;谢承旺等[12]将多种不同策略融合到多目标粒子群优化算法,并在多目标基准测试实例中取得了不错的效果.这类算法一般根据算子(组件)和元启发式方法的特点有机结合,发挥多目标优化算法和元启发式方法的长处,进行优势互补,从而克服单个的多目标优化算法或元启发式方法所固有的局限性,可进一步增强算法在解空间搜索的效果.上述不同种类的多目标优化算法虽然在解决一些MOP问题中表现出了较好的性能,也取得了不错的应用效果,但现实中的多目标优化问题正日益增多,而且也越来越复杂,迫切需要探索新的有效的进化机制应对这种局面,以更好地解决这些较难的MOP问题.2010年,Tan等[13]通过模拟烟花爆炸中炸点的扩散机制提出了一种新颖的烟花搜索算法(Fireworks Explosion Algorithm,FEA).由于烟花弹爆炸时,释放出的火星散布在以烟花弹(炸点)为中心的一个圆形邻域内,如果将该邻域看成是问题解空间的一个局部区域,炸出的火星看成是区域中的点,则一次爆炸就类似于对局部区域的一次探索,这种探索可看作是对空间中该炸点附近的一次局部搜索.FEA算法为智能优化领域提供了新思想,注入了新活力,并引起了研究者的重视.文献[14]在原始FEA算法的基础上,对爆炸点的方向和爆炸半径等参数进行改进,提高了算法的性能.文献[15]借鉴PSO算法引入了交流算子,实现种群内个体之间的交流,引导种群向全局最优解逼近.文献[16]将遗传算法思想引入FEA中,随机选择某炸点与当前最佳炸点位置进行信息交换,增加种群的多样性,克服算法早熟收敛.文献[17]将精英反向学习机制引入至FEA算法以指导种群向全局最优解所在的空间逼近,并取得了较好的求解精度和收敛速度.然而,上述对FEA算法及其变种的研究均局限于单目标优化.2013年,Zheng等[18]将多目标烟花爆炸算法(Multi-Objective Fireworks Optimization Algorithm,MOFA)用于解决精准农业中的施肥问题,但其沿用单目标优化模式生成火星的做法值得商榷.鉴于FEA算法基于群体的搜索以及具有执行参数较少、求解速度快和较强的局部搜索能力等优势,而且有关多目标烟花爆炸方面的研究尚不多见,因此,开展多目标烟花爆炸算法的研究具有现实意义.但也应注意到:烟花爆炸优化采用了贪婪选择的方式,随着迭代的进行,所有个体逐渐向当前最优个体靠拢,而且其爆炸半径也逐渐缩小,种群的多样性也会逐渐降低,这对于多目标优化算法是不能接受的.因为保持群体的多样性是指导搜索朝Pareto前沿逼近,克服多目标优化算法早熟收敛的重要措施.基于此,本文将精英反向学习机制(Elite Opposition-based Learning,EOL)引入至多目标烟花爆炸算法,一方面利用精英个体包含了比普通个体更多的有益搜索信息;另一方面,通过精英反向学习产生的反向解能远离局部最优区域,扩大算法在精英反向解所在区域内的搜索,增强算法的全局搜索能力,有利于算法较快收敛于全局Pareto前沿.本文提出了应用精英反向学习的多目标烟花爆炸算法(Multi-Objective Fireworks Optimization Algorithm Using Elite Opposition-based Learning,MOFAEOL),其中的精英反向学习机制与烟花爆炸优化方法相互协同,以期更好地平衡算法的全局探索能力和局部开采能力,并能有效地解决复杂的多目标优化问题.另外,MOFAEOL算法采用改进的k-最近邻方法[2]更新外部档案以保持解群的多样性.根据优化的对偶理论,只需考虑最小化问题.不失一般性,一个具有n个决策变量,m个目标函数,(p+q)个约束的MOP问题可定义为:定义1(可行解集) 可行解集Xf为满足式(1)中约束函数g(x)和h(x)的决策向量x的集合,即Xf={x∈X|g(x)≥0且h(x)=0}.定义2(Pareto支配) 假设x1,x2∈Xf是上述MOP问题的可行解,称x1Pareto支配x2(记为x1x2)当且仅当∀i=1,2,…,m:fi(x1)≤fi(x2)∧∃j=1,2,…,m:fj(x1)<fj(x2)成立.定义3(Pareto最优解) 假设x*∈Xf且不存在其他的解∈Xf,使得成立且至少有一个是严格不等式,则称x*是式(1)的Pareto最优解.定义4(Pareto最优解集) Pareto最优解集(Pareto Set,PS)是所有Pareto最优解的集合,即PS={x*}={x∈Xf|∃x′∈Xf:fi(x′)≤fi(x*),i=1,2,…,m}.定义5(Pareto前沿) Pareto前沿(Pareto Front,PF)是Pareto最优解集在目标空间中的投影,即PF={F(x)|x∈PS}.定义6(当前种群的非劣解集NDS) 假设Pop(t)为MOEA算法的第t代种群,个体x*∈Pop(t)为群体的非劣解,当且仅当∃x′∈Pop(t):x′x*.Pop(t)中所有非劣解x*组成的集合称为当前群体的非劣解集NDS,即NDS={x*}={x|x∈Pop(t)且∃x′∈Pop(t),使x′x}.Tizhoosh[19]于2005年提出了反向学习(Opposition-Based Learning,OBL)的概念,并说明了反向解要比当前解有高近50%的概率靠近全局最优.其主要思想是通过在当前个体所在区域产生反向个体,并将反向个体与当前个体一起参与竞争,优秀个体进入下一代.定义7(反向解) 设在区间[a,b]上存在一个实数x,则x的反向数定义为x′=a+b-x.基于此,假设在R域上存在某n维的解点p=(x1,x2,…,xn),且xi∈[ai,bi],则定义为p的反向解.其中,为[0,1]区间均匀分布的随机数,也称为一般化系数.定义8(基于反向解的优化) 设待优化问题为式(1)中的最小化多目标优化问题,若存在当前解X,其反向解为X′,对X和X′采用如下更新机制:①若XX′,则保留当前解X;②若X′X,则用X′替换X;③若X和X′彼此非支配,则随机选择其中某个个体保留.多目标优化问题中的非支配解一般视为精英个体,这些个体通常包含了更多的引导种群向全局最优Pareto前沿收敛的有益信息.如果最终算法能够全局收敛,那么精英个体所形成的搜索区域必然会收敛到全局最优Pareto解集所形成的搜索区域.因此,加强精英个体所在空间邻域的搜索,将会提高算法的收敛速度,改善算法的全局收敛能力.定义9(精英反向解) 设n维搜索空间中群体Pop中的某精英个体Xbest=(x1,x2,…,xn) 的反向解为,则该精英反向解可定义为为服从均匀分布的随机数,xi∈[ai,bi],[dai,dbi]为群体Pop在第i维搜索空间的动态边界,且可按式(2)计算得到.用搜索空间的动态边界代替固定边界有利于保存搜索经验,使得生成的反向解能够位于逐步缩小的搜索空间,促进算法较快收敛.由于精英反向解也可能跳出边界[ai,bi]而成为非可行解,这里采用文献[20]中的方法对越界值进行重置,如式(3)所示:通过形成的精英反向解,可加强对精英个体邻域的探测,MOFAEOL算法在每一次迭代中,针对种群的精英个体执行反向学习,生成精英个体的反向种群,并参与进化竞争.FEA算法受烟花爆炸现象的启发,将寻优问题的搜索空间类比于烟花爆炸的空间,用炸点及其爆炸产生的火星的位置来表征优化问题的候选解.评估炸点和火星位置的优劣,并选择较优的位置保留至下一代,如此迭代进行,直至获得满意的结果或停机条件达到时为止.基于烟花爆炸优化的搜索方式如下:首先在搜索空间中随机初始化N个炸点,即确定第一次爆炸的炸点位置,用以表征问题的初始解.例如,在n维搜索空间中的第i个炸点可表示为xi=(xi,1,xi,2,…,xi,n).炸点执行均匀爆炸操作时需预设最大爆炸半径r,即火星的最大散开区域.如果炸点爆炸层数为w,那么每一层的爆炸半径为j·r/w(j=1,2,…,w),其中,r设置为随迭代次数的增加呈非线性递减的参数,以确保算法初期可以执行搜索空间的全局探索,算法末期能在全局最优前沿附近进行精确的局部搜索.考虑到算法在实际执行过程中由于时空资源的限制,同时也为了保证有足够的火星数目,这里规定火星与炸点之间的距离只有r/4,r/2,3r/4和r四种情况.烟花弹爆炸半径r的计算如式(4)所示,而对于炸点i,其爆炸产生的火星的迭代公式如式(5)所示.这里在实施烟花爆炸的过程中对所有炸点和火星的位置边界进行限制,设xl(l=1,2,3,…,n)为n维搜索空间任一维决策变量,且xl∈[al,bl],如果炸点x爆炸过程中产生的火星xj跳出边界[al,bl]成为非可行解,则将xj在第l维上的值按式(6)进行重置.这里从第二代起将当前种群中每一个个体都将视为一个炸点,这些炸点爆炸后将会产生大量的火星,这些火星与炸点一起进行评估以选择出较优的火星(炸点)参与下一次爆炸.为了保持每一代种群规模不变以及火星的多样性,这里根据文献[13]中基于距离的方法筛选出一定数目的解点.设xi∈M,M为当前炸点及其爆炸后产生火星的集合,则个体xi与M中其他个体的欧式距离之和定义为:MOFAEOL算法在种群外部设置一个档案集合,用于保存算法在搜索过程中获得的非支配解.这里采用渐进方法对外部档案进行维护,初始时置档案为空,对每次迭代产生的非劣解执行算法1所示的操作.在使用渐进方法决定解个体进入档案的过程中,档案成员的多样性不断增强,而渐进方法所采用的个体密度估计方法对档案的维护和解群的多样性保持都很重要.在目前已定义的密度估计方法中,SPEA2算法的k-最近邻方法[2]在保持解群多样性方面表现突出.这里将对k-最近邻方法做一定改进后用于更新外部档案并保持解群的多样性.原始的k-最近邻方法将个体的密度值定义为个体与它的第k个最邻近个体之间的距离,为节省算法的时间开销,这里取k=log(N+N′),而不采用原方法的.其中,N为种群的规模,N′为档案的最大容量.MOFAEOL算法执行时,如果档案规模达到预设的最大值时,档案中每加入一个新解则要从中移出一个个体,比如个体A,个体A应满足:对于档案中所有个体B,A<dB成立.这里的A<dB定义为当且仅当对于所有的l=1,2,…,N′:DlA=DlB;或者对于某个l,DlA<DlB,而对任意的l′<l:Dl′A=Dl′B.这里的DlA(DlB)为个体A(B)与它的第l个最邻近个体的距离.若多目标优化问题的目标数目为M,采用改进的k-最近邻方法维护外部档案的时间复杂度O(M(N+N′)2log(N+N′)),其复杂度则要优于原方法的复杂度O(M(N+N′)3)[2].在前面3.1至3.3小节描述的基础上,以下给出MOFAEOL算法的流程,如算法2所示.假设待优化MOP问题的目标数目为M,搜索空间的维度为n,种群的规模为N,外部档案最大容量为N′,算法最大迭代次数为Tmax,则MOFAEOL算法的时间复杂度可估计如下:Step1产生初始种群的时间复杂度为O(nN),将种群中非支配解复制到外部档案集的时间为O(MN2),因而Step1的时间复杂度为O(MN2).算法从Step2开始便进入迭代循环过程.循环体内,Step3至Step5为炸点产生火星的过程,其中一个炸点产生火星的时间复杂度为O(8n2/3),N个炸点产生火星的时间则为O(8Nn2/3).Step6执行精英反向学习的时间复杂度为O(MN′).Step7利用归一化排序[21]构造非支配集NDS的时间复杂度为O(M(N+N′)log(N+N′)).Step8利用算法1对外部档案进行多样性维护的时间复杂度为O(M(N+N′)2log(N+N′)).Step9根据距离关系选择参与下一代繁殖的个体所需的时为O(nN2).Step10的时间复杂度为O(1).基于上述分析,循环体内的时间复杂度应为O(8Nn2/3)+O(MN′)+O(M(N+N′)log(N+N′))+O(M(N+N′)2log(N+N′))+O(nN 2)+O(1)=O(M(N+N′)2log(N+N′)),而整个循环迭代过程的时间复杂度则为O(TmaxM(N+N′)2log(N+N′)).Step12输出算法求解结果所需要的时间为O(N′n).综上,MOFAOL算法的时间复杂度为O(MN2)+O(TmaxM(N+N′)2log(N+N′))+O(N′n)=O(TmaxM(N+N′)2log(N+N ′)).(1)对等比较算法为了测试MOFAEOL算法的性能,选取5个代表性多目标优化算法作为对等比较算法,它们分别是:①Deb等提出的改进型非劣分类遗传算法NSGA-II[1];②Zitzler等提出的改进型强度Pareto进化算法SPEA2[2];③Coello C等提出的多目标粒子群优化算法CMOPSO[6];④Sierra等提出的改进型多目标粒子群算法OMOPSO[7];⑤Zhang等提出的基于分解的多目标进化算法MOEA/D[9].(2)多目标测试问题集测试函数由ZDT[22]和DTLZ[23]两个系列共计12个函数组成.其中,ZDT系列是5个2-目标测试问题,由ZDT1~ZDT4以及ZDT6组成.由于ZDT5是布尔函数,需要二进制编码,本文省去了该测试函数.DTLZ系列是由DTLZ1~DTLZ7组成的一个可以改变搜索变量和优化目标个数的可扩展多目标测试问题集.这里选择DTLZ 系列作为3-目标优化测试问题集.(3)实验参数根据文献[17]的研究,MOFAEOL算法中的半径递减指数α取值为5,初始爆炸半径rinitial=a·(xi,max-xi,min),a∈[0.05,0.3],rend取值为10-6.文献[20]的研究结果表明,一般化系数β=1时能获得较好效果,本文的实验参数β亦取值为1.本文选取的其他5个对比算法的实验参数都按照对应的参考文献设置.比较实验中各算法在2-目标测试问题中的种群规模均设为N=100,外部档案集合的最大容量N′=100,所有测试函数的最大评估次数均设为50000次,所有算法的最大迭代次数Tmax=500;3-目标测试问题中种群的大小均设为N=200,外部档案集合的最大容量N′=200,所有测试函数的最大评估次数均为200000次,所有算法的最大迭代次数为Tmax=2000.为减少性能分析中随机因素的影响,每种算法在所有的测试函数上均独立运行30次.本文的仿真实验在Think Pad X200笔记本电脑上运行,电脑配置5G内存和2.4GHz双核CPU,安装Windows 7 X64操作系统,算法运用C++编程实现,并利用Matlab 2010a环境出图.(4)性能指标为了评估算法获得的近似Pareto前沿的收敛性和均匀性,本文采用反转世代距离(Inverted Generational Distance,IGD)作为性能评估指标[9].IGD是度量真实Pareto前沿到算法获得的近似Pareto前沿之间的距离指标.该指标值越低,表明算法获得的近似Pareto前沿的收敛性和多样性越好,越接近真实Pareto前沿.令P为真实Pareto最优解集,A是进化算法获得的近似Pareto最优解集,则IGD可根据式(9)计算:实验1 通过比较6个对等多目标优化算法在12个多目标测试问题上的IGD值来考察MOFAEOL算法的性能.表1列出了各算法在12个测试实例上的IGD性能对比结果.其中IGD的均值(mean)和标准差(std.)是同一算法在同一测试问题上独立运行30次的统计结果;t-test值是本文算法与其他对等算法在同一测试问题上进行t检验时的t值;“+”、“=”和“-”表示本文算法获得的IGD值在显著性水平为5%的双尾t检验中分别优于、等于和劣于对应列的对等算法在对应行的测试问题上的显著性区分结果;“Score”表示本文算法显著优于对应列的对等算法在12个测试问题中的净胜得分,即得“+”与得“-”的测试问题个数之差(下文同).同时,采用粗体字表示所有对比算法在每一个测试问题中的最小IGD均值.从表1可以看出,MOFAEOL算法在12个测试函数上获得了4个最优的IGD均值,NSGA-II、CMOPSO和MOEA/D各获得2个最优的IGD均值,SPEA2和OMOPSO分别获得1个最优的IGD均值.这表明MOFAEOL算法在12个测试问题中总体上具有较好的IGD性能.而在MOFAEOL未能获得最优IGD均值的那些测试问题上,本文算法所获得的IGD值与那些在同一测试函数上获得的最优的IGD均值始终处在相同的数量级上,这也反映了MOFAEOL算法与那些在某些测试问题上表现最优的对等算法相比,它们在IGD性能上的差距很小.在表1的t-检验结果中,MOFAEOL算法对比其他5种算法的净胜得分均为正数,其中,MOFAEOL对比OMOPSO的净胜得分为10,对比NSGA-II和SPEA2的净胜得分为8,对比MOEA/D的净胜得分为6,对比CMOPSO的净胜得分为2.这表明MOFAEOL算法在所有测试问题上获得的总体IGD性能要显著优于另5种对比算法.当然,根据没有免费午餐的定理,不能期望MOFAEOL算法在每一个测试问题上都能获得最好的IGD值.由于IGD性能指标能够同时反映算法的收敛性和多样性,因此本文算法在所有对等比较算法中获得了最好的收敛性和多样性的折中效果,说明MOFAEOL算法的精英反向学习策略和烟花爆炸方法相互协同,较好地平衡了算法的勘探与开采的进化过程.文献[24,25]通过分析测试算法在所有测试问题上的性能指标排名均值和方差来比较算法的准确性(accuracy)和稳定性(stability),本文也采用这种方法进一步比较6种对等算法.每一种比较算法在12个测试问题上均有一个IGD性能排名值,设RA={r1,r2,…,r|R|}为算法A在|R|个测试问题中排名的集合,则算法A的准确性可用排名均值r表示,而其稳定性可以用排名方差(r-μA)2表示.如果一个算法A1的排名均值和排名方差均小于另一种对比算法A2,则可认为A1的性能优于A2.这里给出了6种对等比较算法在12个测试函数上的排名均值和排名方差,如图2所示.从图2可以看出,MOFAEOL算法的排名均值和排名方差确定的点位于左下角,即本文算法的排名均值和排名方差占优了其他5种对比算法,这也表明了MOFAEOL算法在所有对比算法中具有最好的准确性和稳定性.表1和图2的实验结果反映出MOFAEOL算法总体上具有最好的多样性和收敛性.究其原因,该算法采用精英反向学习策略加强算法的全局搜索能力,利用烟花爆炸方法增强算法局部搜索能力,并利用简化的k-最近邻策略保持解群的多样性,这些策略相互协同,较好地解决了复杂MOP问题.实验2 为检验MOFAEOL算法中烟花爆炸优化方法有效性,这里将MOFAEOL 算法与剔除了烟花爆炸优化方法的MOFAEOL算法(简记为MOEOL算法)一起在ZDT4、ZDT6、DTLZ1、DTLZ6和DTLZ7测试实例上进行对比实验,两算法取相同的实验参数.表2给出了MOFAEOL算法与MOEOL算法在IGD性能指标上的实验结果.从表2可以看出,MOFAEOL在6个测试问题上获得了全部最优的IGD均值,而去除烟花爆炸优化方法的MOEOL算法在6个测试问题上无一能获得最优的IGD均值.表2的t-检验结果中,MOFAEOL对比MOEOL在IGD性能上的净胜得分为6.由此可见,采用了烟花爆炸方法的MOFAEOL算法与未使用烟花爆炸方法的MOEOL算法相比,在收敛性和多样性方面具有显著性的优势,这也表明烟花爆炸优化方法在增强算法局部搜索能力,提高解的精度方面发挥了重要的作用.实验2的结果表明了烟花爆炸优化方法是有效的.实验3 为检验MOFAEOL算法中精英反向学习机制的作用,这里将MOFAEOL算法与去除精英反向学习机制的MOFAEOL算法(简记为MOFA算法)一同在ZDT4、ZDT6、DTLZ1、DTLZ3、DTLZ6和DTLZ7测试函数上进行比较实验,两算法的执行参数取相同的值.表3给出了MOFAEOL算法与MOFA算法在IGD性能指标上的实验结果.从表3可以看出,MOFAEOL算法在6个测试函数上获得了全部最优的IGD均值,而MOFA算法无一能获得最优的IGD均值.从表3的t-检验结果来看,MOFAEOL算法对比MOFA算法在IGD性能上的净胜得分为6.由此可见,采用了精英反向学习策略的MOFAEOL算法较之未使用精英反向学习方法的MOFA算法具有显著性的IGD性能优势.这也表明精英反向学习策略在防止种群陷入局部最优,促进群体在更广的区域内搜索发挥了重要的作用.实验3的结果表明了精英反向学习策略的有效性.为更好地解决现实中日益复杂的多目标优化问题,将精英反向学习策略和烟花爆炸优化方法引入至多目标优化算法中,提出了一种应用精英反向学习的多目标烟花爆炸算法MOFAEOL.该算法与另5种代表性多目标优化算法NSGA-II、SPEA2、OMOPSO、CMOPSO和MOEA/D一起在12个基准多目标测试函数集上进行IGD性能的比较实验,并分别就精英反向学习和烟花爆炸方法在多目标优化算法中的有效性进行了测试.实验结果表明MOFAEOL算法较之其他几种对比算法在总体上具有显著性的收敛性、多样性、准确性以及稳定性方面的优势,其中的精英反向学习和烟花爆炸方法在多目标优化算法中是有效的,二者相互协同,有利于MOFAEOL算法较好地解决一些复杂的MOP问题.谢承旺男,1974年10月出生,湖北武汉人,副教授、硕士生导师、中国计算机学会高级会员.2005年、2010年分别在武汉理工大学、武汉大学获得工学硕士和工学博士学位,2015年从武汉大学数学博士后流动站出站.现主要从事智能计算与智能信息处理方面的研究工作.许雷男,1989年1月出生,湖北咸宁人,硕士研究生.主要从事智能计算方面的研究.赵怀瑞男,1977年11月出生,山东临沂人,博士、讲师.2007年、2012年分别在大连交通大学、北京交通大学获得硕士和博士学位.主要从事车辆结构优化方面的研究工作.夏学文男,1974年8月出生,湖北孝感人,博士、副教授、硕生导师.主要从事智能计算及其应用方面的研究.魏波男,1983年1月出生,湖北天门人,博士、讲师.主要从事演化计算方面的研究.。

fireworks教案课件第10章优化与导出

fireworks教案课件第10章优化与导出

2.使用优化面板 根据需要设置优化面板的各种优化选项,可以实现预期的优化效果。 通常称设置优化选项的组合为【优化方案】。Fireworks具有保存优
化方案的功能,通过该功能将自己自定义的优化方案保存起来,在组 图中可以重复使用。
将优化操作存为预设的具体操作如下: (1)单击优化面板右上角的面板选项按钮,打开面板选项菜单,如
第10章 优化与导出
本章重点
本章主要讲述了在Fireworks中编辑的对象进行优化和导出的操作。 对于不同类型的对象,Fireworks均允许使用优化面板来调整对象的 质量和大小之间的关系,以便在Internet的Web页上实现最佳效果。 之后可也通过预览导出和导出向导实现不同格式对象的导出。
学习目的
对图像的优化就是在减少图像颜色、对图像数据进行压缩以及保证图 像质量三者之间取一个最佳效果。
10.1.2 基本的优化操作
Fireworks在图像导出前对图像进行优化,图像优化的基本操作如下: (1)单击菜单命令【窗口】|【优化】命令,打开优化面板,如图所
示。 (2)使用优化面板中的【颜色】选项框来显示当前调色板中的颜色,
图所示。
(2)选择【保存设置】选项。打开【预设名称】对话框,如图所示。 (3)在文本框中输入预设的名字。 (4)单击【确定】,保存预设。
3.预览图像和比较优化结果 Fireworks对预设有实时性。当设置好预设时,可以马上预览到优化
结果。这样方便查看优化的效果是否符合要求。 此外,在Fireworks中可以根据优化方案产生多个预览结果,这样允
10.1.1 概述
图像的使用使网页更加丰富多彩,但同时增添了网页的大小,减缓了 下载速度。通过对图像进行优化可以合理地解决这种矛盾,避免网页 的过度臃肿。

214342432_一种多策略混合型烟花算法

214342432_一种多策略混合型烟花算法

第47卷第3期燕山大学学报Vol.47No.32023年5月Journal of Yanshan UniversityMay 2023㊀㊀文章编号:1007-791X (2023)03-0262-11一种多策略混合型烟花算法黄华娟1,邹鹏程2,韦修喜1,∗,徐㊀晨2(1.广西民族大学人工智能学院广西南宁530006;2.广西民族大学电子信息学院广西南宁530006)㊀㊀收稿日期:2022-07-06㊀㊀㊀责任编辑:唐学庆基金项目:国家自然科学基金资助项目(62266007);广西自然科学基金资助项目(2021GXNSFAA220068,2018GXNSFAA294068)㊀㊀作者简介:黄华娟(1984-),女,广西崇左人,博士,副教授,主要研究方向为机器学习和数据挖掘;∗通信作者:韦修喜(1980-),男,广西百色人,副教授,硕士生导师,主要研究方向为机器学习和智能优化,Email:weixiuxi@㊂摘㊀要:针对传统烟花算法存在寻优精度低,多样性差,爆炸更新具有盲目性的不足,提出一种融合算术优化算法的混合型烟花算法㊂首先,该算法利用算术中乘除运算和加减运算实现烟花的爆炸操作,从而提高算法的收敛能力和寻优精度㊂其次,采用 精英 选择策略取代 轮盘赌 选择策略,降低算法复杂度㊂最后,通过对8个基准函数优化测试以及联合谱聚类算法对2个UCI 基本数据集进行分类实验来评估该算法的有效性㊂实验结果表明,该算法对于函数优化能够较好的寻优求解在4个测试函数上精度误差从10-100附近降低至10-300,在谱聚类算法的应用中适应度值平均值至少优于原算法3.3%,总体性能优秀㊂关键词:烟花算法;算术优化算法;函数优化;谱聚类中图分类号:TP18㊀㊀文献标识码:A㊀㊀DOI :10.3969/j.issn.1007-791X.2023.03.0100 引言烟花算法(Fireworks algorithm,FWA)[1]是由北京大学谭营教授于2010年提出的模拟烟花爆炸并结合进化计算的随机搜索的群智能算法㊂烟花算法不同于其他群智能算法,它的多种不同算子分布工作,实现信息交互共享,能够处理复杂的优化问题㊂爆炸㊁变异㊁选择等算子的存在使得算法具备广阔的研究前景㊂算术优化算法(Arithmetic optimizationalgorithm,AOA)[2]是Abualigah 等于2021年提出的一种根据算术操作符的分布特性实现全局寻优的元启发式优化算法㊂该算法通过乘除运算进行全局勘探并通过加减运算进行局部开采,具有可移植性强㊁参数少及执行效率高等特点㊂谱聚类(Spectral clustering,SC)是基于图论的现代聚类算法,根据样本之间的相似度构建无向图,再使用某种切图算法把无向图分割为若干个不相连接的子图,从而实现对样本的划分,将聚类问题转化为图的切割问题[3]㊂传统的聚类算法在非凸数据上的表现较差,而SC 算法却没有这个限制,对于不同分布的数据都有很好的划分效果㊂具有解决多路谱聚类能力的NJW(Neue juristischewochenschrift)算法是谱聚类的代表性算法,然而其聚类效果很大程度依赖于对初始类中心敏感的K -means 算法㊂K -means 算法是一种无监督学习的聚类方法,在聚类过程中,受初始聚类中心的影响,算法易存在聚类精度低㊁聚类效果不稳定等问题[4]㊂烟花算法对空间解的搜索具有一定的优势,因此,在NJW 算法的特征空间内对新样本划分时,若采用烟花算法替代K -means 算法,这将融合NJW 和FWA 两种算法的优势㊂近年来学界对烟花算法的研究不断深入并针对算法的不足提出一系列改进算法㊂Zheng 等[5]针对爆炸算子存在的不足提出了引入最小爆炸半径阈值的增强烟花算法(Enhanced fireworks algorithm,EFWA)㊂仅依据烟花适应度差值计算得到的爆炸半径较难达到较小值,所以FWA 和EFWA 局部搜索能力较差㊂针对局部寻优能力不足,Zheng 等[6]提出了引入爆炸半径放大缩小机制第3期黄华娟等㊀一种多策略混合型烟花算法263㊀的动态搜索烟花算法(Dynamic search in fireworks algorithm,dynFWA),当烟花种群搜索到一个适应度值不再变好的位置时,dynFWA将减小核心烟花的爆炸半径,反之则增大㊂虽然dynFWA去除了变异算子加快了寻优速度,但适应度值不再变好时减小半径易使得算法陷入局部最优㊂自适应烟花算法(Adaptive fireworks algorithm,AFWA)是Li 等[7]提出的另一种与粒子群算法全局搜索类似的调整搜索半径的方法㊂当前个体的爆炸半径为当前个体与当前最优个体的距离,以便算法跳出局部最优㊂虽然AFWA能对搜索步长进行自适应调整,表现出了很好的性能改善,但是仅有步长的自适应调整,而没有爆炸火花数的自适应变化,难以平衡算法的开采与勘探能力㊂只对单一算法改进难以快速找到最优解,为此,一些混合算法相继被提出㊂Gao等[8]提出融合文化算法的文化烟花算法(Cultural fireworks algorithm,CA-FWA),并将文化烟花算法应用到滤波器的设计上,并取得了较好的性能㊂Zheng等[9]提出融合差分进化算法的混合型烟花算法(Hybrid fireworks optimization method with differential evolution operators,FWA-DE)㊂文化烟花算法和差分进化算法都有其特定的优势,用于结合烟花算法的混合算法能兼顾两种算法的优势,但同时也会产生冲突,如何解决两种算法的冲突往往是解决问题的关键㊂AOA算法原理简单,易于实现,参数少,为此将AOA算法与FWA算法结合,冲突少,易于得到可观的结果㊂以上文献对基本烟花算法都有一定程度的改进,但仍有不足㊂首先,对于爆炸半径的设置,非线性递减的步长具有一定盲目性㊂其次,对粒子随机维度进行爆炸半径内位置更新操作,并非更新步长为爆炸半径,而是0到爆炸半径,既无法保证所选维度的有效性,又可能导致多代粒子更新步长相似,爆炸半径起到极其微小的作用㊂最后,对于变异策略,大多数采用的高斯变异使得粒子变异过程中倾向于0,造成算法对于最优解在原点附近寻优精度高的假象㊂为此,本文提出了融合AOA算法的混合型烟花算法(Hybrid fireworks algorithm based on AOA,AOAFWA)㊂受半径放大缩小机制及AOA算法加减乘除机制的启发,结合烟花爆炸的随机性,本文算法引入加减乘除机制代替烟花算法爆炸更新机制,由于加减乘除机制是在当前最优粒子上实施的,本文采用精英选择策略,既没有了轮盘赌[10]选择策略的高复杂度,又更好地迎合加减乘除机制㊂最后,选取柯西变异[11]策略以增加种群多样性,帮助算法跳出局部最优㊂本文选取了8个基本测试函数进行测试并在谱聚类问题上进行测试,验证了AOAFWA算法在收敛能力和搜索能力上的有效性和优越性㊂1㊀烟花算法1.1㊀烟花算法实现步骤步骤1:种群初始化㊂随机生成N个烟花,根据优化的目标函数计算每个烟花的适应度值,从而确定烟花质量的好坏㊂步骤2:计算烟花的爆炸半径A i和爆炸火花数S i:S i=M㊃y max-f(x i)+εðN i=1(y max-f(x i))+ε,(1)A i=A^㊃f(x i)-y min+εðN i=1(f(x i)-y min)+ε,(2)其中:A^和M为常数,用于调整爆炸半径和爆炸产生火花数;f(x i)为烟花i的适应度值;y min和y max 分别是最好与最差烟花个体的适应度值;ε为机器最小量,避免除零操作㊂为防止产生爆炸火花数向优质或劣质烟花压倒性倾斜,文献[1]对于爆炸火花数进行了限制:S i=round(a㊃M)㊀S i<a㊃Mround(b㊃M)㊀S i⩾b㊃Mround(S i)其他ìîíïïïï,(3)其中:a,b是常数;round(㊀)是取整函数㊂步骤3:根据式(4)生成爆炸火花,并对其进行越界检测,根据式(5)将超出爆炸空间的爆炸火花映射到可行域空间内:N k i=N k i+A iˑU(-1,1),(4) N k i=N k LB+mod(N k i,(N k UB-N k LB)),(5)其中:N k i代表烟花i的第k维度的位置;U(-1,1)代表[-1,1]的随机分布;N k LB和N k UB分别为在维度k上解空间的下㊁上边界㊂步骤4:根据式(6)生成少量的高斯变异火花264㊀燕山大学学报2023并根据式(5)进行越界处理,增加了群体多样性:N k i=N k i㊃e,(6)其中,e~N(0,1)㊂步骤5:选择策略㊂根据式(7)从烟花㊁爆火花和高斯变异火花组成的候选者集合中选择N-1个烟花和当代适应度值最优的火花作为下一代烟花:p i=ðK j=1d(N i-N j)ðK j=1N j,(7)其中d(N i-Νj)表示候选集中个体i与除i以外所有个体之间的距离㊂步骤6:判断是否满足终止条件㊂满足则终止搜索,否则转至步骤2㊂2㊀算术优化算法2.1㊀算术优化算法实现步骤步骤1:初始化算法相关参数和种群㊂步骤2:计算适应度值,并记录最优位置㊂生成0到1之间的随机数r1,r2,r3㊂步骤3:根据式(8)计算数学优化器加速函数(Math Optimizer Acceleration function,MOA),记为FMOA,判断是否小于r1,小于则转步骤4进行全局搜索,否则转步骤5进行局部搜索:FMOA(iter)=M min+iter㊃M max-M minMaxIter,(8)其中:M min和M max分别是加速函数的最小值和最大值,为0.2和1;iter和MaxIter分别为当前迭代次数和最大迭代次数㊂步骤4:根据式(9)和式(10)(数学优化器概率(Math optimizer probability,MOP),记为FMOP)进行乘除运算更新粒子位置㊂其中:μ是调整搜索过程的控制参数,值为0.499;ε为极小值;X b(iter)为iter代最优位置;UB和LB分别为寻优空间上下界;α是敏感参数,取值为5㊂转步骤6㊂步骤5:根据式(11)进行加减运算更新位置:X(iter+1)=X b(iter)/(FMOP(iter)+ε)㊃((UB-LB)㊃μ+LB)㊀r2<0.5X b(iter)㊃FMOP(iter)㊃((UB-LB)㊃μ+LB)r2ȡ0.5{,(9) FMOP(iter+1)=1-iter1/α/MaxIter1/α,(10)X(iter+1)=X b(iter)-FMOP(iter)㊃((UB-LB)㊃μ+LB)㊀r3<0.5X b(iter)+FMOP(iter)㊃((UB-LB)㊃μ+LB)r3ȡ0.5{㊂(11)㊀㊀步骤6:计算适应度值,并记录最优位置㊂步骤7:判断是否满足结束条件,如果满足则输出最优解,否则跳转至步骤3㊂3㊀混合型烟花算法3.1㊀基于加减乘除机制的爆炸策略烟花算法的核心就是烟花爆炸环节,爆炸策略的好坏直接影响寻优能力㊂传统烟花算法以及大多数改进算法均存在爆炸半径盲目设定的问题,无法实现爆炸半径与寻优进度相适应,同时,在不同半径内爆炸的粒子覆盖率较高(极少部分粒子以爆炸半径为步长进行位置更新),进而导致算法早熟或者过早陷入局部最优㊂此外,对爆炸粒子随机维度进行位置更新,无法保证所选维度为寻优所需要的维度,即使该维度为寻优所需关键维度,仅对其实施一次0到A i之间随机幅度位移操作,难以保证寻优效果,应给予其更大的爆炸幅度及更多的位移次数㊂鸟群算法中通过学习因子调节认知经验和社会经验㊂在搜索前期较大的认知系数和较小的社会系数可以增大认知经验的比重,使得鸟群全局搜索能力增强,搜索后期较小的认知系数和较大的社会系数可以增大社会经验的比重,增强局部搜索能力㊂针对上述存在的问题,参考复杂适应理论中的自适应性和个体与种群的协同进化作用[12],采取随机均匀分布的加速度函数的AOA算法与FWA算法结合将更好地平衡算法在迭代初期和后期的全局及局部搜索能力㊂具体通过将AOA 算法位置更新方式取代烟花算法爆炸位置更新方式,利用乘除运算实现全局搜索,利用加减运算实现局部开发㊂第3期黄华娟等㊀一种多策略混合型烟花算法265㊀3.2㊀柯西变异策略传统烟花算法对随机选择的烟花的随机维度进行高斯变异操作,主要存在以下问题:第一,随机选择的烟花,其位置具有很大随机性,难以保证其位置优越性,再对其部分维度进行变异操作,难保证选到需要变异的维度,假设选到该维度,变异方向与大小又会对结果产生影响,总之,其整体位置变优的概率很小,大多数变异粒子适应度值差于当代最优适应度值而被淘汰,浪费了计算资源㊂第二,高斯分布特征决定了算法只在当前解领域范围内进行搜索,难以跳出局部最优㊂针对以上不足,本文根据式N k i=N k i㊃(1+c)(12)对变异算子进行柯西变异,其中c~C(0,1)㊂柯西变异算子的全局搜索能力更强,增大了变异范围,增加了种群多样性㊂3.3㊀精英选择策略传统烟花算法采用基于欧氏距离的轮盘赌选择策略有以下两个主要缺点:第一,计算复杂,限制收敛速度;第二,密度高或适应度值好的粒子周围存在较多粒子,其被选择到下一代的概率较小㊂为了加快收敛速度㊁提高收敛精度以及更好地迎合加减乘除机制,本文选用精英选择策略㊂3.4㊀算法伪代码及复杂度分析算法1㊀AOAFWA算法1输入:群体规范N,最大爆炸火花数M,变异火花数Mu2输出:最优解和最佳适应度值3搜索空间内随机初始化N个烟花;4计算烟花的适应度值;5㊀㊀FOR㊀iter=1TO MaxIter DO6㊀㊀㊀FOR㊀i=1TO N DO7㊀㊀㊀㊀根据式(1)㊁(3)得到爆炸子数S i;8㊀㊀㊀㊀根据式(8)㊁(9)㊁(10)㊁(11)生成爆炸火花,并根据式(5)进行越界处理;9㊀㊀㊀㊀根据式(12)生成变异火花,并根据式(5)进行越界处理;10㊀㊀㊀根据精英选择策略,选出N个烟花作为下一代烟花; 11㊀㊀㊀END FOR12㊀㊀END FOR13输出最佳解和最佳适应度;㊀㊀时间复杂度是指算法执行完成所需的时间,主要取决于问题被重复执行的次数㊂标准烟花算法的时间复杂度主要取决于种群大小n㊁迭代次数t和问题维度d㊂由标准烟花算法的算法步骤可知,它的时间复杂度为O(nˑtˑd)㊂AOAFWA算法是通过改进FWA算法而来,由算法伪代码可知,将原算法爆炸更新机制替换为AOA算法位置更新机制增加了O(t)的工作量,柯西变异策略及精英选择策略均未增加工作量㊂综上,AOAFWA算法的时间复杂度仍是O(nˑtˑd)㊂空间复杂度是算法在执行完成所需的存储空间,而标准烟花算法的空间复杂度主要取决于种群大小n和问题维度d,所以标准烟花算法的空间复杂度为O(nˑd)㊂改进算法AOAFWA中采用几个常量标记MOA和MOP的值,同时减少了常量A i的值,它所消耗的存储空间可以忽略不计,故AOAFWA的空间复杂度也是O(nˑd)㊂4㊀实验仿真与分析为了验证AOAFWA算法的有效性,进行了两组实验㊂第一组是通过8个标准测试函数(详细信息见表1,F1㊁F2㊁F3和F4为单峰函数,F5㊁F6㊁F7和F8中为多峰函数,维度均为30,最优值均为0)及FWA㊁AOA㊁GFWA[13]㊁LoTFWA[14]㊁GWO[15]和BOA[16]6个对比算法进行测试分析㊂第二组是应用于谱聚类问题㊂所有算法初始种群大小统一设置为30,最大迭代次数设为1000次㊂为了降低算法随机性对实验性能的影响,以30次独立实验的平均值作为评估算法寻优性能和收敛性能的最终结果㊂所有算法的实验在同一平台上运行,实验平台为Windows10(64bit)操作系统下的MATLAB R2018b,硬件条件为Intel Core i5-4210CPU 2.90GHz㊁8GB内存㊂参与测试的各算法的具体参数见表2㊂4.1㊀基准函数实验测试与分析表3列出了7种算法在不同测试函数下目标函数最优值㊁最差值㊁平均值㊁运行时间以及标准差的详细数据,其中粗体标注为最佳搜索结果㊂为了更直观地比较,表中将搜索质量进行量化,通过平均值㊁方差进行排序,排名越靠前,等级值越小,最后一列给出了排列次序㊂从表中数据可看266㊀燕山大学学报2023出:在8个测试函数中,AOAFWA 算法均排名第一,并且寻找到最优解㊂在单峰函数F 1㊁F 2㊁F 3和F 4中,AOAFWA 相较于标准FWA,其收敛精度误差从10-100附近降低至10-300,相较于其他对比算法所提升的数量级更多㊂在多峰函数F 5㊁F 6㊁F 7和F 8中,AOAFWA 与标准FWA 均能收敛到最优值,且收敛精度远超其他对比算法㊂这表明,标准FWA 自身已具备出色的寻优能力,改进后的AOAFWA 进一步增加了原算法的收敛精度㊂从运行时间看,AOAFWA 算法运行时间远小于FWA 算法及其改进算法,虽然略高于GWO㊁BOA 和AOA算法,但运行时间的略微增加换取了更高的寻优精度还是可以接受的㊂为补充说明,图1~图8分别描绘了8个测试函数寻优迭代对比曲线图㊂观察可知,改进后的AOAFWA 充分吸收了AOA 和FWA 的优点,既具备了AOA 快速寻优的特点(200代以内就搜寻到最优解),又具备了FWA 收敛精度高的特点(均快速收敛到最优解,远超其他对比算法)㊂通过实验数据和收敛图的展示,进一步说明了AOAFWA 算法相比其他FWA 变体算法以及其他智能优化算法在标准函数测试中的表现更优越㊂表1㊀标准测试函数Tab.1㊀Standard test function函数范围F 1=ðni =1x 2i [-100,100]F 2=ðn i =1|x i |+ᵑni =1|x i |[-10,10]F 3=ðn i =1ðnj =1x j ()2[-100,100]F 4=106x 21+ðni =2x 2i [-100,100]F 5=ðni =1[x 2i -10cos(2πx i )+10][-5.12,5.12]F 6=-20exp -0.21nðni =1x 2i()-exp1nðni =1cos(2πx i )()+20+e [-32,32]F 7=14000ðni =1x 2i-ᵑni =1cos x i i()+1[-600,600]F 8=0.5+sin 2(x 21+x 22+0.5)(1.0+0.0001(x 21+x 22))2[-100,100]表2㊀具体参数Tab.2㊀Specific parameters算法参数FWAN =30,M =20,Mu =10,a =0.04,b =0.8,A ^=0.8DGFWAN =30,M =20,σ=0.2,α=0,A c (1)=0.8D ,ρ+=1.2,ρ-=0.9LoTFWA N =30,M =20,σ=0.2,A c (1)=0.8D ,ρ+=1.2,ρ-=0.9BOAN =30,p =0.8,c =0.01,a =0.3GWO N =30AOA N =30,μ=0.449,α=5,Min =0.2,Max =1AOAFWA N =30,M =20,Mu =10,a =0.04,b =0.8,Min =0.2,Max =1,μ=0.499,α=5第3期黄华娟等㊀一种多策略混合型烟花算法267㊀表3㊀标准函数测试结果Tab.3㊀Test results of standard function函数算法平均值方差最优值最差值时间/s排名F1AOAFWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ1000.661 FWA 4.58ˑ10-87 4.40ˑ10-83 6.02ˑ10-115 2.00ˑ10-82 2.812 AOA 1.19ˑ10-69 3.56ˑ10-69 2.54ˑ10-289 1.19ˑ10-680.183 GFWA 3.78ˑ10-12 1.92ˑ10-11 1.51ˑ10-138.76ˑ10-11 3.147 LoTFWA 1.44ˑ10-19 2.74ˑ10-19 2.86ˑ10-219.51ˑ10-19 4.016 GWO9.04ˑ10-59 1.46ˑ10-59 1.16ˑ10-61 6.44ˑ10-590.234 BOA7.73ˑ10-23 2.34ˑ10-23 4.73ˑ10-23 1.54ˑ10-220.325F2AOAFWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ1000.661 FWA 1.17ˑ10-48 4.89ˑ10-45 2.17ˑ10-60 2.25ˑ10-44 2.273 AOA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ1000.181 GFWA 5.11ˑ10-2 3.00ˑ10-27.42ˑ10-7 1.90ˑ10-1 3.147 LoTFWA 1.94ˑ10-109.49ˑ10-11 4.65ˑ10-11 3.42ˑ10-10 4.096 GWO 1.17ˑ10-34 6.63ˑ10-35 2.02ˑ10-35 2.79ˑ10-340.234 BOA 3.06ˑ10-20 4.00ˑ10-21 2.10ˑ10-20 3.51ˑ10-200.325F3AOAFWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ1000.761 FWA 3.14ˑ10-58 1.29ˑ10-57 2.72ˑ10-93 5.91ˑ10-57 2.372 AOA 6.61ˑ10-5 1.98ˑ10-4 2.84ˑ10-195 6.61ˑ10-40.205 GFWA 1.95ˑ10-37.47ˑ10-4 1.29ˑ10-5 2.58ˑ10-3 3.796 LoTFWA 3.91ˑ10-2 2.36ˑ10-2 5.65ˑ10-39.36ˑ10-2 4.867 GWO 1.59ˑ10-14 3.34ˑ10-13 1.69ˑ10-19 1.51ˑ10-120.264 BOA8.56ˑ10-23 1.62ˑ10-23 5.50ˑ10-23 1.12ˑ10-220.393F4AOAFWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ100 1.051 FWA7.54ˑ10-84 2.05ˑ10-858.82ˑ10-1188.00ˑ10-85 2.933 AOA 6.02ˑ10-99 1.38ˑ10-98 6.74ˑ10-266 4.56ˑ10-980.312 GFWA 4.92ˑ103 3.40ˑ104 1.19ˑ100 1.50ˑ105 5.846 LoTFWA8.73ˑ106 3.52ˑ106 3.57ˑ106 1.63ˑ1077.157 GWO 2.12ˑ10-55 5.15ˑ10-55 3.53ˑ10-58 2.06ˑ10-540.374 BOA 1.52ˑ10-21 1.80ˑ10-18 1.39ˑ10-228.25ˑ10-190.595F5AOAFWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ1000.661 FWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ100 2.951 AOA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ1000.191 GFWA 3.90ˑ101 3.26ˑ1018.95ˑ100 1.20ˑ102 3.496 LoTFWA8.75ˑ101 1.52ˑ101 5.57ˑ101 1.11ˑ102 4.577 GWO 5.92ˑ10-1 2.07ˑ1000.00ˑ100 6.02ˑ1000.235 BOA 3.35ˑ10-13 1.26ˑ10-13 1.14ˑ10-13 6.25ˑ10-130.344268㊀燕山大学学报2023续表函数算法平均值方差最优值最差值时间/s排名F6AOAFWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ1000.661 FWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ100 3.561 AOA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ1000.191 GFWA 1.16ˑ10-1 4.89ˑ10-1 5.75ˑ10-8 2.22ˑ100 3.507 LoTFWA 1.35ˑ10-107.01ˑ10-11 2.04ˑ10-11 3.41ˑ10-10 4.746 GWO 1.31ˑ10-14 3.57ˑ10-15 1.07ˑ10-14 2.84ˑ10-140.234 BOA 4.05ˑ10-14 2.09ˑ10-15 3.20ˑ10-14 4.26ˑ10-140.325F7AOAFWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ100 6.781 FWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ100 2.981 AOA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ1000.191 GFWA 5.67ˑ10-38.31ˑ10-3 3.17ˑ10-13 2.96ˑ10-2 3.597 LoTFWA 1.67ˑ10-16 1.11ˑ10-160.00ˑ100 3.33ˑ10-16 4.745 GWO0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ1000.241 BOA 4.33ˑ10-168.93ˑ10-17 3.33ˑ10-16 5.55ˑ10-160.336F8AOAFWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ1000.651 FWA0.00ˑ1000.00ˑ1000.00ˑ1000.00ˑ100 3.621 AOA 6.81ˑ10-2 3.40ˑ10-20.00ˑ1008.51ˑ10-20.185 GFWA 1.01ˑ10-2 5.61ˑ10-28.51ˑ10-2 2.42ˑ10-1 3.214 LoTFWA 4.81ˑ10-1 4.97ˑ10-3 4.85ˑ10-1 5.00ˑ10-1 4.377 GWO 1.32ˑ10-17.19ˑ10-28.51ˑ10-2 2.42ˑ10-10.236 BOA 4.39ˑ10-16 5.30ˑ10-17 2.78ˑ10-16 5.00ˑ10-160.313图1㊀F1的收敛曲线Fig.1㊀The convergence curve of F 1图2㊀F2的收敛曲线Fig.2㊀The convergence curve of F2第3期黄华娟等㊀一种多策略混合型烟花算法269㊀图3㊀F3的收敛曲线Fig.3㊀The convergence curve of F 3图4㊀F4的收敛曲线Fig.4㊀The convergence curve of F 4图5㊀F5的收敛曲线Fig.5㊀The convergence curve of F 5图6㊀F6的收敛曲线Fig.6㊀The convergence curve of F 6图7㊀F7的收敛曲线Fig.7㊀The convergence curve of F 7图8㊀F8收敛曲线Fig.8㊀The convergence curve of F8270㊀燕山大学学报20234.2㊀Wilcoxon 统计校验仅以算法的平均值㊁标准差㊁最优值和最差值作为算法性能的评价指标是不够严谨的㊂因此对所提出的算法进行统计校验是必不可少的㊂为了比较文中7种算法的性能,采用了Wilcoxon 秩和校验㊂表4中记录了7种算法在8个测试函数上秩和校验后得到的p 值㊂当p 值小于0.05时,说明两种对比算法之间存在较大的差异,否则表明对比算法存在一定的相似性㊂p 值为 NA 表示此校验不适用㊂表4㊀Wilcoxon 秩和校验的p 值Tab.4㊀p-value of Wilcoxon rank-sum test函数AOAFWA /FWA AOAFWA /AOA AOAFWA /GFWA AOAFWA /LoTFWAAOAFWA /GWO AOAFWA /BOA F 18.01ˑ10-9 6.39ˑ10-58.01ˑ10-98.01ˑ10-98.01ˑ10-98.01ˑ10-9F 28.01ˑ10-9NA8.01ˑ10-98.01ˑ10-98.01ˑ10-98.01ˑ10-9F 38.01ˑ10-9 6.39ˑ10-58.01ˑ10-98.01ˑ10-98.01ˑ10-98.01ˑ10-9F 48.01ˑ10-96.39ˑ10-58.01ˑ10-98.01ˑ10-98.01ˑ10-98.01ˑ10-9F 5NA NA 8.01ˑ10-98.01ˑ10-9 3.77ˑ10-47.45ˑ10-9F 6NA NA 8.01ˑ10-98.01ˑ10-9 2.66ˑ10-9 3.73ˑ10-9F 7NA NA 8.01ˑ10-98.00ˑ10-7NA6.85ˑ10-9F 8NA5.97ˑ10-37.56ˑ10-97.30ˑ10-98.01ˑ10-95.88ˑ10-9㊀㊀由表4可知,在所有测试函数中,AOAFWA 与其他对比算法有很大的不同,这说明了AOAFWA 具有较好的寻优性能㊂4.3㊀NJW 谱聚类问题测试与分析NJW 谱聚类可以理解为将高维空间的数据映射到低维,然后在低维空间用其他聚类算法(如K -means)进行聚类㊂本文通过AOAFWA 算法代替K -means 算法寻找最优初始中心簇,评价指标选取为所有点到相应重心的距离的平方和F (D K ,ξ),F (D K ,ξ)=ðKk =1ðnki =1Dist (d (k )i,ξk ),(13)其中:数据集D K 为原始数据划分为K 类得到新的数据集,聚类中心ξ=ξ1,ξ2, ,ξK {},d (k )i为第k 类别中第i 个数据,Dist 为欧氏距离的平方㊂通过2个UCI 数据集Iris 和Wine 及不同尺度参数σ进行分类实验,由于尺度参数对聚类结果有较大影响,所以进行大量实验以验证算法寻优能力,篇幅有限,表5只列出了部分AOAFWA 算法与FWA 算法以及K -means 算法在30次独立运行后的寻优结果,算法具体参数设置见表2㊂与FWA 相比,无论从平均值㊁标准差㊁最优值或者最差值来看,AOAFWA 算法均获得较佳的数据,平均值至少优于原算法3.3%,体现其出色的稳定性与寻优精度;与K -means 相比,AOAFWA 算法平均值依然最低,虽然最优值差于K -means 算法(最多为1.7%),但最差值却优于K -means 算法(最少为3.1%)㊂从标准差可看出:改进后的AOAFWA 算法标准差远远低于改进前的FWA 算法,鉴于K -means 算法具有较大的随机性,所以出现个别标准差低于AOAFWA 算法的情况也可接受㊂综上AOAFWA 收敛速度㊁收敛精度㊁稳定性都优于FWA,表现出对FWA 改进后的AOAFWA 出色效果㊂5㊀结论针对FWA 算法的缺点,本文在传统烟花算法的基础上进行改进,融合了AOA 算法收敛速度快的优点㊂对于AOA 算法而言,FWA 算法烟花爆炸机制的存在增加了AOA 算法的并行寻优能力,进一步提高了AOA 算法寻优速度与寻优精度;对于FWA 算法而言,AOA 算法的加减乘除机制为已经处于瓶颈期的爆炸策略提供了新的思路,进一步平衡了FWA 算法勘探与开采能力㊂通过测试,该算法对于函数优化能够较好的寻优求解,在4个测试函数上精度误差从10-100附近降低至10-300(同时从收敛曲线图能够看出该算法均在300代以内就收敛到全局最优解),在谱聚类算法的应用中适应度值平均值至少优于原算法3.3%,证明本文AOAFWA 算法相比于其他算法在求解精度方第3期黄华娟等㊀一种多策略混合型烟花算法271㊀面具有更强的竞争优势,但运行效率稍低于GWO㊁AOA和BOA算法,这也是FWA算子众多所带来的弊端㊂这篇文章限于篇幅,并未对FWA算子进行简化再融合AOA,未来将考虑删除变异算子并将改进后的AOA融入到FWA中,进一步减少算法运行时间,提高收敛精度,并用于解决更多实际问题㊂表5㊀不同算法在谱聚类问题测试结果比较Tab.5㊀Comparison of test results of different algorithms in Spectral clustering problem数据集尺度参数测试算法最优值最差值平均值标准差WineAOAFWA 1.7495 1.9428 1.78250.0637 0.3FWA 1.7731 2.1561 1.90040.0882K-means 1.7491 2.2975 1.90220.0972AOAFWA 1.5794 1.6889 1.64460.0457 1.0FWA 1.5964 2.0589 1.74440.1255K-means 1.5790 2.1350 1.75840.0983AOAFWA 1.5086 1.6312 1.57390.0316 1.7FWA 1.5340 1.9446 1.72650.1027K-means 1.5083 2.0737 1.65350.0993IrisAOAFWA 1.8401 1.9011 1.86290.0164 0.3FWA 1.8660 1.9618 1.90530.0266K-means 1.8388 1.9681 1.86740.0008AOAFWA 1.7738 1.9229 1.79970.0307 1.0FWA 1.8164 1.9417 1.86040.0318K-means 1.7724 1.8976 1.81180.0015AOAFWA 1.7981 1.8921 1.82480.0225 1.7FWA 1.8143 1.9724 1.88500.0423K-means 1.7964 1.9545 1.83600.0014参考文献1TAN Y ZHU Y.Fireworks algorithm for optimization C// Proceedings of International Conference in Swarm Intelligence Berlin Germany 2010 355-364.2ABUALIGAH L DIABAT A MIRJALILI S et al.The arithmetic optimization algorithm J .Computer Methods in Applied Mechanics and Engineering 2021 376 113609.3俞家珊.基于改进的谱聚类算法和TTLSSA-LSSVM的短期电力负荷预测 D .无锡江南大学2021.YU J S.Short-term load forecasting based on improved spectral clustering algorithm and TTLSSA-LSSVM D .Wuxi Jiangnan University 2021.4王盛慧夏永丰.基于搜寻者优化算法的K-means聚类算法 J .燕山大学学报2018 42 5 422-426.WANG S H XIA Y F.K-means clustering algorithm based on seeker optimization algorithm J .Journal of Yanshan University 2018 42 5 422-426.5ZHENG S Q JANECEK A TAN Y.Enhanced fireworksalgorithm C//IEEE Congress on Evolutionary Computation Cancun Mexico 2013 2069-2077.6ZHENG S Q JANECEK A LI J et al.Dynamic search in fireworks algorithm C//IEEE Congress on Evolutionary Computation Beijing China 2014 3222-3229.7LI J ZHENG S Q TAN Y.Adaptive fireworks algorithm C// IEEE Congress on Evolutionary Computation Beijing China 2014 3214-3221.8GAO H Y DIAO M.Cultural fireworks algorithm and its application for digital filters design J .International Journal of Modelling Identification and Control 2011 14 4 324-331. 9ZHENG Y J XU X L LING H F et al.A hybrid fireworks optimization method with differential evolution operators J . Neurocomputing 2015 148 75-80.10向万里马寿峰.基于轮盘赌反向选择机制的蜂群优化算法 J .计算机应用研究2013 30 1 86-89.XIANG W L MA S F.Artificial bee colony based on reserve selection of roulette J .Application Research of Computers 2013 30 1 86-89.11曾敏赵志刚李智梅.带柯西变异的自学习改进烟花算法272㊀燕山大学学报2023J .小型微型计算机系统2020 41 2 264-270. ZENG M ZHAO Z G LI Z M.Self-learning improved fireworks algorithm with Cauchy mutation J .Journal of Chinese Computer Systems 2020 41 2 264-270.12聂瀚杨文荣马晓燕等.基于改进鸟群算法的离网微电网优化调度 J .燕山大学学报2019 43 3 228-237.NIE H YANG W R MA X Y et al.Optimal scheduling of islanded microgrid based on improved bird swarm optimization algorithm J .Journal of Yanshan University 2019 433 228-237.13LI J ZHENG S Q TAN Y.The effect of information utilization Introducing a novel guiding spark in the fireworks algorithm J .IEEE Transactions on Evolutionary Computation 2017 141 153-166.14LI J TAN Y.Loser-out tournament-based fireworks algorithm for multimodal function optimization J .IEEE Transactions on Evolutionary Computation 2018 22 5 679-691.15VAPNIK V N LERNER A Y.Pattern recognition using generalized portrait method J .Automation and Remote Control 1963 24 774-780.16ARORA S SINGH S.Butterfly optimization algorithm a novel approach for global optimization J .Soft Computing 2019 233 715-734.A multi-strategy hybrid fireworks algorithmHUANG Huajuan1ZOU Pengcheng2WEI Xiuxi1XU Chen21.College of Artificial Intelligence Guangxi Minzu University Nanning Guangxi530006 China2.College of Electronic Information Guangxi Minzu University Nanning Guangxi530006 ChinaAbstract Aiming at the shortcomings of traditional fireworks algorithm such as low searching accuracy poor diversity and blindness of explosion updating a hybrid fireworks algorithm was proposed by integrating arithmetic optimization algorithm.Firstly the algorithm uses arithmetic multiplication division addition and subtraction to realize the fireworks explosion operation so as to improve the convergence ability and optimization accuracy of the algorithm.Secondly the"elite"selection strategy is used to replace the"roulette"selection strategy to reduce the algorithm complexity.Finally the effectiveness of this algorithm was evaluated by eight benchmark function optimization tests and two UCI basic data sets were classified by the joint spectral clustering algorithm.The experimental results show that the algorithm can better optimize the function optimization.The accuracy error of the four test functions is reduced from10-100to10-300.In the application of spectral clustering algorithm the average fitness value is at least3.3%better than the original algorithm and the overall performance is excellent.Keywords fireworks algorithm arithmetic optimization algorithm benchmark function optimization spectral clusteringCopyright©博看网. All Rights Reserved.。

二进制反向学习烟花算法求解多维背包问题

二进制反向学习烟花算法求解多维背包问题

二进制反向学习烟花算法求解多维背包问题薛俊杰;王瑛;孟祥飞;肖吉阳【摘要】In order to apply the fireworks algorithm to discrete optimization and solve the multi-dimensional knapsack problem effectively,an binary opposite backward learning fireworks algorithm is designed.Firstly,on the basis of defining binary string distance and binary convertoperator,fireworks explosion and mutation explo-sion are discretized to build the binary fireworks algorithm.Secondly,incomplete binary backward operator is designed to build the binary opposite backward learning fireworks algorithm,and its convergence is proved.Fi-nally,compared with several typical evolutionary algorithms,simulation on 10 typical benchmark instances is analyzed.Results show that the binary opposite backward learning based fireworks algorithm has excellent per-formance on convergence rate,optimization accuracy and robustness.%为将烟花算法应用于离散优化领域并有效求解多维背包问题,构建一种二进制反向学习烟花算法。

一种新的烟花算法求解约束优化问题

一种新的烟花算法求解约束优化问题

一种新的烟花算法求解约束优化问题徐焕芬;刘伟;谢月珊【摘要】Aiming at the drawbacks of existing algorithms in solving constrained optimization problems like slow convergence speed and low accuracy, this paper proposes a new fireworks algorithm to solve constrained optimization problems. The algorithm not only utilizes parameter equation method to reduce dimension, which aiming at dealing with the equality constraint functions, but also uses annealing penalty function method to dispose of inequality constraints. The experimental results demonstrate that the proposed algorithm has the advantages of strong searching ability, fast convergence speed, high convergence precision and so on. It is a stable algorithm to solve constrained optimization problems.%针对已有算法在求解约束优化问题时存在收敛速度慢、求解精度不高的缺陷, 提出一种新的烟花算法求解约束优化问题.该算法利用参数方程法进行降维处理等式约束函数, 使用退火罚函数法处理不等式约束.仿真实验结果表明, 新的算法具有寻优能力较强、收敛速度快、收敛精度高等优点, 是一种稳定的约束优化求解算法.【期刊名称】《佛山科学技术学院学报(自然科学版)》【年(卷),期】2018(036)006【总页数】8页(P13-20)【关键词】烟花算法;罚函数;参数方程;约束优化【作者】徐焕芬;刘伟;谢月珊【作者单位】广东工业大学应用数学学院,广东广州 510520;广东工业大学应用数学学院,广东广州 510520;广东工业大学应用数学学院,广东广州 510520【正文语种】中文【中图分类】TP18现实生活中的大部分优化问题都属于约束优化问题,因此研究高效求解约束优化问题的算法尤为重要。

烟花爆炸优化算法及其改进研+究

烟花爆炸优化算法及其改进研+究

华 中 科 技 大 学 硕 士 学 位 论 文摘要进化算法是近年来发展起来的一种新型的优化算法。

与传统优化算法相比,这些算法对目标函数和约束函数的要求十分宽松,它们的基本思想都是来自对某种自然规律的模仿,具有人工智能的特点,并且在多种复杂的优化问题上都能发挥出良好的性能。

但是由于进化算法基本上都是“问题依赖”的,不存在一种全能的优化算法,因此,探索新的高效算法仍然是值得探讨的问题,也是目前优化算法领域的一个研究热点。

烟花爆炸优化算法(FEO)是模拟烟花爆炸现象的一种新型的并行弥漫式搜索的优化算法。

该算法在搜索空间中生成一定数目的烟花弹,对每个烟花弹执行爆炸操作,使得爆炸产生的火星对原烟花弹(炸点)的一定邻域范围进行随机搜索,并通过调整烟花弹的爆炸方式均衡算法的全局探索和局部搜索的能力。

对标准测试函数的优化实验初步验证了该算法的优良性能。

文中首先概述了进化算法与传统优化算法的区别并重点介绍了几种经典的进化算法及其主要思想和步骤。

同时分析了目前在进化算法领域主要的研究方向以及一些主要的研究成果。

然后引入了最近基于进化算法的基本结构框架而提出的烟花爆炸优化算法,并对该算法的基本思想、数学模型以及主要步骤进行了详细的叙述。

算法良好的求解精度、稳定性以及收敛速度也在具体的优化试验中得到了初步的验证。

接着文中针对烟花爆炸基础算法所存在的不足之处,引入了最优方向以及有效爆炸空间的概念,使用新的爆炸机制以及局部搜索方法对原算法进行了改进,提出了新的IFEO算法并通过实验进行了进一步的探讨。

关键词:进化算法,烟花爆炸优化算法,并行搜索,爆炸方向,爆炸半径,局部搜索华 中 科 技 大 学 硕 士 学 位 论 文AbstractAs a novel kind of optimization approaches developed in recent years, evolutionary algorithms have less limitation about the constrained conditions and goal functions of the optimized problems to be solved compared with the traditional methods. The ideas of the evolutionary algorithms are mostly based on the imitation of some natural phenomena, so they are characterized with artificial intelligence. Although the evolutionary algorithms have been successfully applied in different areas, they are “problem depended”essentially and there is no omnipotent method. So, seeking for a highly efficient algorithm is still a valuable task, which has become a hot topic in optimization researching area.Recently,a novel fireworks explosion optimization (FEO) algorithm based on the idea of fireworks explosion is introduced. The proposed algorithm generates a certain number of fireworks bombs in the search space and each fireworks bomb will implement the operation of explosion, which can generate plenty of sparks to explore in the neighborhood of the original fireworks bomb. The proposed method has been tested on several benchmark functions. Primary results have indicated the good performance of this new algorithm in terms of convergence rate, precision and stabilization.Firstly, the mainly differences between evolutionary approaches and traditional methods are discussed, and the basic ideas and procedures of some classical algorithms are introduced subsequently. The major research interests and main achievements have also been discussed. Then, based on the general structures of the evolutionary approaches, a new algorithm named Fireworks Explosion Optimization was proposed, at the same time, the idea, mathematical model and steps of this algorithm are described in detail. The good performance of this new algorithm is also indicated with experiments on stander test functions.To solve the problem encountered by the FEO algorithm, the paper has proposed the concepts of optimal direction and efficient explosion space and developed a improved algorithm named IFEO, which contains new explosion mechanism and high-precision local search method. Extensive experiments are designed for further investigating on the efficiency of this improved method.Key words: Evolutionary algorithm, Fireworks Explosion Optimization, parallel search, explosion direction, explosion radius, local research独创性声明本人声明所呈交的学位论文是我个人在导师指导下进行的研究工作及取得的研究成果。

烟花算法的应用场景

烟花算法的应用场景

烟花算法的应用场景
烟花算法是一种优化算法,在以下场景中可以得到良好的应用:
1. 机器学习中的特征选择:烟花算法可以帮助筛选出适合的特征,提高模型预测的准确性。

2. 工程设计优化:比如涉及到流量、材料强度、尺寸等方面的多元优化问题,可以使用烟花算法来寻求最优解。

3. 无人机路径规划:根据无人机的起点、终点、避障点等信息,采用烟花算法可以寻找路径规划的最佳方案。

4. 金融风险评估:通过对金融数据的建模和优化,使用烟花算法可以预测和分析金融风险。

5. 多目标优化问题:对于有多个目标的最优化问题,烟花算法可以在不同的目标之间平衡权衡,找到最合适的解决方案。

caRamel包的中文名字:自动校准通过多目标优化算法包说明书

caRamel包的中文名字:自动校准通过多目标优化算法包说明书

Package‘caRamel’October12,2022Type PackageTitle Automatic Calibration by Evolutionary Multi Objective AlgorithmVersion1.3Date2022-02-01Author Nicolas Le Moine[aut],Celine Monteil[aut],Frederic Hendrickx[ctb],Fabrice Zaoui[aut,cre]Maintainer Fabrice Zaoui<********************>Depends geometry,parallelSuggests markdown,rmarkdown,knitr,testthatDescription Multi-objective optimizer initially developed for the calibration of hydrological models.The algorithm is a hybrid of the MEAS algorithm(Efstratiadis and Koutsoyian-nis(2005)<doi:10.13140/RG.2.2.32963.81446>)by using the direc-tional search method based on the simplexes of the objective spaceand the epsilon-NGSA-II algorithm with the method of classification of the parameter vec-tors archiving management by epsilon-dominance(Reed and De-vireddy<doi:10.1142/9789812567796_0004>).License GPL-3|file LICENSEURL https:///fzao/caRamelBugReports https:///fzao/caRamel/issuesEncoding UTF-8RoxygenNote7.1.2NeedsCompilation noVignetteBuilder knitrRepository CRANDate/Publication2022-02-2509:20:02UTC12caRamel-package R topics documented:caRamel-package (2)boxes (3)caRamel (4)Cextrap (7)Cinterp (8)Crecombination (9)Cusecovar (9)decrease_pop (10)Dimprove (11)dominate (12)dominated (13)downsize (13)matvcov (14)newXval (15)pareto (16)plot_caramel (17)plot_pareto (18)plot_population (18)rselect (19)val2rank (20)vol_splx (21)Index22 caRamel-package caRamel optimizerDescriptionAutomatic Calibration by Evolutionary Multi Objective AlgorithmDetailscaRamel is a package for multi-objective optimization of complex environmental models.The algorithm is a hybrid of the MEAS algorithm(Efstratiadis and Koutsoyiannis,2005)by using the directional search method based on the simplexes of the objective space and the epsilon-NGSA-II algorithm with the method of classification of the parameter vectors archiving management by epsilon-dominance(Reed and Devireddy,2004).The main function of the package is caRamel().This function uses all the other functions of the package.An example of an hydrological optimization is available on the following presentation:useR!2019 Author(s)Fabrice Zaoui,Nicolas Le Moine,Celine Monteil(EDF R&D-LNHE)boxes3ReferencesEfstratiadis,A.and Koutsoyiannis,D.(2005)The multi-objective evolutionary annealing-simplex method and its application in calibration hydrological models,in EGU General Assembly2005, Geophysical Research Abstracts,V ol.7,Vienna,04593,European Geophysical Union.doi:10.13140/ RG.2.2.32963.81446.Le Moine,N.(2009)Description d’un algorithme génétique multi-objectif pour la calibration d’un modèle pluie-débit(in French).Post-Doctoral Status Rep.2,UPMC/EDF,13pp.Reed,P.and Devireddy,D.(2004)Groundwater monitoring design:a case study combining epsilon-dominance archiving and automatic parameterization for the NSGA-II,in Coello-Coello C,editor.Applications of multi-objective evolutionary algorithms,Advances in natural computation series, vol.1,pp.79-100,World Scientific,New York.doi:10.1142/9789812567796_0004.boxes Box numbering for each points individual of the populationDescriptionThis function returns a box number for each points individual of the populationUsageboxes(points,prec)Argumentspoints:matrix of the objectivesprec:(double,length=nobj)desired accuracy for the objectives(edges of the boxes)Valuevector of numbers for the boxes.boxes[i]gives the number of the box containing points[i].Author(s)Fabrice ZaouiExamples#Definition of the parameterspoints<-matrix(rexp(200),100,2)prec<-c(1.e-3,1.e-3)#Call the functionres<-boxes(points,prec)caRamel MAIN FUNCTION:multi-objective optimizerDescriptionMulti-objective optimizer.It requires to define a multi-objective function(func)to calibrate the model and bounds on the parameters to optimize.UsagecaRamel(nobj,nvar,minmax,bounds,func,popsize,archsize,maxrun,prec,repart_gene=c(5,5,5,5),gpp=NULL,blocks=NULL,pop=NULL,funcinit=NULL,objnames=NULL,listsave=NULL,write_gen=FALSE,carallel=1,numcores=NULL,graph=TRUE,sensitivity=FALSE,verbose=TRUE,worklist=NULL)Argumentsnobj:(integer,length=1)the number of objectives to optimize(nobj>=2)nvar:(integer,length=1)the number of variablesminmax:(logical,length=nobj)the objective is either a minimization(FALSE value) or a maximization(TRUE value)bounds:(matrix,nrow=nvar,ncol=2)lower and upper bounds for the variables func:(function)the objective function to optimize.Input argument is the number of parameter set(integer)in the x matrix.The function has to return a vector of atleast’nobj’values(Objectives1to nobj are used for optimization,values afternobj are recorded for information.).popsize:(integer,length=1)the population size for the genetic algorithmarchsize:(integer,length=1)the size of the Pareto frontmaxrun:(integer,length=1)the max.number of simulations allowedprec:(double,length=nobj)the desired accuracy for the optimization of the objec-tivesrepart_gene:(integer,length=4)optional,number of new parameter sets for each rule andper generationgpp:(integer,length=1)optional,calling frequency for the rule"Fireworks"blocks(optional):groups for parameterspop:(matrix,nrow=nset,ncol=nvar or nvar+nobj)optional,initial population(used to restart an optimization)funcinit(function,optional):the initialization function applied on each node of clusterwhen parallel computation.The arguments are cl and numcores objnames(optional):names of the objectiveslistsave(optional):names of the listingfiles.Default:None(no output).If exists,fields to be defined:"pmt"(file of parameters on the Pareto Front),"obj"(fileof corresponding objective values),"evol"(evolution of maximum objectivesby generation).Optionalfield:"totalpop"(total population and correspondingobjectives,useful to restart a computation)write_gen:(logical,length=1)optional,if TRUE,savefiles’pmt’and’obj’at eachgeneration(FALSE by default)carallel:(integer,length=1)optional,do parallel computations?(0:sequential,1:par-allel(default),2:user-defined choice)numcores:(integer,length=1)optional,the number of cores for the parallel computations(all cores by default)graph:(logical,length=1)optional,plot graphical output at each generation(TRUEby default)sensitivity:(logical,length=1)optional,compute thefirst order derivatives of the paretofront(FALSE by default)verbose:(logical,length=1)optional,verbosity mode(TRUE by default)worklist:optional values to be transmitted to the user’s function(not used)DetailsThe optimizer was originally written for Scilab by Nicolas Le Moine.The algorithm is a hybrid of the MEAS algorithm(Efstratiadis and Koutsoyiannis(2005)<doi:10.13140/RG.2.2.32963.81446>) by using the directional search method based on the simplexes of the objective space and the epsilon-NGSA-II algorithm with the method of classification of the parameter vectors archiving management by epsilon-dominance(Reed and Devireddy<doi:10.1142/9789812567796_0004>).Reference:"Multi-objective calibration by combination of stochastic and gradient-like parame-ter generation rules–the caRamel algorithm"Celine Monteil(EDF),Fabrice Zaoui(EDF),Nicolas Le Moine(UPMC)and Frederic Hendrickx(EDF)June2020Hydrology and Earth System Sciences 24(6):3189-3209DOI:10.5194/hess-24-3189-2020Documentation:"Principe de l’optimiseur CaRaMEL et illustration au travers d’exemples de parametres dans le cadre de la modelisation hydrologique conceptuelle"Frederic Hendrickx(EDF)and Nicolas Le Moine(UPMC)Report EDF H-P73-2014-09038-FRValueList of seven elements:success return value(logical,length=1):TRUE if successfullparameters Pareto front(matrix,nrow=archsize,ncol=nvar)objectives objectives of the Pareto front(matrix,nrow=archsize,ncol=nobj+nadditional)derivatives list of the Jacobian matrices of the Pareto front if the sensitivity parameter is TRUE or NA otherwisesave_crit evolution of the optimal objectivestotal_pop total population(matrix,nrow=popsize+archsize,ncol=nvar+nobj+nadditional)gpp the calling period for the third generation rule(independent sampling with a priori parameters variance)Author(s)Fabrice Zaoui-Celine MonteilExamples#Definition of the test functionviennet<-function(i){val1<-0.5*(x[i,1]*x[i,1]+x[i,2]*x[i,2])+sin(x[i,1]*x[i,1]+x[i,2]*x[i,2])val2<-15+(x[i,1]-x[i,2]+1)*(x[i,1]-x[i,2]+1)/27+(3*x[i,1]-2*x[i,2]+4)*(3*x[i,1]-2*x[i,2]+4)/8 val3<-1/(x[i,1]*x[i,1]+x[i,2]*x[i,2]+1)-1.1*exp(-(x[i,1]*x[i,1]+x[i,2]*x[i,2]))return(c(val1,val2,val3))}#Number of objectivesnobj<-3#Number of variablesnvar<-2#All the objectives are to be minimizedminmax<-c(FALSE,FALSE,FALSE)#Define the bound constraintsbounds<-matrix(data=1,nrow=nvar,ncol=2)bounds[,1]<--3*bounds[,1]bounds[,2]<-3*bounds[,2]#Caramel optimizationresults<-caRamel(nobj=nobj,nvar=nvar,minmax=minmax,bounds=bounds,func=viennet,popsize=100,archsize=100,maxrun=500,prec=matrix(1.e-3,nrow=1,ncol=nobj),carallel=0)Cextrap7 Cextrap Extrapolation along orthogonal directions to the Pareto front in thespace of the objectivesDescriptiongives n new candidates by extrapolation along orthogonal directions to the Pareto front in the space of the objectivesUsageCextrap(param,crit,directions,longu,n)Argumentsparam:matrix[NPoints,NPar]of already evaluated parameterscrit:matrix[Npoints,NObj]of associated criteriadirections:matrix[NDir,2]the starting and ending points of the candidate vectors longu:matrix[NDir,1]giving the length of each segment thus defined in the OBJ space(measure of the probability of exploring this direction) n:number of new vectors to generateValuexnew:matrix[n,NPar]of new vectorspcrit:matrix[n,NObj]estimated positions of new sets in the goal spaceAuthor(s)Fabrice ZaouiExamples#Definition of the parametersparam<-matrix(rexp(100),100,1)crit<-matrix(rexp(200),100,2)directions<-matrix(c(1,3,2,7,13,40),nrow=3,ncol=2)longu<-runif(3)n<-5#Call the functionres<-Cextrap(param,crit,directions,longu,n)8Cinterp Cinterp Interpolation in simplexes of the objective spaceDescriptionproposes n new candidates by interpolation in simplexes of the objective spaceUsageCinterp(param,crit,simplices,volume,n)Argumentsparam:matrix[NPoints,NPar]of already evaluated parameterscrit:matrix[Npoints,NObj]of associated criteriasimplices:matrix[NSimp,NObj+1]containing all or part of the triangulation of the space of the objectivesvolume:matrix[NSimp,1]giving the volume of each simplex(measure of the prob-ability of interpolating in this simplex)n:number of new vectors to generateValuexnew:matrix[n,NPar]of new vectorspcrit:matrix[n,NObj]estimated positions of new sets in the goal spaceAuthor(s)Fabrice ZaouiExamples#Definition of the parametersparam<-matrix(rexp(100),100,1)crit<-matrix(rexp(200),100,2)simplices<-matrix(c(15,2,1,15,22,1,18,15,2,17,13,14),nrow=4,ncol=3)volume<-runif(4)n<-5#Call the functionres<-Cinterp(param,crit,simplices,volume,n)Crecombination9 Crecombination Recombination of the sets of parametersDescriptionperforms a recombination of the sets of parametersUsageCrecombination(param,blocks,n)Argumentsparam:matrix[.,NPar]of the population of parametersblocks:list of integer vectors:list of variable blocks for recombinationn:number of new vectors to generateValuexnew:matrix[n,NPar]of new vectorsAuthor(s)Fabrice ZaouiExamples#Definition of the parametersparam<-matrix(rexp(15),15,1)blocks<-NULLn<-5#Call the functionres<-Crecombination(param,blocks,n)Cusecovar New parameter vectors generation respecting a covariance structureDescriptionproposes new parameter vectors respecting a covariance structureUsageCusecovar(xref,amplif,n)10decrease_pop Argumentsxref:matrix[.,NPar]of the reference population whose covariance structure is to be usedamplif:amplification factor of the standard deviation on each parametern:number of new vectors to generateValuexnew:matrix[n,NPar]of new vectorsAuthor(s)Fabrice ZaouiExamples#Definition of the parametersxref<-matrix(rexp(35),35,1)amplif<-2.n<-5#Call the functionres<-Cusecovar(xref,amplif,n)decrease_pop Decreasing of the population of parameters setsDescriptiondecreases the population of parameters setsUsagedecrease_pop(matobj,minmax,prec,archsize,popsize)Argumentsmatobj:matrix of objectives,dimension(ngames,nobj)minmax:vector of booleans,of dimension nobj:TRUE if maximization of the objective, FALSE otherwiseprec:nobj dimension vector:accuracyarchsize:integer:archive sizepopsize:integer:population sizeDimprove11 ValueA list containing two elements:ind_arch indices of individuals in the updated Pareto frontind_pop indices of individuals in the updated populationAuthor(s)Fabrice ZaouiExamples#Definition of the parametersmatobj<-matrix(rexp(200),100,2)prec<-c(1.e-3,1.e-3)archsize<-100minmax<-c(FALSE,FALSE)popsize<-100#Call the functionres<-decrease_pop(matobj,minmax,prec,archsize,popsize)Dimprove Determination of directions for improvementDescriptiondetermines directions for improvementUsageDimprove(o_splx,f_splx)Argumentso_splx:matrix of objectives of simplexes(nrow=npoints,ncol=nobj)f_splx:vector(npoints)of associated Pareto numbers(1=dominated)Valuelist of elements"oriedge":oriented edges and"ledge":lengthAuthor(s)Fabrice ZaouiExamples#Definition of the parameterso_splx<-matrix(rexp(6),3,2)f_splx<-c(1,1,1)#Call the functionres<-Dimprove(o_splx,f_splx)dominate Successive Pareto fronts of a populationDescriptioncalculates the successive Pareto fronts of a population(classification"onion peel"),when objectives need to be maximized.Usagedominate(matobj)Argumentsmatobj:matrix[NInd,NObj]of objectivesValuef:vector of dimension NInd of dominancesAuthor(s)Fabrice ZaouiExamples#Definition of the parametersmatobj<-matrix(runif(200),100,2)#Call the functionpareto_rank<-dominate(matobj)dominated Rows domination of a matrix by a vectorDescriptionindicates which rows of the matrix Y are dominated by the vector(row)xUsagedominated(x,Y)Argumentsx:row vecteurY:matrixValueD:vector of booleansAuthor(s)Fabrice ZaouiExamples#Definition of the parametersY<-matrix(rexp(200),100,2)x<-Y[1,]#Call the functionres<-dominated(x,Y)downsize Downsizing of a population to only one individual per box up to agiven accuracyDescriptionreduces the number of individuals in a population to only one individual per box up to a given accuracyUsagedownsize(points,Fo,prec)14matvcovArgumentspoints:matrix of objectivesFo:rank on the front of each point(1:dominates on the Pareto)prec:(double,length=nobj)desired accuracy for sorting objectivesValuevector indicesAuthor(s)Fabrice ZaouiExamples#Definition of the parameterspoints<-matrix(rexp(200),100,2)prec<-c(1.e-3,1.e-3)Fo<-sample(1:100,100)#Call the functionres<-downsize(points,Fo,prec)matvcov Calculation of the variances-covariances matrix on the reference pop-ulationDescriptioncalculates the variances-covariances matrix on the reference populationUsagematvcov(x,g)Argumentsx:populationg:center of reference population(in the parameter space)Valuerr:variances-covariances matrix on the reference populationAuthor(s)Fabrice ZaouinewXval15Examples#Definition of the parametersx<-matrix(rexp(30),30,1)g<-mean(x)#Call the functionres<-matvcov(x,g)newXval Generation of a new population of parameter sets following thefiverules of caRamelDescriptiongenerates a new population of parameter sets following thefive rules of caRamelUsagenewXval(param,crit,isperf,sp,bounds,repart_gene,blocks,fireworks)Argumentsparam:matrix[Nvec,NPar]of parameters of the current populationcrit:matrix[Nvec,NObj]of associated criteriaisperf:vector of Booleans of length NObj,TRUE if maximization of the objective, FALSE otherwisesp:variance a priori of the parametersbounds:lower and upper bounds of parameters[NPar,2]repart_gene:matrix of length4giving the number of games to be generated with each rule:1Interpolation in the simplexes of the front,2Extrapolation accordingto the directions of the edges"orthogonal"to the front,3Random draws withprescribed variance-covariance matrix,4Recombination by functional blocks blocks:list of integer vectors containing function blocks of parametersfireworks:boolean,TRUE if one tests a random variation on each parameter and each maximum of O.F.Valuexnew:matrix of new vectors[sum(Repart_Gene)+eventually(nobj+1)*nvar iffireworks,NPar] project_crit:assumed position of the new vectors in the criteria space:[sum(Repart_Gene)+even-tually(nobj+1)*nvar iffireworks,NObj];Author(s)Fabrice Zaoui16paretoExamples#Definition of the parametersparam<-matrix(rexp(100),100,1)crit<-matrix(rexp(200),100,2)isperf<-c(FALSE,FALSE)bounds<-matrix(data=1,nrow=1,ncol=2)bounds[,1]<--5*bounds[,1]bounds[,2]<-10*bounds[,2]sp<-(bounds[,2]-bounds[,1])/(2*sqrt(3))repart_gene<-c(5,5,5,5)fireworks<-TRUEblocks<-NULL#Call the functionres<-newXval(param,crit,isperf,sp,bounds,repart_gene,blocks,fireworks)pareto Indicates which rows are ParetoDescriptionindicates which rows of the X criterion matrix are Pareto,when objectives need to be maximizedUsagepareto(X)ArgumentsX:matrix of objectives[NInd*NObj]ValueFt:vector[NInd],TRUE when the set is on the Pareto front.Author(s)Fabrice ZaouiExamples#Definition of the parametersX<-matrix(runif(200),100,2)#Call the functionis_pareto<-pareto(X)plot_caramel17 plot_caramel Plotting of caRamel resultsDescriptionPlot graphs of the Pareto front and a graph of optimization evolutionUsageplot_caramel(caramel_results,nobj=NULL,objnames=NULL)Argumentscaramel_results:list resulting from the caRamel()function,withfields$objectives and$save_crit nobj:number of objectives(optional)objnames:vector of objectives names(optional)Examples#Definition of the test functionviennet<-function(i){val1<-0.5*(x[i,1]*x[i,1]+x[i,2]*x[i,2])+sin(x[i,1]*x[i,1]+x[i,2]*x[i,2])val2<-15+(x[i,1]-x[i,2]+1)*(x[i,1]-x[i,2]+1)/27+(3*x[i,1]-2*x[i,2]+4)*(3*x[i,1]-2*x[i,2]+4)/8 val3<-1/(x[i,1]*x[i,1]+x[i,2]*x[i,2]+1)-1.1*exp(-(x[i,1]*x[i,1]+x[i,2]*x[i,2]))return(c(val1,val2,val3))}nobj<-3#Number of objectivesnvar<-2#Number of variablesminmax<-c(FALSE,FALSE,FALSE)#All the objectives are to be minimizedbounds<-matrix(data=1,nrow=nvar,ncol=2)#Define the bound constraintsbounds[,1]<--3*bounds[,1]bounds[,2]<-3*bounds[,2]#Caramel optimizationresults<-caRamel(nobj,nvar,minmax,bounds,viennet,popsize=100,archsize=100, maxrun=500,prec=matrix(1.e-3,nrow=1,ncol=nobj),carallel=FALSE) #Plot of resultsplot_caramel(results)18plot_population plot_pareto Plotting of a population of objectives and Pareto frontDescriptionPlots graphs the population regarding each couple of objectives and emphasizes the Pareto frontUsageplot_pareto(MatObj,nobj=NULL,objnames=NULL,maximized=NULL)ArgumentsMatObj:matrix of the objectives[NInd,nobj]nobj:number of objectives(optional)objnames:vector,length nobj,of names of the objectives(optional)maximized:vector of logical,length nobj,TRUE if objective need to be maximized,FALSE if minimizedAuthor(s)Celine MonteilExamples#Definition of the populationPop<-matrix(runif(300),100,3)#Definition of objectives to maximize(Obj1,Obj2)and to minimize(Obj3)maximized<-c(TRUE,TRUE,FALSE)#Call the functionplot_pareto(MatObj=Pop,maximized=maximized)plot_population Plotting of a population of objectivesDescriptionPlot graphs the population regarding each couple of objectivesrselect19 Usageplot_population(MatObj,nobj,ngen=NULL,nrun=NULL,objnames=NULL,MatEvol=NULL,popsize=0)ArgumentsMatObj:matrix of the objectives[NInd,nobj]nobj:number of objectivesngen:number of generations(optional)nrun:number of model evaluations(optional)objnames:vector of objectives names(optional)MatEvol:matrix of the evolution of the optimal objectives(optional)popsize:integer,size of the initial population(optional)Author(s)Celine MonteilExamples#Definition of the populationPop<-matrix(runif(300),100,3)#Call the functionplot_population(MatObj=Pop,nobj=3,objnames=c("Obj1","Obj2","Obj3"))rselect Selection of n pointsDescriptionperforms a selection of n points in facpUsagerselect(n,facp)20val2rankArgumentsn:number of points to selectfacp:vector of initial pointsValueix:ranks of selected points(vector of dimension n)Author(s)Fabrice ZaouiExamples#Definition of the parametersn<-5facp<-runif(30)#Call the functionres<-rselect(n,facp)val2rank Converting the values of a vector into their rankDescriptionconverts the values of a vector into their rankUsageval2rank(X,opt)ArgumentsX:vector to treatopt:integer which gives the rule to follow in case of tied ranks(repeated values):if opt=1,one returns the average rank,if opt=2,one returns the correspondingrank in the series of the unique values,if opt=3,return the max rankValueR:rank vectorAuthor(s)Fabrice Zaouivol_splx21Examples#Definition of the parametersX<-matrix(rexp(100),100,1)opt<-3#Call the functionres<-val2rank(X,opt)vol_splx Volume of a simplexDescriptioncalculates the volume of a simplexUsagevol_splx(S)ArgumentsS:matrix(d+1)rows*d columns containing the coordinates in d-dim of d+1 vertices of a simplexValueV:simplex volumeAuthor(s)Fabrice ZaouiExamples#Definition of the parametersS<-matrix(rexp(6),3,2)#Call the functionres<-vol_splx(S)Index∗packagecaRamel-package,2boxes,3caRamel,4caRamel-package,2Cextrap,7Cinterp,8Crecombination,9Cusecovar,9decrease_pop,10Dimprove,11dominate,12dominated,13downsize,13matvcov,14newXval,15pareto,16plot_caramel,17plot_pareto,18plot_population,18rselect,19val2rank,20vol_splx,2122。

fireworks教程

fireworks教程

fireworks教程Fireworks是一款由Adobe公司开发的图形编辑软件,主要用于创建和编辑Web图像,特别适用于设计师和开发人员在制作网站时进行图像处理和优化。

本教程将介绍Fireworks 的基本功能和使用方法,帮助读者快速上手并提升其设计能力。

简介Fireworks是一款在Adobe Creative Suite软件套件中独立存在的软件,最早被设计用于处理和优化Web图像。

它的特点是集成了矢量图形编辑器和位图编辑器的功能,能够同时处理SVG、PNG、GIF、JPEG等多种图像格式。

Fireworks的设计理念是帮助用户快速创建和编辑Web图像,提供丰富的工具和特效,支持切片和优化,以及生成HTML和CSS代码。

下载和安装Fireworks可以通过Adobe官方网站下载安装程序。

安装过程与大多数软件相似,跟随提示完成即可。

安装后,启动软件并进入主界面。

界面概览Fireworks的主界面分为几个主要区域:1.菜单栏:包含各种工具和功能的菜单。

2.工具栏:包含常用工具的按钮,用于选择和应用工具。

3.画布:用于显示和编辑图像的区域。

4.图层面板:显示和管理图像的各个图层。

5.属性面板:用于调整和修改工具和图层的属性。

基本操作创建新文档要创建新的Fireworks文档,请执行以下操作:1.单击菜单栏中的“文件”>“新建”。

2.在弹出的对话框中,设置文档的尺寸、分辨率和背景颜色等选项。

3.单击“确定”创建新文档。

绘制基本图形Fireworks提供了多种绘图工具,可以帮助用户创建各种基本图形。

以下是创建基本图形的一般步骤:1.选择合适的绘图工具,例如矩形工具或椭圆工具。

2.在画布上单击并拖动,绘制出所需大小的图形。

3.在属性面板中设置图形的颜色、边框大小和样式等属性。

编辑图像Fireworks提供了丰富的编辑工具和功能,可以对图像进行调整和修改。

以下是一些常用的图像编辑操作:1.裁剪图像:选择裁剪工具,拖动鼠标选择要保留的区域,点击“裁剪”按钮完成裁剪操作。

Fireworks Algorithm for Optimization 烟花算法

Fireworks Algorithm for Optimization   烟花算法

Fireworks Algorithm for OptimizationYing Tan and Yuanchun ZhuKey Laboratory of Machine Perception(MOE),Peking UniversityDepartment of Machine Intelligence,School of Electronics Engineering and Computer Science,Peking University,Beijing,100871,China{ytan,ychzhu}@Abstract.Inspired by observingfireworks explosion,a novel swarm in-telligence algorithm,called Fireworks Algorithm(F A),is proposed forglobal optimization of complex functions.In the proposed F A,two typesof explosion(search)processes are employed,and the mechanisms forkeeping diversity of sparks are also well designed.In order to demon-strate the validation of the F A,a number of experiments were conductedon nine benchmark test functions to compare the F A with two vari-ants of particle swarm optimization(PSO)algorithms,namely StandardPSO and Clonal PSO.It turns out from the results that the proposed F Aclearly outperforms the two variants of the PSOs in both convergencespeed and global solution accuracy.Keywords:natural computing,swarm intelligence,fireworks algorithm,particle swarm optimization,function optimization.1IntroductionIn recent years,Swarm Intelligence(SI)has become popular among researchers working on optimization problems all over the world[1,2].SI algorithms,e.g.Par-ticle Swarm Optimization(PSO)[3],Ant System[4],Clonal Selection Algorithm [5],and Swarm Robots[6],etc.,have advantages in solving many optimization problems.Among all the SI algorithms,PSO is one of the most popular algorithm for searching optimal locations in a D-dimensional space.In1995,Kennedy and Eberhart proposed PSO as a powerful global optimization algorithm inspired by the behavior of bird blocks[3].Since then,the PSO has attracted the attentions of researchers around the globe,and a number of variants of PSO have been con-tinually proposed[7,8].Like PSO,most of swarm intelligence algorithms are inspired by some intelli-gent colony behaviors in nature.In this paper,inspired by the emergent swarm behavior offireworks,a novel swarm intelligence algorithm called Fireworks Al-gorithm(FA)is proposed for function optimization.The FA is presented and implemented by simulating the explosion process offireworks.In the FA,two explosion(search)processes are employed and mechanisms for keeping diversity of sparks are also well designed.To validate the performance of the proposed FA,comparison experiments were conducted on nine benchmark test functions Y.Tan,Y.Shi,and K.C.Tan(Eds.):ICSI2010,Part I,LNCS6145,pp.355–364,2010.c Springer-Verlag Berlin Heidelberg2010356Y.Tan and Y.C.Zhuamong the FA,the Standard PSO(SPSO),and the Clonal PSO(CPSO)[8].It is shown that the FA clearly outperforms the SPSO and the CPSO in bothoptimization accuracy and convergence speed.The remainder of this paper is organized as follows.Section2describes theframework of the FA and introduces two types of search processes and mecha-nisms for keeping diversity.In Section3,experimental results are presented to validate the performance of the FA.Section4concludes the paper.2Fireworks Algorithm2.1F A FrameworkWhen afirework is set off,a shower of sparks willfill the local space around the firework.In our opinion,the explosion process of afirework can be viewed asa search in the local space around a specific point where thefirework is set offthrough the sparks generated in the explosion.When we are asked tofind a point x j satisfying f(x j)=y,we can continually set off‘fireworks’in potential space until one‘spark’targets or is fairly near the point x j.Mimicking the process ofsetting offfireworks,a rough framework of the FA is depicted in Fig.1.In the FA,for each generation of explosion,wefirst select n locations,wherenfireworks are set off.Then after explosion,the locations of sparks are obtained and evaluated.When the optimal location is found,the algorithm stops.Oth-erwise,n other locations are selected from the current sparks andfireworks for the next generation of explosion.From Fig.1,it can be seen that the success of the FA lies in a good designof the explosion process and a proper method for selecting locations,which arerespectively elaborated in subsection2.2and subsection2.3.Fig.1.Framework offireworks algorithmFireworks Algorithm for Optimization357 2.2Design of Fireworks ExplosionThrough observingfireworks display,we have found two specific behavior of fireworks explosion.Whenfireworks are well manufactured,numerous sparks are generated,and the sparks centralize the explosion center.In this case,we enjoy the spectacular display of thefireworks.However,for a badfirework explosion, quite few sparks are generated,and the sparks scatter in the space.The two manners are depicted in Fig.2.From the standpoint of a search algorithm,a goodfirework denotes that thefirework locates in a promising area which may be close to the optimal location.Thus,it is proper to utilize more sparks to search the local area around thefirework.In the contrast,a badfirework means the optimal location may be far from where thefirework locates.Then, the search radius should be larger.In the FA,more sparks are generated and the explosion amplitude is smaller for a goodfirework,compared to a bad one.(a)Good explosion(b)Bad explosionFig.2.Two types offireworks explosionNumber of Sparks.Suppose the FA is designed for the general optimization problem:Minimize f(x)∈R,x min x x max,(1) where x=x1,x2,...,x d denotes a location in the potential space,f(x)is anobjective function,and x min and x max denote the bounds of the potential space.Then the number of sparks generated by eachfirework x i is defined as follows.s i=m·y max−f(x i)+ξni=1(y max−f(x i))+ξ,(2)where m is a parameter controlling the total number of sparks generated by the nfireworks,y max=max(f(x i))(i=1,2,...,n)is the maximum(worst) value of the objective function among the nfireworks,andξ,which denotes the smallest constant in the computer,is utilized to avoid zero-division-error.To avoid overwhelming effects of splendidfireworks,bounds are defined for s i,which is shown in Eq.3.358Y.Tan and Y.C.Zhuˆs i=⎧⎪⎨⎪⎩round(a·m)if s i<amround(b·m)if s i>bmround(s i)otherwise,a<b<1,(3)where a and b are const parameters.Amplitude of Explosion.In contrast to the design of sparks number,the am-plitude of a goodfirework explosion is smaller than that of a bad one.Amplitude of explosion for eachfirework is defined as follows.A i=ˆA·f(x i)−y min+ξni=1(f(x i)−y min)+ξ,(4)whereˆA denotes the maximum explosion amplitude,and y min=min(f(x i))(i= 1,2,...,n)is the minimum(best)value of the objective function among the n fireworks.Generating Sparks.In explosion,sparks may undergo the effects of explosion from random z directions(dimensions).In the FA,we obtain the number of the affected directions randomly as follows.z=round(d·rand(0,1)),(5) where d is the dimensionality of the location x,and rand(0,1)is an uniform distribution over[0,1].The location of a spark of thefirework x i is obtained using Algorithm1. Mimicking the explosion process,a spark’s location˜x j isfirst generated.Then if the obtained location is found to fall out of the potential space,it is mapped to the potential space according to the algorithm.Algorithm1.Obtain the location of a sparkInitialize the location of the spark:˜x j=x i;z=round(d·rand(0,1));Randomly select z dimensions of˜x j;Calculate the displacement:h=A i·rand(−1,1);for each dimension˜x j k∈{pre-selected z dimensions of˜x j}do˜x j k=˜x j k+h;if˜x j k<x mink or˜x jk>x maxk thenmap˜x j k to the potential space:˜x j k=x mink+|˜x jk|%(x maxk−x mink);end ifend forTo keep the diversity of sparks,we design another way of generating sparks—Gaussian explosion,which is show in Algorithm2.A function Gaussian(1,1), which denotes a Gaussian distribution with mean1and standard deviation1,is utilized to define the coefficient of the explosion.In our experiments,ˆm sparks of this type are generated in each explosion generation.Fireworks Algorithm for Optimization359Algorithm2.Obtain the location of a specific sparkInitialize the location of the spark:ˆx j=x i;z=round(d·rand(0,1));Randomly select z dimensions ofˆx j;Calculate the coefficient of Gaussian explosion:g=Gaussian(1,1);for each dimensionˆx j k∈{pre-selected z dimensions ofˆx j}doˆx j k=ˆx j k·g;ifˆx j k<x mink orˆx jk>x maxk thenmapˆx j k to the potential space:ˆx j k=x mink +|ˆx j k|%(x maxk−x mink);end ifend for2.3Selection of LocationsAt the beginning of each explosion generation,n locations should be selected for thefireworks explosion.In the FA,the current best location x∗,upon which the objective function f(x∗)is optimal among current locations,is always kept for the next explosion generation.After that,n−1locations are selected based on their distance to other locations so as to keep diversity of sparks.The general distance between a location x i and other locations is defined as follows.R(x i)=j∈K d(x i,x j)=j∈Kx i−x j ,(6)where K is the set of all current locations of bothfireworks and sparks.Then the selection probability of a location x i is defined as follows.p(x i)=R(x i)j∈KR(x j).(7)When calculating the distance,any distance measure can be utilized including Manhattan distance,Euclidean distance,Angle-based distance,and so on[9]. When d(x i,x j)is defined as|f(x i)−f(x j)|,the probability is equivalent to the definition of the immune density based probability in Ref.[10].2.4SummaryAlgorithm3summarizes the framework of the FA.During each explosion genera-tion,two types of sparks are generated respectively according to Algorithm1and Algorithm2.For thefirst type,the number of sparks and explosion amplitude depend on the quality of the correspondingfirework(f(x i)).In the contrast,the second type is generated using a Gaussian explosion process,which conducts search in a local Gaussian space around afirework.After obtaining the locations of the two types of sparks,n locations are selected for the next explosion gener-ation.In the FA,approximate n+m+ˆm function evaluations are done in each generation.Suppose the optimum of a function can be found in T generations, then we can deduce that the complexity of the FA is O(T∗(n+m+ˆm)).360Y.Tan and Y.C.ZhuAlgorithm 3.Framework of the FARandomly select n locations for fireworks;while stop criteria=false doSet offn fireworks respectively at the n locations:for each firework x i doCalculate the number of sparks that the firework yields:ˆs i ,according to Eq.3;Obtain locations of ˆs i sparks of the firework x i using Algorithm 1;end for for k=1:ˆm doRandomly select a firework x j ;Generate a specific spark for the firework using Algorithm 2;end forSelect the best location and keep it for next explosion generation;Randomly select n −1locations from the two types of sparks and the current fireworks according to the probability given in Eq.7;end while3Experiments3.1Benchmark FunctionsTo investigate the performance of the proposed FA,we conducted experiments on nine benchmark functions.The feasible bounds for all functions are set as [−100,100]D .The expression of the functions,initialization intervals and di-mensionalities are listed in Table 1.Table 1.Nine benchmark functions utilized in our experiments Function ExpressionInitializationD SphereF 1= D i =1x 2i [30,50]D 30Rosenbrock F 2= D −1i =1(100(x i +1−x 2i )2+(x i −1)2)[30,50]D 30Rastrigrin F 3= D i =1(x 2i −10cos(2πx i )+10)[30,50]D 30Griewank F 4=1+ D i =1x 2i 4000− D i =1cos(x i √i )[30,50]D 30Ellipse F 5= D i =1104i −1D−1x 2i [15,30]D 30Cigar F 6=x 21+ D i =2104x 2i [15,30]D 30Tablet F 7=104x 21+ D i =2x 2i [15,30]D 30Schwefel F 8= Di =1((x 1−x 2i )2+(x i −1)2)[15,30]D 30AckleyF 9=20+e −20exp −0.2 1DD i =1x 2i[15,30]D30−exp 1D D i =1cos(2πx 2i )3.2Comparison Experiments among the F A,the CPSO and the SPSOIn this section,we compare the performance of the FA with the CPSO and the SPSO in terms of both convergence speed and optimization accuracy.Fireworks Algorithm for Optimization361 Table2.Statistical mean and standard deviation of solutions found by the F A,the CPSO and the SPSO on nine benchmark functions over20independent runsFunctionFunction F A’s mean CPSO’s mean SPSO’s mean evluations(StD)(StD)(StD)Sphere5000000.0000000.0000001.909960 (0.000000)(0.000000)(2.594634)Rosenbrock6000009.56949333.403191410.522552 (12.12829)(42.513450)(529.389139)Rastrigrin5000000.0000000.053042167.256119 (0.000000)(0.370687)(42.912873)Griewank2000000.0000000.6324032.177754 (0.000000)(0.327648)(0.294225)Ellipse5000000.0000000.00000053.718807 (0.000000)(0.000000)(68.480173)Cigar6000000.0000000.0000000.002492 (0.000000)(0.000000)(0.005194)Tablet5000000.0000000.0000001.462832 (0.000000)(0.000000)(1.157021)Schwefel6000000.0000000.0950990.335996 (0.000000)(0.376619)(0.775270)Ackley2000000.0000001.68364912.365417 (0.000000)(1.317866)(1.265322)The parameters of both the CPSO and the SPSO are set as those in Ref.[8]. For the FA,the parameters were selected by some preliminary experiments.We found that the FA worked quite well at the setting:n=5,m=50,a=0.04, b=0.8,ˆA=40,andˆm=5,which is applied in all the comparison experiments.Table2depicts the optimization accuracy of the three algorithms on nine benchmark functions,which are averaged over20independent runs.It can be seen that the proposed FA clearly outperforms both the CPSO and SPSO on all the functions.In addition,the FA canfind optimal solutions on most benchmark functions in less than10000function evaluations,as shown in Table3.However, the optimization accuracy of the CPSO and the SPSO is unacceptable within 10000function evaluations.Besides optimization accuracy,convergence speed is quite essential to an opti-mizer.To validate the convergence speed of the FA,we conducted more thorough experiments.Fig.3depicts the convergence curves of the FA,the CPSO and the SPSO on eight benchmark functions averaged over20independent runs.From these results,we can arrive at a conclusion that the proposed FA has a much faster speed than the CPSO and the SPSO.From Table3,we canfind that the FA canfind excellent solutions with only10000times of function evaluations. This also reflects the fast convergence speed of the proposed FA.362Y.Tan and Y.C.Zhu(a)Sphere(b)Rosenbrock(c)Rastrigin(d)Griewank(e)Ellipse(f)Cigar(g)Tablet(h)SchwefelFig.3.Convergence curves of the F A,the CPSO and the SPSO on eight benchmark functions.The function fitness are averaged over 20independent runs.Fireworks Algorithm for Optimization363 Table3.Statistical mean and standard deviation of solutions found by the F A,the CPSO and the SPSO on nine benchmark functions over20independent runs of10000 function evaluationsFunction F A’s mean CPSO’s mean SPSO’s mean(StD)(StD)(StD)Sphere0.00000011857.42578124919.099609 (0.000000)(3305.973067)(3383.241523)Rosenbrock19.383302750997504.0000005571942400.000000 (11.94373)(1741747548.420642)(960421617.568024)Rastrigrin0.00000010940.14843824013.001953 (0.000000)(3663.484331)(4246.961530)Griewank0.0000003.4572737.125976 (0.000000)(0.911027)(0.965788)Ellipse0.0000002493945.5000005305106.500000 (0.000000)(1199024.648305)(1117954.409340)Cigar0.000000122527168.000000149600864.000000 (0.000000)(28596381.089661)(13093322.778560)Tablet0.00000015595.10742242547.488281 (0.000000)(8086.792234)(8232.221882)Schwefel4.3537338775860.0000006743699.000000 (1.479332)(1217609.288290)(597770.084232)Ackley0.00000015.90766518.423347 (0.000000)(1.196082)(0.503372)3.3DiscussionAs shown in the experiments,the FA has a faster convergence speed and a better optimization accuracy,compared to the PSO.We consider the success of the FA lies in the following two aspects.–In the FA,sparks suffer the power of explosion from z dimensions simul-taneously,and the z dimensions are randomly selected for each spark˜x i.Thus,there is a probability that the differences between thefirework and the target location happen to lie in these z dimensions.In this scenario,the sparks of thefirework can move towards the target location from z directions simultaneously,which endues the FA with a fast convergence speed.–Two types of sparks are generated to keep the diversity of sparks,and the specific selection process for locations is a mechanism for keeping diversity.Therefore,the FA has the capability of avoiding premature convergence.4ConclusionsMimicking the explosion process offireworks,the so-called FA is proposed and implemented for function optimization.The experiments among the FA,the CPSO and the SPSO have shown that the proposed FA has a promising per-formance.It clearly outperforms the CPSO and the SPSO on nine benchmark364Y.Tan and Y.C.Zhufunctions in terms of both optimization accuracy and convergence speed,which endues the FA with a promising prospect of application and extension.In future work,we will seek a deep theoretical analysis on the FA and try to apply the FA to some practical engineering applications.Finally,we intend to discuss the relationship between the FA and other general-purpose optimization algorithms. Acknowlegements.This work was supported by National Natural Science Foundation of China(NSFC),under Grant No.60875080and60673020,and partially supported by the National High Technology Research and Develop-ment Program of China(863Program),with Grant No.2007AA01Z453.Authors appreciate Mr.Chao Rui for his facility with the early phase of the experiments. References1.Garnier,S.,Gautrais,J.,Theraulaz,G.:The biological principles of swarm intelli-gence.Swarm Intelligence1(1),3–31(2007)2.Das,S.,Abraham,A.,Konar,A.:Swarm intelligence algorithms in bioinformatics.Studies in Computational Intelligence94,113–147(2008)3.Kennedy,J.,Eberhart,R.C.:Particle swarm optimization.In:Proceedings of IEEEInternational Conference on Neural Networks,vol.4,pp.1942–1948(1995)4.Dorigo,M.,Maniezzo,V.,Colorni,A.:Ant system:optimization by a colony ofcooperating agents.IEEE Transactions on Systems,Man,and Cybernetics,Part B:Cybernetics26(1),29–41(1996)5.De Castro,L.N.,Von Zuben, F.J.:Learning and optimization using theclonal selection principle.IEEE Transactions on Evolutionary Computation6(3), 239–251(2002)6.Beni,G.,Wang,J.:Swarm intelligence in cellular robotic systems.In:Proceedingsof NATO Advanced Workshop on Robots and Biological Systems(1989)7.Bratton,D.,Kennedy,J.:Defining a standard for particle swarm optimization.In:Proceedings of IEEE Swarm Intelligence Symposium,pp.120–127(2007)8.Tan,Y.,Xiao,Z.M.:Clonal particle swarm optimization and its applications.In:Proceedings of IEEE Congress on Evolutionary Computation,pp.2303–2309 (2007)9.Perlibakas,V.:Distance measures for PCA-based face recognition.Pattern Recog-nition Letters25(6),711–724(2004)10.Lu,G.,Tan,D.,Zhao,H.:Improvement on regulating definition of antibody densityof immune algorithm.In:Proceedings of the9th International Conference on Neural Information Processing,vol.5,pp.2669–2672(2002)。

利用增强烟花算法对RFID网络进行规划

利用增强烟花算法对RFID网络进行规划

利用增强烟花算法对RFID网络进行规划杨志升;朱参世;高杨军【摘要】In order to realize the RFID(Radio FrequencyIdentification)network planning for thecomplex environment, in the implementation of the enhanced fireworks algorithm for multi-objective RFID network planning problem,this paper uses hierarchical approach to objectives. It proposes an optimization model of RFID network system that is, to achieve tag 100%coverage, to deploy fewer readers, to avoid signal interference while using less transmitting power. For experimen-tal purposes it uses standard benchmark sets and makes a comparative analysis withGPSO(Global topology Particle Swarm Optimization)、VNPSO(Von Neumann topology Particle Swarm Optimization)、GPSO-RNP(Global topology Particle Swarm Optimization-RFID Network Planning)and VNPSO-RNP(Von Neumann topology Particle Swarm Opti-mization-RFID Network Planning). Experiment results show that the algorithm can be more effective in theplanning of multi-objectiveRFIDnetwork, and the optimization scheme can be obtained more effectively.%为了实现面向复杂环境下的RFID(Radio Frequency Identification)网络规划,提出利用增强烟花算法,并采用分层方法来实现多目标RFID网络的规划.通过建立优化模型,在满足标签100%覆盖率、部署更少的阅读器、使用较少的发射功率和避免信号干扰四个目标的基础上,使用标准基测试集进行测试,与GPSO(Global topology Par-ticle Swarm Optimization)、VNPSO(Von Neumann topology Particle Swarm Optimization)、GPSO-RNP(Global to-pology Particle Swarm Optimization-RFID Network Planning)和VNPSO-RNP(Von Neumann topology Particle Swarm Optimization-RFID Network Planning)四种算法进行了对比分析.实验结果表明,增强烟花算法在对多目标RFID 进行网络规划时表现更优异,可以更有效地求出最优化方案.【期刊名称】《计算机工程与应用》【年(卷),期】2017(053)003【总页数】5页(P23-27)【关键词】增强烟花算法;无线射频识别;网络规划;优化【作者】杨志升;朱参世;高杨军【作者单位】空军工程大学装备管理与安全工程学院,西安 710051;空军工程大学装备管理与安全工程学院,西安 710051;空军工程大学装备管理与安全工程学院,西安 710051【正文语种】中文【中图分类】O221.6YANG Zhisheng,ZHU Canshi,GAO Yangjun.Computer Engineering andApplications,2017,53(3):23-27.物联网的飞速发展,使得无线射频识别技术(Radio Frequency Identification,RFID)在许多行业中得到了广泛的应用。

群体智能优化算法-烟花算法

群体智能优化算法-烟花算法

第十五章 烟花算法15.1 介绍受到烟花在夜空中爆炸产生火花并照亮周围区域这一自然现象的启发,北大教授谭营在2010年提出了烟花算法(Fireworks Algorithm ,FWA)[1]。

在该算法中,烟花被看作为最优化问题的解空间中一个可行解,那么烟花爆炸产生一定数量火花的过程即为其搜索邻域的过程。

15.2 FWA 算法框架烟花算法的算法流程图如图1所示。

图1 烟花算法流程图烟花算法具体包括以下几个步骤:开始在N 个位置释放烟花满足终止条件?获得爆炸火花和高斯火花选择N 个位置结束否是1)在可行解空间中随机产生一定数量的烟花,每个烟花代表解空间中的一个可行解。

2)根据优化目标函数计算每个烟花的适应度值,并据此确定烟花质量的好坏,以在不同爆炸半径下产生不同数量的火花。

在烟花算法中,作者使用了两种形式的火花,分别是爆炸火花和高斯变异火花。

其中爆炸火花主要负责对烟花邻近区域的搜索,适应度值好的烟花在较小的邻近区域内产生较多的火花,反之,适应度值差的烟花在较大的邻近区域内产生较少的火花。

相对于爆炸火花,高斯火花的引入增强了种群的多样性。

3)判定是否满足终止条件。

如果满足则停止搜索,否则在爆炸火花、高斯变异火花和烟花中选择一定数量的个体作为烟花进入下一代的迭代。

烟花算法具有局部搜索能力和全局搜索能力自调节机制。

烟花算法中每个烟花的爆炸半径和爆炸火花数是不同的,适应度值差的烟花的爆炸半径较大,使其具有更大的“探索能力”——开发性。

适应度值好的烟花的爆炸半径较小,使其能够在该位置周围具有更大的“挖掘能力”——利用性。

此外,高斯变异火花的引入可以进一步增加种群的多样性。

15.3算子分析假设待求解的优化问题为:x x(1)Min(),∈∈Ωf R其中Ω为解的可行域。

在烟花算法中,爆炸算子(即爆炸产生火花操作)、变异算子(高斯变异产生火花操作)和选择策略(即选择下一代烟花操作)是最重要的3个组成部分,直接决定烟花算法的性能优劣。

一种改进的烟花算法

一种改进的烟花算法

第39卷第6期Vol.39 No.6长春师范大学学报Journal of Changchun Normal University2020年6月Jun.2020一种改进的烟花算法王苏霞ꎬ陈得宝ꎬ邹㊀锋(淮北师范大学物理与电子信息学院ꎬ安徽淮北235000)[摘㊀要]针对传统烟花算法(fireworksalgorithmꎬFWA)多样性差㊁易陷入局部搜索的问题ꎬ提出一种改进的烟花算法(CFWA)ꎮ传统烟花算法最优个体的爆炸半径非常小ꎬ导致其生成的火花之间差异很小ꎬ多样性受到了很大的限制ꎮ本文采用cubic混沌序列确定爆炸半径ꎬ避免了个体半径出现接近于零的现象ꎬ改善了火花的多样性ꎮ在18个典型函数集上对CFWA算法与jDE算法㊁PSOFDR算法㊁HBSA算法㊁LFWA算法以及EFWA算法进行3项指标对比实验ꎬ实验结果显示ꎬCFWA算法在收敛速度和收敛精度上占据显著优势ꎮ[关键词]烟花算法ꎻ爆炸ꎻ变异ꎻ映射ꎻ选择ꎻ混沌[中图分类号]TP301㊀㊀[文献标志码]A㊀㊀[文章编号]2095-7602(2020)06-0059-101㊀研究背景受生物系统运行机制的启发ꎬ一系列启发式搜索算法应运而生ꎬ并成功应用于多种领域ꎮ例如ꎬ粒子群优化算法(particleswarmoptimizationꎬPSO)[1]模拟鸟群通过位置和速度更新的方法来寻找食物的行为ꎬ就可以找到问题的较优解ꎬPSO已经广泛应用于解决实际优化问题ꎮ其改进算法ꎬ如基于适应距离比的粒子群优化算法(fitness-distance-ratiobasedparticleswarmoptimizationꎬPSOFDR)[2]ꎬ以附近高适应度的粒子为引导ꎬ使用相对适合度与其他粒子的距离的比率来确定粒子位置的每个分量方向来实现对粒子位置的更新ꎬ算法有效地提高了传统算法的性能ꎬ也成功地应用于一些优化问题ꎮ差分进化算法(differentialevolutionꎬDE)[3]㊁回溯搜索算法(backtrackingsearchalgorithmꎬBSA)[4]及其改进方法都在优化问题中发挥了重要的作用ꎮ烟花算法[5]是一种新型群智能算法ꎬ已成功应用于不同领域优化问题的求解ꎬ例如ꎬ0/1背包问题[6]㊁图像识别[7]㊁垃圾邮件检测[8]㊁过滤器设计[9]㊁施肥问题[10]等ꎮ作为一种年轻的优化算法ꎬ烟花算法存在一些不足ꎬ主要有以下三点:第一ꎬ爆炸半径是整个算法的核心ꎬ它确定了火花粒子位置的范围ꎬ进一步决定了种群的多样性ꎬ爆炸半径太小不利于算法的全局搜索ꎬ适应度值最优的烟花个体半径几乎接近于零ꎬ不仅影响种群多样性ꎬ同时浪费烟花资源ꎻ第二ꎬ生成的火花粒子超出搜索边界往往是一个很小的值ꎬ对于搜索范围关于零点对称且最优值处于零点或者附近的问题而言ꎬ模运算映射规则的越界处理方式ꎬ会加速算法的收敛速度ꎬ但这种快的收敛方式不是算法的智能收敛ꎬ对于最优解不在零点的问题ꎬ烟花算法往往难以达到较好的效果ꎻ第三ꎬ在选择策略上ꎬ基于欧氏距离的轮盘赌选择方法计算复杂度高ꎬ且不能保证留下较多的优质烟花ꎬ使算法的精度降低[11]ꎮ[收稿日期]2019-09-27[基金项目]国家自然科学基金资助项目 集成动态优化及应用研究 (61976101)ꎻ安徽省自然科学基金项目 离散教学多目标优化及在个性化推荐中的应用研究 (1708085MF140)ꎻ安徽省高等学校自然科学研究重点项目 面向图像分割的多目标核聚类模型与方法 (KJ2019A0593)ꎮ[作者简介]王苏霞ꎬ女ꎬ硕士研究生ꎬ从事智能优化计算研究ꎮ[通讯作者]陈得宝ꎬ男ꎬ教授ꎬ博士ꎬ从事智能计算㊁模式识别研究ꎮ95㊀㊀为了提高传统烟花算法的性能ꎬ研究者提出了一些改进方法ꎬ大体可归纳为两类:第一类是对原始烟花算法的各个组成部分进行改进ꎮ郑少秋[12]针对爆炸算子存在的不足提出了增强烟花算法(enhancedfireworksalgorithmꎬEFWA)ꎬEFWA的创新点在于引入了最小爆炸半径ꎬ当烟花个体半径的值小于设定的阈值时ꎬ就将半径设置为其阈值ꎬ且EFWA随机选定的维度加上的爆炸偏置是不同的ꎬ有效地增加了种群的多样性ꎮ徐一[13]针对传统烟花算法存在的爆炸幅度参数难以设定㊁挑选规则无法兼顾烟花质量和分布等问题ꎬ提出了一种基于学习的烟花算法(learning-basedfireworksalgorithmꎬLFWA)ꎬLFWA算法的爆炸半径一部分来源于公式计算值ꎬ一部分取决于半径估计值ꎬ将比烟花适应度值小的火花粒子作为优秀集合ꎬ计算集合中每个火花粒子与烟花个体的欧式距离ꎬ将欧氏距离之和的两倍作为半径估计值ꎬ引入学习参数ꎬ表示当代半径值是偏向计算值还是估计值ꎮ同时ꎬ为了平衡进化过程中烟花种群的分布问题ꎬ文中还设计了一种 锦标赛 选择策略来选取烟花子代ꎬ将烟花个体㊁爆炸火花个体㊁变异火花个体作为一个整体ꎬ将其分成N个小组ꎬ选取每一组的最优个体成为下一代成员ꎬ算法的多样性得到了大大的提高ꎮ郑少秋[14]将烟花种群划分为核心烟花和非核心烟花ꎬ提出了动态搜索烟花算法(dynamicsearchfire-worksalgorithmꎬdynFWA)ꎬ适应度值最优的个体作为核心烟花ꎬ核心烟花采用自适应调整爆炸半径的策略ꎬ即当新创建的最好火花粒子的适应度值优于核心烟花的适应度值时ꎬ就扩大下一代核心烟花的爆炸半径ꎬ反之就缩小ꎬ而非核心烟花的爆炸半径仍然采用传统烟花的计算方式ꎮ第二类方法是将烟花算法与其他算法进行混合ꎮGAO[9]提出了一种文化烟花算法(Culturalfireworkalgo ̄rithmꎬCA-FWA)ꎬ该混合算法用于数字滤波器的设计ꎬ算法一共有4种火花生成方式ꎬ在选择策略上ꎬ先选择较优的前λN个火花粒子ꎬ剩下的(1-λ)N个个体采用传统烟花算法的选择策略ꎮ上述方法无论是对烟花算法的算子进行改进ꎬ还是与其他方法混合ꎬ其爆炸半径的确定仍然依赖于适应度值ꎬ适应度最优个体的爆炸半径接近于零ꎬ产生的火花位于此烟花附近ꎬ不利于种群多样性的维持ꎬ导致算法易于陷入局部最优的可能性大大增加ꎮ本文提出一种利用混沌序列产生爆炸半径的方法ꎬ混沌机制增强了种群的多样性ꎬ混沌的遍历功能有利于算法个体的分布性ꎬ降低了算法陷入局部最优的可能性ꎬ使得算法收敛精度得到提升ꎮ2㊀烟花算法烟花算法的主要组成部分有爆炸算子㊁变异算子㊁模运算映射㊁赌轮选择ꎮ2.1㊀爆炸烟花爆炸的目的是产生火花粒子ꎬ以烟花粒子为中心ꎬ加上随机的偏置生成一定数量的火花ꎮX=(x1ꎬx2ꎬ ꎬxiꎬ ꎬxN)是算法迭代的烟花集合ꎬ其中ꎬN是烟花的数量ꎬxi是第i个烟花的位置坐标ꎬ其适应度值大小为f(xi)ꎮYi(t)=(yi1ꎬyi2ꎬ ꎬyijꎬ ꎬyiSi)是由烟花个体xi执行爆炸操作后产生的火花粒子的集合ꎮ对第i个烟花的第k维进行爆炸操作生成火花的过程如公式(1)所示ꎮykiꎬj=xki+AiˑU(-1ꎬ1)ꎬ1ɤiɤNꎬ1ɤjɤSiꎬ(1)其中ꎬU(-1ꎬ1)是[-1ꎬ1]中服从均匀分布的随机数ꎮ烟花爆炸幅度的计算公式为Ai=A^ˑf(xi)-min1ɤkɤNf(xk)+εðNi=1(f(xi)-min1ɤkɤNf(xk))+εꎬ(2)其中ꎬAi为第i个烟花的爆炸半径ꎻA^为常数ꎬ用于限制最大爆炸幅度ꎻf(xi)是第i个烟花个体的适应值ꎻε是一个非常小的常数ꎬ用来避免零操作的发生ꎮ烟花爆炸强度计算公式为Si=mˑmax1ɤkɤNf(xk)-f(xi)+εðNi=1(max1ɤkɤNf(xk)-f(xi))+εꎬ(3)其中ꎬSi是第i个烟花产生的火花数量ꎬm是用于限制产生的火花总数的常数ꎮ 06为了控制烟花爆炸时在较小范围内不至于产生过多的火花和在较大范围内产生过少的火花ꎬ对火花的数量做如式(4)所示的限制[5]ꎮSi=R(aˑm)ꎬ㊀㊀Si<aˑmꎻR(bˑm)ꎬ㊀㊀Si>bˑmꎬa<b<1ꎻR(Si)ꎬ㊀㊀㊀其他.ìîíïïï(4)其中ꎬR( )为取整函数ꎻaꎬb为设定常量ꎬ与m一起确定火花个数的范围ꎮ2.2㊀变异在烟花个体的位置上加上偏置产生爆炸火花ꎬ种群多样性受到限制ꎬ为了维持算法种群的多样性ꎬ执行高斯变异操作获得变异火花ꎮ随机挑选一个烟花个体xiꎬ对其某些维度执行高斯变异操作ꎬ如式(5)所示ꎮxki=xkiˑeꎬ(5)其中ꎬe~N(1ꎬ1)ꎬN(1ꎬ1)表示均值为1㊁方差为1的高斯分布ꎮ2.3㊀映射在爆炸阶段和变异阶段之后产生了爆炸火花和变异火花ꎬ这两类火花有超出可行域范围的可能性ꎬ为了充分利用火花资源ꎬ有必要将超出可行域范围的火花粒子拉回活动领域之内ꎮ烟花算法采用模运算操作的映射规则ꎬ当第i个火花的d维超出上下边界时ꎬ可根据公式(6)进行映射:ydi=xdmin+ydi%(xdmax-xdmin)ꎬ(6)其中ꎬxdminꎬxdmax分别是可行域在第d维的上下搜索边界ꎬydi表示的是ydi的模ꎮ2.4㊀选择将爆炸变异操作阶段后产生的爆炸火花以及变异火花与烟花种群合并为一个候选集合Kꎬ计算每个个体到其他所有个体的欧氏距离之和ꎬ最后根据基于概率的轮盘赌选择方法选择N个个体进入下一代ꎮ其中ꎬ最佳个体直接保留到下一代ꎬ剩余的N-1个个体应用轮盘赌方法从候选集合中选择ꎮ选择粒子概率的计算公式如(7)(8)所示ꎮD(xi)=ðxiɪKd(xi-xj)=ðxiɪKxi-xjꎬ(7)P(xi)=D(xi)ðxjɪkxjꎬ(8)其中ꎬD(xi)是当前个体xi与候选集合K中除xi之外的所有粒子的距离之和ꎮ3㊀改进的烟花算法针对上述的问题ꎬ本文对基本的烟花算法进行改进ꎬ利用混沌方法产生爆炸半径ꎬ利用随机映射方法限制粒子的运动领域ꎬ利用精英选择策略ꎬ加快算法收敛ꎮ3.1㊀爆炸混沌是一种看似杂乱而又有着规律性的运动现象ꎮ混沌搜索的遍历性㊁随机性但同时具有规律性的特点有利于避免智能算法陷入局部最优值[15]ꎮ混沌系统有多种映射规则ꎬ常见的混沌映射有Logistic映射㊁K阶Chebyshev映射㊁Cubic映射等ꎮLogistic的概率密度图像分布呈现中间部分较平缓㊁两端边缘处概率密度骤然增大的现象ꎬ故Logistic映射的遍历均匀性差ꎬ而Cubic的概率密度图形也是呈U型分布的ꎬ但其分布区间是Logistic的两倍ꎬ因此Cubic映射的遍历均匀性优于Logistic映射ꎮ故本文采用Cubic混沌映射ꎬ表达式为Cn+1=rˑC3n-(1-r)ˑCnꎬ(9)其中ꎬCn为混沌域ꎬn=0ꎬ1ꎬ ꎬ取值范围为(-1ꎬ1)ꎬ当r=4时序列处于混沌状态ꎮ在传统烟花算法中ꎬ当烟花爆炸时ꎬ通过公式(2)(3)得到每个烟花粒子的爆炸半径和每个烟花生成的火花数量ꎬ以烟花个体为中心的周围区域会产生一定量的火花ꎬ适应度值小的烟花可以在小的半径范围内产生多的火花ꎬ提供强大的勘探功能ꎬ适应度值大的烟花在大的半径范围内产生少的火花ꎬ具有一定的开采能力ꎮ但是ꎬ使用公式(2)计算烟花爆炸半径的时候会发现适应度值最优的个体爆炸半径非常小ꎬ几乎接近于零ꎬ这样就浪费了烟花粒子ꎮ为了解决这一缺陷ꎬCFWA采用Cubic混沌方法产生爆炸半径ꎬ如式(10)所示ꎮ16R(i)t+1=A^ˑU(0ꎬ1)ˑ[rˑ(R(i)t)3-(1-r)ˑR(i)t]ꎬ(10)其中ꎬR(i)t+1是当代第i个烟花爆炸半径ꎬR(i)t是相对应的烟花个体上一代的爆炸半径ꎮR(i)t相当于混沌系统的混沌域ꎬ取值范围在-1和1之间ꎬ因此初始的烟花半径在这个范围之内随机选取ꎬ半径迭代时采用式(10)的方式ꎬ使每一代的所有烟花个体生成的半径具有随机性㊁遍历性ꎬ看似杂乱而又能不重复地取到半径范围之内的值ꎬ这样的机制增强了全局搜索能力ꎬ避免快速陷入局部收敛ꎮ3.2㊀映射传统烟花算法的映射方法是模运算映射ꎬ该方法复杂ꎬ计算量较大ꎬ并且随着维度的增加ꎬ计算机的效率将变低ꎮ寻找一种可处理高维问题并确保计算有效性的方法变得非常迫切ꎮ随机映射可以大大地减少计算量ꎬ虽然简单但具有高效的计算效率和数据独立性[12]ꎮ映射公式如下:ydiꎬj=ydmin+R(1ꎬD)ˑ(ydmax-ydmin)ꎬ(11)其中ꎬR(1ꎬD)为0~1间的随机数ꎮ3.3㊀选择传统的烟花算法采用基于欧氏距离的轮盘赌选择策略ꎮ需要求得每一个个体到除了自身之外的所有个体的距离之和ꎬ密度高的个体即周围有很多其他粒子的个体ꎬ到周围粒子的距离之和相对较小ꎬ通过公式(8)可知其相应的概率较小ꎬ根据概率来选择下一代时的机会就大大降低ꎮ同时这种选择策略计算复杂ꎬ工作量大ꎬ限制算法收敛速度ꎮ本文采用了精英选择策略[16]ꎬ直接将当代候选集中的最优个体保留至下一代ꎬ剩下的个体从候选集合中随机选取ꎮ这种选择策略不仅节省时间ꎬ而且最优个体的保留加速了算法的收敛速度ꎬ随机选取剩下的个体增加了种群的多样性ꎮ4㊀实验结果与分析本文使用18个标准测试函数来验证改进CFWA算法的可行性和有效性ꎮ实验结果与jDE算法㊁PSOFDR算法㊁HBSA算法以及改进的EFWA算法和LFWA算法进行比较ꎮ4.1㊀实验参数设置选择一组包含单峰函数F1~F5㊁多峰函数F6~F10和旋转函数F11~F18的标准测试函数用于实验ꎬ如表1所示ꎬ测试维度D=30ꎮ所有实验均在MATLABR2012b(Windows7ꎻIntel(R)core(TM)i5-4460CPU@3.2GHzꎻ4.0GB)上进行ꎮ算法的种群规模N=5ꎬ变异个体m^=5ꎬ最大函数评估数(F=5000ˑD)作为算法停止标准ꎬ每个算法独立运行30次ꎮCFWA算法中的一些参数设置为m=50ꎬA^=40ꎬa=0.04ꎬb=0.8ꎮ其他算法的相关参数如下:PSOFDR算法[2]:ωmin=0.4ꎬωmax=0.9ꎬφ1=1ꎬφ2=1ꎬφ3=2ꎻjDE算法[4]:F=0.5ꎬCR=0.9ꎻHBSA算法[17]:F=5ˑRꎻLFWA算法[8]:Amin=10-10ꎬσ=0.9ꎻEFWA算法[7]:Ainit=(xmax-xmin)ˑ0.02ꎬAfinal=(xmax-xmin)ˑ0.001ꎮ表1㊀测试函数函数函数名搜索范围最优值函数函数名搜索范围最优值F1Sphere[-100ꎬ100]0F10Schwefel[-500ꎬ500]0F2Quadric[-100ꎬ100]0F11RotatedSumSquare[-10ꎬ10]0F3SumSquare[-10ꎬ10]0F12RotatedZakharov[-10ꎬ10]0F4Zakharov[-10ꎬ10]0F13RotatedRosenbrock[-2.048ꎬ2.048]0F5Rosenbrock[-2.048ꎬ2.048]0F14RotatedAckley[-32.768ꎬ32.768]0F6Ackley[-36.728ꎬ36.728]0F15RotatedRastrigin[-5.12ꎬ5.12]0F7Rastrigin[-5.12ꎬ5.12]0F16RotatedWeierstrass[-0.5ꎬ0.5]0F8Weierstrass[-0.5ꎬ0.5]0F17RotatedGriewank[-600ꎬ600]0F9Griewank[-600ꎬ600]0F18RotatedSchwefel[-500ꎬ500]0264.2㊀实验结果分析对比算法的18个测试函数的适应度值最优解ꎬ均值和标准差如表2所示ꎮ表格中的粗体是比较后的最佳结果ꎮ从表2中可以看出ꎬ在30维条件下ꎬ基准函数F1㊁F3㊁F4㊁F6㊁F7㊁F8㊁F9㊁F11㊁F12㊁F14㊁F16㊁F17ꎬ最优适应度值㊁均值以及标准差这3个测试指标ꎬCFWA算法的表现是最优的ꎻ在F2㊁F15函数中ꎬCFWA算法的最优值和均值都优于对比的所有算法ꎬ但是函数F2的标准差劣于EFWA算法ꎬ函数F15的标准差劣于HBSA算法ꎻ对F5函数而言ꎬCFWA算法的适应度值最优值和均值不如LFWA算法ꎬ但是标准差是最稳定的ꎻ在F10函数上ꎬCFWA算法的最优适应度值劣于比HBSA算法ꎬ均值劣于jDE算法ꎬ标准差劣于EFWA算法ꎻCFWA算法在F13函数上的适应度值最优值和均值劣于LFWA算法㊁EFWA算法ꎬ但优于其他比较的算法ꎬ标准差劣于LFWA算法ꎻ对比F18测试函数ꎬ适应度值最优值劣于jDE算法优于PSOFDR算法㊁LFWA算法㊁EFWA算法ꎬ平均值劣于HBSA算法优于LFWA算法㊁EFWA算法ꎬ标准差劣于PSOFDR算法优于LFWA算法㊁EFWA算法ꎮ由上分析可得ꎬ对于Rosenbrock㊁Schwefel函数以及它们的旋转函数而言ꎬCFWA算法优化效果不是最好ꎬ但是对于大部分的优化函数效果还是明显处于优势的ꎮ表2㊀30维函数测试结果函数性能指标PSOFDRjDEHBSALFWAEFWACFWAbest1.54E-333.30E-021.13E-032.06E-234.13E-040.00E+00F1mean4.00E+039.38E+029.41E+003.08E-235.13E-040.00E+00std6.99E+031.67E+031.68E+017.06E-248.86E-050.00E+00best1.34E-047.35E+025.08E+022.06E+033.96E+015.68E-274F2mean1.53E+043.06E+032.98E+033.69E+031.03E+026.55E+01std9.93E+033.67E+031.68E+031.34E+035.73E+011.27E+02best2.39E-363.17E-095.05E-051.14E-082.05E-020.00E+00F3mean4.90E+022.41E+016.26E+011.22E-073.35E-020.00E+00std8.77E+025.24E+011.21E+021.62E-077.40E-030.00E+00best2.71E-063.72E+008.88E+002.29E+025.67E-026.75E-138F4mean2.46E+027.42E+014.13E+012.84E+021.55E+006.84E-78std3.62E+025.42E+012.37E+014.42E+011.76E+002.16E-77best2.09E+014.12E+012.89E+012.05E+012.45E+012.76E+01F5mean1.98E+028.60E+011.13E+022.35E+012.74E+012.80E+01std3.70E+023.44E+011.09E+022.24E+002.44E+002.71E-01best7.53E-111.21E+011.09E+011.78E+002.01E+000.00E+00F6mean1.53E+001.54E+011.31E+013.15E+003.11E+000.00E+00std4.52E+001.65E+001.49E+006.61E-011.02E+000.00E+00best4.18E+012.49E+011.59E+013.08E+012.06E+010.00E+00F7mean8.50E+019.14E+015.24E+015.96E+013.29E+010.00E+00std4.46E+014.17E+012.64E+011.33E+016.49E+000.00E+00best8.21E-013.80E+001.40E+011.83E+011.75E+010.00E+00F8mean4.71E+001.24E+011.86E+012.40E+012.19E+010.00E+00std2.76E+005.93E+004.14E+003.48E+002.18E+000.00E+00best1.04E-137.58E-014.50E-016.66E-163.84E-030.00E+00F9mean1.81E+017.26E+004.19E+009.85E-032.27E-020.00E+00std3.82E+016.44E+004.96E+001.21E-021.83E-020.00E+0036续表函数性能指标PSOFDRjDEHBSALFWAEFWACFWAbest2.87E+031.40E+031.26E+032.51E+034.72E+033.60E+03F10mean3.75E+032.47E+032.60E+034.12E+035.38E+034.26E+03std7.99E+021.07E+031.10E+031.01E+035.45E+025.46E+02best9.60E-274.81E-031.53E+001.98E-102.38E-020.00E+00F11mean6.13E+012.62E+013.74E+011.53E-073.03E-020.00E+00std1.94E+024.36E+034.82E+012.97E-075.96E-030.00E+00best3.12E-061.11E+006.24E+008.00E-216.96E-045.87E-158F12mean1.84E+027.37E+014.28E+011.00E+008.41E-032.93E-70std1.42E+021.11E+023.63E+013.11E+001.04E-029.27E-70best9.00E+013.82E+014.81E+011.44E-016.59E+002.91E+01F13mean8.31E+028.45E+011.00E+022.52E+015.60E+016.89E+01std5.41E+023.07E+013.60E+012.18E+014.13E+013.98E+01best1.71E-091.15E+011.10E+012.22E+003.16E+000.00E+00F14mean1.65E+001.48E+011.39E+015.70E+001.30E+010.00E+00std7.15E-011.62E+001.90E+004.06E+005.85E+000.00E+00best5.77E+013.37E+014.08E+016.47E+011.09E+020.00E+00F15mean9.30E+016.91E+016.96E+018.59E+011.58E+021.39E+01std2.75E+012.31E+011.72E+012.30E+012.27E+012.14E+01best3.11E+005.28E+001.38E+012.11E+012.38E+010.00E+00F16mean1.04E+011.48E+012.03E+012.55E+012.97E+010.00E+00std4.00E+007.44E+004.23E+003.41E+003.22E+000.00E+00best1.96E-117.30E-022.21E-011.11E-161.43E-030.00E+00F17mean1.81E+013.65E+006.84E+001.30E-021.39E-020.00E+00std3.81E+017.51E+009.67E+002.03E-021.59E-020.00E+00best4.40E+033.08E+033.18E+034.53E+035.68E+034.12E+03F18mean5.07E+034.24E+033.75E+036.46E+037.00E+035.50E+03std4.52E+029.56E+025.02E+021.20E+031.26E+039.75E+02㊀㊀为了进一步了解各个算法平均适应度值的收敛快慢ꎬ通过6个算法18个测试函数的平均适应度值变化情况(图1)ꎬ图1纵坐标中V表示平均适应度值ꎬ可以看出ꎬCFWA算法对于函数F1㊁F2㊁F3㊁F4㊁F7㊁F11㊁F12㊁F14㊁F15的收敛速度明显快于其他比较的算法ꎻ函数F6㊁F8㊁F9㊁F16㊁F17ꎬ算法CFWA的收敛速度极快ꎻ函数F5ꎬ算法CFWA在运动前期收敛速度比所有算法快ꎬ后期慢于LFWA算法ꎬ但仍快于其他算法ꎻF10函数ꎬCFWA算法的收敛速度仅优于EFWA算法ꎬ慢于其他比较的所有算法ꎻ对于测试函数F13ꎬCFWA算法的收敛速度比EFWA算法㊁LFWA算法慢ꎬ但是快于HBSA算法㊁PSOFDR算法㊁jDE算法ꎻF18函数的结果与F13的恰好相反ꎬCFWA算法快于FWA的改进算法EFWA算法㊁LFWA算法ꎬ却慢于其他3种算法ꎮ46(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)56(m)(n)(o)(p)(q)(r)图1㊀18个函数平均适应度值变化上述实验结果表明ꎬCFWA算法的3个测试指标不能对所有问题都是最优的ꎬ但其优于绝大部分算法ꎬ这满足 没有免费的午餐 理论ꎬ即一种算法很难在所有性能上都比其他所有算法好ꎮ为了进一步验证算法CFWA的性能ꎬ对CFWA算法和其他算法的测试结果进行t-test测试ꎮ本文采用双边检验ꎬ显著水平为0.05ꎮCFWA在30维情况下对比其他算法的t值和p值如表3所示ꎮ表3㊀各算法对基准函数30维的t-test测试结果FPSOFDRjDEHBSALFWAEFWAtptptptptpF13.13340.00273.08620.00313.06540.003323.89500.000031.70790.0000F28.41920.00004.46170.00009.46260.000014.74770.00001.47400.1459F33.05870.00342.51340.01482.83430.00634.12480.000124.82570.0000F43.71620.00057.49640.00009.51920.000035.16940.00004.82730.0000F52.51180.01489.23830.00004.27400.0001-10.92210.0000-1.33220.1880F61.85380.068951.36160.000048.11910.000026.08530.000016.63940.0000F710.43540.000012.01340.000010.88320.000024.52310.000027.77190.0000F89.35320.000011.45060.000024.61850.000037.86360.000055.11240.0000F92.60260.01176.17120.00004.62340.00004.45460.00006.78840.0000F10-2.88180.0055-8.11650.0000-7.42620.0000-0.64680.52037.96050.0000F111.73210.08863.29450.00174.25100.00012.82160.006527.85370.000066续表FPSOFDRjDEHBSALFWAEFWAtptptptptpF127.08780.00003.62160.00066.46170.00001.76560.08274.43810.0000F137.69500.00001.70390.09383.18790.0023-5.26550.0000-1.22870.2241F1412.64470.000050.26430.000040.09810.00007.69480.000012.13570.0000F1512.43390.00009.60240.000011.10150.000012.55540.000025.26010.0000F1614.20300.000010.86700.000026.31960.000040.97950.000050.39070.0000F172.60110.01182.66050.01013.87280.00033.52090.00084.81000.0000F18-2.17290.0339-5.04920.0000-8.73580.00003.40640.00125.15760.0000㊀㊀表4是对表3中各算法的pꎬt值与CFWA算法比较ꎬ进行优劣数量总结ꎬ表中的bꎬwꎬs分别表示CFWA算法优于㊁劣于㊁等于其他算法的数量ꎮd表示b和w之间的差值ꎮ结果显示ꎬ对18个优化问题而言ꎬ对大部分函数ꎬCFWA算法的结果可以被接受ꎮ表4㊀CFWA算法与各算法对比pꎬt值优劣数量统计表性能指标CFWA与各算法对比pꎬt优劣数量PSOFDRjDEHBSALFWAEFWAb1415161415w22220s21023d12131412155㊀结语本文针对传统烟花算法最优个体爆炸半径非常小㊁火花种群多样性差㊁易陷入局部收敛问题ꎮ利用Cubic混沌序列生成半径的方法ꎬ使得半径的数值产生较大的差异ꎬ改善了算法火花种群的多样性ꎬ挣脱算法快速陷入局部优化的束缚ꎬ增强算法的收敛精度ꎮ通过与其他算法的比较实验ꎬ结果表明ꎬCFWA算法并不是对所有优化问题都是最优的ꎬ但优于其他的大部分算法ꎬ通过证明可知CFWA算法的改进是可行的ꎮ本文提出的改进方法维持了种群的多样性ꎬ提升了算法的收敛精度ꎮ下一步我们要做的是增强种群个体间的信息交流ꎬ充分利用个体的历史信息ꎬ优化算法性能ꎮ[参考文献][1]KENNEDYJꎬEBERHARTRC.Particleswarmoptimization[C].ProceedingsofIEEEInternationalConferenceonNeuralNet ̄worksꎬ1995:1942-1948.[2]PERAMTꎬVEERAMACHANENIKꎬMOHANCK.Fitness-distance-ratiobasedparticleswarmoptimization[C].Proceed ̄ingsofSwarmIntelligenceSympꎬ2003:174-181.[3]STONRꎬPRICEK.Differentialevolution:asimpleandefficientheuristicforglobaloptimizationovercontinuousspaces[J].JournalofGlobalOptimizationꎬ1997(4):341-359.[4]PINARCIVICIOGLU.Backtrackingsearchoptimizationalgorithmfornumericaloptimizationproblems[J].AppliedMathemat ̄ics&Computationꎬ2013(15):8121-8144.[5]TANYꎬZHUYC.Fireworksalgorithmforoptimization[C].InternationalConferenceonAdvancesinSwarmIntelligenceꎬ2010:355-364.[6]张家琴.求解0/1背包问题的烟花算法研究[J].武汉工程职业技术学院学报ꎬ2011(3):64-66.[7]ZHENGSꎬTANY.Aunifieddistancemeasureschemefororientationcodinginidentification[C].InternationalConferenceonInformationScienceandTechnologyꎬ2013:979-985.76[8]HEWꎬMIGꎬTANY.Parameteroptimizationoflocal-concentrationmodelforspamdetectionbyusingfireworksalgorithm[C].AdvancesinSwarmIntelligenceꎬ2013:439-450.[9]GAOHꎬDIAOM.Culturalfireworkalgorithmanditsapplicationfordigitalfiltersdesign[J].InternationalJournalofModellingꎬIdentificationandControlꎬ2011(4):324-331.[10]ZHENGYJꎬSONGQꎬCHENSY.Multiobjectivefireworksoptimizationforvariable-ratefertilizationinoilcropproduction[J].AppliedSoftComputingꎬ2013(11):4253-4263.[11]余冬华ꎬ郭茂祖ꎬ刘晓燕ꎬ等.改进选择策略的烟花算法[J].控制与决策ꎬ2020(2):389-395.[12]ZHENGSQꎬJANECEKAꎬTANY.Enhancedfireworksalgorithm[C].Proceedingsofthe2013IEEECongressonEvolutionaryComputationꎬ2013:2069-2077.[13]徐一.基于学习的烟花算法[C].2018中国自动化大会(CAC2018)论文集ꎬ2018:7.[14]ZHENGSQꎬJANECEKAꎬLIJAꎬetal.Dynamicsearchinfireworksalgorithm[C].Proceedingsofthe2014IEEECongressonEvolutionaryComputationꎬ2014:3222-3229.[15]EIGOHARYAꎬAIRUZAIZAAS.Chaosandadaptivecontrolintwopreyꎬonepredatorsystemwithnonlinearfeedback[J].ChaosSolitonsandFractalsꎬ2007(2):443-453.[16]杨志升ꎬ朱参世ꎬ高杨军.利用增强烟花算法对RFID网络进行规划[J].计算机工程与应用ꎬ2017(3):23-27. [17]QUNLꎬLIANGGꎬLIXYꎬetal.Ahybridbacktrackingsearchalgorithmforpermutationflow-shopschedulingproblem[J].Computers&IndustrialEngineeringꎬ2015(85):437-446.AnImprovedFireworkAlgorithmWANGSu-xiaꎬCHENDe-baoꎬZOUFeng(CollegeofPhysicsandElectronicInformationꎬHuaibeiNormalUniversityꎬHuaibei235000ꎬChina)Abstract:Thispaperproposesanimprovedfireworksalgorithmfortheproblemsoftraditionalfireworksalgorithm(FWA)withpoordi ̄versityandeasytofallintolocalsearch.Theexplosionradiusoftheoptimalindividualofthetraditionalfireworkalgorithmisverysmallꎬthedifferencebetweenthesparksthatcausedittobesmallandthediversityisgreatlyrestricted.Inthispaperꎬthecubicchaoticse ̄quenceisusedtodeterminetheexplosionradiusꎬwhichavoidsthephenomenonthattheindividualradiusisclosetozeroꎬandimprovesthediversityofsparks.Onthe18typicalfunctionsetsꎬtheCFWAalgorithmiscomparedwiththejDEalgorithmꎬPSOFDRalgorithmꎬHBSAalgorithmꎬLFWAalgorithmꎬandEFWAalgorithm.TheexperimentalresultsshowthattheCFWAalgorithmoccupiesasignificantadvantageinconvergencespeedandconvergenceaccuracy.Keywords:fireworksalgorithmꎻexplosionꎻmutationꎻmappingꎻselectionꎻchaos86。

萤火虫算法在WSN节点部署中的应用

萤火虫算法在WSN节点部署中的应用

本期推荐本栏目责任编辑:唐一东萤火虫算法在WSN 节点部署中的应用曹娜娜,谢智峰,穆莉,王汐存(江西科技学院信息工程学院,江西南昌330098)摘要:为解决WSN 随机部署方法导致覆盖率低的问题,提出了一种基于萤火虫算法的WSN 自适应部署方法。

该方法融合概率感知模型和萤火虫算法两种技术,建立网格覆盖模型,实现WSN 节点优化部署。

设计了3组仿真测试,实验结果表明,新方法相较于随机部署方法,其测覆盖率有所提升。

关键词:WSN ;随机部署;萤火虫算法;概率感知模型;网格覆盖模型中图分类号:TP301、TP391文献标识码:A文章编号:1009-3044(2021)03-0005-03开放科学(资源服务)标识码(OSID ):Application of Firefly Algorithm in WSN Node Deployment CAO Na-na,XIE Zhi-feng,MU Li,WANG Xi-cun(School of Information Engineering,Jiangxi University of Technology,Nanchang 330098,China)Abstract:In order to solve the problem of low coverage caused by the random deployment method of WSN,a WSN adaptive deploy⁃ment method based on the Firefly algorithm is proposed.This method fuses two technologies,the probability perception model and the firefly algorithm,to establish a grid coverage model to achieve optimal deployment of WSN nodes.Three sets of simulation tests are designed,and the experimental results show that compared with the random deployment method,the new method has improved test coverage.Key words:WSN;random deployment;firefly algorithm;probabilistic perception model;grid coverage model1前言无线传感器网络(Wireless Sensor Network,WSN)[1]是基于微处理、嵌入式及无线通信等技术的一种具有低功耗、低成本、自组织等特点的分布式信息感知、传输和处理系统。

烟花算法中爆炸半径的改进研究

烟花算法中爆炸半径的改进研究

烟花算法中爆炸半径的改进研究摘要:烟花算法是最近出现的一种优化算法,分析了算法中一个关键参数即爆炸半径。

分析表明,由最优烟花所产生的火花由于其爆炸半径趋于0,所以在计算中几乎是无用的,而且增加了计算代价。

为此,给出了一个改进的爆炸半径的算法,实验表明,改进算法在收敛速度和精度方面都优于原始算法。

关键词:烟花算法;爆炸半径;群体智能;优化算法中图分类号:tp301.6 文献标志码:a 文章编号:1006-8228(2013)01-28-02study on improvement of explosion radius in fireworks algorithmdu zhenxin(hanshan normal university, chaozhou, guangdong 521041,china)abstract: fireworks algorithm is a new optimization algorithm. the fireworks algorithm is analyzed and the shortage of the crucial parameter explosion radius is pointed out. the analysis manifests that because their explosion radius tends to zero, the sparks produced by the best firework are useless and the computing process is wasted. an improved explosion radius formula is proposed in the paper, andexperimental results show that the improved algorithm’s performance is better than the original one in convergence velocity and accuracy.key words: fireworks algorithm; explosion radius; swarm intelligence; optimization algorithm0 引言烟花算法是由ying tan和yuanchun zhu[1]在2010年提出的一种新的群体智能优化算法,具有卓越的优化性能,因此一经提出就引起了世界范围内的广泛关注[2-3]。

基于烟花算法的非合作博弈Nash均衡问题求解

基于烟花算法的非合作博弈Nash均衡问题求解

基于烟花算法的非合作博弈Nash均衡问题求解杨彦龙;向淑文;夏顺友;贾文生【摘要】The fireworks algorithm(FWA)is proposed to solve finite non-cooperative game among N people.The fireworks generate explosive and gaussian mutation sparks, then the next sparks are generated based on fitness.Sparks with higher fitness will generate more explosive sparks in smaller scope while sparks with lower fitness will generate less explosive sparks in larger scope.This explosive searching mechanism can provide a more complete search in area of greater sparks and avoid falling into local optimum based on the increased group diversity by Gaussian mutation.The results demonstrate that the proposed algorithm is effective and superior to the immune particle swarm algorithm in solving Nash equilibrium of non-cooperative game among N people.%提出一种求解N人有限非合作博弈Nash均衡的群体智能算法—烟花算法(FWA).烟花爆炸后产生爆炸火花和高斯变异火花,根据火花的适应度值的好坏产生下一代烟花,适应度值较好的火花在较小范围内产生较多的爆炸火花,反之,适应度值较差的火花在较大范围内产生较少的爆炸火花.通过高斯变异火花增加种群的多样性,这种爆炸搜索机制对较好火花附近的区域搜索更加彻底并且避免过早陷入局部寻优.实验结果表明,烟花算法在求解N人有限非合作博弈Nash均衡问题上优于免疫粒子群算法.【期刊名称】《计算机应用与软件》【年(卷),期】2018(035)003【总页数】4页(P215-218)【关键词】烟花算法;爆炸半径;非合作博弈;Nash均衡【作者】杨彦龙;向淑文;夏顺友;贾文生【作者单位】贵州大学计算机科学与技术学院贵州贵阳550025;贵州大学计算机科学与技术学院贵州贵阳550025;贵州大学数学与统计学院贵州贵阳550025;贵州大学计算机科学与技术学院贵州贵阳550025;贵州大学数学与统计学院贵州贵阳550025【正文语种】中文【中图分类】TP30 引言随着经济全球化深入发展,博弈论研究持续活跃,特别是诺贝尔经济学奖多次授予从事博弈论研究与应用的学者,博弈论被广泛地应用到经济学、社会学、计算机科学等许多领域。

基于烟花算法的分子构象搜索方法

基于烟花算法的分子构象搜索方法

科学技术创新2021.05基于烟花算法的分子构象搜索方法廖灵志杨智欢洪玲慧李瑾(西南医科大学医学信息与工程学院,四川泸州646000)1概述分子对接[1]算法中的采样方法,即构象搜索方法对于分子对接的精度、尤其是效率有着至关重要的影响。

早期构象搜索中应用的算法包括:遗传算法[2]、模拟退火[3]、禁忌搜索[4]等各种方法。

随着群体智能算法的发展,一种新的群体智能算法———烟花算法[5,6]因其具有很强的优化问题求解能力而倍受关注。

本文对分子对接中的构象搜索问题展开研究,提出一种基于烟花算法的构象搜索方法,我们的工作证明了烟花算法在解决蛋白质-配体对接的构象搜索问题方面表现出的强大性能,具有更快的收敛速度,更加稳定的表现。

2FWAVina 构象搜索方法构建2.1分子对接的模型表示采用如下优化问题模型表示分子对接构象搜索过程:(1)(2)该优化问题的解表示为,其中,表示配体三维结构的中心坐标,是用四元数表示配体的取向信息,表示配体中每个可旋转键对应的旋转角度,其中b 表示配体中可旋转键的个数。

目标函数f 对应的是打分函数,本文中采用AutodockVina 的内置打分函数。

g 为约束函数。

2.2相关算子设计2.2.1烟花初始化在公式(2)的可行解范围内随机产生N 个烟花,第i 个烟花表示为,,计算每个初始烟花的适应度值。

2.2.2爆炸算子将烟花按适应度值进行排序,通过烟花的适应度值排序进行火花数目的分配,而不再依赖适应度值数值本身。

采用公式(3)的方式进行火花数目的计算,公式如下所示:(3)其中,M 为每个烟花最多爆炸的火花数目;r i 表示烟花w i 的适应度值排序。

我们将该构象搜索算法的解空间搜索范围分为三个层次。

一是构象中心位置在蛋白质结合口袋中的变化;二是构象中心位置固定后,取向的变化;三是中心位置和取向固定后,可扭转键的键角变化。

因此,对应解空间的这三个层次,将烟花爆炸的范围划分为如下三个区域:Ω1:变化区域为可扭转键变化,范围为[-π,π];Ω2:变化区域为取向变动,范围为[-π,π];Ω3:变化区域为中心位置变动。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Fireworks Algorithm for OptimizationYing Tan and Yuanchun ZhuKey Laboratory of Machine Perception(MOE),Peking UniversityDepartment of Machine Intelligence,School of Electronics Engineering and Computer Science,Peking University,Beijing,100871,China{ytan,ychzhu}@Abstract.Inspired by observingfireworks explosion,a novel swarm in-telligence algorithm,called Fireworks Algorithm(F A),is proposed forglobal optimization of complex functions.In the proposed F A,two typesof explosion(search)processes are employed,and the mechanisms forkeeping diversity of sparks are also well designed.In order to demon-strate the validation of the F A,a number of experiments were conductedon nine benchmark test functions to compare the F A with two vari-ants of particle swarm optimization(PSO)algorithms,namely StandardPSO and Clonal PSO.It turns out from the results that the proposed F Aclearly outperforms the two variants of the PSOs in both convergencespeed and global solution accuracy.Keywords:natural computing,swarm intelligence,fireworks algorithm,particle swarm optimization,function optimization.1IntroductionIn recent years,Swarm Intelligence(SI)has become popular among researchers working on optimization problems all over the world[1,2].SI algorithms,e.g.Par-ticle Swarm Optimization(PSO)[3],Ant System[4],Clonal Selection Algorithm [5],and Swarm Robots[6],etc.,have advantages in solving many optimization problems.Among all the SI algorithms,PSO is one of the most popular algorithm for searching optimal locations in a D-dimensional space.In1995,Kennedy and Eberhart proposed PSO as a powerful global optimization algorithm inspired by the behavior of bird blocks[3].Since then,the PSO has attracted the attentions of researchers around the globe,and a number of variants of PSO have been con-tinually proposed[7,8].Like PSO,most of swarm intelligence algorithms are inspired by some intelli-gent colony behaviors in nature.In this paper,inspired by the emergent swarm behavior offireworks,a novel swarm intelligence algorithm called Fireworks Al-gorithm(FA)is proposed for function optimization.The FA is presented and implemented by simulating the explosion process offireworks.In the FA,two explosion(search)processes are employed and mechanisms for keeping diversity of sparks are also well designed.To validate the performance of the proposed FA,comparison experiments were conducted on nine benchmark test functions Y.Tan,Y.Shi,and K.C.Tan(Eds.):ICSI2010,Part I,LNCS6145,pp.355–364,2010.c Springer-Verlag Berlin Heidelberg2010356Y.Tan and Y.C.Zhuamong the FA,the Standard PSO(SPSO),and the Clonal PSO(CPSO)[8].It is shown that the FA clearly outperforms the SPSO and the CPSO in bothoptimization accuracy and convergence speed.The remainder of this paper is organized as follows.Section2describes theframework of the FA and introduces two types of search processes and mecha-nisms for keeping diversity.In Section3,experimental results are presented to validate the performance of the FA.Section4concludes the paper.2Fireworks Algorithm2.1F A FrameworkWhen afirework is set off,a shower of sparks willfill the local space around the firework.In our opinion,the explosion process of afirework can be viewed asa search in the local space around a specific point where thefirework is set offthrough the sparks generated in the explosion.When we are asked tofind a point x j satisfying f(x j)=y,we can continually set off‘fireworks’in potential space until one‘spark’targets or is fairly near the point x j.Mimicking the process ofsetting offfireworks,a rough framework of the FA is depicted in Fig.1.In the FA,for each generation of explosion,wefirst select n locations,wherenfireworks are set off.Then after explosion,the locations of sparks are obtained and evaluated.When the optimal location is found,the algorithm stops.Oth-erwise,n other locations are selected from the current sparks andfireworks for the next generation of explosion.From Fig.1,it can be seen that the success of the FA lies in a good designof the explosion process and a proper method for selecting locations,which arerespectively elaborated in subsection2.2and subsection2.3.Fig.1.Framework offireworks algorithmFireworks Algorithm for Optimization357 2.2Design of Fireworks ExplosionThrough observingfireworks display,we have found two specific behavior of fireworks explosion.Whenfireworks are well manufactured,numerous sparks are generated,and the sparks centralize the explosion center.In this case,we enjoy the spectacular display of thefireworks.However,for a badfirework explosion, quite few sparks are generated,and the sparks scatter in the space.The two manners are depicted in Fig.2.From the standpoint of a search algorithm,a goodfirework denotes that thefirework locates in a promising area which may be close to the optimal location.Thus,it is proper to utilize more sparks to search the local area around thefirework.In the contrast,a badfirework means the optimal location may be far from where thefirework locates.Then, the search radius should be larger.In the FA,more sparks are generated and the explosion amplitude is smaller for a goodfirework,compared to a bad one.(a)Good explosion(b)Bad explosionFig.2.Two types offireworks explosionNumber of Sparks.Suppose the FA is designed for the general optimization problem:Minimize f(x)∈R,x min x x max,(1) where x=x1,x2,...,x d denotes a location in the potential space,f(x)is anobjective function,and x min and x max denote the bounds of the potential space.Then the number of sparks generated by eachfirework x i is defined as follows.s i=m·y max−f(x i)+ξni=1(y max−f(x i))+ξ,(2)where m is a parameter controlling the total number of sparks generated by the nfireworks,y max=max(f(x i))(i=1,2,...,n)is the maximum(worst) value of the objective function among the nfireworks,andξ,which denotes the smallest constant in the computer,is utilized to avoid zero-division-error.To avoid overwhelming effects of splendidfireworks,bounds are defined for s i,which is shown in Eq.3.358Y.Tan and Y.C.Zhuˆs i=⎧⎪⎨⎪⎩round(a·m)if s i<amround(b·m)if s i>bmround(s i)otherwise,a<b<1,(3)where a and b are const parameters.Amplitude of Explosion.In contrast to the design of sparks number,the am-plitude of a goodfirework explosion is smaller than that of a bad one.Amplitude of explosion for eachfirework is defined as follows.A i=ˆA·f(x i)−y min+ξni=1(f(x i)−y min)+ξ,(4)whereˆA denotes the maximum explosion amplitude,and y min=min(f(x i))(i= 1,2,...,n)is the minimum(best)value of the objective function among the n fireworks.Generating Sparks.In explosion,sparks may undergo the effects of explosion from random z directions(dimensions).In the FA,we obtain the number of the affected directions randomly as follows.z=round(d·rand(0,1)),(5) where d is the dimensionality of the location x,and rand(0,1)is an uniform distribution over[0,1].The location of a spark of thefirework x i is obtained using Algorithm1. Mimicking the explosion process,a spark’s location˜x j isfirst generated.Then if the obtained location is found to fall out of the potential space,it is mapped to the potential space according to the algorithm.Algorithm1.Obtain the location of a sparkInitialize the location of the spark:˜x j=x i;z=round(d·rand(0,1));Randomly select z dimensions of˜x j;Calculate the displacement:h=A i·rand(−1,1);for each dimension˜x j k∈{pre-selected z dimensions of˜x j}do˜x j k=˜x j k+h;if˜x j k<x mink or˜x jk>x maxk thenmap˜x j k to the potential space:˜x j k=x mink+|˜x jk|%(x maxk−x mink);end ifend forTo keep the diversity of sparks,we design another way of generating sparks—Gaussian explosion,which is show in Algorithm2.A function Gaussian(1,1), which denotes a Gaussian distribution with mean1and standard deviation1,is utilized to define the coefficient of the explosion.In our experiments,ˆm sparks of this type are generated in each explosion generation.Fireworks Algorithm for Optimization359Algorithm2.Obtain the location of a specific sparkInitialize the location of the spark:ˆx j=x i;z=round(d·rand(0,1));Randomly select z dimensions ofˆx j;Calculate the coefficient of Gaussian explosion:g=Gaussian(1,1);for each dimensionˆx j k∈{pre-selected z dimensions ofˆx j}doˆx j k=ˆx j k·g;ifˆx j k<x mink orˆx jk>x maxk thenmapˆx j k to the potential space:ˆx j k=x mink +|ˆx j k|%(x maxk−x mink);end ifend for2.3Selection of LocationsAt the beginning of each explosion generation,n locations should be selected for thefireworks explosion.In the FA,the current best location x∗,upon which the objective function f(x∗)is optimal among current locations,is always kept for the next explosion generation.After that,n−1locations are selected based on their distance to other locations so as to keep diversity of sparks.The general distance between a location x i and other locations is defined as follows.R(x i)=j∈K d(x i,x j)=j∈Kx i−x j ,(6)where K is the set of all current locations of bothfireworks and sparks.Then the selection probability of a location x i is defined as follows.p(x i)=R(x i)j∈KR(x j).(7)When calculating the distance,any distance measure can be utilized including Manhattan distance,Euclidean distance,Angle-based distance,and so on[9]. When d(x i,x j)is defined as|f(x i)−f(x j)|,the probability is equivalent to the definition of the immune density based probability in Ref.[10].2.4SummaryAlgorithm3summarizes the framework of the FA.During each explosion genera-tion,two types of sparks are generated respectively according to Algorithm1and Algorithm2.For thefirst type,the number of sparks and explosion amplitude depend on the quality of the correspondingfirework(f(x i)).In the contrast,the second type is generated using a Gaussian explosion process,which conducts search in a local Gaussian space around afirework.After obtaining the locations of the two types of sparks,n locations are selected for the next explosion gener-ation.In the FA,approximate n+m+ˆm function evaluations are done in each generation.Suppose the optimum of a function can be found in T generations, then we can deduce that the complexity of the FA is O(T∗(n+m+ˆm)).360Y.Tan and Y.C.ZhuAlgorithm 3.Framework of the FARandomly select n locations for fireworks;while stop criteria=false doSet offn fireworks respectively at the n locations:for each firework x i doCalculate the number of sparks that the firework yields:ˆs i ,according to Eq.3;Obtain locations of ˆs i sparks of the firework x i using Algorithm 1;end for for k=1:ˆm doRandomly select a firework x j ;Generate a specific spark for the firework using Algorithm 2;end forSelect the best location and keep it for next explosion generation;Randomly select n −1locations from the two types of sparks and the current fireworks according to the probability given in Eq.7;end while3Experiments3.1Benchmark FunctionsTo investigate the performance of the proposed FA,we conducted experiments on nine benchmark functions.The feasible bounds for all functions are set as [−100,100]D .The expression of the functions,initialization intervals and di-mensionalities are listed in Table 1.Table 1.Nine benchmark functions utilized in our experiments Function ExpressionInitializationD SphereF 1= D i =1x 2i [30,50]D 30Rosenbrock F 2= D −1i =1(100(x i +1−x 2i )2+(x i −1)2)[30,50]D 30Rastrigrin F 3= D i =1(x 2i −10cos(2πx i )+10)[30,50]D 30Griewank F 4=1+ D i =1x 2i 4000− D i =1cos(x i √i )[30,50]D 30Ellipse F 5= D i =1104i −1D−1x 2i [15,30]D 30Cigar F 6=x 21+ D i =2104x 2i [15,30]D 30Tablet F 7=104x 21+ D i =2x 2i [15,30]D 30Schwefel F 8= Di =1((x 1−x 2i )2+(x i −1)2)[15,30]D 30AckleyF 9=20+e −20exp −0.2 1DD i =1x 2i[15,30]D30−exp 1D D i =1cos(2πx 2i )3.2Comparison Experiments among the F A,the CPSO and the SPSOIn this section,we compare the performance of the FA with the CPSO and the SPSO in terms of both convergence speed and optimization accuracy.Fireworks Algorithm for Optimization361 Table2.Statistical mean and standard deviation of solutions found by the F A,the CPSO and the SPSO on nine benchmark functions over20independent runsFunctionFunction F A’s mean CPSO’s mean SPSO’s mean evluations(StD)(StD)(StD)Sphere5000000.0000000.0000001.909960 (0.000000)(0.000000)(2.594634)Rosenbrock6000009.56949333.403191410.522552 (12.12829)(42.513450)(529.389139)Rastrigrin5000000.0000000.053042167.256119 (0.000000)(0.370687)(42.912873)Griewank2000000.0000000.6324032.177754 (0.000000)(0.327648)(0.294225)Ellipse5000000.0000000.00000053.718807 (0.000000)(0.000000)(68.480173)Cigar6000000.0000000.0000000.002492 (0.000000)(0.000000)(0.005194)Tablet5000000.0000000.0000001.462832 (0.000000)(0.000000)(1.157021)Schwefel6000000.0000000.0950990.335996 (0.000000)(0.376619)(0.775270)Ackley2000000.0000001.68364912.365417 (0.000000)(1.317866)(1.265322)The parameters of both the CPSO and the SPSO are set as those in Ref.[8]. For the FA,the parameters were selected by some preliminary experiments.We found that the FA worked quite well at the setting:n=5,m=50,a=0.04, b=0.8,ˆA=40,andˆm=5,which is applied in all the comparison experiments.Table2depicts the optimization accuracy of the three algorithms on nine benchmark functions,which are averaged over20independent runs.It can be seen that the proposed FA clearly outperforms both the CPSO and SPSO on all the functions.In addition,the FA canfind optimal solutions on most benchmark functions in less than10000function evaluations,as shown in Table3.However, the optimization accuracy of the CPSO and the SPSO is unacceptable within 10000function evaluations.Besides optimization accuracy,convergence speed is quite essential to an opti-mizer.To validate the convergence speed of the FA,we conducted more thorough experiments.Fig.3depicts the convergence curves of the FA,the CPSO and the SPSO on eight benchmark functions averaged over20independent runs.From these results,we can arrive at a conclusion that the proposed FA has a much faster speed than the CPSO and the SPSO.From Table3,we canfind that the FA canfind excellent solutions with only10000times of function evaluations. This also reflects the fast convergence speed of the proposed FA.362Y.Tan and Y.C.Zhu(a)Sphere(b)Rosenbrock(c)Rastrigin(d)Griewank(e)Ellipse(f)Cigar(g)Tablet(h)SchwefelFig.3.Convergence curves of the F A,the CPSO and the SPSO on eight benchmark functions.The function fitness are averaged over 20independent runs.Fireworks Algorithm for Optimization363 Table3.Statistical mean and standard deviation of solutions found by the F A,the CPSO and the SPSO on nine benchmark functions over20independent runs of10000 function evaluationsFunction F A’s mean CPSO’s mean SPSO’s mean(StD)(StD)(StD)Sphere0.00000011857.42578124919.099609 (0.000000)(3305.973067)(3383.241523)Rosenbrock19.383302750997504.0000005571942400.000000 (11.94373)(1741747548.420642)(960421617.568024)Rastrigrin0.00000010940.14843824013.001953 (0.000000)(3663.484331)(4246.961530)Griewank0.0000003.4572737.125976 (0.000000)(0.911027)(0.965788)Ellipse0.0000002493945.5000005305106.500000 (0.000000)(1199024.648305)(1117954.409340)Cigar0.000000122527168.000000149600864.000000 (0.000000)(28596381.089661)(13093322.778560)Tablet0.00000015595.10742242547.488281 (0.000000)(8086.792234)(8232.221882)Schwefel4.3537338775860.0000006743699.000000 (1.479332)(1217609.288290)(597770.084232)Ackley0.00000015.90766518.423347 (0.000000)(1.196082)(0.503372)3.3DiscussionAs shown in the experiments,the FA has a faster convergence speed and a better optimization accuracy,compared to the PSO.We consider the success of the FA lies in the following two aspects.–In the FA,sparks suffer the power of explosion from z dimensions simul-taneously,and the z dimensions are randomly selected for each spark˜x i.Thus,there is a probability that the differences between thefirework and the target location happen to lie in these z dimensions.In this scenario,the sparks of thefirework can move towards the target location from z directions simultaneously,which endues the FA with a fast convergence speed.–Two types of sparks are generated to keep the diversity of sparks,and the specific selection process for locations is a mechanism for keeping diversity.Therefore,the FA has the capability of avoiding premature convergence.4ConclusionsMimicking the explosion process offireworks,the so-called FA is proposed and implemented for function optimization.The experiments among the FA,the CPSO and the SPSO have shown that the proposed FA has a promising per-formance.It clearly outperforms the CPSO and the SPSO on nine benchmark364Y.Tan and Y.C.Zhufunctions in terms of both optimization accuracy and convergence speed,which endues the FA with a promising prospect of application and extension.In future work,we will seek a deep theoretical analysis on the FA and try to apply the FA to some practical engineering applications.Finally,we intend to discuss the relationship between the FA and other general-purpose optimization algorithms. Acknowlegements.This work was supported by National Natural Science Foundation of China(NSFC),under Grant No.60875080and60673020,and partially supported by the National High Technology Research and Develop-ment Program of China(863Program),with Grant No.2007AA01Z453.Authors appreciate Mr.Chao Rui for his facility with the early phase of the experiments. References1.Garnier,S.,Gautrais,J.,Theraulaz,G.:The biological principles of swarm intelli-gence.Swarm Intelligence1(1),3–31(2007)2.Das,S.,Abraham,A.,Konar,A.:Swarm intelligence algorithms in bioinformatics.Studies in Computational Intelligence94,113–147(2008)3.Kennedy,J.,Eberhart,R.C.:Particle swarm optimization.In:Proceedings of IEEEInternational Conference on Neural Networks,vol.4,pp.1942–1948(1995)4.Dorigo,M.,Maniezzo,V.,Colorni,A.:Ant system:optimization by a colony ofcooperating agents.IEEE Transactions on Systems,Man,and Cybernetics,Part B:Cybernetics26(1),29–41(1996)5.De Castro,L.N.,Von Zuben, F.J.:Learning and optimization using theclonal selection principle.IEEE Transactions on Evolutionary Computation6(3), 239–251(2002)6.Beni,G.,Wang,J.:Swarm intelligence in cellular robotic systems.In:Proceedingsof NATO Advanced Workshop on Robots and Biological Systems(1989)7.Bratton,D.,Kennedy,J.:Defining a standard for particle swarm optimization.In:Proceedings of IEEE Swarm Intelligence Symposium,pp.120–127(2007)8.Tan,Y.,Xiao,Z.M.:Clonal particle swarm optimization and its applications.In:Proceedings of IEEE Congress on Evolutionary Computation,pp.2303–2309 (2007)9.Perlibakas,V.:Distance measures for PCA-based face recognition.Pattern Recog-nition Letters25(6),711–724(2004)10.Lu,G.,Tan,D.,Zhao,H.:Improvement on regulating definition of antibody densityof immune algorithm.In:Proceedings of the9th International Conference on Neural Information Processing,vol.5,pp.2669–2672(2002)。

相关文档
最新文档