Skip to main content
. 2018 Mar 1;18(3):751. doi: 10.3390/s18030751
Algorithm 1. the algorithm of obtaining available energy and obtaining the probability of marking and logging
INPUT: the observed solar radiation power
// di(i0) is the i th day, ti,j(0j23) is the j th hour of the i th day,
// Fi,j is the observed solar radiation power at ti,j; Einitial is the initial energy of the node battery,
// Emax is the max electricity in battery.
OUTPUT: the available energy
// Ui,j is the available energy at ti,j; ri,j is the remaining battery level.
(1) get available energy stage
1: Find a day with the minimum total observed solar radiation power in the whole day using the formula sumi=023Fi,jdt. In addition, define this day as d0.
2: If (i=0)
    t0,n is the time to start the sunshine.
    Get e using the formula e=Einitialn+1.
    Get t0,𝕙 is the highest observed solar radiation time of the day.
    If (0jn)
      U0,0=U0,1==U0,n=e;
      r0,j=r0,j1+F0,je;}
    If (n+2j𝕙)
      U0,j=F0,j;
      r0,j=r0,n;
    If (𝕙+1j23)
      U0,13==U0,23=e;
      r0,j=r0,j1+F0,je;
    If (ri,jEmax)
      ri,j=Emax;
   End if
End if
3: If (i1)
    Switch (j)
   Case1:
     If (0jn)
          Ui,0=Ui,1==Ui,n=e;
          ri,j=ri,j1+Fi,je;
     Break;
      Case2:
     If (j=n+1)
          Ui,n+1=U0,n+1;
     Break;
    Case3:
     If (n+2j<𝕙)
          Ui,j=Fi,j1;
          ri,j=ri,j1+Fi,jUi,j;
          If (ri,jEmax)
          ri,j=Emax;
      Break;
    Case4:
     If (𝕙j𝕙+2)
          Ui,j=0.6Fi,j1;
          ri,j=ri,j1+Fi,jUi,j;
          If (ri,jEmax)
           ri,j=Emax;
     Break;
    Default:
     If (𝕙+2<j23)
           Ui,0=Ui,1==Ui,n=e;
           ri,j=ri,j1+Fi,je;
           If (ri,jEmax)
            ri,j=Emax;
     Break;
End if
(2) get the probability of marking stage
4: For each ti,j in the set {ti,0,ti,1,,ti,23} Do
    Get the probability of marking αi,j using Equation (41);
End for
(3) get the probability of logging stage
5: For each ti,j in the set {ti,0,ti,1,,ti,23} Do
    Get the probability of logging βi,j using Equation (50);
End for