## 3 Problem Description  
The traditional distributed assembly permutation flowshop scheduling problem (DAPFSP) can be divided into two phases; namely, the production phase and the assembly phase. In this section, the two-stage DAPFSP problem is extended to a three-stage DAPFSP, named the production stage, the transportation stage, and the assembly stage, and the problem is described as follows. The job \(j\in\{1,2,\ldots,n\}\) consists of operations \(O_{ij}\), \(O_{Tj}\) and \(O_{Aj}\). In the production stage, there are \(n\) work processes and \(f\) identical plants, and job \(j\in\{1,2,\ldots,n\}\) needs to be assigned to any plant \(l\in\{1,2,\ldots,f\}\) for processing, and each plant is equipped with the same m machines, \(M=\{M_{1},M_{2},\ldots,M_{m}\}\), which correspond to the same assembly line shop for part processing. Operations \(O_{ij}\in\{O_{1j},O_{2j},\ldots,O_{mj}\}\) are processed on machine \(M_{i},\quad i=1,\ldots,m\) and require \(p_{ij}\) time units. Machine \(M_{ij}\) can process at most one job at a time. The production and transport operations \(O_{Tj}\) will be executed on machine \(M_{T}\) and take \(p_{Tj}\) time units. The rule is that in each assembly permutation flowshop, all jobs need to be processed on the same path in the order of machine \(i\), which is equivalent to first on machine \(M_{1}\), then on \(M_{2}\). This goes on, until the end on machine \(M_{m}\). Parts belonging to the same product must be processed continuously, and no partial parts are allowed to pass through. All jobs start timing at time \(t=0\) and on machine \(i=1\). The subsequent phase is the transport stage, which means that after the completion of the first one in the first stage of the product operation, the transport machine collects all parts of the product and moves to the assembly stage. In the assembly stage, there are \(s\) products and an assembly machine \(M_{A}\). Each product \(r\in\{1,2,\ldots,s\}\) has a defined part of the operation. The assembly operation \(O_{Aj}\) will be executed on the machine \(M_{A}\) and uses \(p_{Aj}\) time units. The rule is that the assembly of a product can only start when the work contained in the product is completed and the assembly machine is idle. Continuous processing stages are part of the same product operation. The next product operation can only be performed after all jobs belonging to a product have been processed. From this, it is clear that the objective function of the problem is to determine the allocation of products to plants, and the sequence of parts and products to each plant in order to minimize the completion time or maximum completion time for all products. Based on the above description of the problem, the minimization of the completion time is denoted as \(F_{m}|nwt|C_{\max}\). To satisfy the above constraint, a feasible schedule \(\pi=\{\pi_{1},\pi_{2},\ldots,\pi_{n}\}\) is found for \(n\) jobs, such that the completion time \(C_{\max}(\pi)\) is minimized. This is the same where \(C_{\max}(\pi)\) is also equivalent to the time to complete the last job on the last machine. The Equation (1) is as follows. \[C_{\max}(\pi)=\sum_{k=2}^{n}D_{\pi_{k-1},\pi_{k}}+\sum_{j=1}^{m}P_{\pi_{n},j} \tag{1}\]  
In the transportation phase, it is necessary to ensure that the completion time distance between two adjacent jobs is determined by the processing time of the two processes, independent of the other jobs in the arrangement. Therefore, the completion time distance is defined between each pair of jobs. The completion time distance between two adjacent job processes \(\pi_{k-1}\) and \(\pi_{k}\) is calculated as  
\[C_{\pi_{k-1},\pi_{k}}=\max_{1\leq i\leq m}\left\{\sum_{j=1}^{i}P_{\pi_{k-1},j}- \sum_{j=2}^{i}P_{\pi_{k},j-1}\right\},k=2,3,\ldots,n \tag{2}\]  
In order to build a mathematical model based on the above description, the constraints, parameters and variables are as follows.