Skip to main content
. 2024 Mar 1;24(5):1625. doi: 10.3390/s24051625
Algorithm 1: Context computation (Context Manager)
INPUT: s, tb, ρs, κs
OUTPUT: -
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
if DB[tb] == ∅ then
  t′ ← getPreviousTime(DB, tb)
  DB[tb] ← DB[t′]
t″ ← getHighestTime(DB)
T ← getTimeRange(tb, t″)
cDB[s][“c”]
for each ti ∈ T do
  X={xecm} ← DB[ti][“X”]
  κ0DB[ti][“κs”]
  πs0DB[ti][“πs”]
  πs ← computeMapping(ρs) (Algorithm 2)
  for each <l, e> ∈ πs0 do
     mDB[s][l][“m”]
     xecmxecmκ0
  for each <l, e> ∈ πs do
     mDB[s][l][“m”]
     xecmxecm + κs
  DB[ti][“πs”] ← πs
  DB[ti][“κs”] ← κs
  DB[ti][“X”] ← X
return -