Skip to main content
. 2015 Mar 26;15(4):7434–7453. doi: 10.3390/s150407434
Algorithm 1 Pseudo-code of the proposed algorithm
c = 0;
 for k = 1; k < I; k++
while (c++<cMAX)
  Perform data transmission and record βk
end
if (k == 1)
  ji(1/tj)=g(βk)
  λi=RateUpdate(ji(1/tj))
else if (|βkβlast|<βTHR)
  // Do not change the transmission rate
else if (βk>βlast)
  ji(1/λj)=g(βk)
  Obtain new nodes’ traffic:
  lchange(1/tl)=ji(1/λj)Δ*ji(1/tj)
  λi=RateUpdate(ji(1/tj)+lchange(1/tl))
else if (βk<βlast)
  lcurrent(1/λj)=g(βk)
  Obtain the current traffic:
  lcurrent(1/tl)=lcurrent(1/λj)/Δ*
  λi=RateUpdate(lcurrent(1/tl))
end
 c = 0
end
function λi=RateUpdate(Traffic)
βlast=β*=h(Traffic)
Δ*=Δ*(β*,Traffic) (using Equation (11))
λi=ti/Δ*
end