Optimization method based on artificial bee colony algorithm

文档序号:1709430 发布日期:2019-12-13 浏览:19次 中文

阅读说明:本技术 一种基于人工蜂群算法的优化方法 (Optimization method based on artificial bee colony algorithm ) 是由 柳培忠 刘大海 刘晓芳 骆炎民 汪鸿翔 杜永兆 范宇凌 于 2019-09-03 设计创作,主要内容包括:本发明公开了一种基于人工蜂群算法的优化方法,涉及仿生智能计算与优化领域。本发明采用一种新的初始化策略,从而获得较高质量的初始种群并减少寻优迭代次数;然后提出了两个新的搜索方程,其中一个用于增强局部搜索能力,另一个用于避免后期寻优过程的早熟收敛;进一步地,本发明对基本人工蜂群算法的框架进行了调整。本发明在于提供一种基于人工蜂群算法的优化方法,增强初始种群的多样性和分布性,提高搜索随机性,避免陷入局部最优,改进算法性能,无论在解的精度还是收敛速度方面,效果都有所提高。(the invention discloses an optimization method based on an artificial bee colony algorithm, and relates to the field of bionic intelligent calculation and optimization. The invention adopts a new initialization strategy, thereby obtaining an initial population with higher quality and reducing the number of optimization iterations; then two new search equations are proposed, wherein one search equation is used for enhancing the local search capability, and the other search equation is used for avoiding premature convergence of a later-stage optimization process; further, the present invention adjusts the framework of the basic artificial bee colony algorithm. The invention aims to provide an optimization method based on an artificial bee colony algorithm, which enhances the diversity and the distribution of initial populations, improves the search randomness, avoids falling into local optimization, improves the performance of the algorithm, and improves the effect in the aspects of solution precision and convergence speed.)

1. An optimization method based on an artificial bee colony algorithm is characterized by comprising the following steps:

Step 10, setting parameters of EeABC, wherein the parameters comprise a population size SN, a maximum iteration number MCN, a maximum evaluation number MFE, an individual dimension D and a threshold limit;

Step 20, generating an initial population, and generating a solution and a reverse solution of the solution at the same time, wherein the formula is as follows:

Wherein, i belongs to {1,2, …, SN }, which represents the number of honey sources; j belongs to {1,2, …, D }, and represents the dimension of an individual;represents the solution xiA value of dimension j;To representThe reverse solution of (a) is,Representing the value range of the j-dimension variable; rand (0,1) is a random number between 0 and 1; k is equal to [0,1 ]]Is a generalized coefficient; [ a ] Aj,bj]searching the dynamic boundary of the space for the j dimension;

if the reverse solution is out of range, the value is re-taken by adopting a formula (4):

wherein rand (-) is a random function with a value betweenAndTo (c) to (d);

Step 30, respectively calculating the adaptive values of the individuals according to the formula (5), and selecting SN/2 individuals with larger adaptive values as initial employed bee populations:

Therein, fitidenotes the fitness value of the ith individual, fia function value representing the ith individual;

Step 40, performing neighborhood search near the individuals of the employed bees selected in step 30 to obtain new honey sources, wherein the search strategy is shown as formula (6): (ii) a

Wherein v isi jIs a new honey source; subscript r1 is a random integer in the set {1, 2.., SN }, and is not equal to i; coefficient of performancethe value range is [ -1,1 [ ]](ii) a Variables ofA j-th dimension representing an r 1-th honey source; variables ofj-th dimension representing the best honey source;

step 50, calculating the adaptive value of the new individual in the new honey source according to the formula (5), and recording the adaptive value as fit _ new if fiti<fit _ new, replacing the current employed bee individual with a new individual, and obtaining a trial (i) of 0; otherwise, random search is carried out, when rand<fitithen, a search is performed according to equation (7) with three (i) equal to 0, and if rand>fiti,trial(i)++:

