## 3 Solution Method
### Memetic Algorithm for Solving ITRTRSP
To comply with Equations (2) and (3), the first \(\,|\,R\,|\,\) genes are randomly selected from U, and the second \(\,|\,R\,|\,\) genes are randomly selected from D. For example, a chromosome in the outer layer population of the example given in Table 3 is shown in Figure 3(a), which indicates that A, B, and C are transported to the destination via upstream stations \(2,2,1\) and downstream stations \(3,4,4\), respectively. Step 3: Perform crossover and mutation for the chromosomes in the current outer layer population. Then N new chromosomes are generated. To ensure the feasibility of the new chromosomes, segmented multipoint crossover and mutation are separately applied to the first \(|\)R\(|\) and the second \(|\)R\(|\) genes. For example, in the example given in Table 3, perform multipoint crossover by swapping corresponding genes (Figure 5a). After crossover, apply segmented mutation to the new chromosomes (Figure 6a). Merge these chromosomes after crossover and mutation with the original chromosomes from the current population to form a new outer layer population. Figure 4: Chromosome encoding: (**a**) The outer layer chromosome; (**b**) The inner layer population; (**c**) The transshipment sequence scheme of the first inner layer chromosome. Figure 3: The memetic algorithm framework. Step 4: Inner layer algorithms. Step 4.1: Construct initial inner layer populations. Transfer the information of the current outer layer population to the inner layer, creating an initial inner layer population for each outer layer chromosome (total 2N inner layer populations), and select one population \(n\) (\(1\leq n\leq 2N\)) as the current inner layer population. Each inner layer population consists of M chromosomes, each chromosome containing \(\mid\)R\(\mid\) genes. The gene sequence represents the transshipment sequence at an upstream station, with each gene indicating that \(i\) needs to be loaded (onto trains) in that sequence. To comply with Equations (5) and (6), the genes of each inner layer chromosome should be restricted. First, similar to WTC, divide R into \(\mid\)U\(\mid\) disjoint subsets \(R_{u}\) (\(u\in U\), the union of all \(R_{u}\) is R) based on the first \(\mid\)R\(\mid\) genes (selection results of upstream stations) of outer layer chromosome \(n\). \(R_{u}\) is the set of all \(i\in R\) that select \(u\). Second, group the gene positions for each inner layer chromosome, assigning \(\mid\)\(R_{u}\)\(\mid\) gene positions to each \(R_{u}\) (if \(R_{u}=\Phi\), then \(\mid\)\(R_{u}\)\(\mid\) = 0, meaning no gene positions are assigned to \(u\)). Finally, for each inner layer chromosome, randomly draw elements from \(R_{u}\) without replacement to fill the gene positions, generating the transshipment sequences at each upstream station that satisfies Equations (4)-(10). For example, in the outer layer chromosome shown in Figure 4a, \(R_{1}\) = {C} and \(R_{2}\) = {A, B} are the groups for the upstream stations. Assign gene position 1 of the inner chromosome to \(R_{1}\) and gene positions 2 and 3 to \(R_{2}\). By performing random draws, the initial inner layer population can be generated as shown in Figure 4b (for instance, Figure 4c shows the draw result of the first chromosome in Figure 4b). Step 4.2: Based on the current inner population \(n\), perform crossover and mutation to generate M new chromosomes. To ensure the feasibility of these new chromosomes, only perform crossover and mutation within the same subset \(R_{u}\). Taking the two chromosomes numbered 1 and M in Figure 4b as an example, when performing crossover on \(R_{2}\), only the gene positions 2 and 3 of the two chromosomes can be crossed, resulting in two new chromosomes, as shown in Figure 5b. After crossover, perform mutation on \(R_{2}\) by swapping gene positions 2 and 3 to form a new chromosome, as shown in Figure 6b. Merge the  
Figure 5: Crossover: (**a**) Crossover for the outer layer chromosomes; (**b**) Crossover for the inner layer chromosomes.