Mobile Sink in Fuzzy Logic and Meta-heuristic Firefly Algorithm based Routing Scheme to Extend Network Lifetime of WSN (MSFLMFLA)


 Nowadays, wireless sensor network (WSN) improves people's lives by assisting them with a variety of applications. The major challenge in WSN is consumption of power as well as lifetime of the network. Clustering is the important method for saving energy in WSN because the separation of the sender and the receiver is related to transmission energy. In this paper we used fuzzy rules for clustering. Wireless sensor networks are susceptible to energy holes, in which sensors nearer to a static sink rapidly lose energy. To solve this problem and extend network life we used a mobile sink (MS). In this paper, a customized mobile sink node called the mobile data sender (MDS) has been tried to introduce for collecting data from the sensors by going to visit every node and then going to send this to the base station. This paper proposes nature inspired heuristic discrete firefly algorithm to optimal way accumulate information from sensor nodes in order to decrease the path travelled by the MDS while doing the tour. So, in this paper, we consider Mobile Sink in Fuzzy Logic and Meta-heuristic Firefly Algorithm based routing scheme to extend network lifetime of WSN (MSFLMFLA). Here we compare throughput and network lifetime with the static sink in FLMFLA and EHR-DC and LEACH protocol. The results of simulation shows that the MSFLMFLA increases the throughput, residual energy and also increases the data received by the sink.

LEACH has some fundamental flaws, such as the fact that each station is connect directly to every node and the node which is at center, that's decreases its usage for smaller networks. TDMA plans for LEACH allocates schedule open positions to each hub regardless of whether the data has to transfer by hub or not. This results in unnecessary postponement and overhead [11]. WSNs have been subjected to a plethora of clustering algorithms and strategies. To form clusters, K-means clustering algorithm employs by the KM-LEACH. K-means clustering algorithms both centralized and distributed. LEACH-CKM considers remote nodes when forming groups using the classification method of K-means and transmits data using a routing protocol which transmit minimum energy [14].
Many attributes, like energy of the node, degree, and the energy condition for the neighboring nodes in the network, all has considered at the same time. When developing the WSN dispersed clustering algorithm, As a result, the appropriate CH is chosen in the equilibrium of multi-condition has a significant impact on the overall stabilization of the networks which has cluster. A fuzzy logic system, on the other hand, can only give proper explaination to this type of multifactor problem evaluation, such as CHs selection. In several other words, the fuzzy logic system can take into account a variety of clustering factors when selecting CHs [15]. Many factors influence WSN clustering algorithms,such as the amount of energy remaining in sensor nodes and their total distance from their BS other factors, on the other hand, can be considered if the problem is thoroughly investigated. As a result, clustering is more suitable if the clustering algorithm wants to take advantage of more energy-affecting factors. The fuzzy Inference System (FIS) is a powerful tool for combining parameters in order to improve parameter performance [24]. Author in this paper [7] present a centralized fuzzy-based clustering algorithm for WSN energy-efficient routing algorithms. Generally, fuzzy logic is employed to resolve the uncertainty in WSNs. With the help of fuzzy logic, a system can be configured to run more efficiently with partial data .
A path of routing from a source node to a destination node can be determined using a variety of optimization approaches [31]. Several algorithms including particle swarm optimization, differential evolution, the bat algorithm, the firefly algorithm, and the cuckoo search, has emerged in the last two decades, and they had great promise in solving technically difficult optimization problems. Between these new algorithms, the firefly algorithm was shown to be very efficient in dealing with multisensory, global optimization techniques [20]. The Firefly algorithm is a recent phenomenon in designed to simulate evolutionary algorithms. It is easy, but adequate process parallelly with high strength, which allows it to be used in a variety of areas like dispatch of economy and cryptography [22]. The firefly algorithm is a method which corresponds to the inspired by biological algorithm and help to solve the objective function. The flashing nature of fireflies inspired this algorithm. The fireflies which are bright attracted towards the less-bright fireflies, that used to locate the searching area [28]. Information received from all the sensor nodes is collected and it's transmitted to the base station these sensor nodes have a limited amount of energy and memory. Because of the increased data relaying under multi-hop communication, Sensor nodes in close proximity to the base station rapidly exhaust their battery energy, reducing the WSN's lifetime of the network. Therefore, that strategy called as the emerged problem of energy hole. As a result, the use of clustering and mobile sinks can be regarded as an important method for reducing energy consumption [34]. By adding mobility on a sink node, energy consumption can be significantly lowered. As a result, while transmitting data, mobile data collection can result in lower energy utilization among wholly sensor nodes [36].
The remaining paper is arranged as follows: The research stuff in compression techniques and data cluster analysis using firefly algorithms in WSNs is outlined through Section 2. The System model is described in Section 3. Section 4 discusses the proposed work, and Sections 5 and 6 explain the fundamentals of fuzzy rules and the firefly algorithm. The firefly algorithm for mobile sink is explained in Section 7. Section 8 discusses the performance evaluation, and Section 9 concludes the paper.

