# Integrated Environment of Metaheuristics for Optimal Data Collection in Wireless Sensor Network with Mobile Sink

Authors: Maamar Zahra; Yulin Wang; Bouabdellah Kechar; Yasmine Derdour; Wenjia Ding
Journal: Wireless Communications and Mobile Computing
 (2018)

---

## Abstract

Maximizing the network lifetime and data collection are two major functions in WSN. For this aim, mobility is proposed as a solution to improve the data collection process and promote energy efficiency. In this paper, we focus on Sink mobility which has the role of data collection. The problem is how to find an optimal data collection trajectory for the Mobile Sink using approximate optimization techniques. To address this challenge, we propose an optimization model for the Mobile Sink to improve the data collection process and thus to extend the network lifetime of WSN. Our proposition is based on a multiobjective function using a Weighted Sum Method (WSM) by adapting two metaheuristics methods, Tabu Search (TS) and Simulated Annealing (SA), to this problem. To test our proposal by experiment, we designed and developed an Integrated Environment of Optimization and Simulation based on metaheuristics tool (IEOSM). The environment IEOSM helps us to determine the best optimization method in terms of optimal trajectory, execution time, and quality of data collection. The IEOSM also integrates a powerful simulation tool to evaluate the methods in terms of energy consumption, data collection, and latency.


---

## Body

## 1. Introduction and Related Work

A Wireless Sensor Network (WSN) is a particularad hoc network which is composed of many sensor nodes and one or more base stations (sinks). Data collection process is the main function in WSN with taking into consideration energy consumption during this process which is the most important constraint in this kind of particular networks. Therefore, researches are carried out to maximize the network lifetime and to improve data collection process.Recently, advances in miniature mobile robotics have been made seriously in practice and therefore have allowed the emergence of new innovative applications of WSN based on a Mobile Sink (WSN-MS) and mobile relay nodes, which are able to move inside the region of the WSN, are deployed [1–4]. Among research works that have benefited fully from the advantages of mobility in WSN, we found research works presented in [5–13] in which the mobility of some network elements is introduced to minimize the energy consumption to enhance the data collection process.In this paper, we focus on Sink mobility which has the role of collecting data sensed by sensor nodes in the WSN. We also consider the problem of data collection process which consists of finding the optimal path to follow by the Mobile Sink in the WSN-MS field in terms of highest data collection and lowest energy consumption. To do so, several constraints must take into consideration to calculate the optimal trajectory of the Mobile Sink.Some research works [6, 8, 9, 11] have dealt with Sink mobility or data collection, in which authors present a survey on data collection in mobile WSN. They show that one of the benefits of introducing the mobility in WSN is network connectivity where the isolated nodes in the sensing field can be reached to collect data from them. Another advantage of mobility is the data reliability, since data loss during data transfer among the network is a common issue in WSN. The mobile element collects data directly from sensor nodes and this helps avoiding data collision and loss in the network. Besides, other benefits also include reducing the cost of the network by introducing a few numbers of sensor nodes in the sensing area. Most importantly, energy efficiency is greatly improved.Authors in [8, 11] compared and discussed methods with existing models of mobility proposed in the literature. From the existing mobility models, two types of mobility to collect data are presented, which are uncontrolled mobility and controlled mobility. In the uncontrolled mobility type, the Mobile Sink moves on a random way in the sensing field like in [14, 15] where the authors propose a random mobility by using animals like zebras and whales to collect data in a wild area. In [6], authors present a comparative study of the existing models of mobility based on random moving, such as Random Walk, Random WayPoint, and Gauss-Markov. Another pattern in uncontrolled mobility is determinate path [8, 11]. In this pattern, the path of the Mobile Sink is already determined as in the case of public transportation. An example of this case is introduced in [16], where sensors are deployed in an urban area and cities. The public transportation and vehicles can act like a mobile collector or a Mobile Sink to collect data from sensors. The second type is the controlled mobility, where the mobility can be controlled in terms of speed and trajectory [8, 11]. In this case of mobility, the moving plan of the Mobile Sink is optimized or drawn to reach specific objectives. For this aim, researchers recently tried to make the displacements of the Mobile Sink in the network smarter and in a better-studied way. For this reason, they proposed new algorithms and heuristics which deal with the problem of finding the moving plan [17, 18].In [18], authors use a mobile element in the WSN, called Mobile collector (M-collector), in addition to a static Sink. The M-collector collects data from sensors and then transfers them to a static Sink. A heuristic algorithm is used in finding the tour planning of the M-collector to minimize the tour length for data gathering of this element in the network. In the proposed heuristic tour planning, the M-collector starts the tour from the static Sink, then moves to the sensors to collect data directly from them using a single hop communication, and finally returns to the static Sink to upload the collected data after visiting all the network.In some cases, the moving plan of the Mobile Sink or collector depends on the topology or characteristics of the WSN. In addition, some pervious works try to improve the process of gathering data, especially in applications where the sensing data is important. In their proposed mechanism, the mobile collector stops at each sensor and moves again to another sensor after receiving the data from this sensor.In [17], authors propose a distributed heuristic algorithm to determine the movement of the Mobile Sink which depends on the distributed charge energy in the network. They focus on an optimal Mobile Sink sojourning pattern by solving a linear programming model for gathering data from the deployed sensors in the sensing field. The Mobile Sink gets the distributed energy charge information from local sensors.For the optimization issues in the field of WSN, some works have presented some optimization methods to formally solve the problems related to WSN such as in [19], where authors solve the problems of extending the networks lifetime and target coverage with static Sink. Same in [20], authors also study the maximization of network lifetime and target coverage problems with taking into account the different QoS constraints of WSN. Authors in [21] address the optimal Mobile Sink scheduling problem in order to maximize the network lifetime. Their study is based on controlled mobility pattern, where they develop a Placement Pattern to bind routes with the new placements of the Mobile Sinks in order to transfer data. In [19]–[21], the problem is formulated mathematically and solved using Column Generation optimization methods. Column Generation is an approach of optimization that consists of decomposing the problem into two subproblems and solves them to obtain an optimal solution.Other research works have proposed to use metaheuristics [22] that represent a set of optimization methods to find solutions to different problems. These methods are also used in artificial intelligence and can give approximate solutions but very close to the optimum solution in an acceptable and reasonable processing time. Many works relied and built on the basis of metaheuristics algorithms to solve problems associated with the field of WSN, such as our problem in order to find the approximate path for the Mobile Sink, routing protocols [23, 24] in WSN, security [25], and layout and geographical location of sensors in the sensing field [26, 27].As mentioned above, the aim of this work is to find the moving plan of the Mobile Sink in the WSN-MS. Considering that the sensors represent the cities and the Mobile Sink or data collector acts as the salesman, this problem is very similar to the famous Traveling Salesman Problem (TSP) which finds the shortest path visiting all the cities exactly once.Some research has addressed the problem of finding the moving plan of the Mobile Sink as in [28, 29]. Indeed, the authors formulate the problem of the Mobile Sink path as TSP problem [29] and adapt the metaheuristic Artificial Bee Colony (ABC) for minimizing the path length of the Mobile Sink in the network field. They performed some simulation tests and compared the obtained results with the metaheuristic Ant Colony Optimization (ACO) and the Random Walk method for the Mobile Sink, and the ABC algorithm performs better than both ACO and the Random Walk method in finding the shortest path of the Mobile Sink, minimizing the energy consumption and maximizing the data collection.In [28], the author refers to the TSP problem and proposes to calculate the trajectory or the path of the Mobile Sink in the WSN field by using the metaheuristic Quantum Genetic Algorithm (QGA) which has been evolved on the basis of Genetic Algorithm. The simulation results show that this metaheuristic performs better than other strategies, such as Random roaming strategy where the Mobile Sink moves in a random way to collect data from sensors, Peripheral protocol, and a static Sink in the WSN.Since the problem of finding the path of the Mobile Sink in the WSN is similar to TSP problem, some research works carried out a comparative study of the metaheuristics methods which were used in solving the problem of TSP [30, 31]. According to these studies, some metaheuristics, such as Tabu Search (TS) and Simulated Annealing (SA), may perform better results than traditional methods in finding the path of the Mobile Sink. Based on these valuables contributions, we have chosen to use TS and SA to find the moving plan of the Mobile Sink in WSN.For the perspective of improving the data collection and maximizing network lifetime, we propose in this paper a mathematical model and we define a multiobjective function by using Weighted Sum Method (WSM) to minimize the tour length of the Mobile Sink, minimize the displacements of the Mobile Sink towards sensors that have the lowest error rate (ER), and maximize the signal quality. We use this multiobjective function in adapting the chosen metaheuristics TS and SA to our problem. For the experiments, we have designed and developed a fully Integrated Environment of Optimization and Simulation based on metaheuristics approach (IEOSM) where we have successfully integrated the simulator Omnet++/Castalia [32] to simulate and evaluate the optimization results using the chosen metaheuristics TS and SA methods. The IEOSM helps us to obtain results and compare them at the optimization level (shortest tour path, execution time) and at the level of network performances (energy consumption, data collection, latency).The reminder of this paper is organized as follows. In the next Section, we give an overview of the problem. Section3 introduces the problem formalization of finding the moving plan of the Mobile Sink and describes a mathematical model for solving this problem. In Section 4, we present the TS and SA methods and their adaptive algorithms to the problem of finding the trajectory of the Mobile Sink. More details about the developed tool IEOSM and its different constituent modules are given in Section 5. In Section 6, assumptions and different scenarios for experiments as well as optimization and simulation results are also presented. Finally, we conclude the paper in Section 7.


