| Algorithm 1. Search the optimal transmission radius set algorithm. |
| INPUT: , R,,,, . |
| OUTPUT: , |
| 1: set |
| 2: |
| 3: ; // Initialize optimized maximum energy consumption value |
| 4: For Do |
| 5: Calculate energy consumption of this node using Equation (34); // Calculate energy consumption at different distance from the sink with the current |
| 6: //The maximum energy consumption of the current optimal transmission radius set |
| 7: ; |
| 8: ; |
| 9: For Do |
| 10: |
| 11: For
to
Do //Calculate energy consumption under the current transmission radius |
| 12: Calculate energy consumption of this node using Equation (34) |
| 13: ; |
| 14: = ; //The average energy consumption after j rotations |
| 15: End for |
| 16: = // indicates the maximum energy consumption of transmission radius set |
| 17: IF < Then //Maximum energy consumption can be reduced after adding |
| 18: |
| 19: Else |
| 20: Exit //Stop the search of the current transmission radius set |
| 21: End if |
| 22: ; |
| 23: End For |
| 24: If
Then //If the maximum energy consumption of the current transmission set is lower, then record it |
| 25: |
| 26: End if |
| 27: |
| 28: End for |
| 29: OUTPUT , |