Related work
For environmental monitoring, an easy and productive clustering technique termed energy efficient structured clustering algorithm (EESCA) is suggested in this study [9]. Cluster heads (CHs) are chosen using distance of communication as well as energy remaining. The new methodology is shown to be favorable for WSNs when compared to the well-known previously algorithms low energy adaptive clustering hierarchy (LEACH) and scaled energy efficient clustering hierarchy (SEECH). The research [12] suggests employing clustering based on particle swarm optimization and routing based on harmony search in WSN to improve network lifetime. As a result, this study is established for global ideal cluster heads choosing and gateway nodes to decrease the CH's utilization of energy while sending aggregated information to the base station (BS). The results findings that the PSOHSA algorithm outperforms other traditional protocols like EEABR and IHSBEER as well as that increases the network's life. The "fuzzy based unequal clustering algorithm" is studied in this study [13] to extend the network's life. This approach creates clusters that are uneven in size. This is done to keep the energy consumption in check. The fuzzy logic technique is used to choose cluster heads. The separation with base station, remaining energy, and density are all input variables. When compared to its competitors, it extends the network's lifespan. The author of this study [16] presented a cluster-based SPIN (CBSPIN) routing algorithms, that is an extended type of the SPIN routing protocol that uses a clustering methodology to construct the network. The MATLAB platform is utilized to simulate both the SPIN and CBSPIN protocols, and the results reveal that CBSPIN performs better as compared with time as well as energy.
The author considers topology of network based on complex optimization network theory for resolve the energy saving issue of WSN in this research [17]. Here an energy-efficient WSN model was proposed. The clustering properties of a small world network are similar to those of the network's rules, but it also resembles random networks with short average path lengths. It's used to improve the overall energy efficiency of networks. The simulation results support this model's energy efficiency and the renovating of the sink nodes to assure the WSN's regular performance. The study [18] describes a method for increasing the life of a network in a WSN by employing genetic algorithm-based clustering and particle swarm optimization-based routing. A genetic algorithm uses distance and energy characteristics to identify the optimum cluster head (CH) that gathers information from the remaining nodes. Furthermore, the optimization algorithm of particle swarm is based on the selection of optimal routing paths for all relay nodes sending data to the base station (BS). This procedure demonstrates that the relay node facilitates and supports communication between the sink and CH, resulting in increased energy efficiency. To boost network performance, a fitted firefly heuristic, the firefly algorithm, is suggested in this paper [19]. Simulated results show that the suggested methodology outperforms LEACH and energy well organized hierarchical clustering.
A novel congestion control method depends on optimal rate is developed in this study [21] in order to deliver energy efficient transmissions. To reduce energy usage across the network, a congestion control method based on cluster routing is introduced. The rate control technique reduces the end-to-end delay, extending the life of the network over a longer simulation period. Author proposed a routing which uses the multipath approach for homogeneous WSNs in this paper [23]. Grouping the nodes in the network, finding the pathways within the CHs, and continuing the pathways are the three phases of the proposed technique. In forms of end-to-end delay, utilization of energy, losing rate of packet, and network lifetime the simulation demonstrate that this multipath routing exceeds other routing approaches. The authors of this study [25] offer a Distributed Energy aware Fuzzy Logic based routing algorithm (DEFL) that targets utilization of energy as well as balancing energy at the same time. For the shortest path calculation, this approach captures network state using relevant energy measurements and maps them to cost values. The lifetime of network produced by DEFL outperforms the best as compared to all studied systems under varied load of traffic levels, according to simulation data. Using a free space energy consumption model, it is shown that single-hop forwarding consumes minimum energy [26]. When compared to other methods, results demonstrate that the algorithm efficiently increases the life of the network while also achieving energy planning and balance of the energy. A HWSNs routing protocol depends on the grey wolf optimizer (HMGWO) is studied in this study [27]. The process begins by explaining various functions of fitness for different nodes energy, after which the values for fitness of the nodes are determined and used as starting weights in GWO. When compared with the different algorithms, the HMGWO protocol enhances the network lifetime. In this research [29], the author focuses on contemporary hierarchical routing methods that rely on the LEACH protocol for improving the performance as well as lifespan of WSN. As a result, the Node Ranked-LEACH technique is presented. Based on the node rank algorithm, this suggested protocol improves the total network lifetime.
In this research [32], a fuzzy based balanced cost CH selection algorithm (FBECS) is suggested, that takes into account the residual energy, distance with the sink, and density of nodes in the region as inputs to the FIS. In terms of improved period of stability, longer life with balancing of load, and large data sending to BS, the simulation demonstrate that the FBECS is above as compared with BCSA and LEACH. In this study [33], a novel method of clustering known as Energy Centers Searching using Particle Swarm Optimization (ECPSO) is provided to skipping the holes of energy as well as seeking centers of energy for selection of CHs. The authors did a number of simulations to show that the EC-PSO beats other works in terms of life of network extension as well as ratio of energy usage. This paper [35] proposes an event-aware hierarchical routing with differential compression (EHRDC) scheme. It groups sensors and chooses the cluster head (CH) in each group to handle routing and compression. In normal times, sensors transmit information to their CHs, which are compressed by the use of spatial correlation. When events appear, sensors adaptively forward data to nearby CHs to raise the efficiency of compression. Through simulations, the authors show that EHRDC is outperforming other methods in terms of life of the network and the amount of sensed data collected by the base station. However, in [35] the node which energy is higher is assigning the cluster head that might be quite away with the sink node.
The firefly algorithm has the fewest parameters, is capable of automatic subdivision, and can interact with multimodality. This prompted the use of the firefly algorithm, a distinct optimization technique, for the proposed mobile information collection challenge in WSN. MDS is used for planning the tour and for collecting the information in wait time, limited WSNs. In this case, the BS and sensor nodes are considered to just be stationary, and the sensors have been installed at random across the selected area. An MDS starts at the base station and proceeds among all sensors by using the perfect option obtained from the proposed technique. That's decreases the MDS's total transport costs as well as the power consumption of each sensor node. In this paper Mobile Sink in Fuzzy Logic and Meta-heuristic Firefly Algorithm based routing scheme to extend network lifetime of WSN (MSFLMFLA) modify the cluster head selection and forwarding data so as to increase network lifetime and the MSFLMFLA is used for finding the best way for the MDS to take across the network while collecting sensor information across all nodes along the path.

