|
Algorithm 2 Best-effort Algorithm |
-
Input:
;
-
Output:
;
-
1:
for each i in I
do
-
2:
for each j in J
do
-
3:
allocate as many tasks of as possible to till reach its capacity
-
4:
end for
-
5:
calculate for each
-
6:
end for
-
7:
while the solution is infeasible do
-
8:
carry out the Best-effort strategy in fog level
-
9:
carry out the Best-effort strategy in MEC level
-
10:
if the solution is infeasible, decrease the with largest unless becomes 0
-
11:
end while
-
12:
return
|