| Algorithm 2. Energy conserving and transmission radius adaptive protocol. |
| INPUT: ,,, , R,, |
| OUTPUT: the new maximum energy consumption |
| 1: Set |
| 2: Calculate the available energy at time t of one day using Equations (31) and (32); |
| 3: Calculate the optimal transmission radius set and its maximum energy consumption using Algorithm 1; |
| 4: Calculate the maximum energy consumption using Equation (33); |
| 5: For Do |
| 6: If
Then // Adjusting the transmission radius with transmission radius set |
| 7: For Do |
| 8: ; |
| 9: For Do |
| 10: Make send data with the transmission radius ; |
| 11: End for |
| 12: End for |
| 13: Else //Make full use of solar energy and reduce delay |
| 14: While // Find the longest radius that is less than the available energy |
| 15: ; |
| 16: Calculate using Equation (33) |
| 17: Until |
| 18: For
Do //Use a bigger transmission radius to improve energy utilization |
| 19: Make send data with the new transmission radius ; |
| 20: End for |
| 21: End if |
| 22: End for |
| 23: If Then |
| 24: Output the new maximum energy consumption |
| 25: End If |
| 26: End |