# Efficient Resource Scheduling for Multipath Retransmission over Industrial WSAN Systems
## 4 The Proposed Scheduling
### CEM-RM Algorithm
The maximum number of CCA units is 5 in this paper. Multiple source nodes will contend this slot by randomly selecting a CCA unit to detect the state of a channel. Once a source node detects that the channel is free, it sends a preamble signal to occupy the current slot during the remaining time TsTxOffset. Another source node will detect the preamble; then, it stops to perform CCA and to give up using the current slot. The radio chip may switch the state and channel in TsRxTx, which is less than 192 \(\upmu\)s. We assume that there are \(K\) transmissions with different source nodes and the same destination node. The probability of successful contention is \((K/5)\cdot\sum_{j=0}^{4}(j/5)^{K-1},K\geq 0\) and enough to guarantee the reliability of the flow transmission, since the contention at CES occurs only when the DL-ACK is lost on the previous link. The use of CES is to decrease abundant slot allocation and to increase slot use, which also results in the increase of schedulable ratios. With the use of the above three approaches, we designed the slot and channel allocation to avoid node interference. The following two situations should be solved by the above approaches when the allocation to a transmission \(x^{k_{1}}(s_{\alpha},d_{\alpha})\) meets the already allocated transmission \(x^{k_{2}}(s_{\beta},d_{\beta})\) in the same slot. (1) According to constraints expressed by Equations (1)-(3), two different transmissions (\(\alpha\
eq\beta\)) in a flow (\(k_{1}=k_{2}\)) should be allocated for different slots if the source node of a transmission is the  
Figure 5: The structure of a CE (clear channel assessment-embedded) slot for the transmitting node. same as one of the nodes in another transmission. However, if \(d_{\alpha}=d_{\beta}\) and two transmissions are allocated for the same slot exactly, those transmissions can use the same channel and the slot is changed into a CES. With the assumption of \(\alpha>\beta\), the condition can be expressed as follows:  
\[\text{if}\quad s_{\beta}\in\{s_{\alpha},d_{\alpha}\}\lor s_{\alpha} \in\{s_{\beta},d_{\beta}\}\quad\text{then}\] \[\quad(t_{\alpha}\
eq t_{\beta})=1\] \[\text{else if}\quad d_{\alpha}\
eq d_{\beta}\wedge e(\beta, \alpha)\
otin E_{k_{1}}\quad\text{then}\] \[\quad((t_{\alpha}=t_{\beta})\wedge(c_{\alpha}=c_{\beta})\wedge( \text{the resource is CES}))=1\] \[\text{else}\quad((t_{\alpha}\
eq t_{\beta})\vee(c_{\alpha}\
eq c _{\beta}))=1\]  
(2) Accordingly, two transmissions in different flows \((k_{1}\
eq k_{2})\) also should be allocated for different slots if the source node of a transmission is the same as one of the nodes in another transmission. Also, if \(d_{\alpha}=d_{\beta}\
eq sk\), CES cannot be used for the transmissions in different flows. However, if \(d_{\alpha}=d_{\beta}=sk\), we can change \(d_{\alpha}\) to one of the other available sink nodes. In this scenario, the above two transmissions can be allocated at the same slot with different channels. With the assumption of \(p_{k_{1}}>p_{k_{2}}\), \(q\) represents all integers within \([0,p_{k_{1}}/p_{k_{2}})\).