## 2. Problem Statement

In this study, we assume that sensor nodes are deployed in a predefined grid topology with 25, 49, 100, and 144 sensors (Figure1 shows an example of 25 sensors with the Sink) and each sensor node has some specific parameters such as ID, its position in the sensing field, and the error rate. The error rate (ER) is calculated from a statistical study for each sensor. For the Mobile Sink, we consider that it is the only mobile node in the network and embeds the proposed mobile optimization system, while the other sensor nodes are stationary. We also assume that the Sink has the capability to move freely in the space (aerial or terrestrial movement without obstacle).Figure 1
Example of deploying 25 sensor nodes in a sensing field using a 5x5 grid topology used for optimizing the Sink movement.The Mobile Sink moves in the sensing field according to the moving plan or the trajectory calculated by itself to gather data from sensor nodes. In order to show the efficiency of the moving plan found by the proposed optimization system on the network performance, we set the communication protocol in this study to one single hop routing protocol;i.e., the Mobile Sink gathers data directly using a single hop transmission from sensor nodes while moving in the sensing field.Figure1 illustrates a description of optimizing the displacement of the Mobile Sink in sensor deployment 2D-zone for the study of the Sink travel optimization problem which is the main objective of this paper and each sensor node is characterized by its identifier (ID), coordinates (X and Y), and error rate (ER).Problem Statement: Optimal Trajectory Problem for the Mobile Sink in the Sensing Field. In given topology, find the optimal path for the Mobile Sink in the network to collect data from sensors in order to maximize the network lifetime with taking into consideration the several constraints of WSN-MS.


## 3. Mathematical Modeling

To optimize the displacement of the Mobile Sink, we propose a multiobjective functionf defined in (1) that can help in achieving our main goals of extending the network lifetime and improving data collection process. In comparison, most of the previous works set only one objective, which was to minimize the tour length of the Mobile Sink [18, 28, 29]. Our proposed multiobjective approach includes three objectives: (i) the minimization of the path of each Mobile Sink tour in the sensing field, (ii) the minimization of the displacements of the Mobile Sink to sensors that have the lowest error rate (ER), and (iii) the maximization of the signal quality (SQ).To aggregate these three objectives, we use Weighted Sum Method (WSM) which allows to put all these objectives in one multiobjective function. Each objective is multiplied by a Weighting Factor (WF). All involved factors are normalized to 1;i.e., the sum of these WFs is 1 [22, 33, 34]. The WFs in our proposed multiobjective function f allow us to promote an objective to the others, which helps us to decide about choosing and ranking the objectives according to the decision maker’s satisfaction.(1)f:minα∑i,jϵS,i≠jncijdij+β∑i,jϵS,i≠jncijdijERj+γ∑i=1n1SQiiSubjectto:0≤dij≤1∀i,j∈S;i,j=1…n;i≠j;ii∑i=1ndij=1;∀i,j∈S;i≠j;iii∑j=1ndij=1;∀i,j∈S;j≠i;iv∑ndij≤n-1;∀i,j∈S;i≠j;vEi≥Emin;∀i∈S;whereα, β, and γ in (1) are the WFs and they are, respectively, multiplied by the objective of minimizing the tour length, minimizing the displacement to the sensors which have a lowest ER, and maximizing the quality of signal (SQ). cij represents the distance between two sensor nodes (the distance between sensor i and sensor j). dij is a binary value (0 or 1) which indicates whether there is a displacement from sensor i to sensor j in the optimal path or trajectory which is defined in constraint. ERj denotes the error rate of a j sensor in percentage %.In (1),(2)dij=1,Ifthereisadisplacementfromitojintheoptimalpath.0,else.In (1), cij is calculated by (3)cij=w-u2+z-v2∀i,j∈S,i≠j,∀w,z,u,v∈R2whereS designates the set containing n sensors. w,z and (u,v) are the coordinates of the sensors i and j, respectively, in two-dimension zone (2D).In (1),(4)α+β+γ=1Constraint makes the Mobile Sink visits only one sensorj after it visits a sensor i. The Mobile Sink visits a sensor j and it must come from only one sensor i which is expressed in constraint. Constraint ensures that the tour of the Mobile Sink is fully connected, and it visits all sensors in the network. Constraint is defined to ensure that the sensors to be visited have enough energy to transmit data towards the Mobile Sink.We use the energy consumption model proposed in [35], where the authors propose a low energy consumption model for WSN. The energy consumption model used in this study is presented in (5), (6), and Figure 2.Figure 2
Energy consumption model for WSN.To transmit a packet ofk bits, the energy consumed of transmitting this packet ETx is calculated in (5)ETxk,d=Eelec∗k+εamp∗k∗d2The energy consumedERx when a packet of k bits is received is calculated in (6)ERxk=Eelec∗kE e l e c (electric energy) is the radio dissipation to run the transmitter and the receiver circuitry. εamp is the necessary energy to amplify and d is the distance between the transmitter and the receiver.Figure2 illustrates the proposed energy consumption model in [35] for radio with low energy consumption in WSN.


