Online Optimization for UAV-Assisted Distributed Fog Computing in Smart Factories of Industry 4.0
In this paper, the problem of unmanned aerial vehicle (UAV)-assisted fog computing in Industry 4.0 smart factories is studied. In particular, a novel online framework is proposed to enable a source UAV to offload computing tasks from ground sensors within a smart factory and allocate them to neighboring fog UAVs for distributed task computing, before the source UAV arrives at its destination. The online nature of the framework allows the UAVs to optimize their task allocation and decide on which neighbors to use for fog computing, even when the tasks are revealed to the source UAV in an online manner, and the information on future task arrivals is unknown. The proposed framework essentially maximizes the number of computed tasks by jointly considering the communication and computation latency. To solve the problem, an online greedy algorithm is designed and solved by using the primal-dual approach. Since the primal problem provides an upper bound of the original dual problem, the competitive ratio can be analytically derived as a function of the task sizes and the data rates of the UAVs. Simulation results show that the proposed online algorithm can achieve a near- optimal task allocation with an optimality gap that is no higher than 7.5% compared to the offline, optimal solution with complete knowledge of all tasks.