# Minimum-Cost Offloading for Collaborative Task Execution of MEC-Assisted Platooning
## 6 Numerical Analysis
### Minimum-Cost Decision Strategy  
We consider a mobile application that consists of 12 tasks. The deadline of the application is 0.3 s, the computation resource cost of MEC server is \(\alpha_{\text{MEC}}=0.9\) and the offloading decisions in detail are shown in Figure 7. In these four figures, the red line represents the tasks offloading decision \(S^{*}\), which is the shortest path with the lowest cost and within the deadline. The NeededCycles means the computing workload. The task context includes two parts: the NeededCycles, whose unit is cycle, and the DataSize, whose unit is Kilobyte (kb). Figure 7 indicates different offloading strategies based on the proposed algorithm for tasks with different computing workloads and data sizes. Specifically, in Figure 7a, the amount of computation cycles required for each task of the application is relatively small and transmission data size of the tasks is relatively large. We get \(S^{*}=\{9,6,6,9,9,6,6,6,6,6,9\}\), because the transmission data rate between vehicles is much faster than that between leader and BS, and the large data size of the tasks limits the task execution on the MEC server. If the task is to be offloaded to the MEC server, it will lead to a large transmission delay. In Figure 7b, \(S^{*}=\{9,8,0,8,0,0,8,8,0,8,9\}\). Note that the size of the transmitted data is relatively small, and the required computation cycles for each task increase. In order to satisfy the deadline constraint of the application, a task with high required computation cycles should be offloaded to the MEC server. In Figure 7c, \(S^{*}=\{9,4,4,7,7,7,1,8,8,1,8,9\}\). Each task requires a relatively small amount of computation cycles. To minimize the cost, the MEC server with higher computing power does not need to provide computational assistance to the task execution. In Figure 7d, \(S^{*}=\{9,\ 8,8,0,0,0,0,8,8,8,9\}\). Note that last four tasks are executed in the platoon to avoid high data transmission delays from the BS to the leader. These four cases show that the MEC server and the BS can cooperate to complete the application tasks. Figure 7 indicates that the computing workloads and the data size affect the offloading decisions. A task with low computing cycles and high size of data tends to be executed in the platoon instead of MEC server, because the impact of task transmission time is greater than that of computing time, and these kinds of tasks are more likely to be offloaded to the nodes with fewer computing resources for lower cost. On the contrary, a task with high computing cycles and low size of data tends to be executed at the nodes with more computing resources in the platoon or at the MEC server decided by the cost and deadline. Note that the tasks with high computing cycles and low size of data is offloaded to the MEC server, which do not always meet the requirements of system. For instance, if the penultimate task with high computing cycles and low size of data was offloaded to the MEC server to execute, and the last task with 0 computing cycle and high size of data must be executed at the platoon member. That will cause extremely large transmission time when the data of last task is transmitted back to the member from the BS so that execution time of all tasks may exceed the deadline. Our algorithm succeeds in avoiding this. In summary, the LARAC algorithm can offload the tasks reasonably, and the task execution deadline can be satisfied. Figure 7: _Cont._We next evaluate the effect of \(\alpha_{\text{MEC}}\) on the tasks offloading decisions. The NeededCycles and the DataSize of these four subfigures in Figure 8 are the same. In Figure 8a, the cost of offloading the tasks to the MEC server is greater than that of any member of the platoon. To meet the deadline of the application, Tasks 6 and 7 must be offloaded to the MEC server for shorter execution time. In Figure 8b, we can see that, besides Tasks 6 and 7, Tasks 2, 8, and 9 are offloaded to the MEC server to execute.