where rand is a random number between 0 and 1, and subscript r2 is a random integer in the set {1,2The value range is [ -1,1 [ ]](ii) a Variables ofA j-th dimension representing an r 2-th honey source;

Step 60, judging whether the trial (i) > limit is established, if so, abandoning the current honey source, entering a bee detection stage, generating a new honey source according to a formula (8), if not, determining the current solution as the optimal solution, and turning to step 7;

Step 70, recording the optimal solution;

Step 80, judging whether the evaluation times are larger than or equal to MFE, and if so, outputting an optimal solution; otherwise, go to step 40.

Technical Field

the invention relates to the field of bionic intelligent calculation and optimization, in particular to an optimization method based on an artificial bee colony algorithm.

background

With the increasing development of scientific technology, the core problems of many projects are finally solved into optimization problems. Therefore, optimization has become an indispensable computational tool for engineers. Today, computers are widely popularized, and solution of large-scale optimization problems can be realized on a common computer, so that the optimization method is more widely applied than ever before.

An Artificial Bee Colony Algorithm (ABC) belongs to one of bionic intelligent algorithms, is a novel global optimization algorithm based on swarm intelligence and is proposed by Karaboga in 2005, and the honey collection process of a Bee Colony is used as a simulation object. All bees in the bee population in the nature have clear work division, simple information exchange is also realized among the bees of different division, the bees of different division can also convert functions, and the bee population finds the optimal honey source through mutual cooperation. The artificial bee colony algorithm simulates the processes of division of labor, information exchange, function conversion and the like of a bee colony, and three most basic elements contained in the algorithm are as follows: honey source, hired bees, not hired bees. The bees perform different activities according to respective division and share and exchange swarm information, so that the optimal solution of the problem is found, and the method has the advantages of few control parameters, easiness in implementation, strong local search capability and wide application range.

However, the traditional artificial bee colony algorithm still has the defects of uneven population initialization, unbalanced searching capability and the like.

Disclosure of Invention

the technical problem to be solved by the invention is to provide an optimization method based on an artificial bee colony algorithm, so that the diversity and the distribution of initial populations are enhanced, the search randomness is improved, the local optimization is avoided, and the algorithm performance is improved.

The invention is realized by the following steps:

An optimization method based on an artificial bee colony algorithm comprises the following steps:

step 10, setting parameters of EeABC, wherein the parameters comprise a population size SN, a maximum iteration number MCN, a maximum evaluation number MFE, an individual dimension D and a threshold limit;

Step 20, generating an initial population, and generating a solution and a reverse solution of the solution at the same time, wherein the formula is as follows:

Wherein, i belongs to {1,2, …, SN }, which represents the number of honey sources; j belongs to {1,2, …, D }, and represents the dimension of an individual;represents the solution xiA value of dimension j;To representthe reverse solution of (a) is,representing the value range of the j-dimension variable; rand (0,1) is a random number between 0 and 1; k is equal to [0,1 ]]Is a generalized coefficient; [ a ] Aj,bj]Searching the dynamic boundary of the space for the j dimension;

if the reverse solution is out of range, the value is re-taken by adopting a formula (4):

Wherein rand (-) is a random function with a value betweenandTo (c) to (d);

step 30, respectively calculating the adaptive values of the individuals according to the formula (5), and selecting SN/2 individuals with larger adaptive values as initial employed bee populations:

therein, fitidenotes the fitness value of the ith individual, fia function value representing the ith individual;

Step 40, performing neighborhood search near the individuals of the employed bees selected in step 30 to obtain new honey sources, wherein the search strategy is shown as formula (6): (ii) a

Wherein the content of the first and second substances,Is a new honey source; subscript r1 is a random integer in the set {1, 2.., SN }, and is not equal to i; coefficient of performanceThe value range is [ -1,1 [ ]](ii) a Variables ofRepresenting the r1 th honey sourcethe j-th dimension; variables ofJ-th dimension representing the best honey source;

step 50, calculating the adaptive value of the new individual in the new honey source according to the formula (5), and recording the adaptive value as fit _ new if fiti<fit _ new, replacing the current employed bee individual with a new individual, and obtaining a trial (i) of 0; otherwise, random search is carried out, when rand<fitiThen, a search is performed according to equation (7) with three (i) equal to 0, and if rand>fiti,trial(i)++:

