Skip to main content
. 2019 Apr 13;19(8):1779. doi: 10.3390/s19081779
Algorithm 1: Dynamic Communication Efficiency Optimization
Input: Set of received information blocks B
   Set of battery consumptions BATconi
   Estimated costs Qconsump and Qobten (hardware dependent)
   Circular buffer BUFF with Nhist last GPATmax evaluations
   Circular buffer ENT with Nhist last H(B)¯ evaluations
Output: Endpoint configuration
Calculate Qinfo for the set of received information blocks B, Qinfo=CI[B]
Calculate Qlink using the set of battery consumptions BATconi, Qlink=CE[BATconi]
Calculate the mean entropy of the information blocks, H(B)¯
Obtain the mean communication efficiency η¯=η(Qinfo,Qlink, Qobten,Qconsump)
ifη¯< ηthreshold or endpoint is not configured then
   CONFselected=ALWAYSON
   for every server pattern PAT{predefined, Bernoulli, Poisson} do
      for every cost Qi {Qinfo, Qlink, Qobten, Qconsump} do
         Calculate pi= p( Qi | server=PAT ) using the proposed mathematical model
         Obtain pPAT, i= p(server=PAT  | Qi) using Bayes theorem
      end for
      Calculate GPATtotal =iG(pPAT, i) 
   end for
   Calculate GPATmax=max {GPATtotal,   being GPATtotal> Gthreshold} 
   Insert GPATmax in BUFF
   if Gpredefinedmax is contained in BUFF at least Neval times then
       if server allows dynamic scheduling then
            CONFselected=DYNAMIC
       else
            CONFselected=EXPONENTIAL
       end if
   else if GBernoullimax is contained in BUFF at least Neval times then
       Estimate pber using the set of received information blocks B
       if pber<0,5 then
          CONFselected=FIXED
       end if
   else
       if GPoissonmax is contained in BUFF at least Neval times then
          CONFselected=EXPONENTIAL
       end if
   end if
   Insert H(B)¯ in ENT
   if server allows negotiation then
       if H(B)¯ [0,k2] in ENT at least Neval times then
          COMPRESSION=RLE
       else if H(B)¯ [k2,3k2] in ENT at least Neval times then
          COMPRESSION=HUFFMAN
       else
          if H(B)¯ [3k2,k] in ENT at least Neval times then
             COMPRESSION=RAW
          end if
      end if
   end if
end if