二进制PSO有关理论参考_第1页
二进制PSO有关理论参考_第2页
二进制PSO有关理论参考_第3页
二进制PSO有关理论参考_第4页
二进制PSO有关理论参考_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、二进制PSO有关理论参考:U 13.4遗传莫法流程图随机算子种群1 a种群213.2.2遗传算法的关键实现技术遗传算法的基本实现技术主要有编码方法、适应度函数、选择算于、交叉算 子和变异算于五个方面:编码g将可行解从其解空间转换到遗传算法所能处理的搜索空间的 转换操作或方法称为绿码。概括而言,编码方法可以分为以下三类:瓦- 进制缱码,h实数编码,c.符号绿码口适应度函数:度量个纯适应度的函数称为适应度函数(Fitness Function )t 遗传算法使用适应度这个概念来度量群体中各个个体在优化计算中有 可能达到或接近于或有助于找到最优解的优良程度,适应度较高的个体 遗传到下一代的概率就较大

2、;而适应度较低的个体遗传到下一代的概率 就相对小一些,遗传算法的一个特点是它仅使用所求问题的目标函数值 就可得到下一步的有关搜索信息,而对耳标函数值的使用是通过评价个 体的适应度来体现的选择算子:遗传算法根据个体的适应度,使用选择算于(或称复制算于 (Reproduction Operator)来对群体中的个体进行优胜劣汰操作,即确 定如何从父代群体中按某种方法选取哪些个体遗传到下一代群体中的 一种遗传运算对于各种不同的问题,人们提出了各种各样的迷择算子* 其中最常用的选择算子是:土比例选择法,b.最优保存策略,。.排序选择 法.交叉算子:交叉运算是指对两个相互配对的染色体按某种方式相互交换

3、其部分基因,M而形成两个新的个体。在交叉运算之前,常用流机配对 策略先对群体中的个体进行配对。交叉算子的设计要求不能太多地破坏 优臭个体的模式,且能有效地产生出一些较好的新个体模式.最常用的 交叉算子有&多点、交叉,h均匀交叉,七.算交交叉n变异算子:变异运算是指将个体编码串中的某些基因座上的基因值,以 一较小概率用其他等位基因来替换,从而形成一个新的个体,使用变异 算子可以改善遗传算法的局部搜索能力,维持群体的多样性,防止出现 早熟现象莒用的变异算子有:基本位变异,b.均匀变异,c.非均匀变 异,d.自适应变异。1323遗佐算法求解函数优化问题MATLAB R2OIOa中提供了遗传算法工具箱

4、*下而对该工具箱进行详细介绍匚在Global Optimization Toolbox ZL具箱下的遗传算法工具箱提供了 4个函数于 它们分别是goptimset函数、gaoptimget函数、学函数gmultiobj函数匚卜-面 对上述4个函数的功能及调用格式进行详细介绍蚌IUseParall el以弁行的方式计算种群淘w叫& ever5适应度Real number space & Discrete spaceKennedy,1997在连续空间,粒子群算法 TOC o 1-5 h z V(t +1) = V(t) + c - rP- X(t) + c - r- G- X(t)(1)i, ji

5、, j11, ji, ji, j22, jji, jX . (t +1) = X . (t) + V . (t +1)(2)其中,i = 1,2,N; j = 1,2,D; D为维数,N为种群规模,匕、c2为学习因子,建议取 值2.0; r为(0,1)之间的均匀分布的随机数。然而,实际工程优化问题中,常遇到离散数空间。2011 Binary Particle Swarm Optimization with Crossover Operation for Discrete Optimization.优化精度:优化所得最优解和理论最优解的相对误差。成功率:连续运行runtime次,其中优化精度在容

6、许的阈值范围内的次数与运行总次数的比 值,用百分数表示。该参数一定程度上反映了当前所用的优化算法的计算精度和鲁棒性。当 然该参数也可作为参数选取的依据,即通过参数敏感性分析,参数分别选取不同的值,优先 选取优化成功率高的那次优化所取的参数值。To tackle this problem, Kennedy and Eberhart proposed KBPSO algorithm, where the particles take the values of binary vectors of length n and the velocity defined the probability o

7、f bit 易 to take the value 1. KBPSO reserved the updating formula of the velocity (see (1) while velocity was constrained to the interval 0.0, 1.0 by a limiting transformation function, that is, the particle changes its bit value by (3N) in KBPSOS(v0 = l/(1-)ifrand()WS(%)0 etherise where the value of

8、 rand() drawn from U(0,l) and the function S(v) is a sigmoid limiting transformation.As the optimization ability of KBPSO is not ideal, Qi developed a modified discrete binary PSO algorithm (MBPSO). In MBPSO, the updating formulas are defined by th巳 following equations 13(5)(6)If (0Vjj (i) then (new

9、)=孔(old),f (ot捋j J_ (1-a) then 孔(new) = p(J ,ff(L(l+(gj I) then 气(*)=疏,where a named static probability is a random value in the range of (0,1). The initial value of a is 0.5.& The Probability Binary Particle Swarm Optimization AlgorithmAs KBPSO and MBPSO are very easy to trap in the local optimum a

10、nd KBPSO updating formulas is complexity, we propose a novel algorithm named probability binary particle swarm optimization algorithm (PBPSO) to tackle these problems in this paper. Here (1) and (2) are all reserved for iterative evolution in PBPSO, and then we adopt a novel formula to determine a b

11、inary bit pxy which can be denoted as follows:Lg)二国-RQ (* -尺顷),(8)严 5),where Z(x) is a linear function, its output value belongs to (0,1); rand。is a stochastic number selected from a uniform distribution in 0,0, 1,0; and /?iyiax, 7fmin is a predefined range for gaining the probability value with L版)

12、 function.SteelTable=1,2,3,.,n;A=A1,A2,A3,.,An;Elon S. Correa Alex A. Freitas Colin G . Johnson. ().A New Discrete Particle Swarm Algorithm Applied to Attribute Selection in a Bioinformatics Data Set, 35-42.function f itness= evaluat e (positiorij 虬 J var5 K_maXj f itnessj Num_func) for i= 1:N %对每个粒

13、子计算其话应值,1旦是fitness (ij :) ?列号k表示当前迭代次数端号;for j=1:vartemp=position(ij (j-1) *L+1: j#L):Z (j)=decode (tempj Lj s_max) : 3S#ol end% now X is m real-number space.swit ch Num fxmc为L;%第二个粒子的第位串,每个位串长度均:AGROW另相当于多维实数空间中的Nj都可以、用一个长度.为L的位串表示,是吗?case 1result 二 sum (Z.2);case 2result = swn(abs (X) + prod(abs (

14、X) case 3result 二 0 :for ii=1:varresult 二 result + sum(X(1:ii). 2;endcase 4result 二 max (abs(X);case 5result = 0:for ii=1:var-1result = result + 100* (X (ii+l)-X (ii)2)2+(X(ii)-l)2); endendfitness (ij k.)二 result :end1- returnfunction Z=decode rtempj Lj K_max) z=0;for i=l:LK=K+t emp f i)*2ri-l);endz

15、=k/(2T-1):X= (2*x_max)/ (1-0)* z-0)-K_maxreturn3. THE STANDARD BIARY PSO ALGORITHMIhe standard binaiy version cf the PSO algorithm 9 works as fbllcws. iJutenTial so hit io ns (particles) to the target pmblFin are encoded as fixed length binan;, strings; i .e. 熟i) = (w%i)点网珅:,工(饥where 欠危 E 也 1, i = 1

16、.如.、A; and j = 1. 2.,几 Given a list cf attributes A = (A2.A2. An). the first element of X(i). from the left tc the right hand side, ccrrcspmds to the first aitribute . the second to the second attribute . and sc fbrth. A value cf 0 on rhe site associated to aii attribute signifies that the respectiv

17、e attribute is net ielected A value cf 1 means that it is selected. For exampls given the list cf attributes A = A. Al A3. Ai. As) and Ar = 4. a swarm could look like this:vt/1 oO.L5 J1 oL S*J _T o 1/X /f-XI/12 3 4 vrf fv MX Mix1 1 rJ 1 o-sT 1 1T 1 /f-In this example., particle X (T: = (D, J. J, 0.

18、1 : represents a candidate solution where attributes A2: A3 euicI Az are the only attributes aelected3 J The initial population for the standard binary PSO algorithmFor the initial population. A binaiy strings of length n ar丑 randomly generated. Each pailiclp X i is mdependently Igenerated as follow

19、s. For every position rr;:.d;, of X4) a uniform Iandcm number p is drawn on the inteival 0 1 :. If 户 町 = L otherwise 工厘心 =0.3*2 Lpdatinj; the recordsAt the beginning, the previous best position of X (ij. denoted by B(!). is emptj Therefore, once the initia particle Xi) is generated, B(i) is set to 8

20、( = X(4). After that,!i .I .U_eveiy time that X (Q is updated. B2) is also updated if is better than f I: 8 ( ;, Qtheiise. H (2) remains as it is. A similar process is used to update the global best posi- _l_l3ticn C. At the beginning. C is also empty. Therefore., once ji ji all the 8(时 hmve been de

21、termined. G is set to the fittest i3i previously Gomputcd. After that. G is updated if the fittestin the swarm is better than y(7(i),:. And,in that case. /(。()追洗巾切= AttestOtheinAFise. C remains as it is.乙-91:(900乙)日日日1即wire。oa 4i9AnoouBA uopBjnduioQ XiBuopnpAg uo ssaiSuoQ 3331900 tuspreipog SuTjpuBf

22、j-ureijsuoQ oaon b qjiM laziuipdQ uiibms ajopiBj uiiBMS-ppp otuibuXq,(900) Nd u叫ire#ns T T #况门 :fi酒逝觞 NOUVZIHUdO HHVMS mDUHVd AHVNia DNISH SQVOT HVHNnNON HO HONHSHNd ni snaaaad Nounaraisia nviavn no iNHHHDvnd hoiidvjvd nvHiido【】s。阙Q uopBjsqng pgyojsiQ qjiM siapggj uopnqujsiQWS5UBq JOJTOBClBQ JO SuiZ

23、Ig pUB JU9UI90BJJ pUITjdQ IOJ UOTJBZTUITjdQ UIIBMS gpiJIBJ XlBUIQ y j&ded 具 qi ut peso,id uh中曲E 0而口 mqi siuesajd u田:pa? pcsu mq.工 1 mq 口每方工 jo mnpuA &JOLLT P a jo mqmq isjiuod7) mq :x jo snEA mqi X珂y sjollt mq E jo mnBA 四jawoj 四【召甲 舛。乂 6 口中口 OSH iuiq 四】ut sepiut?tl Atmu mduTB? p&sn uoT|-Bnte pjpirei

24、s 日冥吕 uoii (S)n-jdxm c .-Ellbsi TCJTl-JUTIJ piDUlSTS 乳SI =(pire jaquinu mopimi uuojimi B si puKi q 如四地:初心四U T 1 _ (5 办)5 pu 或如J-:lTOTlETlb5 SlITAWJJJOJ 叫:|.码 UBA宣 SI piTC A ? 也 菖I -。日上 &ATio&ds&j B1.I uo pssEq si jo q eq TjVl Wh jmqjmqAi jo u田电n叩 四工 , jo q mq aw (?) y 3 如,B -ipjOOD M9U 91J JO ailJHBLY 3L Pp UOISU9UIip ipB9 piTO I 93IJ -J旧d l3B-9 JO

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论