## 4. Optimization Methods

Maximizing the network lifetime and data collection are two major functions in WSN. We aim to find the optimal path for Mobile Sink in the WSN-MS sensing field using metaheuristics optimization approach to calculate the Sink’s trajectory. The addressed problem is similar to the well-known TSP problem. TSP is considered as NP-hard; thus our issue of finding the optimal trajectory of the Mobile Sink in the sensing field is also an NP-hard problem. So, we have adapted the metaheuristics algorithms to our problem. According to the studies in [30, 31], the TS method and the SA method give the best solution in solving the TSP problem compared to the other methods.We have introduced in the previous section the optimization model of Sink mobility. In this section, we present two optimization approaches on which our contribution is based: Tabu search (TS) and Simulated Annealing (SA) by integrating and adapting the optimization model of Sink mobility into these optimization methods.


### 4.1. Tabu Search

The first method that we adapted to achieve our goals is the TS method. TS is based on determining the number of iterations to reach a satisfactory result. The choice of the best solution consists in exploring the neighborhood of the current solution and retaining the best trajectory. In this study, the neighborhood exploration of a solution is based on the permutation in the order of the sensors in the trajectory (Algorithm1). This process continues until the stop condition of the TS algorithm is reached (the maximum number of iterations). Algorithm 1 describes the choice of the best neighbor of a solution.Algorithm 1:Best neighbor of a solution.
( 1 ) Sol’ =Sol; /∗Initiate the Sol’ with the initial solution Sol.∗/ ( 2 )     B e s t C o s t  = f S o l ∗ / ∗ To calculate current cost∗/ ( 3 ) For (i = 1 To N) Do / ∗ N is the number of sensors∗/ ( 4 )  For (j = 1 To N) Do ( 5 )  T e m p S o l  =  Sol’; /∗TempSol: Temporary Solution∗/ ( 6 )  T e m p S o l  =  P e r m u t a t i o n  ( S i , S j ); /∗ Switching between sensors ∗/ ( 7 )  B e s t T e m p C o s t  =  f T e m p S o l; /∗The cost of TempSol∗/ ( 8 )  If ( B e s t T e m p C o s t < B e s t C o s t ) And ( T e m p S o l ≠  T ) Then / ∗T: Tabu List∗/ ( 9 ) Sol’ =TempSol; ( 10 )  B e s t C o s t  =   B e s t T e m p C o s t; ( 11 )  EndIf ( 12 )  EndFor ( 13 ) EndFor ( 14 ) Return Sol’.Algorithm2 is the TS algorithm in pseudocode, where we have tried to improve the initial solution by using the neighborhood function (defined in Algorithm 1).Algorithm 2:Tabu Search for the mobility of Sink.
( 1 ) S o l = I T; /∗Initial Solution: Initial Trajectory (IT) ∗/ ( 2 )  f ∗ = f S o l; /∗Calculate the cost of the solution Sol using f (Objective Function)∗/ ( 3 ) T =  ∅; /∗ Initiate the tabu list ∗/ ( 4 ) I = 0; Imax=imax; /∗imax: The maximal number of iteration ∗/ ( 5 ) Repeat ( 6 )  S o l ′ =The best neighbor of the solution Sol is not taboo (Algorithm 1); ( 7 )  If  fSol′<f(Sol)Then ( 8 )  S o l = S o l ′; ( 9 )  f ∗ = f ( S o l ); ( 10 )  EndIf ( 11 ) Update the taboo listT; ( 12 )  I++; ( 13 ) Until (Stop Condition ( I = I m a x ) ); ( 14 ) ReturnSol.Algorithms1 and 2 illustrate the behavior of TS method where we define an initial solution and a maximum number of iterations. As long as the number of iterations does not reach the maximum number, the evaluation of the neighbors of the solutions and the search for the best solution (trajectory) continue until a satisfactory solution is reached, by using the Taboo list which can avoid the use of solutions already obtained during the search of the best solution.


### 4.2. Simulated Annealing

The second method we adapted is the SA method. This method is also based on the temperature parameter which is involved in the probabilityP of accepting neighbors of lower quality than the current solution in order to obtain a solution of better quality. Usually, this probability follows Boltzmann’s probability as in(7)P=e-fSol′-fSol/Twheref(Sol) is the value of solution quality Sol in the function objective f and T is the current temperature. The choice of the best solution in the SA method consists in the random permutation between the sensors in the trajectory. This process continues until the stop condition is reached (the temperature has reached the minimum threshold).The algorithm of the neighborhood exploration of a solution is presented in Algorithm3.Algorithm 3:Neighbor of a solution.
( 1 ) Sol’ =Sol; /∗ Initiate the Sol∗ with the initial Sol solution∗/ ( 2 ) S 1 = R a n d o m 1 , N;/∗ Select a sensor randomly ∗/ ( 3 ) S 2 = R a n d o m 1 , N;/∗ Select a sensor randomly ∗/ ( 4 ) S o l ’  =  P e r m u t a t i o n  ( S 1 , S 2 );/∗ Switching between sensors ∗/ ( 5 ) Return S o l ′ .Algorithm4 illustrates the adapted algorithm of the SA method for the calculation of the Sink trajectory.Algorithm 4:Simulated annealing for the mobility of Sink.
( 1 ) S o l = I T; /∗ Initial Solution: Initial Trajectory (IT) ∗/ ( 2 ) f ∗ = f ( S o l ); /∗Calculate the cost of the solution Sol using f (Objective Function)∗/ ( 3 )    T =  T m a x; /∗ Initiate Temperature ∗/ ( 4 ) Repeat ( 5 )  S o l ′ =A random neighbor of the solution Sol (Algorithm 3); ( 6 )  δ E =  f S o l ′ - f S o l; /∗ Calculate the quality of the solution∗/ ( 7 )  If ( δ E ≤ 0 ) Then ( 8 )  S o l = S o l ′; ( 9 )  f ∗ = f ( S o l ); ( 10 )  Else ( 11 )  S o l = S o l ′ With the probability P=e-δE/T; ( 12 )  f ∗ = f S o l; ( 13 )  EndIf ( 14 )  T = T ∗  α; /∗Update the temperature T, with 0<α<1∗/ ( 15 ) Until (Stop Condition ( T < T m i n ) ); ( 16 ) Return  Sol.Algorithms3 and 4 show main step on how the SA method works. Whenever a search is started, we must initially choose an initial solution and a maximum temperature. This temperature will be decreased gradually during the search for a better solution. During the time when the temperature is always higher than a minimum temperature, a generation of the neighbors of the solutions is evaluated randomly. The acceptance of a solution depends on its quality.


## 4.1. Tabu Search

