## 2 Methods
### Problem Formulation
In order to transport task \(i\), the initial and goal positions of task \(i\) need to be determined first through the task assignment process. Then, robot \(j\) moves to the starting position of the task \(i\) and transports the cargo to the goal position \(gp_{i}\). During this period, time is set to be discretized into unit time steps, and a robot can move over one cell in one time step. In the path finding process, two types of collisions need to be avoided: vertex collision and edge collision. The former states that two robots should not occupy the same cell at the same time, and the latter means that two robots should not move along adjacent cells in opposite directions at the same time. Let \(P=\{sp_{1},\cdots,sp_{n},gp_{1},\cdots,gp_{n}\}\) be all possible positions that robot \(j\) can arrive at. \(TA_{jp}:R\times P\rightarrow\{0,0.5\},j\in R,p\in P\) represents a task assignment mapping table that maps the indices of robot \(j\) and the loading or unloading position \(p\) to a fixed value, which equals 0.5 if and only if robot \(j\in R\) has to reach the position \(p\in P\). \(TA_{jsp_{1}}+TA_{jsp_{1}}=1\) means that task \(i\) is assigned to robot \(j\). The optimization variable \(MT_{kt}:M\times Time\rightarrow\{0,i\},k\in M,t\in Time,i\in T\) represents a processing mapping table, which equals \(i\) if and only if the machining center \(k\) is processing task \(i\) at time \(t\). \(MT_{kt}=0\) implies that machining center \(k\) is idle at time \(t\). \(c_{j}^{t}\) denotes the number of loading tasks of robot \(j\) at time \(t\). \(loc_{j}(t)\) denotes the location of robot \(j\) at time \(t\). \(t_{j}\) denotes the time spent by robot \(j\) transporting all the tasks assigned to it. \(t_{k}\) and \(e_{k}\) denote the time spent and energy consumed by machining center \(k\), respectively, after completing all tasks assigned to it. Minimize  
\[F=w_{t}PT+w_{e}PE=w_{t}\bigg{(}\underset{j\in R}{maxt}j+\underset{k\in M}{max t}\bigg{)}+w_{e}{\sum_{k=1}^{m}e_{k}} \tag{1}\]  
Subject to  
\[TA_{jsp_{i}}+TA_{jsp_{i}}\in\{0,1\},\forall i\in T,\forall j\in R \tag{2}\]  
\[\sum_{j=1}^{a}TA_{jsp_{i}}+TA_{jsp_{i}}\in\{0,1\},\forall i\in T \tag{3}\]  
\[c_{j}^{t}\in\{0,1\},\forall t,\forall j\in R \tag{4}\]  
\[loc_{j}(t)\
eq loc_{j^{\prime}}(t),\forall j,j^{\prime}\in R,j\
eq j^{\prime},\forall t \tag{5}\]  
\[\{loc_{j}(t),loc_{j}(t+1)\}\
eq\Big{\{}loc_{j^{\prime}}(t+1),loc_{j^{\prime}} (t)\Big{\}},\ \forall j,j^{\prime}\in R,j\
eq j^{\prime},\forall t \tag{6}\]  
\[gp_{i}=-1,\forall i\in T\,s.t.\,type_{i}=0 \tag{7}\]  
\[gp_{i}\geq 0,\forall i\in T\,s.\,type_{i}=1 \tag{8}\]  
\[sp_{i}\geq 0,st_{i}=0,gt_{i}=-1,parent_{i}=\phi,\forall i\in layer_{1} \tag{9}\]  
\[sp_{w}\geq 0,sp_{w^{\prime}}=-1,\exists w,w^{\prime}\in layer_{t},l\geq 2,w \in T,w\
eq w^{\prime},\forall type_{parent_{w}}=0 \tag{10}\]  
\[TA_{jsp_{i}}+TA_{jsp_{i}}\in\{0,1\},\forall i\in T,\forall j\in R \tag{2}\]0  
\[TA_{jsp_{i}}+TA_{jsp_{i}}\in\{0,1\},\forall i\in T,\forall j\in R \tag{2}\]1  
Equation (2) indicates that the loading and unloading processes of a task are performed by the same robot. Equation (3) means that a task can only be transported by exactly one robot. Equation (4) implies that each robot is capable of transporting at most one task at a time, i.e., a robot cannot transport multiple tasks simultaneously. Equation (5) implies there is no vertex collisions between robots. Equation (6) implies that there is no edge collision between robots. Equations (7)-(12) describe the constraints of certain task attributes when considering the precedence of tasks, and the details are described below. The time complexity is \(O(mnab^{d})\), where \(m,n,a\) represent the number of optional machining centers, tasks, and robots, \(b\) is the branching factor of the tree, and \(d\) is the depth of the goal node. Figure 1 shows an illustrative example of a task queue organized in three layers consisting of five tasks with precedence constraints.