# Memetic Chains for Improving the Local Wireless Sensor Networks Localization in Urban Scenarios +
## 5 Memetic Algorithm Chains for the Node Location Problem
### MA-VND-Chains Pseudo-Code
#### 5.2.2 LS Procedure and Chains Memory  
The MA introduces problem-specific knowledge for facilitating the improvement of the individuals. As the process of the algorithm converges, the number of individuals that can improved is reduced. MA-Memory introduces knowledge from previous LS iterations to determine the predisposition of an individual to be improved. The reach of the best individual in a bounded region through the LS procedure suggests no future iterations for this individual, thus reducing the computational complexity of the algorithm.  
Therefore, this individual is not going to be selected for future applications of LS yielding the opportunity to other individuals for improving.  
LS is the method that allows the finding of the best-adapted individuals within a bounded region defined. In each execution of the MA, the population is analyzed in terms of elitism, diversification, and intensification, to select a set of potential individuals, that can be improved by the LS. The method selects an individual of the set and executes the VND metaheuristic technique until the maximum number of local iterations permitted is attained. The configuration employed in this search is stored after the whole LS process of an individual. Therefore, this method introduces specific knowledge, heterogeneity in the population, diversity in the evolutionary process, and in addition, accelerates the convergence.  
At the outset of the LS, the parameters of the current individual are loaded from the stored memory. This memory provides information about the state of the individual prior to the beginning of the execution. An individual executed for the first time in the LS algorithm has its parameters at the default level. These values are modified as the VND method progresses. The MA-Memory is encoded as shown in Figure 4.  
VND obtains an approximate solution to the discrete optimization problem raised to measure the improvement of a sensor by analyzing the adjacent spatial coordinates. The continuous displacement in each visited neighborhood into the best local individual defines the way of the LS optimization. The spatial coordinates of an adjacent sensor node used for localization in LPS must belong to the NLE and not be in the restricted zones. Each time a sensor is displaced, the improved value indicates the k-distance of the next neighborhood. Once the sensor depth search is completed, the value of k-distance is stored in memory. Hence, the k-distance value is stored individually for each of the sensors that composed the individual. The best global fitness of an individual achieved by the VND is reached through one or several LS runs. The memory allows the starting of the VND algorithm in the same state in which the previous LS ended.  
The analysis of the changes generated for the MA-VND-Chains algorithm quantifies the improvement introduced with respect to the GA [35] and the MA [28] from our earlier papers. After the LS process, a reevaluation of all the individuals that have been modified through the improvement of the pseudo-function is required. CRB characterizes the quality of a node distribution in the localization field. The individual is modeled according to all the uncertainties associated with the system rather than exclusively with LOS/NLOS conditions as in the pseudo-function.  
The individual modified in the MA is replaced when it presents a better fitness than the initial individual. The range for improvement obtained is also quantified and stored in memory. A large improvement increases the chances for an individual to be selected. The individual who does not present an improvement, increases the value of the memory corresponding to the \(n_{LS}\) reducing its chances of being executed in future iterations.  
Figure 4: Format of the memory of the MA-Variable Neighborhood Descent-Chains (MA-VND-Chains).