# Distributed Reliable and Efficient Transmission Task Assignment for WSNs
## 5 Reliable and Efficient Task Allocation Algorithm for WSNs
### Distributed Task Assignment
#### 5.2.2 Distributed Reliable and Efficient Task Allocation in Planar Topology
Secondly, each random variable is directly sampled, and simulation experiments and calculations are performed according to the task assignment strategy, and the optimal strategy of task assignment is obtained. Finally, statistical analysis is performed on the test results to obtain the average value of each evaluation index of the task assignment strategy. #### 6.2.2 Simulation Results and Analysis

The performance evaluation indicators in this research include the energy consumption of task assignment, the delay of successful allocation within the deadline, and the success rate of the task assignment. The success rate of task assignment represents the ratio of the number of tasks successfully assigned to the total number of tasks to be assigned in a simulation cycle, while the other two indicators are calculated according to Equations (5), (19), and (20). For comparison purposes, the simulation of centralized task allocation in the same network environment is conducted and represented by TRETA. \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Value** \\ \hline Bandwidth & 250 kbps \\ \(e_{dec}\) & 50 nJ/b \\ \(\epsilon_{amp}\) & 100 pJ/b/m\({}^{2}\) \\ Maximum transmission range of the node & 50 m \\ The initial energy of the node & 2 kJ \\ \(e_{j}\) & 0.05 nJ/b \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Main simulation parameters. \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Value** \\ \hline Transmission direction & Upstream \\ Task interval & 10 s \\ Task duration & [100 s, 300 s] \\ Target reliability & 90\% \\ Packet size & 500 bytes \\ Number of packets per task & [100, 1000] \\ Packet loss rate & 0–10\% \\ Topology change rate & 0–10\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Task parameters to be assigned. (A) Energy Consumption for Task Assignment

It is shown in Figure 6, the comparison of energy consumption among the three allocation strategies is proposed: the centralized task allocation TRETA and the distributed task assignment strategies TRETA-Cluster and TRETA-Multi-Sink. As seen in this figure, the energy consumption increases with the increase of node size. Among them, the energy consumption of TRETA is highest, since the global state of the network is converged to a single sink through long-distance multi-hop in large-scale WSNs. On the other hand, the energy consumption of TRETA-Multi-Sink is relatively small, as it is based on the multi-sink being able to collect the local state and merge it into the global view by multicasting. TRETA-Cluster is performed in two stages. When the task cannot meet the target reliability, if the reselected node in the cluster can reach the stage target reliability, the sink does not need to re-allocate the task, so the energy consumption of TRETA-Cluster is less than both TRETA and TRETA-Multi-Sink. (B) Delay of Successful Assignment within the Deadline

The delay of task assignment in the size of the network from 50 to 300 nodes is analyzed. As can be seen in Figure 7, TRETA has a substantial delay. Due to long-distance multi-hop aggregation to a single sink, achieving the global state of the cluster topology causes considerable delays in large-scale WSNs. (C) The Success Rate of Task Assignment

The success rate of task assignments under different task arrival rates is analyzed. Such a rate represents the number of tasks waiting to be allocated per second, and the success rate of the task allocation represents the ratio between the number of successfully assigned tasks in one simulation cycle and the total number of tasks to be assigned. As seen in Figure 8, the success rate of the task allocation decreases as the task arrival rate increases, and the rise in the task arrival rate leads to the

Figure 6: Distributed task assignment energy consumption. Figure 7: Task allocation delay. increase in link conflict in the network.