System Model
Consider a sensing field in which sensors are uniformly distributed and form a connected WSN. All sensors seem to be similar in terms of hardware and battery capacity, and generate the same type of sensing data, allowing them to be grouped and compacted. The sensing field is already divided into grids. Utilizing various positioning strategies because sensor locations can be obtained, each sensor knows which grid it belongs to. Events can occur at any time and in any location. Sensors would start generating sensing data whose values differed greatly from those generated during normal times after detecting events.
A sensor expends energy in the production, transmission, and reception of data. When a sensor ni generates a m-bit packet of sensing data, it expends energy.
Where vi G , ci G and ti G denote the voltage, current and time required by ni for generating the packet respectively. When sensor node ni sends the packet to a node nj , ni takes an amount of energy : is the power for ni's transmitter and is the power for ni's amplifier for sending a bit and ( , ) is the distance function.
Suppose be the power for ni's receiver to get a bit. Then nj spends an amount of energy to take the packet: WSN sensors detect data and send this one to the sink. When the separation between both the sink and sensor node is greater, the sensor must expend more energy to transmit data. As a result, we introduced mobility to allow the sink node to move all over the network, meet the sensors, and begin receiving one's information. Because the mobile sink pays close attention to each sensor node, the power consumption within the sensors is drastically decreased.
The challenge of choosing the optimal tour of an MDS that comes to visit every nodes present in the network for information collection is referred to here. The following is a mathematical description of an MDS's data collection tour as an integer equation.
If a path exists among both sensors i and 'j,' sij is close to unity. The sensors are labeled to signifiers ranging between 1 and sN for I = [1,2 sN-1,sN]. According to equations 7 and 8, the MDS must begin arriving at each sensor from a particularly clear other sensor, but that each sensor must depart from an absolutely clear other sensor. According to equation 9, the MDS must have one tour that covers all sensors. The variables ui and uj appear to be dummy variables in this model, and the following assumptions are made.
(1) Each practicable MDS sample consists of a single closed series of detectors.
(2) For each tour taken by an MDS in an attempt to cover all sensors,and (3) Incident information across all sensor devices makes a equal contribution in the WSN applicationt. (4) It is assumed that the separation between the two sensors along each side is assumed to be equal. An MDS performs the necessary information collection trip to gather information out of a network system with deployed nodes. At the end of the tour, before reporting to base station the MDS tours all the sensors in the most efficient order possible and collects one's information.

