## 6 Implementation, Results and Discussion
Therefore the optimization technique is going to find out the best possible route among several ones by considering the abovementioned criteria, without having to explore the entire graph of all the feasible connections. Before building the objective function and performing the optimization, it is important to understand the main sources of energy loss in operation of wireless sensor networks in order to make more effective the optimization process itself. Basically the two main sources of power consumption are represented by communication or computation tasks [28]: communication involves essentially the use of transceivers while computation is related with processing aspects due to the chosen protocol and data compression techniques. A proper Medium Access Control (MAC) protocol should be able to balance between computation and communication costs, trying to solve all the typical problems that cause energy waste in WSNs [33], namely: collision, overhearing, idle listening, and control packet overhead (\"MAC protocol's overhead\": frame headers, signaling, _etc._). To validate the effectiveness and the reliability of the proposed technique for optimizing a wireless sensor network in a multi-hop routing scheme, the sample network of \(N=100\) nodes shown in Figure 3 has been generated. Figure 3: The resulting clustering architecture for a sample network of 100 nodes. We perform a series of \(N_{s}=10\) independent simulations using the same random sequence of senders in order to evaluate and compare the performances of the selected metrics in terms of energy savings and enhancement of the connectivity of the network. For each sender of the sequence the GSO performs \(N_{i}=100\) iterations in search of the best possible path accordingly with the adopted criteria. Being 10 the number of individuals in the considered population, the total number of function calls is limited to 1,000 per each GSO run. For each sender, an optimal route is defined by a single run of GSO and the network status and power level of each node are updated consequently. The best route is chosen by GSO according to fitness function which implements the set of rules presented in Section 5 and in [4]. Figure 3 shows the connectivity of the network and the energy-efficient distributed clustering scheme proposed by the optimization algorithm. Figure 4 describes the depletion of the nodes' batteries and is obtained as a mean of the values of each simulation performed using the same criterion. The power level of the sensors is updated after each round of the simulation and, as expected, the first node to exhaust their power are some of those positioned close to the base station. Figure 3: _Cont._  
Thus, sensor networks present significant system challenges involving the use of large numbers of resource-constrained nodes operating essentially unattended and exposed to potential local communication failures. It is difficult to reach an optimal solution which takes into account simultaneously different issues such as the reliable extraction of data from different distributed sensor nodes, accurate data reporting and efficient power management to extend sensor network lifetime. In particular, the obtained behavior reflects the ability of the optimization technique in optimizing the routes from several nodes to a mobile base station as the novel architecture implemented in the EU-FP7 SkyMedia Project [20], under an energy saving point of view, in order to preserve the network functionality and to avoid premature death of the most solicited nodes. The use of such advanced bio-inspired computing techniques appears to be useful in this context especially in optimizing the network energy distribution.