# Energy Aware and Quality of Service Routing Mechanism for Hybrid Internet of Things Network
## 5 Performance Evaluation  
In this section, we evaluate the performance of the proposed algorithm. First, we assess its energy performance in terms of the number of nodes that can be spared and switched off. Next, we evaluate the maximum path length taken from each of the submitted flow sets (with the assumption that the end-to-end packet transmission delay is proportional to the number of hops in a path). The maximum route length considered is the maximum path length taken by a flow from the set of flows generated. Further, the proposed algorithm is compared with two other algorithms for mesh networks. Shortest path algorithm: An algorithm that routes flows (video streams) over the shortest available path between the source and the gateway. The algorithm is defined for a single flow in [22], but it is extended to consider a set of flows in this paper. Aggregation algorithm: A routing mechanism that aggregates flows over a minimum number of nodes [20]. Both the aggregation algorithm and shortest path algorithm take into account inter-flow and intra-flow interference. Proposed Algorithm: An algorithm that allows flows to be routed over a limited number of nodes without allowing each flow to take a path length longer than a maximum desired value (\(\mathcal{P}m\)). This limits the path taken by each flow and therefore benefits delay-sensitive applications such as video streaming. We have chosen this path length (\(\mathcal{P}m\)) to be the diameter of the network, i.e., the length of the shortest path between the farthest node and gateway in the topology. This paper considered a 6 \(\times\) 6 grid network consisting of 36 nodes. The distance between neighboring nodes was 250 m. The nodes had a transmission range of 250 m and an interference range of 500 m. We considered the grid network with one gateway located at one of the corners of the grid. The shortest path between the farthest node and the gateway was 10 nodes (\(\mathcal{P}m=10\)). We generated a set of flows from 1 to 10 (1, 2 sets, 3 sets of flows, etc. ), and each flow was generated with a randomly selected source, and the bandwidth requirement of each flow was set to 0.5 Mbps. We considered constant capacity between wireless links and varying values of capacities for the simulations (C = 5 Mbps, C = 10 Mbps, C = 15 Mbps). We also considered an ideal wireless link. We used MATLAB for generating and calculating parameters from the network and used CPLEX studio [26] to solve the formulated optimization problem. All computations were performed on a computer equipped with 2.8 GHz Intel Core i7 and 16 GB RAM. The comparison of the proposed algorithms in terms of energy consumption against the shortest path algorithm and the aggregation algorithm is presented in Figures 2-4 for varying values of wireless channel capacitates (C = 5 Mbps, C = 10 Mbps, C = 15 Mbps). Figure 3: The percentage of spared nodes (nodes that can be switched off) variation according to the number of set of flows generated for wireless capacity equal to C = 10 Mbps. Figure 2: The percentage of spared nodes (nodes that can be switched off) variation according to the number of set of flows generated for wireless capacity equal to C = 5 Mbps. The comparison of the proposed algorithm in terms of maximum route length against the shortest path algorithm and the aggregation algorithm is presented in Figures 5-7 for varying values of wireless channel capacitates (C = 5 Mbps, C = 10 Mbps, C = 15 Mbps). Figure 4: The percentage of spared nodes variation according to the number of set of flows generated for wireless capacity equal to C = 15 Mbps. Figure 5: The maximum path length variation according to the number of set of flows generated for wireless capacity equal to C = 5 Mbps. As can be seen from Figures 2-4, the proposed algorithm and the aggregation algorithm greatly outperform the shortest path algorithm in terms of energy saving, while the aggregation algorithm performs slightly higher than the proposed algorithm.