The first method that we adapted to achieve our goals is the TS method. TS is based on determining the number of iterations to reach a satisfactory result. The choice of the best solution consists in exploring the neighborhood of the current solution and retaining the best trajectory. In this study, the neighborhood exploration of a solution is based on the permutation in the order of the sensors in the trajectory (Algorithm1). This process continues until the stop condition of the TS algorithm is reached (the maximum number of iterations). Algorithm 1 describes the choice of the best neighbor of a solution.Algorithm 1:Best neighbor of a solution.
( 1 ) Sol’ =Sol; /∗Initiate the Sol’ with the initial solution Sol.∗/ ( 2 )     B e s t C o s t  = f S o l ∗ / ∗ To calculate current cost∗/ ( 3 ) For (i = 1 To N) Do / ∗ N is the number of sensors∗/ ( 4 )  For (j = 1 To N) Do ( 5 )  T e m p S o l  =  Sol’; /∗TempSol: Temporary Solution∗/ ( 6 )  T e m p S o l  =  P e r m u t a t i o n  ( S i , S j ); /∗ Switching between sensors ∗/ ( 7 )  B e s t T e m p C o s t  =  f T e m p S o l; /∗The cost of TempSol∗/ ( 8 )  If ( B e s t T e m p C o s t < B e s t C o s t ) And ( T e m p S o l ≠  T ) Then / ∗T: Tabu List∗/ ( 9 ) Sol’ =TempSol; ( 10 )  B e s t C o s t  =   B e s t T e m p C o s t; ( 11 )  EndIf ( 12 )  EndFor ( 13 ) EndFor ( 14 ) Return Sol’.Algorithm2 is the TS algorithm in pseudocode, where we have tried to improve the initial solution by using the neighborhood function (defined in Algorithm 1).Algorithm 2:Tabu Search for the mobility of Sink.
( 1 ) S o l = I T; /∗Initial Solution: Initial Trajectory (IT) ∗/ ( 2 )  f ∗ = f S o l; /∗Calculate the cost of the solution Sol using f (Objective Function)∗/ ( 3 ) T =  ∅; /∗ Initiate the tabu list ∗/ ( 4 ) I = 0; Imax=imax; /∗imax: The maximal number of iteration ∗/ ( 5 ) Repeat ( 6 )  S o l ′ =The best neighbor of the solution Sol is not taboo (Algorithm 1); ( 7 )  If  fSol′<f(Sol)Then ( 8 )  S o l = S o l ′; ( 9 )  f ∗ = f ( S o l ); ( 10 )  EndIf ( 11 ) Update the taboo listT; ( 12 )  I++; ( 13 ) Until (Stop Condition ( I = I m a x ) ); ( 14 ) ReturnSol.Algorithms1 and 2 illustrate the behavior of TS method where we define an initial solution and a maximum number of iterations. As long as the number of iterations does not reach the maximum number, the evaluation of the neighbors of the solutions and the search for the best solution (trajectory) continue until a satisfactory solution is reached, by using the Taboo list which can avoid the use of solutions already obtained during the search of the best solution.


## 4.2. Simulated Annealing

The second method we adapted is the SA method. This method is also based on the temperature parameter which is involved in the probabilityP of accepting neighbors of lower quality than the current solution in order to obtain a solution of better quality. Usually, this probability follows Boltzmann’s probability as in(7)P=e-fSol′-fSol/Twheref(Sol) is the value of solution quality Sol in the function objective f and T is the current temperature. The choice of the best solution in the SA method consists in the random permutation between the sensors in the trajectory. This process continues until the stop condition is reached (the temperature has reached the minimum threshold).The algorithm of the neighborhood exploration of a solution is presented in Algorithm3.Algorithm 3:Neighbor of a solution.
( 1 ) Sol’ =Sol; /∗ Initiate the Sol∗ with the initial Sol solution∗/ ( 2 ) S 1 = R a n d o m 1 , N;/∗ Select a sensor randomly ∗/ ( 3 ) S 2 = R a n d o m 1 , N;/∗ Select a sensor randomly ∗/ ( 4 ) S o l ’  =  P e r m u t a t i o n  ( S 1 , S 2 );/∗ Switching between sensors ∗/ ( 5 ) Return S o l ′ .Algorithm4 illustrates the adapted algorithm of the SA method for the calculation of the Sink trajectory.Algorithm 4:Simulated annealing for the mobility of Sink.
( 1 ) S o l = I T; /∗ Initial Solution: Initial Trajectory (IT) ∗/ ( 2 ) f ∗ = f ( S o l ); /∗Calculate the cost of the solution Sol using f (Objective Function)∗/ ( 3 )    T =  T m a x; /∗ Initiate Temperature ∗/ ( 4 ) Repeat ( 5 )  S o l ′ =A random neighbor of the solution Sol (Algorithm 3); ( 6 )  δ E =  f S o l ′ - f S o l; /∗ Calculate the quality of the solution∗/ ( 7 )  If ( δ E ≤ 0 ) Then ( 8 )  S o l = S o l ′; ( 9 )  f ∗ = f ( S o l ); ( 10 )  Else ( 11 )  S o l = S o l ′ With the probability P=e-δE/T; ( 12 )  f ∗ = f S o l; ( 13 )  EndIf ( 14 )  T = T ∗  α; /∗Update the temperature T, with 0<α<1∗/ ( 15 ) Until (Stop Condition ( T < T m i n ) ); ( 16 ) Return  Sol.Algorithms3 and 4 show main step on how the SA method works. Whenever a search is started, we must initially choose an initial solution and a maximum temperature. This temperature will be decreased gradually during the search for a better solution. During the time when the temperature is always higher than a minimum temperature, a generation of the neighbors of the solutions is evaluated randomly. The acceptance of a solution depends on its quality.


## 5. Integrated Environment of Optimization and Simulation Based on Metaheuristics (IEOSM)

We have presented our optimization model and the adapted metaheuristics methods used for the Sink mobility in Sections3 and 4. In the present section, we introduce the tool which we have developed for the aim of calculating the optimal path of the Mobile Sink.


### 5.1. IEOSM Structure

Figure4 shows the Integrated Environment of Optimization and Simulation based on metaheuristics (named IEOSM for short). IEOSM is a complete implementation tool that we have developed, in one hand, to optimize the movement of the Mobile Sink in the WSN by the above metaheuristics, and on the other hand, to simulate the results generated by the optimization of Sink movements. We have integrated all the necessary modules in IEOSM to allow the user to process all steps of optimization, comparison, and simulation without the need to change the optimization tool. Indeed, most of interactions with the user are made by our tool, even the launch of simulation and visualization of the findings. Therefore, our tool constitutes a user-friendly interface between the user and the simulator which simulates the results obtained by the optimization. Figure 3 illustrates different modules implemented and used to build IEOSM.Figure 3
Architecture of the IEOSM tool.Figure 4
Example of results generated by IEOSM tool.The following points represent the different modules implemented and constituted our developed tool named IEOSM.


#### 5.1.1. Setting and Data Input Module

In Figure3, the first module is Setting and Data Input Module, where all required input parameters for the optimization process are introduced. These parameters include the number of iterations for the TS, the temperature used in SA, Weighing Factors (WFs) of the objective function, the speed, and the position of the Mobile Sink at the starting point. In this module, we also define the chosen topology to optimize the movements of the Sink. The topology is either random or predefined and uploaded from an input “.txt” file containing the number of sensors and their deployment.


#### 5.1.2. Optimization Module

We implemented TS and SA in the Optimization Module, which is responsible for calculating the moving plan of the Mobile Sink by using the parameters and settings entered in the Setting and Data Input Module. We can also display in this module the optimization results such as the execution time and the best solution for the sake of comparing the results of both methods TS and SA.


