Research Article
Joint Load Balancing and Offloading Optimization in Multiple Parked Vehicle-Assisted Edge Computing
Algorithm 1
Multiple offloading node selection algorithm.
| Input: Task Di = {di, ci, timax}; the offloading task workload ω; the computing power filo, fij; the parking probability Pij. | | Output: The node selection variable xij (j =1 denotes MEC server, j >1 denotes PV). | | 1: Initialization:, , and . | | 2: calculate the execution time and , the energy consumption and . | | 3: setΔuiloc = Tiloc + Eiloc | | 4: ifkij ≥ rmaxfijmaxthen | | 5: CalculateTijwait | | 6: setΔtij = Tij + Tijwait | | 7: else | | 8: setΔtij = Tij | | 9: end if | | 10: setΔeij = Eij | | 11: then calculate Δuij = Δtij + Δeij | | 12: ifPij ≥ Pth and Δuij < Δulocthen | | 13: setxij =1 | | 14: updatekij = kij + ω, fij = fij - ω | | 15: else | | 16: setxij = 0 | | 17: end if | | 18: returnxij |
|