Lyapunov-based computation offloading algorithm. | Input:, , , , ,,, . | Output: The offloading strategy of different edge devices. | for each time slot do | for each device m with , harvest all the energy and update . | end for | for each device with do | obtain and , then compute . | if, use for local computing. | harvest all the energy , store it in battery, and update . | else compute according to (2),(3),(5) and (6). | for all the , device do | solve , | obtain and accordingly, | compute . | end for | find minimum element in , s.t.(13). | if the element is , choose sever and use to offloading tasks. | else if the element is , use for local computing. | else drop the tasks. | end if | harvest all the energy, and update . | end if | end for | end for |
|