Skip to main content
. 2016 Aug 29;16(9):1376. doi: 10.3390/s16091376
Algorithm 1 StealRM.
Require: the flow set F
Ensure: the scheduling results sa and ra
 1: the schedulable transmission set R{τi1*,τi1,τi1|fiF};
 2: for t[1,T]do
 3:  RR;
 4:  sort R according to the decreasing order of priorities;
 5:  for each a from 1 to |R| do
 6:   iF(τa)
 7:   if χi==H and τaΓiΓi then
 8:    Yh[0,TTi(H))(Yt+Ti(H)×hHYt+Ti(H)×hHL)-{τig*};
 9:   else if χi==H and τaΓi* then
10:    Y(h[0,TTi(L))Yt+Ti(L)×hL)(h[0,TTi(H))(Yt+Ti(H)×hHYt+Ti(H)×hHL))-{τig,τig};
11:   else
12:    Y(h[0,TTi(L))Yt+Ti(L)×hL)(h[0,TTi(H))Yt+Ti(H)×hHL);
13:   if τbY(τaτb) and |Θ(Y)|<M then
14:    if t exceeds the deadline of fi then
15:     return unschedulable;
16:    sat; ra a random channel that is not in Θ(Y);
17:    RR-{τa}+ the next transmission of τa;
18:    if χi==H and τaΓiΓi then
19:     h[0,TTi(H)),Yt+Ti(H)×hHYt+Ti(H)×hH+{τa};
20:    else if χi==H and τaΓi* then
21:     h[0,TTi(L)),Yt+Ti(L)×hHLYt+Ti(L)×hHL+{τa};
22:    else
23:     h[0,TTi(L)),Yt+Ti(L)×hLYt+Ti(L)×hL+{τa};
24: return sa and ra;