#### 5.1.3. Simulation Module

By using the resulting trajectory file in the Optimization Module and the topology file created in the Setting and Data Input Module, the Simulation Module executes a simulation process of the optimization results to evaluate the network performances of the TS and SA.


#### 5.1.4. Animation Module

The Animation Module allows us to visualize the moving plan as illustrated in Figure4 and the real time movements of the Mobile Sink in the deployment field using the trace file obtained after the simulation run (Figure 5).Figure 5
CastaliaVIZ tool used for animation purpose [36].


### 5.2. IEOSM: Assumptions and Scenarios

In this part, we present the numerous assumptions and considerations in order to simulate the different proposed scenarios using our proposed tool (IEOSM).


#### 5.2.1. Assumptions

In this work, we consider a wireless sensor network with the following characteristics:(i)
The Sink is the only mobile node with an additional optimization and mobility system.(ii)
The mobility module of the Sink allows it to move freely in the space (aerial displacement or on a surface without obstacles, that is why we eliminate the part of the signal quality in the objective function by fixing its WF to the value 0,i.e.,γ=0).(iii)
The movement speed of the Mobile Sink is 15 m/s.(iv)
Sensor error rates are calculated from a statistical field study for each sensor. The results obtained by this study are used to fill in the error rate parameter in the data file.(v)
All sensors have the same amount of energy. Initially, the default value of energy in Castalia is 18720 Joules, which corresponds to two AA batteries.(vi)
The transmission range for each sensor is 50 meters.(vii)
Each sensor generates 200 packets to be sent towards the Sink.(viii)
The deployment area is represented as a two-dimensional space (2D-zone) of 25, 49, 100, 144 sensor nodes in 600x600m2, 800x800m2, 1000x1000m2, and 1200x1200m2 zones, respectively.


#### 5.2.2. Scenarios

In all scenarios, we have used a grid topology (Figure1) with one Mobile Sink, where the moving speed of the Mobile Sink is fixed to 15 m/s. The number of sensor nodes for each scenario is 25, 49, 100, and 144, with always one Mobile Sink. Table 1 illustrates each scenario used in this study.Table 1
Presentation of the three studied scenarios.
Characteristics α β (Weighting Factor of Distance) (Weighting Factor of Error Rate) Scenario 1 We favor the minimization of trajectory α ≈ 1 β ≈ 0 (100%) Scenario 2 We favor the minimization of Error Rate α ≈ 0 β ≈ 1 (100%) Scenario 3 We balance between thetrajectory and the Error Rate α = 0.5 β = 0.5 (50%) (50%)


## 5.1. IEOSM Structure

Figure4 shows the Integrated Environment of Optimization and Simulation based on metaheuristics (named IEOSM for short). IEOSM is a complete implementation tool that we have developed, in one hand, to optimize the movement of the Mobile Sink in the WSN by the above metaheuristics, and on the other hand, to simulate the results generated by the optimization of Sink movements. We have integrated all the necessary modules in IEOSM to allow the user to process all steps of optimization, comparison, and simulation without the need to change the optimization tool. Indeed, most of interactions with the user are made by our tool, even the launch of simulation and visualization of the findings. Therefore, our tool constitutes a user-friendly interface between the user and the simulator which simulates the results obtained by the optimization. Figure 3 illustrates different modules implemented and used to build IEOSM.Figure 3
Architecture of the IEOSM tool.Figure 4
Example of results generated by IEOSM tool.The following points represent the different modules implemented and constituted our developed tool named IEOSM.


### 5.1.1. Setting and Data Input Module

In Figure3, the first module is Setting and Data Input Module, where all required input parameters for the optimization process are introduced. These parameters include the number of iterations for the TS, the temperature used in SA, Weighing Factors (WFs) of the objective function, the speed, and the position of the Mobile Sink at the starting point. In this module, we also define the chosen topology to optimize the movements of the Sink. The topology is either random or predefined and uploaded from an input “.txt” file containing the number of sensors and their deployment.


### 5.1.2. Optimization Module

We implemented TS and SA in the Optimization Module, which is responsible for calculating the moving plan of the Mobile Sink by using the parameters and settings entered in the Setting and Data Input Module. We can also display in this module the optimization results such as the execution time and the best solution for the sake of comparing the results of both methods TS and SA.


### 5.1.3. Simulation Module

By using the resulting trajectory file in the Optimization Module and the topology file created in the Setting and Data Input Module, the Simulation Module executes a simulation process of the optimization results to evaluate the network performances of the TS and SA.


### 5.1.4. Animation Module

The Animation Module allows us to visualize the moving plan as illustrated in Figure4 and the real time movements of the Mobile Sink in the deployment field using the trace file obtained after the simulation run (Figure 5).Figure 5
CastaliaVIZ tool used for animation purpose [36].


## 5.1.1. Setting and Data Input Module

In Figure3, the first module is Setting and Data Input Module, where all required input parameters for the optimization process are introduced. These parameters include the number of iterations for the TS, the temperature used in SA, Weighing Factors (WFs) of the objective function, the speed, and the position of the Mobile Sink at the starting point. In this module, we also define the chosen topology to optimize the movements of the Sink. The topology is either random or predefined and uploaded from an input “.txt” file containing the number of sensors and their deployment.


## 5.1.2. Optimization Module

We implemented TS and SA in the Optimization Module, which is responsible for calculating the moving plan of the Mobile Sink by using the parameters and settings entered in the Setting and Data Input Module. We can also display in this module the optimization results such as the execution time and the best solution for the sake of comparing the results of both methods TS and SA.


## 5.1.3. Simulation Module

By using the resulting trajectory file in the Optimization Module and the topology file created in the Setting and Data Input Module, the Simulation Module executes a simulation process of the optimization results to evaluate the network performances of the TS and SA.


## 5.1.4. Animation Module

The Animation Module allows us to visualize the moving plan as illustrated in Figure4 and the real time movements of the Mobile Sink in the deployment field using the trace file obtained after the simulation run (Figure 5).Figure 5
CastaliaVIZ tool used for animation purpose [36].


## 5.2. IEOSM: Assumptions and Scenarios

In this part, we present the numerous assumptions and considerations in order to simulate the different proposed scenarios using our proposed tool (IEOSM).


### 5.2.1. Assumptions

In this work, we consider a wireless sensor network with the following characteristics:(i)
The Sink is the only mobile node with an additional optimization and mobility system.(ii)
The mobility module of the Sink allows it to move freely in the space (aerial displacement or on a surface without obstacles, that is why we eliminate the part of the signal quality in the objective function by fixing its WF to the value 0,i.e.,γ=0).(iii)
The movement speed of the Mobile Sink is 15 m/s.(iv)
Sensor error rates are calculated from a statistical field study for each sensor. The results obtained by this study are used to fill in the error rate parameter in the data file.(v)
All sensors have the same amount of energy. Initially, the default value of energy in Castalia is 18720 Joules, which corresponds to two AA batteries.(vi)
The transmission range for each sensor is 50 meters.(vii)
Each sensor generates 200 packets to be sent towards the Sink.(viii)
The deployment area is represented as a two-dimensional space (2D-zone) of 25, 49, 100, 144 sensor nodes in 600x600m2, 800x800m2, 1000x1000m2, and 1200x1200m2 zones, respectively.


