现代智能优化算法粒子群算法课件

起源:生物社会学家对鸟群捕食行为研究 我们可以设想这样的一个场景,一群鳥在随机搜寻食物这个区域裡只有一块食物所有的鸟都不知道食物在哪里,那么找到食物的最佳策略是什么?最简单的方法就是找尋距离距离食物最近的食物最近的鸟鸟的周围区域及根据自己本身飞行飞行的的经验判断经验判断食物的所在FoodGlobal Best SolutionPast Best SolutionParticle Swarm Optimization(PSO)为James Kennedy 于1995年提出PSO is a robust stochastic optimization technique based on the movement and intelligence of swarms.PSO applies the concept of social interaction to problem solving.It was developed in 1995 by James Kennedy(social-psychologist)and Russell Eberhart(electrical engineer).PSO特点:It uses a number of agents(particles)that constitute a swarm moving around in the search space looking for the best solution.Each particle is treated as a point in a N-dimensional space which adjusts its“flying”according to its own flying experience as well as the flying experience of other particles.PSO特点:Each particle keeps track of its coordinates in the solution space which are associated with the best solution(fitness)that has achieved so far by that particle.This value is called personal best,pbest.Another best value that is tracked by the PSO is the best value obtained so far by any particle in the neighborhood of that particle.This value is called gbest.The basic concept of PSO lies in accelerating each particle toward its pbest and the gbest locations,with a random weighted accelaration at each time step as shown in Fig.1PSO搜索机理Fig.1 Concept of modification of a searching point by PSOsk:current searching point sk+1:modified searching point.vk:current velocity.vk+1:modified velocity.vpbest:velocity based on pbest,vgbest:velocity based on gbest.Each particle tries to modify its position using the following information:the current positions,the current velocities,the distance between the current position and pbest,the distance between the current position and the gbest.PSO搜索机理PSO搜索机理The modification of the particles position can be mathematically modeled according the following equation:PSO计算步骤PSO计算流程Loop until max iterLoop until all particles exhaustStartInitialize particles with random position and velocity vectors.For each particles position(p)evaluate fitnessIf fitness(p)better than fitness(pbest)then pbest=pSet best of pBests as gBestUpdate particles velocity(eq.1)and position(eq.3)Stop:giving gBest,optimal solution.PSO应用实例40045050055060065070075080085014166425610244096sample.dat。