Matlab scientific research 2021-08-10 09:14:53 阅读数:868

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

job
shop
scheduling
solving
flexible

1 Overview of genetic algorithm

Genetic algorithm (ga) （Genetic Algorithm,GA） It's part of evolutionary computing , It is a computational model that simulates the biological evolution process of Darwin's genetic selection and natural elimination , It is a method to search the optimal solution by simulating the natural evolution process . The algorithm is simple 、 Universal , Strong robustness , Suitable for parallel processing .

2 Characteristics and application of genetic algorithm

Genetic algorithm is a kind of robust search algorithm which can be used for complex system optimization , Compared with the traditional optimization algorithm , It has the following characteristics ：

（1） Take the code of decision variable as the operation object . Traditional optimization algorithms often directly use the actual value of decision variables to optimize calculation , But genetic algorithm uses some form of coding of decision variables as the operation object . This coding method for decision variables , So we can learn from the concepts of chromosome and gene in Biology , It can imitate the genetic and evolutionary incentives of organisms in nature , Genetic operators can also be easily applied .

（2） Directly use fitness as search information . The traditional optimization algorithm not only needs to use the value of the objective function , Moreover, the search process is often constrained by the continuity of the objective function , There may be a need to meet “ The derivative of the objective function must exist ” To determine the search direction . The genetic algorithm only uses the fitness function value transformed by the objective function value to determine the further search range , No other auxiliary information such as derivative value of objective function is required . Directly using the objective function value or individual fitness value can also focus the search range into the search space with higher fitness , To improve search efficiency .

（3） Search information using multiple points , With implicit parallelism . The traditional optimization algorithm is often an iterative search process starting from an initial point in the solution space . A single point provides little search information , So the search efficiency is not high , It is also possible to fall into the local optimal solution and stop ; Genetic algorithm starts the search process of the optimal solution from the initial population composed of many individuals , Instead of searching from a single individual . Of the initial population 、 choice 、 cross 、 Mutation and other operations , Produce a new generation of groups , It includes a lot of group information . This information can avoid searching some unnecessary points , So as to avoid falling into local optimization , Gradually approach the global optimal solution .

（4） Use probabilistic search instead of deterministic rules . Traditional optimization algorithms often use deterministic search methods , The transfer from one search point to another has a definite transfer direction and transfer relationship , This certainty may make the search less than optimal , It limits the application scope of the algorithm . Genetic algorithm is an adaptive search technology , Its choice 、 cross 、 Operations such as mutation are carried out in a probabilistic way , Increases the flexibility of the search process , And it can converge to the optimal solution with a large probability , It has good global optimization ability . but , Crossover probability 、 Mutation probability and other parameters will also affect the search results and search efficiency of the algorithm , Therefore, how to select the parameters of genetic algorithm is an important problem in its application .

Sum up , Because the overall search strategy and optimization search method of genetic algorithm do not depend on gradient information or other auxiliary knowledge , Only the objective function affecting the search direction and the corresponding fitness function need to be solved , Therefore, genetic algorithm provides a general framework for solving complex system problems . It does not depend on the specific area of the problem , Strong robustness to the types of problems , So it is widely used in various fields , Include ： Function optimization 、 Combinatorial optimal production scheduling problem 、 Auto-Control

、 Robotics 、 The image processing （ Image restoration 、 Image edge feature extraction …)、 Artificial life 、 Genetic programming 、 machine learning .

3 The basic flow and implementation technology of genetic algorithm

Basic genetic algorithm （Simple Genetic Algorithms,SGA） Use only the selection operator 、 Crossover operator and mutation operator are three genetic operators , Evolution is simple , It is the basis of other genetic algorithms .

3.1 The basic flow of genetic algorithm

Generate a number of randomly determined lengths （ The length is related to the accuracy of the problem to be solved ） The initial population of coding ;

Each individual is evaluated by fitness function , Individuals with high fitness value were selected to participate in genetic operation , Individuals with low fitness are eliminated ;

Genetically manipulated （ Copy 、 cross 、 variation ） A new generation of population is formed by the collection of individuals , Until the stop criteria are met （ Evolution algebra GEN>=?）;

The best realized individual in the offspring is taken as the execution result of the genetic algorithm .

among ,GEN Is the current algebra ;M It's population size ,i Represents the number of populations .

3.2 Implementation technology of genetic algorithm

Basic genetic algorithm （SGA） Coded by 、 Fitness function 、 Genetic operators （ choice 、 cross 、 variation ） And operation parameters .

3.2.1 code

（1） Binary code

The length of binary coded string is related to the accuracy of the problem . We need to ensure that every individual in the solution space can be encoded .

advantage ： Ed 、 The decoding operation is simple , inheritance 、 Crossover is easy to achieve

shortcoming ： The length is large

（2） Other coding methods

Gray code 、 Floating point code 、 Symbolic encoding 、 Multi parameter coding, etc

3.2.2 Fitness function

The fitness function should effectively reflect the gap between each chromosome and the chromosome of the optimal solution of the problem .

3.2.3 Selection operator

3.2.4 Crossover operator

Cross operation refers to the exchange of some genes between two paired chromosomes in some way , And two new individuals ; Crossover operation is an important feature that distinguishes genetic algorithm from other evolutionary algorithms , Is the main way to produce new individuals . Before crossing, individuals in the group need to be paired , Generally, the principle of random pairing is adopted .

Commonly used crossover ：

A single point of intersection

Two point intersection （ Multi-point crossover , The more cross points , The more likely the individual's structure is to be destroyed , Generally, multi-point intersection is not adopted ）

Uniform cross

Arithmetic crossover

3.2.5 Mutation operator

The mutation operation in genetic algorithm refers to replacing the gene values at some loci in the individual chromosome coding string with other alleles at this locus , So as to form a new individual .

In terms of the ability to generate new individuals in the operation of genetic algorithm , Cross operation is the main method to generate new individuals , It determines the global search ability of genetic algorithm ; Mutation is only an auxiliary method to generate new individuals , But it is also an essential operation step , It determines the local search ability of genetic algorithm . The combination of crossover operator and mutation operator completes the global search and local search of the search space , Thus, the genetic algorithm can complete the optimization process of the optimization problem with good search performance .

3.2.6 Operation parameters

4 The basic principle of genetic algorithm

4.1 Pattern theorem

4.2 Building block hypothesis

With low order 、 The definition length is short , The pattern whose fitness value is higher than the average fitness value of the population is called gene block or building block .

Building block hypothesis ： Individual gene blocks are selected 、 cross 、 The role of genetic operators such as mutation , Can be spliced together , Form individual coding strings with higher fitness .

The building block hypothesis illustrates the basic idea of using genetic algorithm to solve various problems , That is, better solutions can be produced by directly splicing building blocks together .

edition ：2014a

版权声明：本文为[Matlab scientific research]所创，转载请带上原文链接，感谢。 https://car.inotgo.com/2021/08/20210810091259306D.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