# Distributed Reliable and Efficient Transmission Task Assignment for WSNs
## 3 Description of Reliable and Efficient Task Allocation in WSNs
### Constraints of Task Reliability and Deadline
#### 3.2.2 Task Reliability Constraint  
As is known, a WSN consists of a large number of randomly distributed sensor nodes. Performing different tasks in the same network will also show different task reliability due to factors such as network traffic and transmission path; thus, a scheme that matches the task assignment of WSNs with task reliability requirements becomes necessary. Task assignment needs to satisfy Equation (7):  
\[R_{WSN}\geq R_{s} \tag{7}\]  
where \(R_{WSN}\) represents the transmission reliability of the current WSN, whose value can be obtained from the evaluation model of reliable transmission given in Equations (8) or (10). Also, \(R_{s}\) represents a threshold for the application of WSN transmission reliability. Reliability is an important indicator to measure the QoS of WSNs. It has been well studied in the past and is mainly regulated by the successful delivery rate of the link packets. Users are more concerned with the quality of the transmission of a task than the quality of the link in many applications [16]. Since a task is contained by many packets, the user is concerned whether the end-to-end event is successfully perceived rather than the successful delivery rate of the individual node's data packets. Therefore, it is necessary to measure the reliability of WSNs from the perspective of transmission and how the tasks in the network are utilized based on the analysis of the granularity. For two typical topologies in WSNs, mesh (planar) and cluster-based (hierarchical), the cognitive data transmission process of these conventional topologies is analyzed. A task reliability evaluation model is then established based on the transmission path. (A) Clustered Topology  
Clustered topology is widely used in a variety of applications due to its higher energy efficiency and scalability. The heads of different clusters compose the backbone layer of WSNs. When evaluating a transmission task, it is supposed there are \(L\) task-related clusters in the sensing area. The reliability of clustered WSNs at time \(t\) is:  
\[ClusterR_{s_{i},sink}(t,i)=\prod_{c=1}^{L}R_{A}^{c}(t,i)\times R_{T}^{c}(t,i) \tag{8}\]  
where \(R_{A}^{c}(t,i)\) refers to the reliability of the \(i\)-th transmission performed by cluster \(c\). In most clustered WSNs, a cluster is designed with one cluster head, and the transmission between cluster head and members is single-hop [17]. Since the packet delivery rate is within one hop in a cluster, the error between the average and the actual value is smaller. Therefore, \(R_{A}^{c}\left(t,i\right)\) can be modeled by a k-out-of-n system under the multisource environment. Let \(R_{T}^{c}\left(t,i\right)\) represent the reliability of the head of cluster \(c\), which successfully sends the collected data of \(i\)-th transmission to sink at time \(t\). This stage is considered successful as long as there is at least one path whose packet delivery rate is higher than the transmission threshold. Thus, the head of cluster \(c\) which successfully sends the collected data of the \(i\)-th transmission to sink at time \(t\) can be modeled by a parallel system. (B) Mesh Topology  
In a mesh WSN, there are multiple source nodes randomly located in the perceived area. The sink is the destination in the uplink transmission, as multiple source nodes collect data packets independently yet transmit them to the sink via intermediate nodes. The transmission reliability \(MeshR_{s_{i},sink}(t,i)\) in mesh WSN is shown in Equation (9), where \(K\) is the number of source nodes, and \(R_{s_{i},sink}(t,i)\) represents the reliability of the transmission task from the source \(s_{i}\) to the sink in the network at time \(t\). \[MeshR_{s_{i},sink}(t,i)=\sum_{s_{i}=1}^{K}R_{s_{i},sink}(t,i) \tag{9}\]  
Let \(l\) represent the number of paths in the minimal path sets from the source \(s_{i}\) to sink.