## 3 Methods
### Protocol Definition  
In order to overcome the drawbacks of network failures, by which a connected path from source to destination is never available, we proposed a new routing protocol called Scheduling-PROPHET. Calculating delivery predictability by the encountering frequency is the key point of the Scheduling-PROPHET routing protocol. According to the delivery predictability, we can deduce whether a message should be transmitted or removed from the ranked list of the nodes' carried messages. In addition, Scheduling-PROPHET uses acknowledgments to notify all nodes that messages have been delivered to. In the remainder of this sub-section, we are going to explain the delivery predictability and transmitting management with scheduling in detail. We use the incremental averaging method to make the change of delivery predictability smoother. The calculation model for delivery predictability is given as follows. We establish a probabilistic value called delivery predictability, noted as \(P(A,B)\in[0,1]\). It refers to the probability that node \(A\) encounters node \(B\) in the network. To each node, it is required to preserve a table to store information about delivery predictability. When node \(A\) encounters node \(B\), they will exchange their table information to determine whether to transfer messages or not. We set an initial value called \(P_{init}\in(0,1]\), which is an initialization constant for each node. When node \(A\) encounters node \(B\), the delivery predictability is calculated by Equation (1), where \(\beta\in(0.5,1)\). \[P(A,B)_{new}=P(A,B)_{old}+[1-P(A,B)_{old}]*\beta \tag{1}\]  
After that, the delivery predictabilities of all nodes will be recalculated according to Equation (2), where \(N\) denotes the set of all nodes. \[P(i,j)=\frac{P(i,j)_{old}}{2},\ (i,j\in N) \tag{2}\]  
When node \(A\) encounters node \(B\) for the first time, the delivery predictability is calculated by Equation (3). \[P(A,B)_{new}=P_{init} \tag{3}\]  
Therefore, \(P\) is directly related to the frequency by which they meet each other. According to Equation (2), if two nodes cannot encounter each other, the value of \(P\) will become much lower. In the worst case, forwarding messages to intermediate nodes that rarely encounter the destination node will cause delivery failure. Therefore, we try to calculate the complete delivery predictability from the current node to the destination node. The complete delivery predictability is calculated by Equation (4), where \(S(i,i+1,\ldots,D)\) denotes the total predictability from the current node \(i\) to the destination node \(D\). \[S(i,i+1,\ldots,D)=\prod_{x=i}^{D-1}P(x,x+1). \tag{4}\]  
From the source node \(A\) to the destination node \(B\), we can get a series of values for \(S(i,i+1,\ldots,D)\) by Equation (4), and then we can choose an appropriate path with the highest value for \(S(i,i+1,\ldots,D)\). In this way, we are able to choose the most efficient transmission path, to improve the transmission efficiency and reduce the message drop rate. Figure 2 shows an example illustrating the working process of our routing protocol. In this example, each node holds the delivery predictabilities. There are eight connected paths between node \(A\) (source node) and node \(E\) (destination node), and the list of paths is as follows:  
1. \(S(ABE)=P(A,B)*P(B,E)=0.3*0.2=0.06\)
2. \(S(ACE)=P(A,C)*P(C,E)=0.15*0.7=0.105\)
3. \(S(ADE)=P(A,D)*P(D,E)=0.25*0.2=0.05\)
4. \(S(ABCE)=P(A,B)*P(B,C)*P(C,E)=0.3*0.5*0.7=0.105\)
5. \(S(ABDE)=P(A,B)*P(B,D)*P(D,E)=0.3*0.6*0.2=0.036\)
6. \(S(ACDE)=P(A,C)*P(C,D)*P(D,E)=0.15*0.5*0.2=0.015\)
7. \(S(ADBE)=P(A,D)*P(D,B)*P(B,E)=0.25*0.6*0.2=0.03\)
8. \(S(ABCDE)=P(A,B)*P(B,C)*P(C,D)*P(D,E)=0.3*0.5*0.5*0.2=0.015\)  
We can see that the path \(ACE\) is an optimal one because of its high predictability (\(S(ACE)=0.105\)). Thus, the source node \(A\) will transfer messages to node \(C\) according to the protocol.