# Multirobot Task Planning Method Based on the Energy Penalty Strategy
## 5 Simulation Experiment Analysis
### Task Sequence Optimization of \(A^{*}+ga\)  
In the two task environments of regular obstacles and irregular obstacles, the A\({}^{*}\) algorithm is used to plan the obstacle avoidance path between adjacent task nodes without changing the number of tasks. It is also used to recalculate and evaluate the robot energy consumption as well as to realize the secondary optimization of the energy excess robot task sequence through genetic iteration.  
**Experiment 4:** We set a regular obstacle environment map and ensure that the distribution of task points is the same as that in Experiment 2. The number of tasks \(m=40\), the number of robots \(n=3\), and the size of the grid map is 80 \(\times\) 80 m. The A\({}^{*}\) optimal path planning diagram before task sequence optimization is shown in Figure 14.  
As shown in Table 4, the relative error of energy consumption of Robot 2 \(P_{2}=5.56\%\), which exceeds the threshold \(\alpha=4\%\). Therefore, it is necessary to re-optimize the task sequence of Robot 2 to minimize its energy consumption. The optimized optimal path planning diagram of Robot 2 (renamed as \"Robot 2a\") based on the GA is shown in Figure 15. Meanwhile, the respective task sequences and related experimental data of Robot 2 before and after optimization are shown in Table 5.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Robot No.** & _L(R) (m)_ & _E (R)_ & _P (\%)_ \\ \hline Robot1 & 202 & 840.75 & - \\ Robot2 & 232 & 957.45 & 5.56\% \\ Robot3 & 186 & 922.95 & 1.75\% \\ \hline \hline \end{tabular}
\end{table}
Table 4: Path planning operation parameters of A\({}^{*}\) algorithm from Experiment 4.  
Figure 14: A\({}^{*}\) algorithm path planning diagram of the initial task sequence from Experiment 4.  
It can be seen that the path length of the optimized Robot 2 is reduced by 3.4%, and the energy consumption is reduced by 2.2%. As shown in Table 6, the total energy after task sequence optimization is 0.78% lower than the previous one, and the standard deviation is also 13.85% lower. Therefore, the results indicate the effectiveness of the proposed algorithm.  
**Experiment 5:** Here, we set the irregular obstacle environment map, the number of tasks \(m=30\), and the number of robots \(n=3\). Furthermore, the distribution of task points is the same as that in Experiment 1, and the grid map size is 40 m \(\times\) 40 m. The A* optimal path planning diagram before task sequence optimization is shown in Figure 16.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Task** & \(\mathbf{E(R_{1})}\) **(j)** & \(\mathbf{E(R_{2})}\) **(j)** & \(\mathbf{E(R_{3})}\) **(j)** & **Sum(E) (j)** & \(\mathbf{\sigma}\) \\ \hline Before & 840.75 & 957.45 & 922.95 & 2721.15 & 60.0 \\ After & 840.75 & 936.15 & 922.95 & 2699.85 & 51.69 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Comparison of energy consumption before and after optimization from Experiment 4.  
Figure 15: Path planning diagram of Robot 2 after task sequence optimization from Experiment 4.  
The analysis of the results of Experiments 4 and 5 indicates that the task sequence optimization process using A* + GA can effectively reduce energy consumption and maintain energy balance in different task scenarios. Notably, in order to reduce the amount of computation, the second stage of the proposed algorithm optimizes the task sequence of the robot with a high energy consumption only on the basis of not changing the number of tasks. Other robot task sequences with low energy consumption do not need to be recalculated.