|
Algorithm 2: Predict the remaining lifetime of the network |
Procedure: Find network lifetime
Input: (Number of nodes), , (the set of all nodes’ remaining battery);
Output: recording the lifetime of each node in ;
For do
| Regard node as relay , and get remaining energy of all nodes ();
| For = 1, 2, …, ,
do
| | Calculate the transmission power of node j ();
| | ;
| End
| Network lifetime computation: ;
End
Return L;
|