Matlab scientific research 2021-08-10 09:14:37 阅读数:554

本文一共[544]字，预计阅读时长:1分钟~

workshop
scheduling
solve
6x6
workshop

Particle swarm optimization (PSO) It is a numerical optimization algorithm based on swarm intelligence , By social psychologists James Kennedy And Electrical Engineer Russell Eberhart On 1995 in . since PSO Since the birth of , It has been improved in many ways , This part will introduce the basic principle and process of particle swarm optimization .

1.1 Particle swarm optimization

Particle swarm optimization (PSO) It is a population intelligent algorithm , Its inspiration comes from the flock of birds or the school of fish , It is used to solve nonlinear problems in many fields of science and engineering 、 Nonconvex or combinatorial optimization problems .

1.1.1 Algorithmic thought

Many birds are social , And different bird groups are formed for various reasons . Birds may be of different sizes , Appear in different seasons , It may even consist of different species in the group that can cooperate well . More eyes and ears mean more opportunities to find food and predators in time . Birds are always good for the survival of their members in many ways ：

foraging ： Sociobiologists E.O.Wilson say , At least in theory , Individual members of the group can benefit from other members' discoveries and previous experience in looking for food [1]. If a flock of birds have the same food source , Then some species of birds will gather together in a non competitive way . such , More birds can take advantage of other birds' discovery of food locations .

Against predators ： Birds have many advantages in protecting themselves from predators .

More ears and eyes mean more opportunities to find predators or any other potential danger ;

A flock of birds may confuse or suppress predators through siege or agile flight ;

In groups , Mutual warning can reduce the danger of any bird .

aerodynamics ： When birds fly in groups , They often arrange themselves in a specific shape or formation . The number of birds in the flock is different , Each bird produces a different air flow when it stirs its wings , This will lead to changes in wind patterns , These formations will make full use of different typing , So that birds in flight can use the surrounding air in the most energy-saving way .

The development of particle swarm optimization needs to simulate some advantages of bird swarm , However , In order to understand an important property of swarm intelligence and particle swarm optimization , It is worth mentioning some shortcomings of birds . When birds flock , It also brings them some risks . More ears and eyes means more wings and mouth , This leads to more noise and movement . under these circumstances , More predators can locate birds , A continuing threat to birds . A larger group will also need more food , This leads to more food competition , It is possible to eliminate some weaker birds in the group . What needs to be pointed out here is ,PSO There is no disadvantage of simulating bird group behavior , therefore , It is not allowed to kill any individual during the search , In genetic algorithm , Some weaker individuals die . stay PSO in , All individuals will survive , And strive to become stronger throughout the search process . In particle swarm optimization , The improvement of potential solution is the result of cooperation , In evolutionary algorithms, it is because of competition . This concept makes swarm intelligence different from evolutionary algorithms . In short , In evolutionary algorithms , Each iteration has a new population evolution , In swarm intelligence algorithms , Each generation has individuals who make themselves better . The identity of an individual does not change with iterations .Mataric[2] The following flock rules are given ：

Secure roaming ： When birds fly , There is no collision with each other or with obstacles ;

Dispersed ： Every bird keeps a minimum distance from other birds ;

polymerization ： Each bird will also keep a maximum distance from other birds ;

Go home ： It is possible for all birds to find food sources or nests .

When designing particle swarm optimization , These four rules are not used to simulate the group behavior of birds . stay Kennedy and Eberhart The basic particle swarm optimization model is developed , Yes agent The movement of does not follow the rules of safe roaming and dispersion . let me put it another way , In the motion process of basic particle swarm optimization algorithm , Allow the agents in the particle swarm optimization algorithm to be as close to each other as possible . Aggregation and homing are effective in particle swarm optimization model . In particle swarm optimization , The agent must fly in a specific area , To maintain maximum distance from any other agent . This is equivalent to the whole process , The search always stays within or at the boundary of the search space . The fourth rule , Homing means that any agent in the group can achieve global optimization .

stay PSO During the development of the model ,Kennedy and Eberhart Five basic principles are proposed to judge whether a group of agents is a group ：

Nearby principle ： The agent group should be able to perform simple spatial and temporal calculations ;

Quality principles ： Agent groups can respond to quality factors in the environment ;

Multi response principle ： The agent group should not engage in activities in too narrow channels ;

Stability principle ： Agent groups cannot change their behavior patterns every time the environment changes ;

The principle of adaptability ： When the cost of calculation is small , Agent groups can change their behavior patterns .

