Firefly Algorithm Analysis

1145 Words5 Pages
Basic Implementation The basic introduction and working of firefly algorithm is explained in previous chapters. In this chapter the actual implementation of Firefly Algorithm for cell to switch assignment problem is given. As discussed above that each firefly in the solution space is a complete solution which is independent to the other fireflies. Implementation of Firefly Algorithm starts with spreading a particular number of fireflies in the solution space. The initial position of fireflies may be random or fixed as given by the user. Based on this initial position an initial solution is calculated for each firefly. Here in this problem the initial solution means the initial assignment matrix for each firefly and correspondingly the cost…show more content…
Based on this cost the firefly with minimum cost is selected as the brightest firefly and all the other fireflies move towards this brightest firefly depending upon randomness of firefly, distance between fireflies and absorption coefficient of fireflies. This is called motion update for firefly. In the cell assignment problem motion update means update the elements of assignment matrix. Thus the assignment matrix of each firefly is updated according to the cost of each firefly. Now for this new assignment again total cost is calculated for each firefly and all the parameters like brightest firefly and update value for each assigned matrix are updated and this process is repeated until a stopping criterion is met. From all the cost values of each firefly the one which is minimum of all is selected as the best value and the corresponding assignment is selected as the best assignment for the cells. The complete algorithm can be divided into 5 main steps. The algorithmic steps are explained in 5.2. 5.2…show more content…
The same steps can be better understood by the flow diagram represented below in Fig 5.1. No Yes Figure 5.1: Flow diagram for the implementation of firefly 5.3 Steps with Example Now consider the simplest case with 2 switches, 6 cells and 3 fireflies. Now the execution of above algorithm is shown below. The numerical values are directly taken from the output of MATLAB code Step 1: • The number of cells, switches and fireflies are initialized as: n=6, m=2, p=3 • The position of cells is: x-axis -1.490 0.1324 -0.9819 -4.2403 -2.6008 3.7668 y-axis -3.1609 -2.6004 -0.8273 -4.5034 4.0271 4.4478 The position of switches is: x-axis -0.0913 -0.1074 y-axis -1.6228 4.0005 • The distance between cells and switches is given by matrix d of size 2X5 Cell 1 2 3 4 5 6 Switch 1 2.0793 1.0030 1.1941 5.0510 6.1822

More about Firefly Algorithm Analysis

Open Document