where rand is a random number between 0 and 1, and subscript r2 is a random integer in the set {1,2The value range is [ -1,1 [ ]](ii) a Variables ofA j-th dimension representing an r 2-th honey source;

Step 60, judging whether the trial (i) > limit is established, if so, abandoning the current honey source, entering a bee detection stage, generating a new honey source according to a formula (8), if not, determining the current solution as the optimal solution, and turning to step 7;

Step 70, recording the optimal solution;

step 80, judging whether the evaluation times are larger than or equal to MFE, and if so, outputting an optimal solution; otherwise, go to step 40.

The invention has the following advantages:

1. when the initial population is generated, a solution and a reverse solution of the solution are generated simultaneously, so that the initial population with uniform distribution can be obtained, and the blindness of random initialization in ABC is avoided to a certain extent;

2. Two improved search strategies are adopted, so that the randomness of the search is improved, the global search capability of the algorithm is enhanced, and the optimization performance of the algorithm is improved.

Drawings

the invention will be further described with reference to the following examples with reference to the accompanying drawings.

FIG. 1 is a simplified flow chart of an optimization method based on an artificial bee colony algorithm according to the present invention;

fig. 2 to 11 are graphs showing the evolution of the invention for 10 test functions with D equal to 30.

Detailed Description

referring to fig. 1 to 11, an optimization method (EeABC) based on artificial bee colony algorithm disclosed in the embodiment of the present invention can achieve the purpose of searching an optimal solution of a certain problem, test the performance of the EeABC of the present invention by performing simulation optimization on 10 typical function minimization problems through MATLAB (commercial math software, advanced technology computing language and interactive environment for algorithm development, data visualization, data analysis and numerical computation), and compare the EeABC with ABC (traditional artificial bee colony algorithm), GABC (gbest-guided ACB algorithm), ABC/Best/1, ABC/Best/2 and MABC (improved artificial bee colony algorithm). The test function is described in table 1, where attribute U represents a unimodal function and attribute M represents a multimodal function.

TABLE 1 test function

EeABC, ABC, GABC, ABC/Best/1, ABC/Best/2 and MABC were used to optimize the above functions, the algorithms were run in the same experimental context and each test function was run independently 30 times to avoid haphazard and the Mean (Mean) and variance (SD) were recorded, the comparison effect is denoted "+/-/-" representing EeABC "superior/similar/inferior to" comparison algorithm respectively.

Fig. 1 is a simulation optimization process of the 10 typical function minimization problems by using the optimization method based on the artificial bee colony algorithm of the present invention, which includes:

step 10, setting parameters of EeABC, wherein the parameters include a population size SN (for example, SN ═ 40), a maximum number of iterations MCN (for example, MCN ═ 5000), a maximum number of evaluations MFE (MFE ═ MCN × D), an individual dimension D (for example, D ═ 30), and a threshold limit (for example, limit ═ 100);

Step 20, generating an initial population, and generating a solution and a reverse solution of the solution at the same time, wherein the formula is as follows:

Wherein, i belongs to {1,2, …, SN }, which represents the number of honey sources; j belongs to {1,2, …, D }, and represents the dimension of an individual;represents the solution xiA value of dimension j;to representThe reverse solution of (a) is,Representing the value range of the j-dimension variable; rand (0,1) is a random number between 0 and 1; k is equal to [0,1 ]]Is a generalized coefficient; [ a ] Aj,bj]searching the dynamic boundary of the space for the j dimension;

If the reverse solution is out of range (namely the value of the reverse solution calculated by the formula (2) exceeds the value range of the test function), the value is re-taken by adopting a formula (4):

wherein rand (-) is a random function with a value betweenAndTo (c) to (d); combining the solution obtained by the formula (1) and the reverse solution obtained by the formula (2) to obtain an initial population;

Step 30, substituting the initial population obtained in the step 20 into a test function to obtain a target function value fiE.g. ellitic function, objective function valueThen f is mixedisubstituting into formula (5) to calculate individual adaptive value, and recording as fitiselecting SN/2 (such as 20) individuals with larger adaptation value as an initial employed bee population:

Therein, fitiDenotes the fitness value of the ith individual, fiA function value representing the ith individual; the other test functions calculate the adaptive value of each individual by the same steps;

Step 40, performing neighborhood search near the individuals of the employed bees selected in step 30 to obtain new honey sources, wherein the search strategy is shown as formula (6): (ii) a