Proposed work
To conserve energy, the sensor node in WSN form clusters. So, each cluster does have a coordinator, abbreviated cluster head. The sensor node collects data from the targeted region and start relays that data to the base station. Each sensor node could serve both as a node which sense the information and a cluster head. The head of the cluster gather information from its members and routes it all to the base station. As a result, the emphasis is on because large amount of power has been drained from the deployed sN during information transmission.
The system architecture proposed in this work aims to implement sensor nodes within the impact zone by monitoring the surroundings. The following assumptions are made in this proposed work: 1.The network consists of homogeneous sensor nodes with an initial energy of 6480 Joules.
2. Throughout the network the deployed sensor nodes are dispersed at random.
3. Once deployed, the sensor nodes have become static, i.e. they are immovable.
4. Sink node is mobile and base station is also static 5. After deployment, the sensor is unsupervised and energy constricted, i.e., the battery pack is irreplaceable.
6. RSSI (received signal strength index) computes the sensor to base station separation.
7. The Base station has an endless supply of power.
8. Adjusting the transmission power relative to the spacing is possible. 9. A symmetric radio communications network exists. 10. Sensor node inability occurs as a result of energy depletion.
11. The network continuously generates reports.

Fuzzy Rule in MSFLMFLA
The proposed methodology is intended to use fuzzy rules to modify the selection of cluster head. The cluster head is chosen based on three variables: the node's residual energy, its distance from the grid's center, and the cost of communication with the base station. Fuzzy rules are based on iterations such as LEACH. The framework of these rules in a single round is divided into 2 phases. The first is the topology construction phase, and the second is the phase of forwarding.

Topology construction phase
Each sensor node distributed throughout the targeted region. That once sensor node is installed inside the specific location, the suggested technique plays a role. Before gathering information from target region, clusters are formed following the formation of every round. In every round, maximum p percent cluster heads are selected from the implemented alive sensor node. Following deployment, the sink node sends the packet into the targeted region (LOC SN). Such a packet includes important information such as the sink node location. The coordinates of the classified regions and the sensor node time slot to avoid collision. To avoid collision, the sensor node now broadcasts a message throughout the network in order to comply with the time slot offered by the sink node. Once all broadcasts have been completed, the sensor node calculates local parameters such as residual energy, distance from the grid's center, and communication cost with the sink node. Algorithm 1 describes the cluster formation algorithm in the suggested technique. To form a cluster, SNode (x) connects to the nearest CH.

Model with Fuzzy Bases
Throughout portion, we introduce the fuzzy based method besides cluster head selection, as well as a technique of clustering derived from the adaptive fuzzy system for effective WSN clustering. In WSN, a variety of factors influence CH selection. As a result, they must be properly combined in order to make the right choices FIS would be an effective method for accomplishing this goal. This enables the combination of all input parameters in such a manner that their performance in cluster head selection is reflected. Here uses fuzzy logic to maximize the benefits of selecting the cluster head. It is necessary to investigate the factors that influence cluster head selection. We use appropriate scales to evaluate all of those aspects, as well as construct an effective fuzzy model with an efficient integration of fuzzy sets and suitable parameters.
Fuzzy logic approach is used in this proposed method to select the best candidate for the position of cluster head. Fuzzy logic would be effective at simulating experience of human and behavior of making the decision. Figure 3 depicts the basic framework of the fuzzy system used in the proposed work. .

