We compare the offloading results of the genetic algorithm (GA) with two benchmarks. One is the Exhaustive Search (ES). In ES, all the possible solutions are systematically enumerated to find the optimal one. The purpose here is to verify the accuracy of the GA algorithm. We additionally compare the results with an “all on robot” (AoR) approach where all tasks are considered to be completed by a robot. This result is used to evaluate if the alternative approach with the usage of the cloud infrastructure is beneficial or not. The results help justify the performance and shortcomings of each of the methods.
5.2. Simulation Results
We ran a simulation of a GA-based scheme for 20-node task flow to find the optimal offloading decisions. To show the adaptability of GA in this context, we considered two scenarios. In case there is any shortage of one of the parameters (energy/time), the robotic agent can prioritize the other and adjust the task objectives accordingly.
● Scenario 1 (Minimise: )
From the simulations with fitness score
, the results show that the average fitness score decreases with the generation number (
Figure 6). This leads to the conclusion that most generations of GA scheme tend to result in lower fitness and thereby decrease the average fitness score. The lower trend of the graph clearly indicates a process where GA keeps replacing the fitness with lower scores until it finds the minimal one. From Generation 71 onwards, no change in generation score is seen. Hence, GA stops running after 371 generations in accordance with thestopping criteria (
Table 2).
The results of the simulation are presented in
Table 3, along with two benchmarks for comparison. As seen from the table, an offloading decision for each task is provided. For the simulation, 13 tasks take place onboard the robot (represented by “1”), which means seven tasks have been offloaded (represented by “0”). As the task allocation result is presented in a serial, the seven offloaded tasks (Tasks 3, 4, 6, 8, 12, 16, and 18) can clearly be identified. This is the optimal offloading decision for each task of the task flow.
A further comparison with the ES helps to verify the accuracy of the algorithm. We can observe that ES presents the minimal energy (2699.13 J), which is slightly better than the GA result. The situation is the same for the task completion time (51.74 s), which means that both algorithms manage to meet the delay constraint of 60 s. A more in-depth analysis shows that the reason for the difference in the value of minimal energy is the number of offloading decisions. The number of tasks offloaded for ES (8) is greater than GA (7). As a result, more offloading in ES provides the better value. However, GA provides the near-optimal result. Even though the results for minimal energy in ES are slightly better, it has some drawbacks. The major difference between the two methods is in the overhead. ES takes about 511.74 s to run the algorithm, which is more than 100 times the overhead time needed to run the GA (3.96 s). At the same time, the algorithm overhead energy for GA is 332.36 J. In the case of ES, the overhead energy is 3,4586.11 J, which is significantly higher. As the robot has limited energy, ES is definitely not a suitable option as it costs significantly more overhead time and more energy. From this point of view, the GA performs better for the proposed scenario as it provides a near-optimal result with a slight error in minimum energy, but significantly less overhead time.
We conduct another comparison for GA with an AoR (all-on-robot) approach. The results in
Table 3 show that the processing energy (3802.23 J) of AoR is very high when compared with GA. More significantly, the task completion time in this case is 70.01 s, which does not meet the delay constraint. As AoR does not have any scope of adaptability, it is definitely not a suitable solution in this context. In contrast, the offloading approach to the cloud with GA provides more opportunities for the robot to adapt and complete the necessary tasks in cases when the AoR does not work.
Finally, we have evaluated the efficiency of the GA by calculating the “overall time”, which includes the GA overhead time as well as the task completion time. It is found that the overall time (56.36 s) is less than the overall time constraint of 60 s. So, it can be observed that in terms of overall energy, the GA-based scheme meets the delay constraint and is lower than the other benchmarks (463.46 s for EX and 70.01 s for AoR), as seen in
Table 3. Even for the overall energy, the value of overall energy for the GA-based scheme is 3079.74 J, which is lower than both EX (3,7285.24 J) and AoR (3802.23 J).
● Scenario 2 (Minimise: )
We run simulations for an alternative scenario where the objective is to minimise the time. Similar to the previous simulation, the downward trend of average fitness score (
Figure 7) suggests that the GA is working properly. The lowest fitness score looks for lower fitness score to be replaced until finding the lowest one. For this scenario, it takes 651 simulations to find the minimum task completion time, which is a lot higher than the previous scenario. The optimal solution (
Table 4) shows the eight tasks being offloaded (Tasks 3, 4, 6, 8, 12, 16, 17, 18, which are represented by “0”).
We also compare with ES and AoR to verify the performance. For ES, we get the exact same result as GA, which means it is an optimal result. As ES has a high overhead energy and time (55,552.2836 J and 661.34 s, respectively), it is not suitable. However, for GA, the overhead energy (838.53 J) and time (55,552.28 J) is around 60 times less. The results of AoR show that it takes 70.01 s to complete the task flow. Even though the total energy consumption (3802.23 J) meets the energy constraint, the method does not result in the minimum task completion time. Instead, a GA-based approach provides the best result (as shown earlier).
We have added an extra performance criterion to accommodate the GA overhead energy and time to the overall energy and time calculations. The objective here is to see if the added GA overhead can still maintain performance within the constraints. As seen from
Table 4, the GA-based scheme provides overall energy of 3605.48 J, which is less than the energy constraints. It is also lower than the other benchmarks of EX (58,319.23 J) and AoR (3802.23 J). The same is found in the case of overall time. Ex takes 711.46 s and AoR takes 70.01 s, while the overall time for GA-based scheme is 60.82 s.
All the performance criteria (time, energy, overhead, etc.) in both scenarios point to the superiority of the genetic algorithm (GA)-based scheme over the other two benchmarks of Exhaustive Search (EX) and All on Robot (AoR) method.
5.2.1. Impact of Bandwidth (Minimise: )
In this section we have run simulations to check the impact of bandwidth on offloading decisions and system performance. The results are presented in
Table 5. We considered Scenario 2 (Minimise:
) for running simulations of bandwidth change. As mentioned, we verified the adaptability of the GA-based scheme with respect to bandwidth. As different parts of the abovementioned application take place in different locations, we varied the bandwidth values for one of the zones/locations (Zone 2) to observe the effects of bandwidth change. We ran five different simulations and evaluated the results of the offloading decisions and minimum completion time.
The results suggest a clear progression of offloading decisions with the increase in bandwidth (illustrated in
Figure 8). At the same time, the bandwidth increase also ensures a decline in overall task completion time for the robot (
Figure 9). This indicates that better bandwidth enables the GA scheme to adapt to changing conditions and offload more tasks, which in turn decreases the minimum task completion time of the robot. It also means that bandwidth has a significant impact on the offloading decisions and thereby the overall performance. Similar results have been found for Scenario 1 (Minimise:
), where the GA adapts with changing bandwidth and provides more offloading options for tasks. Thus it manages to find the optimal offloading decisions that provide minimal energy while meeting the constraints.
This suggests that changing the bandwidth has a significant impact on offloading for robotics operations. As the robot has the ability to move, so this opens up this area for discussion regarding the impact of bandwidth and movement on performance as well as each other. A further study is required to analyse its impact and find ways to utilize it properly for improving system performance.
5.2.2. Impact of Movement (Minimise: )
To understand the impact of movement on the current scenario, we have selected scenario 1 (Minimise: ) to run simulations. The three zones in our problem set are represented by coordinates. We have changed the coordinates of one the zones (Zone 2) to increase the distance between Zone 1 and Zone 2. For that changing condition, we run simulations on two cases. In first case, the bandwidth of Zone 2 is 512 Kbps. This section explains the results for this particular case.
From the results in
Table 6, we can see that there is an increasing trend for both energy and time. This means that the increase in distance between the zones causes more robotic energy consumption as the movement itself is a task that requires energy. This also increases the total completion time. As seen from the table, the total completion time becomes higher than the time constraint (60 s) after a certain amount of increase in distance. At that point, the robot fails to complete the tasks within the given constraints despite offloading seven tasks. For this simulation, this happens when the Zone 2 coordinates result in a distance of 54.43 units between Zone 1 and Zone 2. These results clearly show that movement has a significant impact on task offloading decisions for this scenario.
5.2.3. Impact of Movement and Bandwidth (Minimise: )
We further study the integrated impact of both bandwidth and movement in task offloading decisions. This also helps us to show how this can be used to our benefit. For the simulation results in
Table 6, the first case (512 Kbps) presents a situation where the increasing distance causes the movement energy and time to become so high that the total completion time exceeds the constraints. Even though seven tasks were offloaded using available bandwidth (512 Kbps), it was still not enough.
To solve this situation, we ran simulations for a second case. In this case, everything remained the same except for the bandwidth of one of the zones (Zone 2). We increased the zone bandwidth to 5 Mbps. From the results, we can see that the performance improved much faster. For the same increase in distance, the robot managed to complete the task flow for all the simulations. Even when the distance increased to 54.43 units, it was within time constraint. This was possible because of better network connectivity, which meant faster offloading was possible. Also, the robot managed to offload nine tasks (more than in the other case), which also contributed to the improvement in results.
From the results and analysis, we can conclude that movement and bandwidth make a significant impact on task offloading decisions. In fact, as the latter case suggested, a proper trade-off between movement and bandwidth can actually overcome the shortcomings of the system and improve the system performance when necessary. In addition, pre-gathered knowledge about the bandwidth and the locations could be useful for the robot to plan paths for offloading and task completions. A future study will focus on implementations to make offloading decisions with movement, bandwidth, and paths as possible variables.