1.1.2 Particle swarm optimization process

Considering these five principles ,Kennedy and Eberhart A method for function optimization is developed PSO Model . In particle swarm optimization , Using the method of random search , Using swarm intelligence to solve . let me put it another way , Particle swarm optimization (PSO) is a population intelligent search algorithm . This search is done by a set of randomly generated possible solutions . This set of possible solutions is called a group , Every possible solution is called a particle .

In particle swarm optimization , Particle search is influenced by two learning methods . Every particle is learning from other particles , At the same time, I also learn my own experience in the process of sports . Learning from others can be called social learning , Learning from one's own experience can be called cognitive learning . As a result of social learning , The particle stores in its memory the best solution accessed by all particles in the group , We call it gbest. Through cognitive learning , The particle stores in its memory the best solution it has ever visited , be called pbest.

The change in the direction and size of any particle is determined by a factor called velocity , Speed is the rate of change of position relative to time . about PSO, Iterating over time . such , For particle swarm optimization , Velocity can be defined as the rate of change of position relative to iteration . As the iteration counter unit increases , Speed v Dimension and position of x identical .

about D Dimensional search space , In time step t The second in the next group ith A particle consists of D Dimension vector x i t = ( x i 1 t , ⋯ , x i D t ) T x_i^t = {(x_{i1}^t, \cdots ,x_{iD}^{t)}T}xit=(xi1t,⋯,xiDt)T To express , Its speed is determined by another D Dimension vector v i t = ( v i 1 t , ⋯ , v i D t ) T v_i^t = {(v_{i1}^t, \cdots ,v_{iD}^{t)}T}vit=(vi1t,⋯,viDt)T Express . The first ith The location of the optimal solution visited by particles is p i t = ( p i 1 t , ⋯ , p i D t ) T p_i^t = {\left( {p_{i1}^t, \cdots ,p_{iD}^t} \right)^T}pit=(pi1t,⋯,piDt)T Express , The index of the optimal particle in the population is “g”. The first ith The velocity and position of particles are updated by the following formula respectively ：

v i d t + 1 = v i d t + c 1 r 1 ( p i d t − x i d t ) + c 2 r 2 ( p g d t − x i d t ) (1) v_{id}^{t + 1} = v_{id}^t + {c_1}{r_1}\left( {p_{id}^t - x_{id}^t} \right) + {c_2}{r_2}\left( {p_{gd}^t - x_{id}^t} \right)\tag 1vidt+1=vidt+c1r1(pidt−xidt)+c2r2(pgdt−xidt)(1)

x i d t + 1 = x i d t + v i d t + 1 (2) x_{id}^{t + 1} = x_{id}^t + v_{id}^{t + 1}\tag 2xidt+1=xidt+vidt+1(2)

among d=1,2,…,D Dimensionality ,i=1,2,…,S Index particles ,S It's the size of the group .c1 and c2 Constant , Cognitive and social scaling parameters, respectively , Or simply called acceleration coefficient .r1 and r2 Is to satisfy uniform distribution [0,1] Random number between . The above two formulas update each dimension of each particle separately , The only connection between different dimensions in the problem space is introduced through the objective function , That is, the best position found so far gbest and pbest[3].PSO The algorithm flow of is as follows ：

1.1.3 Interpret and update the equation

Speed update equation （1） The right side of the consists of three parts 3：

The speed of the previous time v, It can be considered as a momentum term , Used to store the previous direction of motion , The purpose is to prevent particles from changing direction violently .

The second is the cognitive or self part , Through this , The particle's current position moves to its own best position , So throughout the search , Particles will remember their best position , To avoid wandering around . What needs to be noted here is ,pidt-xidt It's a direction from xidt To pidt Vector , So as to attract the current position to the best position of the particle , The order of the two cannot be changed , Otherwise, the current position will be far away from the best position .

The third is the social part , Responsible for sharing information through groups . Through this item , The particle moves towards the best individual in the group , That is, each individual learns from other individuals in the group . Again, the two should be pgbt-xidt.

It can be seen that , Cognitive scale parameters c1 What is adjusted is the maximum step size of the particle in its best position direction , And the social scale parameter c2 It adjusts the maximum step size in the direction of the globally optimal particle . chart 2 The typical geometry of particle motion in two-dimensional space is given .

chart 2 Geometric description of particle movement in particle swarm optimization

