Research Article

Enhancing Existing Communication Services with Context Awareness

Algorithm 1

Reasoning on contextual information.
Input:
 Current user situation or context data 𝐢 = { 𝑐 1 , … , 𝑐 𝑛 } ,
 Fitness Threshold 𝛼 ,
 Filering rules F R = { f r 1 , … , f r 𝑝 } ,
 Optimization rules O R = { o r 1 , … , o r π‘ž }
Output:
 Applicable actions 𝐴 = { π‘Ž 1 , … , π‘Ž π‘š }
 1: A ← βˆ…
 2: Applicable ← βˆ…
 3: for each rule f r 𝑖 ∈ F R   do
 4:   if   f r 𝑖 β‹… 𝑐 π‘œ 𝑛 𝑑 𝑖 𝑑 𝑖 π‘œ 𝑛 ∈ 𝐢   and  d   f r 𝑖 β‹… π‘Ž 𝑐 𝑑 𝑖 π‘œ 𝑛 β‹… is Applicable ():
 5: Applicable ← Applicable   βˆͺ f r 𝑖 β‹… π‘Ž 𝑐 𝑑 𝑖 π‘œ 𝑛
 6: for each rule o r 𝑖 ∈ O R   do
 7:  for each action π‘Ž 𝑗 ∈   Applicable  do
 8:  π‘Ž 𝑗 β‹… weight = π‘Ž 𝑗 β‹… weight + o r 𝑖 β‹… evaluate  ( π‘Ž 𝑗 )
 9: for action in π‘Ž 𝑖 ∈   Applicable do
 10:  if   π‘Ž 𝑖 β‹… weight > 𝛼 :
 11:  𝐴 ← 𝐴 βˆͺ π‘Ž 𝑖
 12: return   𝐴