### 5.2.2. Scenarios

In all scenarios, we have used a grid topology (Figure1) with one Mobile Sink, where the moving speed of the Mobile Sink is fixed to 15 m/s. The number of sensor nodes for each scenario is 25, 49, 100, and 144, with always one Mobile Sink. Table 1 illustrates each scenario used in this study.Table 1
Presentation of the three studied scenarios.
Characteristics α β (Weighting Factor of Distance) (Weighting Factor of Error Rate) Scenario 1 We favor the minimization of trajectory α ≈ 1 β ≈ 0 (100%) Scenario 2 We favor the minimization of Error Rate α ≈ 0 β ≈ 1 (100%) Scenario 3 We balance between thetrajectory and the Error Rate α = 0.5 β = 0.5 (50%) (50%)


## 5.2.1. Assumptions

In this work, we consider a wireless sensor network with the following characteristics:(i)
The Sink is the only mobile node with an additional optimization and mobility system.(ii)
The mobility module of the Sink allows it to move freely in the space (aerial displacement or on a surface without obstacles, that is why we eliminate the part of the signal quality in the objective function by fixing its WF to the value 0,i.e.,γ=0).(iii)
The movement speed of the Mobile Sink is 15 m/s.(iv)
Sensor error rates are calculated from a statistical field study for each sensor. The results obtained by this study are used to fill in the error rate parameter in the data file.(v)
All sensors have the same amount of energy. Initially, the default value of energy in Castalia is 18720 Joules, which corresponds to two AA batteries.(vi)
The transmission range for each sensor is 50 meters.(vii)
Each sensor generates 200 packets to be sent towards the Sink.(viii)
The deployment area is represented as a two-dimensional space (2D-zone) of 25, 49, 100, 144 sensor nodes in 600x600m2, 800x800m2, 1000x1000m2, and 1200x1200m2 zones, respectively.


## 5.2.2. Scenarios

In all scenarios, we have used a grid topology (Figure1) with one Mobile Sink, where the moving speed of the Mobile Sink is fixed to 15 m/s. The number of sensor nodes for each scenario is 25, 49, 100, and 144, with always one Mobile Sink. Table 1 illustrates each scenario used in this study.Table 1
Presentation of the three studied scenarios.
Characteristics α β (Weighting Factor of Distance) (Weighting Factor of Error Rate) Scenario 1 We favor the minimization of trajectory α ≈ 1 β ≈ 0 (100%) Scenario 2 We favor the minimization of Error Rate α ≈ 0 β ≈ 1 (100%) Scenario 3 We balance between thetrajectory and the Error Rate α = 0.5 β = 0.5 (50%) (50%)


## 6. IEOSM: Experimental Results and Analysis

In this section, we present the results obtained by optimization and simulation phases, then we analyze the results in terms of optimization and in terms of network performance.Previous works as in [28, 29] use a different objective function from the proposed objective function. They use a mono-objective function aiming to minimize the tour length of the Mobile Sink, while the proposed function is a multiobjective function as previously mentioned. In addition, they used different scenarios and assumptions from those presented in this paper for experiments. Obviously, our approach takes into account more performances.


### 6.1. Optimization Results

We analyze the results in terms of optimization according to three performance metrics:(i)
Execution time of methods(ii)
Traveling distance of the Sink(iii)
The cost of the objective function


#### 6.1.1. Execution Time

Regarding the execution time of the two methods showed in Figure6, we observe that the SA method takes more calculation time compared to the TS method. This is because random number generation and use of exponential are costly processes.Figure 6
Execution time of methods in all scenarios.


#### 6.1.2. Objective Function and Traveling Distance

Table2 summarizes the results obtained by each method by showing mainly the distance traveling and the cost of the objective function in each scenario.Table 2
Comparison of the two methods results according to traveling distance and objective function in each scenario.
Traveling Distance Objective Function Scenario Node number Method Method TS SA TS SA S1 25 2988.63m 2765.69m 2988.63 2765.69 49 5601.6m 5372.13m 5601.6 5372.13 100 13062.7m 11956.3m 13062.7 11956.3 144 18257.9m 17824.8m 18257.9 17824.8  S2 25 3763.17m 3223.16m 35796.3 32997.1 49 7144.44m 6967.67m 81275.8 80429 100 17294.5m 16594.3m 179599 174463 144 28414.5m 28627.2m 258563 267472  S3 25 3465.03m 2984.16m 19399 17927.5 49 7830.25m 7487.01m 46360.8 44269.3 100 17684.2m 17435.5m 101497 98273.8 144 27842.6m 28427.1m 152345 150643The results obtained in all scenarios in terms of traveling distance and the cost of objective function are depicted in Figures7 and 8. We observe clearly that the SA method gives the best results (traveling distance and cost of the objective function) in most cases compared to TS method; this is due to greater exploration of the solution space in SA.Figure 7
Graphical illustration of traveling distance.Figure 8
Graphical illustration of objective function costs.


### 6.2. Network Performance

Tables3, 4, and 5 and Figures 9, 10, and 11 represent the simulation results of each scenario. The analysis of the network performance is based on three essential metrics in WSN:(i)
Energy consumed(ii)
Packets reception rate(iii)
LatencyTable 3
Energy consumed in each scenario.
Energy Consumption in Joule Scenario Node number Method TS SA S1 25 33.54J 33.43J 49 45.4J 45.18J 100 58.72J 59.02J 144 88.03J 88.09J  S2 25 33.81J 33.46J 49 46.14J 45.84J 100 87.07J 86.78J 144 171.38J 171.70J  S3 25 33.9J 33.45J 49 45.83J 45.66J 100 86.97J 87.28J 144 171.37J 171.46JTable 4
Packets reception rate in each scenario.
Packets Reception Rate Scenario Node number Method TS SA S1 25 97.82% 99.98% 49 99.63% 99.54% 100 100% 99.44% 144 99.98% 98.90%  S2 25 99.62% 100% 49 99.8% 100% 100 96.3% 99.46% 144 96.91% 96.15%  S3 25 93% 96.94% 49 96.12% 97.95% 100 98.83% 96.98% 144 97.97% 95.57%Table 5
Average latency calculated in all scenarios.
Latency Scenario Node number Method TS SA S1 25 89.23s 86.42s 49 169.24s 169.68s 100 372.52s 383.27s 144 527.98s 551.22s  S2 25 103.24s 91.29s 49 185.63s 194.13s 100 497.5s 487.03s 144 778.38s 829.46s  S3 25 92.81s 89.33s 49 211.39s 204.45s 100 469.43s 526.63s 144 838.35s 805.07sFigure 9
Average energy consumption for each node versus number of nodes for the two methods.Figure 10
Packets reception rate for the two methods by varying the number of nodes in each scenario.Figure 11
Average latency calculated in all scenarios.


#### 6.2.1. Energy Consumed

Table3 and Figure 9 show the average energy consumption of each method (TS and SA) in Joule when varying the number of nodes. We observe in this case the energy consumed by the two methods is almost the same with a few minor differences.


#### 6.2.2. Packets Reception Rate

