
210
Wireless Ad Hoc and Sensor Networks
Algorithm 14: Schedule S(Ois) or F
left
in the l-th slot
input : OS(Objective Set)-S(Ois) or F
left
, NCS(Sch
l
)
output: schedule plan Sch
l
for time slot l
1 flag= 1;
2 while flag= 0 do
3 flag← 0;
4 for i :1→ m do
5 if a ∈OSand a → P
i
(a)) is ready and a /∈NCS(Sch
l
) then
6 flag← 1;
7 Sch
l
←Sch
l
a →P
i
(a);
8 NCS(Sch
l
) ←NCS(Sch
l
)
NCS(a →P
i
(a));
9 od
a
−−;
10 if od
a
== 0 then
11 OS ← OS\{a};
12 return Sch
l
, NCS(Sch
l
)
Then NCS(9 →8)={3,4,7,8,9, 13,14, 15,22,23,24}is added to NCS(Sch
1
), i.e.,
NCS(Sch
1
)={12,13,18,19, 20, 21,22,26, 32}
{3,4,7,8,9, 13,14, 15,22, 23,24}
= {3, 4,7,8, 9,12, 13,14, 15,18,19,20,21, 22, 23,24,26,32}. Then we