A Neighborhood Grid Clustering Algorithm for Solving Localization Problem in WSN Using Genetic Algorithm
Algorithm 2
Pseudocode for localization algorithm based on NGC and GA.
(i)
Input:-Number of deployed nodes, -Generation counter, -Population size, -Total number of anchor nodes, -Maximum requirement (iterations) index, -The fitness function for evaluation.
(ii)
Output: Localization error .
(1)
Initialize the entire sensor nodes in the grid including sum of all known nodes .
(2)
The clustering approach is observed using Algorithm 1.
(3)
Using fitness function (20) to compute the fitness of nodes in the population.
(4)
All anchor node broadcast their directions in the grid.
(5)
Distance is calculated among the anchor nodes.
(6)
New nodes generated from GA after selection, crossover and mutation calculates its distance in order to find the estimated position.
(7)
If the distance between target node and known node is insignificant but .