Table4 and Figure 10 represent the rate of packets received by the Mobile Sink using the trajectories generated by the two methods when the Sink moves in the deployment space.The packets loss is a very common issue in WSN due mainly to collisions and sensor node failure in the classical WSN when sensor nodes and the Sink are considered stationary. The packets loss in this study is due to the mobility of the Sink;i.e., the Mobile Sink receives data from many sensors when moving or when it leaves the radio range of the transmitter. For the reception rate in scenario 1, both methods give a significant rate of packets reception.In Scenario 2, when we promote the error rate in the objective function, we are interested in the quality of data reception. So, it is clearly showed that the results obtained in most cases are high for both methods, and the reception rate decreases with the increase of number nodes in different topologies.The decrease of the reception rate in Scenario 3 compared to the other scenarios is due to the movements of the Sink. While the Sink moves in the deployments field towards a specific or destined sensor node in its calculated trajectory, the Sink passes through radio ranges of other sensor nodes nondestined, and these sensor nodes start a communication with the Sink. So, the communication established between the Sink and these sensors is not completely done.


#### 6.2.3. Latency

Usually, the latency refers to the time required for a data packet to be transmitted from the source node to the destination node through a network. Latency in mobile WSN is the time taken for a communication to send a data packet from a sensor to the Mobile Sink,i.e., from the instant Ts when the packet is generated in the application layer of a sensor until the time Tr when this packet is received by the Sink.The latency of a data packetLpi in the WSN is calculated in (8)Lpi=Tri-TsiThe average latency L of all received packets by the Mobile Sink is calculated in (9)L=1Np∑i=1NpLpiwhere Np is the number of received packets.Table5 and Figure 11 illustrate the latency obtained after running the simulation in all scenarios.Each sensor node generates data packets at the application layer and waits for the Mobile Sink to approach its radio range to send the stored data. So, the latency in this case depends heavily on the travel time of the Mobile Sink to reach the space area where sensor nodes are deployed. Thereby, the latency increases with the increase of the number of sensor nodes which the Sink must pass through to finally reach the destination. We note that, in all the scenarios, both TA and SA methods give satisfactory results in terms of optimization and network performance.The data collection is an important function in WSN and packet losses are a common problem in this kind of networks. These losses are the consequence of several collisions and nodes failure as they exhausted their batteries when acting as relay nodes in the network. Moreover, in this study, we find that in all scenarios the reception rates are higher than 93%, which is a very important and a satisfactory reception rate in WSN.


## 6.1. Optimization Results

We analyze the results in terms of optimization according to three performance metrics:(i)
Execution time of methods(ii)
Traveling distance of the Sink(iii)
The cost of the objective function


### 6.1.1. Execution Time

Regarding the execution time of the two methods showed in Figure6, we observe that the SA method takes more calculation time compared to the TS method. This is because random number generation and use of exponential are costly processes.Figure 6
Execution time of methods in all scenarios.


### 6.1.2. Objective Function and Traveling Distance

Table2 summarizes the results obtained by each method by showing mainly the distance traveling and the cost of the objective function in each scenario.Table 2
Comparison of the two methods results according to traveling distance and objective function in each scenario.
Traveling Distance Objective Function Scenario Node number Method Method TS SA TS SA S1 25 2988.63m 2765.69m 2988.63 2765.69 49 5601.6m 5372.13m 5601.6 5372.13 100 13062.7m 11956.3m 13062.7 11956.3 144 18257.9m 17824.8m 18257.9 17824.8  S2 25 3763.17m 3223.16m 35796.3 32997.1 49 7144.44m 6967.67m 81275.8 80429 100 17294.5m 16594.3m 179599 174463 144 28414.5m 28627.2m 258563 267472  S3 25 3465.03m 2984.16m 19399 17927.5 49 7830.25m 7487.01m 46360.8 44269.3 100 17684.2m 17435.5m 101497 98273.8 144 27842.6m 28427.1m 152345 150643The results obtained in all scenarios in terms of traveling distance and the cost of objective function are depicted in Figures7 and 8. We observe clearly that the SA method gives the best results (traveling distance and cost of the objective function) in most cases compared to TS method; this is due to greater exploration of the solution space in SA.Figure 7
Graphical illustration of traveling distance.Figure 8
Graphical illustration of objective function costs.


## 6.1.1. Execution Time

Regarding the execution time of the two methods showed in Figure6, we observe that the SA method takes more calculation time compared to the TS method. This is because random number generation and use of exponential are costly processes.Figure 6
Execution time of methods in all scenarios.


## 6.1.2. Objective Function and Traveling Distance

Table2 summarizes the results obtained by each method by showing mainly the distance traveling and the cost of the objective function in each scenario.Table 2
Comparison of the two methods results according to traveling distance and objective function in each scenario.
Traveling Distance Objective Function Scenario Node number Method Method TS SA TS SA S1 25 2988.63m 2765.69m 2988.63 2765.69 49 5601.6m 5372.13m 5601.6 5372.13 100 13062.7m 11956.3m 13062.7 11956.3 144 18257.9m 17824.8m 18257.9 17824.8  S2 25 3763.17m 3223.16m 35796.3 32997.1 49 7144.44m 6967.67m 81275.8 80429 100 17294.5m 16594.3m 179599 174463 144 28414.5m 28627.2m 258563 267472  S3 25 3465.03m 2984.16m 19399 17927.5 49 7830.25m 7487.01m 46360.8 44269.3 100 17684.2m 17435.5m 101497 98273.8 144 27842.6m 28427.1m 152345 150643The results obtained in all scenarios in terms of traveling distance and the cost of objective function are depicted in Figures7 and 8. We observe clearly that the SA method gives the best results (traveling distance and cost of the objective function) in most cases compared to TS method; this is due to greater exploration of the solution space in SA.Figure 7
Graphical illustration of traveling distance.Figure 8
Graphical illustration of objective function costs.


## 6.2. Network Performance

Tables3, 4, and 5 and Figures 9, 10, and 11 represent the simulation results of each scenario. The analysis of the network performance is based on three essential metrics in WSN:(i)
Energy consumed(ii)
Packets reception rate(iii)
LatencyTable 3
Energy consumed in each scenario.
Energy Consumption in Joule Scenario Node number Method TS SA S1 25 33.54J 33.43J 49 45.4J 45.18J 100 58.72J 59.02J 144 88.03J 88.09J  S2 25 33.81J 33.46J 49 46.14J 45.84J 100 87.07J 86.78J 144 171.38J 171.70J  S3 25 33.9J 33.45J 49 45.83J 45.66J 100 86.97J 87.28J 144 171.37J 171.46JTable 4
Packets reception rate in each scenario.
Packets Reception Rate Scenario Node number Method TS SA S1 25 97.82% 99.98% 49 99.63% 99.54% 100 100% 99.44% 144 99.98% 98.90%  S2 25 99.62% 100% 49 99.8% 100% 100 96.3% 99.46% 144 96.91% 96.15%  S3 25 93% 96.94% 49 96.12% 97.95% 100 98.83% 96.98% 144 97.97% 95.57%Table 5
Average latency calculated in all scenarios.
Latency Scenario Node number Method TS SA S1 25 89.23s 86.42s 49 169.24s 169.68s 100 372.52s 383.27s 144 527.98s 551.22s  S2 25 103.24s 91.29s 49 185.63s 194.13s 100 497.5s 487.03s 144 778.38s 829.46s  S3 25 92.81s 89.33s 49 211.39s 204.45s 100 469.43s 526.63s 144 838.35s 805.07sFigure 9
Average energy consumption for each node versus number of nodes for the two methods.Figure 10
Packets reception rate for the two methods by varying the number of nodes in each scenario.Figure 11
Average latency calculated in all scenarios.