wherein the content of the first and second substances,Is a new honey source; subscript r1 is a random integer in the set {1, 2.., SN }, and is not equal to i; coefficient of performancethe value range is [ -1,1 [ ]](ii) a Variables ofA j-th dimension representing an r 1-th honey source; variables ofj-th dimension representing the best honey source;

Step 50, calculating the adaptive value of the new individual in the new honey source according to the formula (5), and recording the adaptive value as fit _ new if fiti<fit _ new, replacing the current employed bee individual with a new individual, and obtaining a trial (i) of 0; otherwise, random search is carried out, when rand<fitithen, a search is performed according to equation (7) with three (i) equal to 0, and if rand>fiti,trial(i)++:

Where rand is a random number between 0 and 1, and subscript r2 is a random integer in the set {1,2the value range is [ -1,1 [ ]](ii) a Variables ofA j-th dimension representing an r 2-th honey source;

Step 60, judging whether the trial (i) > limit is established, if so, abandoning the current honey source, entering a bee detection stage, generating a new honey source according to a formula (8), if not, determining the current solution as the optimal solution, and turning to step 7;

Step 70, recording the optimal solution;

Step 80, judging whether the evaluation times are larger than or equal to MFE, and if so, outputting an optimal solution; otherwise, go to step 40.

in the step 20, the initialization strategy adopted by the population initialization can obtain an initial solution with relatively uniform distribution by simultaneously generating a solution and a reverse solution of the solution, thereby avoiding the situation that the random initialization in ABC is trapped in local optimum due to blind property to a certain extent.

in the step 40 and the step 50, two improved search strategies are adopted to improve the randomness of the search, enhance the global search capability of the algorithm and improve the optimization performance of the algorithm.

Table 2 shows the results of the experiments comparing EeABC and ABC when D is 30.

TABLE 2 EeABC & ABC optimization result comparison

As can be seen from Table 2, in the unimodal function, for F1, EeABC and ABC can both obtain theoretical optimal values, and for other unimodal functions, the precision and stability of EeABC are superior to those of ABC; in a multimodal function, the precision and stability of EeABC are better than those of ABC, and the performance of EeABC and ABC can be evaluated more intuitively through the convergence curves shown in FIGS. 2 to 11, wherein the abscissa represents the iteration number, and the ordinate represents the current optimal solution obtained each time.

Table 3 and table 4 show the experimental results of the comparison of EeABC with GABC & MABC and ABC/Best/1& ABC/Best/2 when D is 30, respectively; wherein, the experimental data of GABC, MABC, ABC/Best/1 and ABC/Best/2 adopts the data in the corresponding algorithm original text, the GABC comes from Zhu G, Kwong S.Gtest-defined specific needle color algorithm for the purpose of optimizing [ J ]. applied mathematics and Computation,2010,

217(7) 3166-3173; MABC is available from Gao WF, Liu S Y. Amodified specialty bee colony algorithm [ J ]. Computers and Operations Research,2012,39(3): 687-697; ABC/Best/1 and ABC/Best/2 are from Gao W, Liu S, Huang L.Agrobal Best intellectual similarity algorithm for global optimization [ J ]. Journal of Computational & Applied Mathematics,2012,236(11): 2741-2753.

TABLE 3 EeABC vs. GABC & MABC optimization results

TABLE 4 EeABC vs. ABC/Best/1& ABC/Best/2 optimization results

As can be seen from tables 3 and 4: for F1-F5 and F7, EeABC is superior to all other comparison algorithms in terms of precision and stability, and can reach the theoretical optimal value of F1. For F6, EeABC is superior to ABC/Best/1, ABC/Best/2 and MABC and has the same effect as GABC. For F8, EeABC is as efficient as other comparison algorithms. Overall, the present invention EeABC improves both the accuracy and the convergence speed of the solution.

According to the method, when the initial population is generated, a solution and a reverse solution of the solution are generated simultaneously, so that the initial population with uniform distribution can be obtained, and the blindness of random initialization in ABC is avoided to a certain extent; two improved search strategies are adopted, so that the randomness of the search is improved, the global search capability of the algorithm is enhanced, and the optimization performance of the algorithm is improved.

Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于混合人工蜂群算法的高维复杂水量分配模型求解方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!