Fig. 3 Building blocks of Fuzzy System
It consists of four construction blocks: Fuzzifier: In fuzzy based implementations, the system inputs seem to be crisp sets that must be transformed into fuzzy sets. A degree of membership is allocated to every fuzzy set. Thus, fuzzifier is used to convert a crisp set into an appropriate linguistic value.
Fuzzy Rule Base: This is made up with IF-THEN regulations that the individual specifies. The fuzzy system's dynamic behavior is defined by a rule base with if-then statements. The knowledge base is another name for the fuzzy rule base.
Inference Engine: An inference engine of fuzzy to input data and rules of IF-THEN simulates the system of human inference. The inference engine of fuzzy is critical in drawing and inferring conclusions out from rule base conditions.
Defuzzification: The defuzzification system transforms its fuzzy set produced by the inference engine it into an output of value from which some conclusions are drawn. The defuzzifier computes the probability based on the centroid.

a. Fuzzification
As input for fuzzy logic, we used three variables. Table 2 shows the fuzzifier crisp input variable, as well as its maximum and minimum values for evaluating the eligibility index. The cost of communication with the base station is the Euclidean distance from each sensor node with the base station. Distance from the centre of the grid count of the distance from sensor node to it centre of that grid under consideration for CH candidature.    (10)), is used for comparative optimization of linguistic variable values. The calculation is done comparable to a discursive universe of zero to 800 based on their locations. Ultimately, values of a given variable of the sensor node have been dispersed from across discourse universe based on its relative locations. As a result, the given variable values have been normalized because they must allocate a highest valued sensor with the highest value for becoming a cluster head. The remaining sensor nodes are prioritized based on the frequency with which they occur in comparison to the variable values, i.e., minimum and maximum.
In above equation Value (var) is the assigned variable's value when considering the most recent sensor and Min (var) as well as Max (var) have become the assigned variable's values i.e., minimum and maximum between all sensor nodes, respectively. It should be noted that when calculating any linguistic variable for a specific sensor, any neighboring sensor closer from before the cluster head should be exempted. This is due to the fact that if this network cluster is chosen, they will never be becoming members of it.

b. Fuzzy Rule Base
For conditions in IF-THEN, membership values of fuzzified variables fed into the rule base. A value is obtained by applying the operators of fuzzy AND as well as OR to the input data. The method of aggregation unions every one of the outcomes as well as selects the value which is to be maximum from the fuzzy set which is aggregated after applying the 27 rules that shown Table 2. We have used inference system of Mamdani that is widely used because of its several advantages, to calculate its eligibility index using fuzzy logic.  Table 3 depicts the variables of fuzzy that have been used to generate the output of crisp value.
Membership functions come in a variety of shapes including triangular, trapezoidal, sigmoid, and gaussian. The only requirement for an MF is that it must be in the range of 0 to 1. We used gaussian MF for intermediate levels in this research schemes because its widely known when defining fuzzy set theory due to this lightness as well as values of non-zero in all points, and Membership Function is Trapezoidal for variables which are in boundary due to the simple design as well as computation is faster. Other membership functions can be used, but we found that membership function of trapezoidal as well as gaussian produced the best results equation (12) as well as (13), respectively, give the membership functions of the trapezoidal and gaussian being used our fuzzy inference system.
The trapezoid's feet and shoulders are denoted by p, q, and r, s, respectively.
The defuzzifier translates the accepted input into a crisp set as well as calculates the Eligibility Index of every node.

Fig. 7 Output-Var: Eligibility Index
After calculating the eligibility index for all nodes, compute the threshold (THV) using the equation 14.
THV is computed using the mean of all sensor node eligibility indexes and the probability allotted to each sensor node based on their presence in the detection area. For indiscriminate CH selection, each sensor node in a wireless network randomly selects a number. Whenever the number will be below the computed THV, that sensor is considered for taking the job of CH. The job of cluster head has been critical to the network's energy efficiency, and this is repositioned for each round to balance the load even amongst the number of sensor nodes. Following the cluster head selection process during the topology construction stage, nodes inside this cluster head item broadcast one's choice inside the coverage area (Ca). By sending (join cluster member) towards the nearest cluster head, the node that was not accepted for the cluster head role joins several of the nearby clusters in this manner it's formed the clusters. If a few nodes remain after cluster formation, they will participate a cluster closest with that sensor node. After that cluster head acknowledges them. When all of the Sensor nodes are bound to clusters, the topology setup phase is complete.

Forwarding phase
Following the successful formation of a cluster during the setup phase of topology, cluster head is now expected to gather information by their members in accordance with the allotted slot for TDMA to every member for communicating with the free collision. During cluster formation, cluster heads assign a slot for TDMA to each of their members. After collecting information from each sensor node, the cluster head integrates the data in terms of reducing repeated data and thus reduce communication costs. The sink node collects the grouped information from each cluster head in accordance with the TDMA schedule in order to ensure collision free communication. Along those same lines, the suggested methodology completes one round successfully.

