电场 大学
Artificial Electric Field Algorithm in short ‘AEFA’ is an artificially intelligent optimization algorithm for mathematical optimization, it is inspired by the Coulomb’s law of electrostatic force. AEFA is also a population-based optimization algorithm. Like other population-based search techniques, it also generates a random population as an initial solution. Then the generated population moves in the influence of the governing forces calculated from Coulomb’s law of electrostatic forces. To understand this algorithm, suppose, we wish to solve:
人工电场算法的简称“ AEFA”是一种用于数学优化的人工智能优化算法,它受到库仑 静电力 定律的启发。 AEFA还是基于人口的优化算法。 像其他基于人口的搜索技术一样,它还会生成一个随机人口作为初始解决方案。 然后,生成的种群在根据库仑静电力定律计算出的控制力的影响下移动。 假设要理解此算法,我们希望解决:
Where each variable has some lower and upper bound. (It may be extended to constrained optimization problems as well).
每个变量都有上限和下限。 (它也可以扩展到受约束的优化问题)。
The following mechanism is used to generate the initial population is used:
以下机制用于生成使用的初始种群:
Each generated solution is called here as a charged particle. Now the idea of AEFA is created from the following laws:
每个生成的溶液在此称为带电粒子。 现在,AEFA的概念是根据以下法律创建的:
This calculates the force of attraction or repulsion between two charged particles. Here K is the artificial designed Quolomb’s constant which is a function of the iter (current iteration)and the max iterations (maxiter)
这将计算两个带电粒子之间的吸引或排斥力。 这里K是人为设计的Quolomb常数,它是iter(当前迭代)和max迭代(maxiter)的函数
The generated electric field around any charge Q is calculated as
围绕电荷Q生成的电场计算为
Finally, the acceleration can be calculated using Newton’s law of force (F=Ma)
最后,可以使用牛顿力定律(F = Ma)计算加速度
In this way, one may calculate the acceleration of all the charged particles initially generated. This acceleration is going to be the major influence for the update of all the particles in every iteration.
以此方式,可以计算最初产生的所有带电粒子的加速度。 该加速度将成为每次迭代中所有粒子更新的主要影响力。
This influence can easily be understood as: suppose we generated five-positions randomly and named them Q1…Q5. Now using the above three equations one may calculate the exerted force of one charged particle on the other particles, i.e. we have the value of F generated by each charge and then by using E=F/Q and a=F/m we can calculate the acceleration of every charged particle. Since this concept is artificially used to generate influence for the movement of the positions, therefore, the artificial value of the charge is defined here which is
这种影响很容易理解为:假设我们随机生成五个位置,并将它们命名为Q1…Q5。 现在,使用以上三个方程式,可以计算一个带电粒子对其他粒子的作用力,即,我们具有每次电荷生成的F值,然后使用E = F / Q和a = F / m可以计算出每个带电粒子的加速度。 由于此概念是人为地用于对位置的移动产生影响,因此,此处定义了电荷的人为值,即
where qi is the charge of each particle best is the best and worst are the best fit and worst fit charged particle which are very simple to calculate, if the problem is of minimization then the particle which has the minimal value in the generated solution is the best, similar for the worst and fit_pi is the fitness value of the ith particle for which we are calculating the charge.
其中qi是每个粒子的电荷最好的是最好的,最差的是最佳拟合和最差拟合的带电粒子,它们非常容易计算,如果问题是最小化,则在生成的溶液中值最小的粒子是最好,与最坏情况相似,fit_pi是我们要为其计算电荷的第i个粒子的适应度值。
The code scripts are:
代码脚本为:
The detailed code scripts are available at:
详细的代码脚本可在以下位置获得:
https://in.mathworks.com/matlabcentral/fileexchange/71218-aefa-artificial-electric-field-algorithm
https://in.mathworks.com/matlabcentral/fileexchange/71218-aefa-artificial-electric-field-algorithm
More details can be found at:
可以在以下位置找到更多详细信息:
Anita和Anupam Yadav。 “ AEFA:用于全局优化的人工电场算法。” 群与进化计算,第一卷。 48,Elsevier BV,2019年8月,第93-108页,doi:10.1016 / j.swevo.2019.03.013。
-Anupam
-阿努帕姆
翻译自: https://medium.com/artifical-mind/artificial-electric-field-algorithm-for-optimization-fb6f57f413b4
电场 大学