# Bilateral Matching Decision Model and Calculation of High-Speed Railway Train Crew Members
## 4 Numerical Example  
To verify the effectiveness of the genetic algorithm in terms of solution quality and time, the optimal solution obtained by Gurobi and the average satisfactory solution obtained by the designed genetic algorithm (GA) were compared for different scales of crew chief stewards (2, 4, 8, 16, 32, 64). The experimental values presented below are the average of ten trials. The genetic algorithm was implemented using Python, with basic parameter settings as follows: population size of 80, crossover probability of 0.99, mutation probability of 0.01, and a maximum of 200 generations. From the analysis of the data in Table 6, it can be observed that Gurobi consistently has a significantly shorter runtime compared to the Genetic Algorithm (GA) across all numbers of conductors. For instance, when the number of conductors is 64, Gurobi's average runtime is 95 s, while GA requires 389 s. As the number of conductors increases, the runtime of both algorithms grows exponentially, but the growth rate of GA is notably faster. Gurobi performs excellently in terms of the objective function value, which increases gradually with the number of conductors but remains consistently lower than the corresponding value for GA. For example, when the number of conductors is 64, Gurobi's objective function value is 1476, whereas GA's is 4472.4. The objective function value of GA also increases substantially with the number of conductors, and in some cases, it is several times greater than that of Gurobi. The trend changes in computation time and objective function for different scales are shown in Figure 6.  
Figure 5: Genetic Algorithm Flowchart. To verify the effectiveness and feasibility of the genetic algorithm in solving large-scale problems, we conducted a simulation with 90 chief stewards and 270 stewards. The chief stewards performed a comprehensive evaluation of the stewards' work ability and other indicators, providing the complete preference order vector \(s_{ij}\). For details, see Table 7.  
Steward \(B_{j}\) combines his own preferences and conducts a comprehensive evaluation of chief steward \(A_{i}\) based on indicators such as management ability, and provides the preference order vector \(r_{ij}\), as shown in Table 8. \begin{table}
\begin{tabular}{c} **The** \\ **Average** \\ **Objective** \\ **Function** \\ \end{tabular} \\ \hline
2 & Gurobi & 0.03 & 10.0 & GA & 1.8 & 10.0 \\
4 & Gurobi & 0.11 & 30.5 & GA & 3.0 & 35.5 \\
8 & Gurobi & 0.14 & 67.5 & GA & 7.8 & 102.5 \\
16 & Gurobi & 0.70 & 178.0 & GA & 32.0 & 333.1 \\
32 & Gurobi & 9.80 & 566.0 & GA & 205.0 & 1188.6 \\
64 & Gurobi & 95.0 & 1476.0 & GA & 389.0 & 4472.4 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparison of Problem Computation and Results for Different Scales and Solution Strategies. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \(A_{1}\) & \(A_{2}\) & \(A_{3}\) & \(\ldots\) & \(A_{268}\) & \(A_{269}\) & \(A_{270}\) \\ \hline \(B_{1}\) & 198 & 216 & 21 & & 72 & 145 & 258 \\ \(B_{2}\) & 206 & 215 & 24 & & 254 & 167 & 160 \\ \(B_{3}\) & 47 & 266 & 40 & & 94 & 155 & 131 \\ \(\cdots\) & & & & & & \\ \(B_{89}\) & 248 & 105 & 151 & 218 & 242 & 48 \\ \(B_{90}\) & 236 & 226 & 61 & & 219 & 202 & 21 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: The complete preference order of the chief stewards to stewards. Figure 6: Comparison of Computation Time Changes and Objective Function Value Calculation Results. The one-to-many bilateral matching relationship is transformed into a one-to-one bilateral matching relationship, resulting in the preference matrix of the virtual chief standards to the stewards, and the preference matrix of the stewards to the virtual chief stewards, \(r_{ij^{\prime}}^{q}\), \(s_{ij}^{q}\). \[\widetilde{S}=\left[ \begin{matrix}\widetilde{s}_{ij}^{q}\end{matrix} \right]= \left[