See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/341508980 Presentation of Electromagnetism-like Mechanism Algorithm Technical Report Presentation ยท May 2020 DOI: 10.13140/RG.2.2.28975.97441 CITATIONS READS 0 12 1 author: Arman Daliri Shafagh Institute of Higher Education 8 PUBLICATIONS 1 CITATION SEE PROFILE All content following this page was uploaded by Arman Daliri on 20 May 2020. The user has requested enhancement of the downloaded file.
An Electromagnetism-likeMechanism for Global Optimization (EM) Field of study: Artificial Intelligence and Robotics Lesson: Special topics in artificial intelligence Instructor: Dr. Azgomi edited by: Arman Daliri " November 2019" Contact : armandaliri@shafagh.ac.ir - daliriarman111@gmail.com - daliriarman111@outlook.com
Introduction This method was first proposed by Birbil and Feng in 2003, and like the genetic algorithm, it is a population-based method. In this method, each point of a charged particle in space is assumed, and its charge value is determined based on the value of its objective function. After determining the load of each point in the population, the result of the force applied to the points and to move them in each iteration is determined . Like electromagnetic forces, the result of the force acting on any point is obtained by summing all the forces acting on it. In some cases, this method differs from electromagnetic theory in that it describes the steps of the algorithm. Electromagnetism-likeMechanism
The electromagnetic algorithm is designed to solve problems with real and limited variables. The general picture of such issues is confronted. ๐๐๐ ๐(๐ฆ) ๐. ๐ข, ๐ฆ โ [๐, ๐ฃ] [๐, ๐ฃ]: = {๐ฆ โ ๐๐ | ๐๐ < ๐ฆ๐ < ๐ฃ๐, ๐ = 1, โฆ ๐} This algorithm includes four main phases of setup, local search, computing the force applied to each particle, and moving the force vector, each of which is discussed in more detail below. Electromagnetism-likeMechanism
Classification of algorithms A LGORITHM1. ๐น๐ ALGORITHM2. ๐ฝ๐๐๐ข๐๐๐๐๐จ๐ () ALGORITHM3. ๐๐๐๐๐(๐๐๐ฝ๐ ๐น๐, ๐) ALGORITHM4. ๐ท๐๐๐๐บ(): ๐บ ALGORITHM5. ๐๐๐ค๐(๐บ) Electromagnetism-likeMechanism
Setting up At the beginning of the electromagnetic algorithm, similar to other population- based methods, m is randomly selected from the problem space. In order to produce a random point, it is assumed that each component is a random variable with a uniform distribution function between its lower and upper limits, then a random value is selected for each component. After creating this set, the value of the target function is calculated for each point and the best point is shown as xbest. Electromagnetism-likeMechanism
General layout for EM 1: Initialize() ALGORITHM1. EM 2: iteration โ 1 3: while iteration < MAXITER do 4: Local (LSITER , ฮด) 5: F โ CalcF( ) 6: Move(F) 7: iteration โ iteration+1 8: end while Electromagnetism-likeMechanism
Initialization ALGORITHM2. Initialize )( 1: ๐๐๐ ๐ = 1 ๐ข๐ ๐ ๐๐ The Initialize method is randomly used to sample m points. 2: ๐๐๐ ๐ = 1 ๐ข๐ ๐ ๐๐ It is assumed that each coordinate is evenly 3: ๐ โ ๐( 0,1) distributed from a single point between the corresponding upper and lower boundary. 4: ๐ฆ ๐๐ โ ๐๐ + ๐( ๐ฃ๐ โ ๐๐ ) After taking a point from space, the value of 5: ๐๐๐ ๐๐๐ the calculated objective function is calculated using the function indicator f (x). 6: ๐ท๐๐๐๐ฃ๐๐๐ข๐ ๐(๐ฆ ๐) This method ends with the identification of m 7: ๐๐๐ ๐๐๐ points, and the point with the best value of performance is stored in xbest. 8: ๐ฆ๐๐๐ก๐ข โ ๐๐ ๐๐๐๐ { ๐(๐ฆ๐) , โ๐ฝ } Electromagnetism-likeMechanism
Local search This step is done to examine the space around each of the created points. Birbil and Feng (2003) provided a simple algorithm for local search. In the method presented by them, for each of the dimensions of the created points, a random step is taken to increase or decrease the desired dimension. This step is randomly selected. Also, this step can be removed as much as possible depending on the step to the top or bottom of the desired dimension. After performing this step, if the new point created provides a better target function, it is replaced with the previous point, the search process for the next dimension is followed, otherwise, the initial point of retention and search for the next dimension is repeated. Repeat the search process to the maximum number of LSITERs for each dimension. Electromagnetism-likeMechanism
Calculate the total force vector According to electromagnetic theory, the force exerted by two charged particles is directly proportional to the distance between them and the amount of charge in each of them. In this algorithm, the points are determined based on the following relation in each iteration of the load. ๐ ๐ฆ ๐ โ๐(๐ฆ ) ๐๐๐ก๐ข ๐(๐ฆ ๐ )โ๐(๐ฆ ๐๐๐ก๐ข ) ) ๐ ๐ = (โ๐ ๐ ๐=1 Electromagnetism-likeMechanism
How the formula worked The electric charge of each point determines the power of absorption or repulsion of that point, the points that have a better target function value will have more charge. Therefore, xbest will be most likely to be repeated in each iteration. Depending on the formula used, the load of a point may vary in two different iterations. It is noteworthy that, unlike electric charges, the charge of points in this method has no sign, for the force applied to each pair of points after determining the value of their objective function. Between each pair of points, the point that has a better target function absorbs the other point, and the point that has a worse target function repels the other point, and if the objective functions are equal, the force points will not enter each other. Therefore, at each repetition of the point that has the best value of the objective function, it absorbs the other points and the point that has the worst value of the objective function repels the other points. Electromagnetism-likeMechanism
The amount of force exerted by point j on point i It is calculated as follows: ๐ ๐ ๐ ๐ ๐ฆ ๐ โ ๐ฆ ๐ ๐๐ ๐ ๐ฆ ๐ < ๐ ๐ฆ ๐ ๐ฆ ๐ โ ๐ฆ ๐ 2 ๐ เธ } , โi ๐โ ๐ ๐ ๐ ๐ ๐ ๐ฆ ๐ โ ๐ฆ ๐ ๐๐ ๐ ๐ฆ ๐ โฅ ๐ ๐ฆ ๐ ๐ฆ ๐ โ ๐ฆ ๐ 2 Electromagnetism-likeMechanism
ALGORITHM4. CalcF():F 1: for i =1 tom do 2: ๐_๐ = (โ๐ (๐(๐ฆ^๐ ) โ ๐(๐ฆ^(๐๐๐ก๐ข)))/( _(๐ = 1)^๐โใ(๐(๐ฆ^๐ ใ) โ ๐ ( ๐ฆ ^ ๐๐๐ก๐ข ))) ) 3: Fi โ 0 4: end for Explain the algorithm 5: for i =1 tom do As can be seen in algorithm 4 (lines 7-8), between two points, the 6: for j =1 tom do point with the best performance value absorbs the other point. 7: if f(xj) < f(x i) then Conversely, a point that is worth performing worse will repel ๐ ๐ ๐ ๐ 8: ๐๐ โ ๐ฆ ๐ โ ๐ฆ ๐ ๐ฆ ๐ โ ๐ฆ ๐ 2 {Attraction} another (lines 9-10). Because xbest has the least amount of 9: else objective performance, it acts as an absolute point of attraction, ๐ ๐ ๐ ๐ meaning it attracts all other parts of the population. ๐ฆ ๐ โ ๐ฆ ๐ 10: ๐๐ โ ๐ฆ ๐ โ ๐ฆ ๐ 2 {Repulsion} 11: end if 12: end for 13: end for Electromagnetism-likeMechanism
Move according to the total force After evaluating the total force vector Fi, the point (i) moves in a random direction along the equation. Here the length of the random step, ฮป is assumed to be evenly distributed between 0 and 1. Obviously, there are many other distributions that can be used to calculate the length of this step. But for ease of calculation, we have applied uniform distribution. Electromagnetism-likeMechanism
RNG It is the vector whose components indicate the permissible movement towards the upper limit, ๐ฃ๐ , or lower limit, ๐๐ , for the corresponding dimension. Is equal to : ๐ฆ ๐ = ๐ฆ ๐ + ๐ ๐ ๐ RNG i = 1,2, โฆ , m ๐ ๐ Electromagnetism-likeMechanism
ALGORITHM5. Move(F) 1: for i =1 to m do 2: if i โ best then Motion Algorithm 3 : ฮป โ U( 0,1) ๐ ๐ 4: Fi โ ๐ ๐ Quasi-code gives the method of movement. Note that 5: for k =1 ton do the best point, xbest, has not been moved and will be 6: if Fi k > 0 then moved to the next iterations (line 2). This suggests 7: xi k โ xi k + ฮปFi k(uk โ xi k) that we may avoid calculating the total force at the 8: else best current point in algorithm 4 (but computational 9: xi k โ xi k + ฮปFi k(xi k โ lk) effort to calculate the total force at the best current 10: end if point is negligible). 11: end for 12: end if 13: end for Electromagnetism-likeMechanism
References โข Birbil ลฤฐ, Fang SC. An electromagnetism-like mechanism for global optimization. Journal of global optimization. 2003 Mar 1;25(3):263-82. โข SADEGHI MH, TAVAKKOLI MR. A HYBRID ELECTROMAGNETISM-LIKE ALGORITHM FOR A MULTI-MODE RESOURCE-CONSTRAINED PROJECT SCHEDULING PROBLEM. Contact : armandaliri@shafagh.ac.ir - daliriarman111@gmail.com - daliriarman111@outlook.com View publication stats View publication stats
Recommend
More recommend