Skip to main content
. 2021 Feb 19;21(4):1444. doi: 10.3390/s21041444
Algorithm 1. Resource Allocation Algorithm for GACK Transmission
Input: U
Output: θr*, τr*, ∀r
Initialization: Nθ*← 0, r ← 1
1: for t ← 1 to k
2:    if there is an idle gateway on the timeslot t
3:       Generate θr and compute Nθr
4:       if Nθr >Nθr* then
5:          Nθr*Nθr, θr*θr
6:          τr*(i)(t,t+θr*(i)min(S)), ∀i
7:       end if
8:      Repeats 3-9 until all θr are considered
9:   end if
10:   rr+1
11:   Update U
12:end for