## 3 Task Scheduling with Mixed-Integer Programming
### Task Scheduling with the Kinematic Constraints  
While arranging multiple tasks, there are task pairs that cannot be performed simultaneously due to kinematic constraints. In this case, only part of the constraints in the task pairs set must hold, and it is called disjunctive constraints [48]. To schedule tasks in \(\mathbb{T}\), suppose that there are \(n\) dishes(\(\mathcal{D}\)). Each \(\mathcal{T}_{j}^{i}\) (\(j\)th task in \(i\)th dish) must be performed on each  
Figure 1: Examples for explaining the Relation Matrix. CheckPossible(\(\mathcal{T}_{i},\mathcal{T}_{j}\)) is the function that checks whether robot \(i\) and robot \(j\) can conduct two tasks concurrently. (**a**) The case in which the robots can conduct two tasks. (**b**) The case in which the robot \(i\) cannot reach the third task location. (**c**) The case in which the robots collide with each other. (**d**) Example _taskset_ and \(M_{R}\) used for the example. \(M_{R}(i,j,1)\) follows the result of CheckPossible(\(\mathcal{T}_{i},\mathcal{T}_{j}\)). \(\mathcal{D}_{i}\). Suppose that the \(i\)th dish has \(x_{i}\) tasks; then, the range of \(j\) is expressed as \(m_{1}^{i},\cdots m_{x_{i}}^{i}\). For example, \(m_{1}^{2}=16,m_{7}^{2}=22,m_{10}^{3}=32\) in Table 1. Suppose \(t_{j}^{i}\) is the start time of \(j\)th task (\(\mathcal{T}_{j}^{i}\)) on the \(i\)th dish (\(\mathcal{D}_{i}\)). \(\tau_{j}^{i}\) means the time duration of \(\mathcal{T}_{j}^{i}\) in \(\mathcal{D}_{i}\). Because \(\mathcal{T}_{j+1}^{i}\) cannot start until \(\mathcal{T}_{j}^{i}\) is finished, we can obtain the constraints below. \(c_{j}^{i}\) is also considered in the constraint, as explained in Section 2.3.1. \[ \begin{split}& t_{j+1}^{i}\geq t_{j}^{i}+\tau_{j}^{i}\qquad \text{when }c_{j}^{i}=0,\text{ for }j=m_{1}^{i},\cdots,m_{x_{i}}^{i}\\ & t_{j+1}^{i}=t_{j}^{i}+\tau_{j}^{i}\qquad\text{when }c_{j}^{i}=1,\text{ for }j=m_{1}^{i},\cdots,m_{x_{i}}^{i}\end{split}  \tag{1}\]  
Equation (1) reflects the dependency constraint, but the kinematic constraints still need to be reflected. Assuming that \(M_{R}\) is precalculated, it can be known which tasks cannot be performed simultaneously. For setting the constraints, the cases to be found are the cases that cannot be performed simultaneously. We describe this situation as the 'tasks are in collision'. Therefore, an equation is formulated to avoid the collision of the task. Suppose that \(\mathcal{T}_{i}\) and \(\mathcal{T}_{j}\) are checked for collisions. For example, when \(M_{R}(i,j)=0\) and \(M_{R}(j,i)=1\), \(\mathcal{T}_{i}\) and \(\mathcal{T}_{j}\) will not collide with each other because \(\mathcal{T}_{j}\) can be performed by the right arm and \(\mathcal{T}_{i}\) can be carried out by the left arm. Therefore, to find collision tasks, the cases \(M_{R}(i,j)=0\) and \(M_{R}(j,i)=0\) should be found. This task collision checking process is shown in Algorithm 2 lines 7 to 10 and in Algorithm 2 lines 5 to 8. For all tasks and dishes in the \(\mathbb{T}\), the collision checking process needs to be performed to find all collision task pairs. Suppose that \(\mathcal{T}_{k}^{a}\) in \(\mathcal{D}_{a}\) and \(\mathcal{T}_{l}^{b}\) in \(\mathcal{D}_{b}\) (\(a,b,k,l\in\mathbb{N}:a,b\in[1,n]\), \(k\in[1,m_{a}]\), \(l\in[1,m_{b}]\)) determine that both cannot be performed simultaneously; then, \((a,b,k,l)\) is inserted into the list of conflicting tasks is \(\mathcal{C}\). After finding all colliding task pairs, the collision avoidance constraints need to be set. To set collision avoidance constraints, disjunctive constraints \(\delta_{kl}^{ab}\) is introduced [49]. \(\delta_{kl}^{ab}\) is a binary variable, and its value becomes 1 when \(\mathcal{T}_{k}^{a}\) is processed before \(\mathcal{T}_{l}^{b}\) starts (\(t_{k}^{a}\leq t_{l}^{b}\)) and 0 when \(t_{k}^{a}\geq t_{l}^{b}\). Using \(\delta_{kl}^{ab}\), the constraints can be written as below. \(B\) is a sufficiently large positive number. \[