### 6.2.1. Energy Consumed

Table3 and Figure 9 show the average energy consumption of each method (TS and SA) in Joule when varying the number of nodes. We observe in this case the energy consumed by the two methods is almost the same with a few minor differences.


### 6.2.2. Packets Reception Rate

Table4 and Figure 10 represent the rate of packets received by the Mobile Sink using the trajectories generated by the two methods when the Sink moves in the deployment space.The packets loss is a very common issue in WSN due mainly to collisions and sensor node failure in the classical WSN when sensor nodes and the Sink are considered stationary. The packets loss in this study is due to the mobility of the Sink;i.e., the Mobile Sink receives data from many sensors when moving or when it leaves the radio range of the transmitter. For the reception rate in scenario 1, both methods give a significant rate of packets reception.In Scenario 2, when we promote the error rate in the objective function, we are interested in the quality of data reception. So, it is clearly showed that the results obtained in most cases are high for both methods, and the reception rate decreases with the increase of number nodes in different topologies.The decrease of the reception rate in Scenario 3 compared to the other scenarios is due to the movements of the Sink. While the Sink moves in the deployments field towards a specific or destined sensor node in its calculated trajectory, the Sink passes through radio ranges of other sensor nodes nondestined, and these sensor nodes start a communication with the Sink. So, the communication established between the Sink and these sensors is not completely done.


### 6.2.3. Latency

Usually, the latency refers to the time required for a data packet to be transmitted from the source node to the destination node through a network. Latency in mobile WSN is the time taken for a communication to send a data packet from a sensor to the Mobile Sink,i.e., from the instant Ts when the packet is generated in the application layer of a sensor until the time Tr when this packet is received by the Sink.The latency of a data packetLpi in the WSN is calculated in (8)Lpi=Tri-TsiThe average latency L of all received packets by the Mobile Sink is calculated in (9)L=1Np∑i=1NpLpiwhere Np is the number of received packets.Table5 and Figure 11 illustrate the latency obtained after running the simulation in all scenarios.Each sensor node generates data packets at the application layer and waits for the Mobile Sink to approach its radio range to send the stored data. So, the latency in this case depends heavily on the travel time of the Mobile Sink to reach the space area where sensor nodes are deployed. Thereby, the latency increases with the increase of the number of sensor nodes which the Sink must pass through to finally reach the destination. We note that, in all the scenarios, both TA and SA methods give satisfactory results in terms of optimization and network performance.The data collection is an important function in WSN and packet losses are a common problem in this kind of networks. These losses are the consequence of several collisions and nodes failure as they exhausted their batteries when acting as relay nodes in the network. Moreover, in this study, we find that in all scenarios the reception rates are higher than 93%, which is a very important and a satisfactory reception rate in WSN.


## 6.2.1. Energy Consumed

Table3 and Figure 9 show the average energy consumption of each method (TS and SA) in Joule when varying the number of nodes. We observe in this case the energy consumed by the two methods is almost the same with a few minor differences.


## 6.2.2. Packets Reception Rate

Table4 and Figure 10 represent the rate of packets received by the Mobile Sink using the trajectories generated by the two methods when the Sink moves in the deployment space.The packets loss is a very common issue in WSN due mainly to collisions and sensor node failure in the classical WSN when sensor nodes and the Sink are considered stationary. The packets loss in this study is due to the mobility of the Sink;i.e., the Mobile Sink receives data from many sensors when moving or when it leaves the radio range of the transmitter. For the reception rate in scenario 1, both methods give a significant rate of packets reception.In Scenario 2, when we promote the error rate in the objective function, we are interested in the quality of data reception. So, it is clearly showed that the results obtained in most cases are high for both methods, and the reception rate decreases with the increase of number nodes in different topologies.The decrease of the reception rate in Scenario 3 compared to the other scenarios is due to the movements of the Sink. While the Sink moves in the deployments field towards a specific or destined sensor node in its calculated trajectory, the Sink passes through radio ranges of other sensor nodes nondestined, and these sensor nodes start a communication with the Sink. So, the communication established between the Sink and these sensors is not completely done.


## 6.2.3. Latency

Usually, the latency refers to the time required for a data packet to be transmitted from the source node to the destination node through a network. Latency in mobile WSN is the time taken for a communication to send a data packet from a sensor to the Mobile Sink,i.e., from the instant Ts when the packet is generated in the application layer of a sensor until the time Tr when this packet is received by the Sink.The latency of a data packetLpi in the WSN is calculated in (8)Lpi=Tri-TsiThe average latency L of all received packets by the Mobile Sink is calculated in (9)L=1Np∑i=1NpLpiwhere Np is the number of received packets.Table5 and Figure 11 illustrate the latency obtained after running the simulation in all scenarios.Each sensor node generates data packets at the application layer and waits for the Mobile Sink to approach its radio range to send the stored data. So, the latency in this case depends heavily on the travel time of the Mobile Sink to reach the space area where sensor nodes are deployed. Thereby, the latency increases with the increase of the number of sensor nodes which the Sink must pass through to finally reach the destination. We note that, in all the scenarios, both TA and SA methods give satisfactory results in terms of optimization and network performance.The data collection is an important function in WSN and packet losses are a common problem in this kind of networks. These losses are the consequence of several collisions and nodes failure as they exhausted their batteries when acting as relay nodes in the network. Moreover, in this study, we find that in all scenarios the reception rates are higher than 93%, which is a very important and a satisfactory reception rate in WSN.


## 7. Conclusion

In this paper, we are interested in optimizing data collection in WSN with Mobile Sink (WSN-MS). The main goal consists of using metaheuristics to optimize the movements of the Mobile Sink in the network. For this sake, we developed an Integrated Environment of Optimization and Simulation to this matter, named IEOSM. In IEOSM, we have implemented the proposed multiobjective function and the two state-of-the-art metaheuristic methods, TS and SA. We have adapted the algorithms of these methods to the addressed problem of finding the optimal trajectory for the Sink in the WSN-MS network. More precisely, our main objectives in this work are twofold: minimize the movement of the Mobile Sink in terms of distance and minimize the movement to sensor nodes that have the lowest error rate. The desired gain here is the reliability of data collection and energy efficiency in WSN-MS.In defined scenarios, both methods offer significant results in terms of optimization and network performance. Due to the great exploration of the search space that can lead to a global optimum, the SA gives better solutions in terms of optimization in most cases compared to those obtained by the TS. In terms of network performance, we observed that both methods used for determining the trajectory of the Mobile Sink give satisfactory results. The choice of the optimization method and the Weighting Factors depend on the use case and the objective set.The developed environment IEOSM is extensible to include other metaheuristics and other optimization tools. Also, it would be more interesting to really validate the results of this work to experience them in practice using test-beds.



---

*Source: 7413427-2018-10-01.xml*