Skip to main content
. 2021 Mar 25;21(7):2308. doi: 10.3390/s21072308
Algorithm 1 Super Arm Exploration
  • 1:

    Initialize: Total number of trials K

  • 2:

    for k=1:K

  • 3:

       Solve problem (16) for a given Bn[ahead](k),

  • 4: 

       CU calculates Bn[total](k) as per (2), R(Bn[ahead](k)) as per (17), and R(Ak[set]) as per (18).

  • 5: 

          If k=1

  • 6: 

                then                   Bn[ahead](k+1)=Bn[ahead](k)+ΔE,nLb.

  • 7: 

          else if the super arm reward of all the RRHs                   R(Ak[set])R(Ak1[set]),

  • 8: 

                then                   Bn[ahead](k+1)=Bn[ahead](k1), nLb,

  • 9: 

          else if the individual reward for the n-th RRH, nN                   R(Bn[ahead](k))R(Bn[ahead](k1))                                     and                   Bn[ahead](k)EJ,

  • 10: 

                then    Bn[ahead](k+1)=Bn[ahead](k)+ΔE,

  • 11: 

          else                   Bn[ahead](k+1)=Bn[ahead](k).

  • 12: 

          end If

  • 13: 

       Calculate the total energy cost of all the RRHs, β[k,f,t] as                   β[k,f,t]=nLbBn[total](k).

  • 14: 

       Calculate the energy package index p at all RRHs from                   p=Bn[ahead](k)ΔE,nLb.

  • 15: 

       Update                   μn,p[k,f,t]=R(Bn[ahead](k)),pJ,nLb;

  • 16: 

       Update                   Ak+1[set]={B1[ahead](k+1),,BN[ahead](k+1)};

  • 17: 

    end for

  • 18: 

          Estimated mean reward for K trials                                     μ^n,p[f,t]=k=1Kμn,p[k,f,t]K,pJ,nLb.