Firefly algorithm
Finding the shortest path from every cluster head to the base station is the goal of firefly algorithm. Along that a novel function of fitness that consists of the residual energy of the node, distance from its center of the grid, and communication cost with the sink node.

Initialization of Firefly and Representation
The fireflies in the firefly algorithm each represent a successful solution. Every firefly represents an information transmitting path from a cluster head to the base station in routing. Each firefly has the same dimension as the overall amount of cluster heads in the WSN, plus another additional place for base station. In this case, the scale of the firefly is equivalent to p + 1. In which p denoted the amount of Cluster heads in the WSN as well as 1 represents the amount of sink node. Let = ( ,1 ( ), ,2 ( ). . . . . , +1 ( )) be the x th firefly, here every place , , ∀ ,1 ≤ ≤ + 1, ∀ ,1 ≤ < + 1 is the (cluster head node) next hop in the data relay to the sink node.

Fitness Function Derivation
Our goal is to search the best path from every cluster head to base station. For accomplishing this, a fitness function is designed that takes into account different parameter such as the residual energy of the node, distance from its center of the grid, as well as cost communication with the sink node.
Residual energy: In the proposed work, the attractiveness factor will be computed based on the distance as well as remaining energy of the relay node. This will make sure that the relay node not only is closest to the base station but also has enough energy to gather data from the cluster head. In transmitting data, the relay node collects and merge the information before transmitting it to the sink nodes. As a result, a higher residual energy relay node is a better option. As a result, our first sub goal in terms of residual energy is f1 maximized as shown in equation 15.
Distance from its center of the grid: Distance from the centre of the grid makes sure that the node is well connected to all the cluster members in the grid. If a node has fewer members cluster head, it will use less energy in communicating with its members as well as will be able to sustain for a more time period. As a consequence, a node with a limited node degree is a better option. As a result, the second sub goal in terms of node degree is to maximize f2 as shown in equation (16).
Communication cost with the sink node: Communication cost will make sure that the selected cluster head expends optimal power in collecting the information from the cluster members and forward it to the base station. When the separation from the cluster head with the base station is as short as possible, it will consume less energy. As a result, the second goal is to reduce the separation from the cluster head with the base station. It will extend the life of the network. As a result, the third sub objective in terms of distance is f3 maximized as shown in equation 17.
However, in the Firefly optimization, the fitness of the node is determined by the attractiveness factor, which is determined by the distance between the nodes in equation 18 and 19.

Displacement and Mobility
For every iteration, the fireflies which has least brightness move closer to the fireflies which has more brightness, as well as the positions of every firefly are modified. If the newly modified place does not satisfy the scope, i.e. Is -ve or larger than p + 1, the algebraic calculation fails. In this scenario, place is substituted with a number which is random from 1 to p + 1. The preceding methods are repeated in iterative manner till reached the highest number. 10. Compute Relay node ( )∀ , 1 ≤ ≤ + 1 (i.e., path ) use high (fitness ( )).

Firefly algorithm for mobile sink
The original firefly algorithm was created to solve consistent optimization issues which could not be used to solve complex optimization issues. Despite the fact that discrete firefly algorithm has numerous application domains, it has yet to be used to handle the information collection issue in networks. As a result, in this article presents a firefly algorithm for mobile data sender (MDS) to handle the information collection travel issue in networks while minimizing MDS travel length. Furthermore, it is assumed that all sensor network data is equally significant and distinct. This algorithm will boost the effectiveness of many sensor network health monitoring applications.

Explanation Illustration
The explanation for such information collecting travel issue used in this method is an appropriate pattern where in the MDS must reach every sensor node for gathering one's information. Every firefly in the initialization signifies the first alternative to an information gathering travel issue. Every other item for this alternative denotes a node Id, as well as the index denotes the position of the MDS's journey. As an example, a simplistic network with 10 nodes is assumed. Every node is recognized by an identification numbered from 1 to 10. Figure 8 depicts one example of a firefly as well as its way to solve. The MDS begins from the base station and travels sensor node 7 initially, collecting the information, and after those travels to sensor node 4, collecting the information, and after those moves to sensor node 10, and so on until it reaches the base station, in which it updates every one of the gathered information as from sensors for more handling and regulation.

