## 3 Solution Procedure
### PSO Phase
#### 3.2.3 Evolve Approach  
The crossover operator means that the following generations inherit the good genes from the previous generation. The crossover operator generates new solutions (offspring) by coalescing the structures of a couple of existing ones (parents) [30]. For our specific representation, the crossover technique defined in the literature was not suitable. We considered the task list concept, precedence feasibility, and the mode assignment. We used the well-known one-point crossover within the TL sector and the two-point crossover within the mode assignment sector. The crossover was applied to each particle with the selected local best and global best. Each new generated particle was evaluated and the best particle was selected as the new global best particle. The local best for each particle was recorded. The one-point crossover and two-point crossover are described as follows:  
Given two individuals selected for crossover,\(M=(j_{1}^{M},j_{2}^{M},\ldots,j_{j}^{M})\) and \(F=(j_{1}^{F},j_{2}^{F},\ldots,j_{j}^{F})\), two offspring, \(D\) and \(S\) are produced.  
1. One-point crossover operator  
First, one integer and non-negative point \(p(1<p<J)\) are randomly generated. The tasks in the first \(p\) positions are inherited from the \(M\), exactly in the same sequence.  
\[j_{i}^{D}:=j_{i}^{M}\ \ \ i=1,\ldots,p \tag{12}\]  
The positions \(i=p+1,\ldots,J\) are inherited from the \(F\) and preserved their relative sequence.  
\[j_{i}^{D}:=j_{k}^{F}\ \ \ i=p+1,\ldots,J \tag{13}\]  
\[k=min\Big{\{}k\Big{|}j_{k}^{F}\
otin\Big{\{}j_{1}^{D},\ldots,j_{i-1}^{D}\Big{\}},k=1,2,\ldots,J\Big{\}} \tag{14}\]  
The \(S\) is generated analogously and the sequence of succession is opposite.  
\[j_{i}^{S}:=j_{i}^{F}\ \ \ i=1,\ldots,p \tag{15}\]  
\[j_{i}^{S}:=j_{k}^{M}\ \ \ i=p+1,\ldots,J \tag{16}\]  
\[k=min\Big{\{}k\Big{|}j_{k}^{M}\
otin\Big{\{}j_{1}^{S},\ldots,j_{i-1}^{S}\Big{\}},k=1,2,\ldots,J\Big{\}} \tag{17}\]  
Figure 5: The example chromosome.  
2. Two-point crossover operator  
First, two integers and non-negative points \(p_{1},p_{2}(1<p_{1}<p_{2}<J)\) are randomly generated. The tasks in the first \(p_{1}\) positions are inherited from the \(M\), exactly in the same sequence.  
\[j_{i}^{D}:=j_{i}^{M}\ \ \ i=1,\ldots,p_{1} \tag{18}\]  
The positions \(i=p_{1}+1,\ldots,p_{2}\) are inherited from the \(F\) and preserved their relative sequence.  
\[j_{i}^{D}:=j_{k}^{F}\ \ \ i=p_{1}+1,\ldots,p_{2} \tag{19}\]  
\[k=min\Big{\{}k\Big{|}j_{k}^{F}\
otin\Big{\{}j_{1}^{D},\ldots,j_{i-1}^{D}\Big{\}},k=1,2,\ldots,J\Big{\}} \tag{20}\]  
The positions \(i=p_{2}+1,\ldots,J\) are inherited from the \(M\) again and preserved their relative sequence.  
\[j_{i}^{D}:=j_{k}^{M}\ \ \ i=p_{2}+1,\ldots,J \tag{21}\]  
\[k=min\Big{\{}k\Big{|}j_{k}^{M}\
otin\Big{\{}j_{1}^{D},\ldots,j_{i-1}^{D}\Big{\}},k=1,2,\ldots,J\Big{\}} \tag{22}\]  
The \(S\) is generated analogously and the sequence of succession is opposite.  
\[j_{i}^{S}:=j_{i}^{F}\ \ \ i=1,\ldots,p_{1} \tag{23}\]  
\[j_{i}^{S}:=j_{k}^{M}\ \ \ i=p_{1}+1,\ldots,p_{2} \tag{24}\]  
\[k=min\Big{\{}k\Big{|}j_{k}^{M}\
otin\Big{\{}j_{1}^{S},\ldots,j_{i-1}^{S}\Big{\}},k=1,2,\ldots,J\Big{\}} \tag{25}\]  
\[j_{1}^{S}:=j_{k}^{F}\ \ \ i=p_{2}+1,\ldots,J \tag{26}\]  
\[k=min\Big{\{}k\Big{|}j_{k}^{F}\
otin\Big{\{}j_{1}^{S},\ldots,j_{i-1}^{S}\Big{\}},k=1,2,\ldots,J\Big{\}} \tag{27}\]  
If the termination criterion were satisfied, usually a sufficiently good fitness or a special number of generations, then the PSO phase was stopped; otherwise it continued. The PSO phase could provide diverse initial solutions for the TS phase.