# Opportunistically Exploiting Internet of Things for Wireless Sensor Network Routing in Smart Cities
## 5 Simulation Details and Results
### Simulation Results  
In this section, we discuss the evaluation results of our simulations using the three metrics discussed earlier.  
To restate, IoT devices are not a part of WSN, rather they are external to the WSN, and WSN opportunistically uses them to route its data. Figure 7 shows our main result that with our prototype implementation Sensor nodes energy consumption is reduced almost four folds. WSNOnly means no IoT's are involved in routing data to Sink. With-IoTs means there are IoTs available that move around in WSN environment and the IT Platform uses them opportunistically.  
A more detailed view of energy consumption is depicted in Figure 8. As shown in Figure 8a, with increase in network size when only WSN routing is used, energy consumption is increased in a linear fashion. While with the IT Platform, the energy consumption is increasing much slowly. With bigger networks the gain of using IT Platform is three times larger.  
We designed an experiment to understand the effect of using IoT devices. In this simulation, we kept the network fixed and added IoT devices in the environment. The results are shown in Figure 8b, where less energy is consumed with more IoT devices. This is because using IT Platform, the sensors are able to sleep more and their routing load is lowered. When the number of IoT devices is 30, there is a three times gain in energy conservation. In Figure 8c, it is found that as a result of lower energy consumption, the network lifetime is increased. The WitthioTs line shows that the gain is almost three to four times consistently as network size is increased.  
In Figure 9, we showed results of analyzing the energy usage of sensors over the simulation time. The gradual depletion of energy in sensor nodes can be clearly seen in Figure 9a. Figure 9b shows the sudden death of the whole network in three seconds, while a slow death of network in 20 s is seen in case IoT devices are used. Thus, it gives more margin of action to take appropriate measures. Furthermore, due to the use of IoT devices, the sensors are still able to send data to the Sink when their multihop routing is no longer working due to dead sensor nodes.  
Figure 7: The energy consumption of WSN when integration platform (IT) Platform is used.  
From the perspective of Reception rate, as depicted by Figure 10, it is slightly increased and more stable by the use of IT Platform. We think that it is due to our careful selection of IoTdevices and sensor  
Figure 8: Energy consumption is decreased using IT Platform. (**a**) Larger the network, more energy is saved; (**b**) With increase in no. of IoTs, Sensor nodes consume less energy; (**c**) Consistent increase in Network lifetime with increase in network size.  
Figure 9: (**a**) Network lasts four times longer by using IT Platform that uses IoT devices. (**b**) [Left] All nodes die instantly, [Right] Nodes die in slow fashion using IT Platform.  
nodes using RSSI values. Moreover, due to the use of frames and slots for communication, there is less chance of interference while communicating. This packet loss is due to near realistic modeling of Radio and wireless channel of Castalia.