| Input:The task , ; the node selection variable xij; the offloading task workload ω. | | Output:The final workload strategy , , , let j = 0 denotes local, j > 0 denotes edge node. | | Initialization:kij = 0, ui =0. | | Step 1. Workload allocation between nodes. | | 1: for each task Di | | 2: whileωi < cido | | 3: calculate the incremental cost of processing unit-sized tasks locally | | 4: ifthen | | 5: calculate | | 6: end if | | 7: compare | | 8: allocate subtask to node j with the smallest cost increment,thenkij = kij + ω. ui = ui + Δuij | | 9: setωi = ωi + ω | | 10: end | | 11: setki = {ki0, ki1,ki2, …, kij} | | Step 2. Iterative to NE based on backward induction. | | 12: leti = i + 1 and repeat step 1 | | 13: calculateki+1 = {ki+1,0, ki+1,1,ki+1,2, …, ki+1,j}, ui+1 | | 14: sendki+1 to user i and repeat step 1 | | 15: calculatek’i, u’i | | 16: Ifu’i < uithen | | 17: updateki = k’i | | 18: Sendki to user i + 1 and repeat step 1 | | 19: n = n + 1 | | 20: calculatek’i+1, u’i+1 | | 21: repeat step 2 until and | | 22: set and | | 23: end if | | 24: returnki, , ui, ui+1 |
|