Skip to main content
. 2018 Aug 31;18(9):2885. doi: 10.3390/s18092885
Algorithm 2. Energy conserving and transmission radius adaptive protocol.
INPUT: t, Δy, f, ζ, R,r, 𝕖
OUTPUT: the new maximum energy consumption Emaxo
 1: Set 𝔨=1;
 2: Calculate the available energy at time t of one day Aj using Equations (31) and (32);
 3: Calculate the optimal transmission radius set 𝓇 ={r+𝓍o,r𝓍o,  r+2𝓍o,r2𝓍o, ,r+S𝓀𝓍o,rS𝓀𝓍o } and its maximum energy consumption Emaxo using Algorithm 1;
 4: Calculate the maximum energy consumption maxr using Equation (33);
 5: For 𝑡=0 to 23 Do
 6: If At==𝕖 Then
     // Adjusting the transmission radius with transmission radius set 𝓇
 7: For p=1 to S𝓀 Do
 8: rp=r0+p×𝓍o;
 9: For d>rp&&d<R Do
 10: Make d send data with the transmission radius rq;
 11: End for
 12: End for
 13: Else   //Make full use of solar energy and reduce delay
 14: While r<R   // Find the longest radius that is less than the available energy
 15: rnew=r+Δy×k;
 16: Calculate maxrnew using Equation (33)
 17: Until maxrnew<Aj
 18: For d>rnew&&d<R Do
    //Use a bigger transmission radius to improve energy utilization
 19: Make d send data with the new transmission radius rnew;
 20: End for
 21: End if
 22: End for
 23: If Emaxo<maxr Then
 24: Output the new maximum energy consumption Emaxo
 25: End If
 26: End