|
Algorithm 2 Offline algorithm for sensor scheduling. |
|
Input:, , ,
From CRM KB:
: the choices of groups of sensors for each of the requested L contexts
: the accuracy of group
: the energy consumption by each sensor
From User Behavior:
: the time limits of the context states
Output:, ,
: the sensing schedules for the sensor groups in recognizing each context.
: the energy consumption for each group of sensors recognizing context state
: the delay of each sensor group in recognizing context state
-
1:
for each sensor group do
-
2:
Calculate as the sum of of
-
3:
for each context state do
-
4:
for each () pair do
-
5:
Run Viterbi algorithm to determine sensing schedule for in recognizing state
-
6:
Compute the objective function value according to (12)
-
7:
Track the resulting energy consumption, delay, and the () pair for the derived sensing schedule.
-
8:
end for
-
9:
Store the sensing schedule with the minimum objective function value according to (12) and the associated energy consumption (), delay (), and () pair in the Look-Up Table (LUT)
-
10:
end for
-
11:
end for
|