# Fuzzy Logic and Bio-Inspired Firefly Algorithm Based Routing Scheme in Intrabody Nanonetworks
## 3 Fuzzy Logic and Bio-Inspired Firefly Algorithm Based Routing Scheme
### Bio-Inspired Firefly Algorithm Based NBSs Selection
The average end-to-end delay is compared for different request rate intervals and increasing NBSs density to provide meaningful insights into our proposed work Figure 12.

Figure 12 clearly shows that our proposed scheme experiences the lowest average end-to-end delay at all intervals with NBSs density of 100 and 200 in a cluster. Our proposed scheme of selecting correlated regions and an optimal number of NBSs avoids the transmission of redundant data. Therefore, a lower number of packets awaits in the queue for their turn in the transmission, which ultimately reduces the average end-to-end delay experienced by a packet. Further, NBSs fitness value also considers the distance of NBSs from nanorouter for reducing packet forwarding rate. Avoiding redundant data transmission and controlling packet forwarding rate results in low average end-to-end delay even for increased nanosensor density. While in the flooding scheme, the number of packet transmission and packet forwarding is higher, that significantly increases the average end-to-end delay for both densities of NBSs. #### 4.1.5 Packet Delivery Ratio

The successful reception of the maximum number of packets leads to increased packet delivery ratio. The packet delivery ratio is assessed with respect to different request rate intervals to highlight the impact of request rate intervals on the packet delivery ratio. Selecting correlated regions and NBSs also improve the packet delivery ratio, as shown in Figure 13. When the number of packets generated by NBSs are controlled, it also reduces congestion and packet drop ratio. Therefore, our proposed scheme achieves a better packet delivery ratio as compared to the flooding scheme. In the flooding scheme, all the NBSs generate response messages at fixed intervals that increase the rate of packets flowing in the network. Due to the smaller range of NBSs, packets are also forwarded at a higher rate. The higher packet transmission and packet forwarding rate in the flooding scheme, consequently result in lower packet delivery ratio for both densities of NBSs. Figure 11: Total remaining energy in the network comparison of proposed scheme with flooding scheme and different scenarios (A and B) with respect to increasing request rate interval and NBSs density of 100 and 200. (**a**) Total remaining energy in the network with respect to increasing request rate interval and NBSs density of 100. (**b**) Total remaining energy in the network with respect to increasing request rate interval and NBSs density of 200. ## 5 Conclusions

In this work, a novel energy-efficient routing protocol is proposed that explicitly considers the constraints of NBSs in providing continuous healthcare, diagnostics and treatments. In our presented work, we have proposed the FLBDS and bio-inspired firefly algorithm for deciding on the selection of correlated regions and NBSs. The proposed routing scheme devises a new scheme that exchanges the burden of generating periodic response among all the members of IBNNs. Furthermore, our proposed scheme also prevents redundant data transmission and increases the transmission of crucial information. The proposed FLBDS ensures the selection of only those correlated regions that have valuable information and enough residual energy resources to handle the data communication load. While the selection of NBSs based on our new fitness function permits only those NBSs participation in data reporting that have maximum residual energy and have already transmitted crucial information in the last interval. Simulation results validate that the proposed scheme outperforms flooding scheme and the diverse scenarios opted for comparison and offer better residual energy, network lifetime, average end-to-end delay and packet delivery ratio. From the results, we conclude that our proposed scheme has a higher potential for realizing energy-efficient routing in IBNNs for more realistic healthcare applications.