|
Algorithm 1: The SAda Algorithm. |
| 1: |
Initialization Parameter:
and
|
| 2: |
for t in T do
|
| 3: |
Get the location of IoT devices and select the suitable devices as the candidates, update .
|
| 4: |
if none of SUE
has connected to TUE then
|
| 5: |
Connect to SUE n once.
|
| 6: |
Update
.
|
| 7: |
else
|
| 8: |
Observe
.
|
| 9: |
for each device
do
|
| 10: |
Calculate the efficiency function
.
|
| 11: |
Find device
,where
.
|
| 12: |
Update
.
|
| 13: |
Update
|
| 14: |
Update
|
| 15: |
end for
|
| 16: |
end if
|
| 17: |
end for |