As can be seen from the renewal equation ,Kennedy and Eberhart Of PSO The design follows PSO The five basic principles of . In the process of particle swarm optimization , stay d A series of time steps are calculated in dimensional space . At any time step , All species follow gbest and pbest The guiding direction of , That is, the population responds to quality factors , So as to follow the quality principle . Because there are uniformly distributed random numbers in the velocity renewal equation r1 and r2, stay pbest and gbest The current position between is randomly assigned , This proves the diversity of response principles . In the process of particle swarm optimization , Only if the particle swarm starts from gbest When better information is received in , Random motion will occur , The stability principle of particle swarm optimization process is proved . Population in gbest Change as you change , Therefore, follow the principle of adaptability .

1.2 Parameters in particle swarm optimization

The convergence speed and optimization ability of any population-based algorithm are affected by its parameter selection . Usually , Because the parameters of these algorithms are highly dependent on the problem parameters , Therefore, it is impossible to give general suggestions on the parameter setting of these algorithms . however , Existing theories and / Or experimental research , The general range of parameter values is given . Similar to other population-based search algorithms , Because there are random factors in the search process r1 and r2, So universal PSO Parameter adjustment has always been a challenging task .PSO The base version of requires only a few parameters . This chapter only discusses [4] Introduced in PSO Parameters of the basic version .

A basic parameter is population size , It is usually set empirically according to the number of decision variables in the problem and the complexity of the problem . General advice 20-50 A particle .

Another parameter is the scaling factor c1 and c2. As mentioned earlier , These parameters determine the particle step size in the next iteration . in other words ,c1 and c2 Determines the velocity of the particles . stay PSO In the base version of , choice c1=c2=2. under these circumstances , The particle s The increase in speed is uncontrolled , This is conducive to faster convergence , But it is not conducive to making better use of the search space . If we make c1=c2>0, Then the particles will attract pbest and gbest Average value .c1>c2 Setting is conducive to multimodal problems , and c2>c1 Conducive to single-mode problems . During search ,c1 and c2 The smaller the value of , The smoother the particle trajectory , and c1 and c2 The greater the value of , The motion of particles is becoming more and more intense , The more acceleration . Researchers have also proposed adaptive acceleration coefficients [5].

The stopping criterion is not only a parameter of particle swarm optimization , It is also a parameter of any population-based meta heuristic algorithm . Common stopping criteria are usually based on the maximum number of function evaluations or iterations , The number of times is proportional to the time spent by the algorithm . A more effective stopping criterion is the search ability based on the algorithm , If an algorithm does not significantly improve the solution within a certain number of iterations , Then you should stop searching .

edition ：2014a

版权声明：本文为[Matlab scientific research]所创，转载请带上原文链接，感谢。 https://car.inotgo.com/2021/08/20210810091259279I.html

