Research Article

Energy-Aware Smart Connectivity for IoT Networks: Enabling Smart Ports

Algorithm 1

First stage learning.
Data: Context-aware constraints, available computational capacity in gateway and eNB, budget
Result: Combination of connectivity route and processing venue
1initialization;
2 for  all IoT devices  do
3Determine the current state using Table 3;
4Evaluate all the actions;
5Calculate the penalty using Table 3;
6Select the best action;
7Jump to the next state;
8Update the -table;
9  if  the selected action includes fog(gateway) or
cloud (eNB) processing  then
10go to Algorithm 2
11  end
12 end