# Multirobot Task Planning Method Based on the Energy Penalty Strategy
## 2 Problem and Algorithm Description  
Multirobot task planning reasonably allocates multiple tasks to a multirobot system and defines the task sequence with the goal of achieving the minimum cost of all tasks, such as the shortest total path (or time) and the least total energy consumption, among others. This kind of task planning covers task allocation, task sequence planning, and path planning. Suppose the number of robots is \(n\), the number of tasks is \(m\), and \(m\geq 2n\). It is required that each robot can only perform one task at the same time, and each task only needs one robot to complete it at one time. The cost of each robot completing its task is expressed as \(Cost=\{C_{i}|i=1,2,\ldots,n\}\). The optimal task planning scheme minimizes the total cost and is expressed as \(Sum(Cost)=\sum\limits_{i=1}^{n}C_{i}\).  
This paper constructs an algorithm model based on the idea of energy penalty. The proposed model takes the robot energy consumption as the optimization goal and the robot and task attributes as constraints; it also uses GA to achieve the optimal task allocation and execution sequence optimization results. In path planning, the punishment mechanism is used again according to the obstacle avoidance requirements of the actual path, and the GA and A* methods are used to optimize the task sequence of the robot to achieve the balanced optimization of the energy consumption of multiple robots. The algorithm framework is shown in Figure 1.  
When researching multirobot task assignments and path planning, an energy penalty strategy is proposed to solve the problem of energy consumption balance among multiple robots. Its main idea is to calculate and compare the total and average energy consumption of robots in task allocation and path planning to obtain the penalty energy for each robot to complete the task, after which it introduces the penalty energy into the optimization objective function. If the penalty energy value of a robot is larger, it means that the task of the robot is heavy, and the energy consumption of the system is unbalanced. As a penalty item in the algorithm, further optimization of robot task allocation can be achieved. The formal description of penalty energy \(PE_{i}\) is shown in Equation (1):  
\[\begin{array}{l}PE_{i}=\left\{\begin{array}{ll}\left|E(R_{i})-\overline{E(X )}\right|&if\quad P_{i}\geq\alpha\\ 0&else\end{array}\right.\\ P_{i}=\frac{E(R_{i})-\overline{E(X)}}{E(X)},i=1,2,3,\ldots,n\end{array} \tag{1}\]  
where \(E(R_{i})\) is the energy consumed by robot \(i\), \(\sum\limits_{i=1}^{n}E(R_{i})\) is the total energy consumed by all robots, which is the sum of the energy consumed by all robots to complete their respective tasks, \(\overline{E(X)}=\left(\sum\limits_{i=1}^{n}E(R_{i})\right)/n\) is the average energy consumption, which means the average of the total energy consumption of n robots, \(P_{i}\) is the relative error of robot \(i\) energy consumption, and \(\alpha\) is the energy consumption threshold. The energy consumption of robots is related to task parameters such as task path and task weight, as detailed in the algorithm model section.