- "Xie Dajiao" Yu Yuexian died in a car accident, and their lives were also terminated by the accident
- At the age of 44, Chen Shu appeared in the brand store to shop, bought three carts of clothes, and his body size was exposed
- Buy Volvo to avoid this car. It is small and expensive. The sales volume in June was only 350 units!
- "Xie Dajiao" died in a car accident in Yuexian. He was only 50 years old. Friends in the circle sent messages to mourn
- Police responded to the cause and details of Yu Yuexian's car accident: driving into a camel in the early morning, and the driver and others were injured
- Actor Yu Yuexian died in a car accident at the age of 50. The police informed Yu Yuexian of the cause of the car accident
- “谢大脚”车祸去世，小沈阳姜超发微博悼念，翟天临都“很难过”
- 被惋惜的不止“谢大脚”，这3位车祸去世的明星，每位都让人心痛
- 警方通报于月仙车祸去世：小型客车发生交通事故造成于某某死亡
- 50岁于月仙车祸去世，与老公结婚20多年无子！把患病弟弟当儿子养
- "Xie Dajiao" died in a car accident. Xiao Shenyang Jiang Chao sent a microblog to mourn. Zhai Tianlin was "very sad"
- It is not just "Xie Dajiao" who is regretted. Each of the three stars who died in a car accident is heartbreaking
- The police reported that Yu Yuexian died in a car accident: a traffic accident on a minibus resulted in Yu's death
- Yu Yuexian, 50, died in a car accident and married her husband for more than 20 years without children! Raise your sick brother as a son
- 男星开百万豪车太高调，多次压线并占用应急车道，网友痛批没素质
- 于月仙车祸去世，《乡村爱情》官博发文：“仙”人已逝，如“月”婵娟
- The male star drove a million luxury cars too high-profile, pressed the line for many times and occupied the emergency lane. Netizens criticized him for lacking quality
- Yu Yuexian died in a car accident. The official blog of rural love wrote: "the immortal" is dead, such as the "Moon" Chan Juan
- 现在上车以太坊挖矿还有戏吗
- Now get on the bus and dig in Ethereum. Is there any play
- 于月仙车祸细节曝光，凌晨三点去参加活动，与丈夫张学松无儿无女
- The details of Yu Yuexian's car accident were exposed. She went to the event at 3 a.m. and had no children with her husband Zhang Xuesong
- 演员于月仙在阿拉善因发生车祸不幸去世
- Actor Yu Yuexian died in a car accident in Alashan
- 于月仙车祸前，在《乡村爱情》中已被边缘化，谢大脚成了广告符号
- 于月仙车祸去世：再见了，《乡村爱情》里的“小卖部女神”
- “谢大脚”于月仙车祸去世，众星发文悼念，章子怡说的话令人泪目
- Before Yu Yuexian's car accident, she was marginalized in rural love, and Xie Dajiao became an advertising symbol
- Yu Yuexian died in a car accident: goodbye, the "canteen goddess" in rural love
- 50岁“谢大脚”车祸去世，《乡村爱情》15年，已经有5位演员走了
- 50岁于月仙车祸去世！途中和两只骆驼相撞，最后一条动态令人泪目
- 于月仙车祸去世，《乡村爱情》再无“谢大脚”，永远怀念！
- "Xie Dajiao" Yu Yuexian died in a car accident. The stars sent a document to mourn. Zhang Ziyi's words made people cry
- At the age of 50, "Xie Dajiao" died in a car accident. Five actors have left in "country love" for 15 years
- 一路走好！50岁“谢大脚”于月仙车祸去世，与老公结婚多年无儿女
- 警方通报于月仙车祸原因：与两头骆驼相撞，司机和其他成员只受伤。“乡爱”官微发文悼念
- Yu Yuexian, 50, died in a car accident! On the way, he collided with two camels, and the last one was tearful
- Yu Yuexian died in a car accident. There is no "Xie Dajiao" in rural love. I will always miss it!
- All the way! Xie Dajiao, 50, died in a car accident in Yuexian. He married his husband for many years without children
- The police informed Yu Yuexian of the cause of the accident: the driver and other members were only injured when they collided with two camels“ "Township love" official wechat sent a document to mourn
- 于月仙因车祸去世，长贵可以复活，但《乡村爱情》从此再无谢大脚
- 50岁于月仙车祸去世，《乡爱》再无谢大脚，小沈阳：小姨一路走好
- 于月仙车祸细节：被撞两只骆驼也死了，全车4人，只有她去世
- 赵本山小姨子车祸去世，《乡村爱情》剧组悼念，50岁一辈子未生子
- 毫无底线！于月仙车祸去世，网红直播谢大脚超市引众怒
- 50岁于月仙遭遇车祸突然离世：原来人生真的没有那么多来日方长
- Yu Yuexian died in a car accident, and Changgui can come back to life, but "country love" has never had Xie Dajiao again
- Yu Yuexian died in a car accident at the age of 50. There is no thanks for big feet in rural love. Little Shenyang: let's go all the way
- 警方通报于月仙车祸原因：与两只骆驼相撞！赵本山女儿发文悼念
- 蹭热度无底线？于月仙车祸去世，多位网红大脚超市直播被网友骂惨
- Details of Yu Yuexian's car accident: two camels were also killed. There were 4 people in the car, and only she died
- Zhao Benshan's sister-in-law died in a car accident. The crew of "rural love" mourned that she had no children at the age of 50
- No bottom line! Yu Yuexian died in a car accident. Xie Dajiao supermarket attracted public anger
- Yu Yuexian, 50, died suddenly in a car accident: it turns out that life really doesn't have so much time
- Police informed Yu Yuexian of the cause of the accident: collision with two camels! Zhao Benshan's daughter sent a document to mourn
- No bottom line for rubbing heat? Yu Yuexian died in a car accident. Many netizens scolded her for live broadcast in wanghongdajiao supermarket
- 《乡村爱情》谢大脚扮演者车祸去世：生命来来往往，来日并不方长
- Xie Dajiao's actor in rural love died in a car accident: life comes and goes, and the future is not long
- 著名演员于月仙：因车祸猝然离世，将悲痛和心碎留给丈夫
- Famous actor Yu Yuexian: died suddenly in a car accident, leaving grief and heartbreak to her husband