Initialization of the Population
Depend on the number of nodes to still be installed throughout the sensor network as well as the number of fireflies, the original sequence is created at random to use the function which is random. The rand iterative function iterates the starting from 1 to SN, where 'SN' denotes the number of sensors. One such random possible combination denotes a firefly explanation, and many these quantities of random variations have been produced and assumed as the original solution dependent on the number of fireflies. The following is the procedure for initialization of population:

Intensity of Light
Because it depicts the illumination of the firefly, the intensity of light is indeed an attractive feature in the basic firefly algorithm. Even though we understand, as in proposed method, every explanation of firefly includes the iterative sequence of ID of sensors to just be attended. A firefly's intensity (I) is proportional to the average travel path length relative to just the firefly's explanation. The Fi firefly's intensity is calculated by equation (20) as the fitness function. Because the goal is to reduce the length of the data collection tour, the firefly's intensity is calculated as the reciprocal of the average travel path length, as shown in equation (20). That allows a firefly's explanation for a shorter travel path length for having a more intensity of light than another firefly. The firefly's intensity dubbed 'Fi' has been computed using equation (20).
In this case, 'Ii' denotes the Firefly's Intensity 'Fi' under considering, while 'SN' denotes the number of sensors installed in WSN.

Distance
The distance between fireflies in a continuous optimization problem is able to computed directly by using Euclidean distance as well as used for optimization. Furthermore, because the information collecting travel issue is a distinct optimization technique, the Euclidean distance approach will not be used. In this case, the separation from firefly F1 to F2 is measured as the proportion of the number of various edges in between those fireflies as well as the number of sensors installed in the WSN, as calculated in equation 21.
Where dF1,F2 denotes the separation from firefly F1 to F2, NE denotes the average amount of various edges from firefly F1 and F2, and SN denotes the amount of deployed sensors. In this case, Figure 9 depicts the computation of the distance from firefly F1 to F2. It's discovered that edges (6,9), (5,2), and (8, 1) present in Fj are not available in Fi. As a result, NE = 3 and SN = 10, and the distance dF1, F2 = 3/10 = 0.3.

Updating Solution set
The light intensity of every firefly in the explanation set is calculated. The firefly which is less bright is drawn to and then travel to a firefly which is brighter. The mobility of a low bright firefly Fi in the direction of the brighter firefly Fj is performed with an edge-based mobility. For that approach, the edges that are not available in a firefly Fi are calculated, and a unknown edge is chosen at random. The edges in Fi were then moved away from the chosen absent edge, reducing the separation from the firefly F1 to F2. As a result, every other firefly would then make contribution 'k' innovative solutions, where 'k' makes reference to the explanation change index. Firefly will be chosen as the current offspring for iteration, as well as the process repeats till the stopping condition is achieved. Ultimately, the better global firefly acquired provides the best route also for MDS to tour most of the sensors and obtain one's information while travelling the shortest route.

Setup of Simulation
In the proposed method we have been used MATLAB R2018a on a CPU of Intel Core i3 with RAM of 4 GB to implement our MSFLMFLA. Experiments were carried out with layout sizes ranging from 1000 m to 1000 m in both dimensions. 800 sensor nodes and 300 rounds have been taken. The effect of a sensor node's transmission range is also investigated in 150 m. This paper considered two distinct scenarios. The first scenario assumes that the sink node is static and placed in the right corner (scenario-I), and that the cluster head collects their data and forwards it to the sink node based on the answers that provided by FLMFLA. The second scenario (scenario-II) is based on the assumption that the sink node is mobile. MSFLMFLA chooses a bundle of backbone nodes and determines the best route to each of them in order to collect their data. The parameters of the network and parameters of the firefly algorithm used in the simulation are listed in Tables 4 and 5. MSFLMFLA's performance is evaluated by running some existing routing techniques such as EHRDC and LEACH.
MSFLMFLA performance is evaluated and validated using FND (First Node Dead-Network stability), LND (Last Node Dead-Network Lifetime), throughput, total alive nodes in every round, total dead nodes in every round, network throughput, and network remaining energy during each round.

Alive nodes and Dead nodes per round
Figure 10 depicts alive nodes with 0 to 300 sensors and two events in the sensing field. Figure 11 depicts the dead counts of all routing paths in the WSN. If a huge proportion of sN are alive and accessible in the sensor network, a large volume of data can be collected from the targeted region. The graph for such total number of alive nodes for each round is shown in Figure 10. In LEACH and EHR-DC, the first node dies at 215 rounds, FLMFLA at 225 rounds, and MSFLMFLA at 235 rounds. In comparison to FLMFLA, EHRDC, and LEACH,The sN in MSFLMFLA has clearly drained away energy in a relatively equal way, and for even more rounds all the nodes have become alive, and makes the MSFLMFLA more steady. In this scenario, MSFLMFLA outperformed its competitors because node expiration occurs at future rounds in comparison with LEACH, EHRDC, and FLMFLA. As nodes expire prematurely in every round, because of the reported inadequacy of field surveillance, the network might become inadequate. Nodes might also die after just a prolonged period of time following their deployment to improve reliability and stability.

Remaining Energy of the network
A sensor node wastes a massive quantity of energy in wireless communication. As that of the rounds grows, the network's remaining network energy declines, resulting in death of the node. Remaining network energy is depicted in Figure 12. In this scenario, we can see that the remaining energy of MSFLMFLA is always greater than that of FLMFLA, EHRDC, and LEACH for round intervals of 10, 50, 100, 150, 200, and 250. It demonstrates that the proposed method efficiently distributes the WSN's load, tends to result in a more stable region.

Throughput of the Network
Throughput can be defined as over the course of a round sending more packets towards the BS, implying that as more data is obtained out from target area. Figure 13 depicts the throughput of sensing data received by the base station.When compared to FLMFLA, EHRDC and LEACH, MSFLMFLA delivered 5%, 10%, and 12% more packets to BS.

FND,LND and Throughput
When the network connection is established, the goal is to gather as much information as possible out from targeted region, in which the node's life is critical. This is due to the fact that the dying of every node tends to make the network vulnerable to non coverage of certain portions of the targeted region. As a result, the overall system design will perform poorly. Figure 14, Figure 15 and Figure 16 depicts FND, LND and The simulation results provided throughput metrics. In this scenario, MSFLMFLA's FND (Network stability) is protracted by 20%, 12%, and 4% when compared to the LEACH, EHRDC, and FLMFLA protocols, respectively. Similarly, LND (Network Lifetime) is extended by 10%, 6.66%, and 3.333% when compared to LEACH, EHRDC and FLMFLA, respectively.Finally, in comparison to LEACH, EHRDC, and FLMFLA.Throughput is increased by 12%, 10%, and 5%, respectively. The results obtained from simulation show here that MSFLMFLA can meet the application's necessities while having a longer lifetime and stability period.

Conclusion
Sensors have limited energy but must continue to report data via multiple relays, so efficient energy routing is critical to extending WSN life. The suggested methodology enables an MDS to move even within the sensor deployed in the network as well as tour sensors in most efficient manner, lowering path length. In network there by applications in which its preasumed that information across all the sensors is important as equal, The MSFLMFLA decreases the length of the tour for MDS. In terms of alive nodes, dead nodes, throughput, and residual energy, the results of simulation demonstrate that the MSFLMFLA algorithm outperforms the LEACH, EHR-DC, and FLMFLA algorithms.This demonstrates that the proposed algorithm is appropriate across all WSN situations and has a long lifespan. As a result, MSFLMFLA not only increases network life, throughput, and reduces end-to-end delay, but it also increases data received by the sink.

Funding
we confirm that No funding was received for this work.

Conflicts of Interest/Competing interests
We wish to confirm that there are no known conflicts of interest associated with this publication and there has been no significant financial support for this work that could have influenced its outcome.

Availability of Data and material
The data that support the findings of this study are openly available in "MSFLMFLA" and by all the authors name and with the paper refference number and with its doi.

Code Availability
Not applicable.

Authors Contribution
All the work is done by Author 1 and Manuscipt is written by Author 1 under the guidence of Author 2 and Author 3. All listed Authors meet the WPC criteria .We attest that all authors contributed significantly to the creation of this manuscript each having fullfilled criateria as establisted by the WPC.

Ethics approval
As the journal is a member of the Committee on Publication Ethics (COPE) .We confirm that we have given due consideration to the protection of intellectual property accociated with this work and that there are no impediments to publication, including the timing of Publication,with respect to intellectual property .In so doing we confirm that we have followed the regulations of our instituions concerning intellectual property.

Consent to participate
We confirm that the manuscript has been read and approved by all named authors and there are no other persons who satisfied the criteria for authorship but are not listed. We further confirm that the order of authors listed in the manuscript has been approved by all of us

Consent for Publication
Not applicable