# Heuristic Routing Algorithms for Time-Sensitive Networks in Smart Factories
## 6 Performance Evaluation
### TT Flow Routing Experiment Based on GATTRP  
In order to verify the effectiveness of the GATTRP proposed in this paper, we built a simulation experiment environment for the TT routing problem on the MATLAB(r) R2021b software platform and developed a test program based on Algorithm 1. The simulation program is available online at [57]. We simulated a factory with 30 TT subnetworks, in which each subnetwork was abstracted as a node. When visualizing the output results, the central control server was marked with a red pentagram, the traversal routes of \(m\) TT frames were represented by line segments, and different routes were labeled with different colors. Finally, on the longest route, all propagation and processing delays that were incurred while passing through each subnetwork were summed to calculate the final output \(T\). The preset simulation parameters are shown in Table 2. We ran the experiments 30 times for each value of \(m\) and took the average value as the final result for each statistic in order to avoid misguidance by randomness. Figure 11(a)-c present some of the routing results obtained during the experiments. As the TT flows traversed through each SW, they consumed a certain amount of processing delay. We set a random processing delay for each SW with maximum values of 10 \(\upmu\)s, 15 \(\upmu\)s, and 20 \(\upmu\)s to simulate the change of the optimization target \(\min(T)\) using Algorithm 1 when the number of salesmen \(m\) changed. The results are shown in Figure 13. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**SymboloValue** & \multicolumn{2}{c}{**Description**} & \multicolumn{2}{c}{**Remarks**} \\ \hline \(n\) & 30 & The number of nodes to be traversed & Can be selected by the user \\ \(U_{0}\) & 100 & The size of the initial population & Can be selected by the user \\ \(U_{max}\) & 150 & The maximum size of the chromosome population & Can be selected by the user \\ \(I_{max}\) & 1500 & The maximum number of iterations & Parameter of the algorithm \\ \(P_{mut}\) & 40\% & The probability of mutation & Parameter of the algorithm \\ \(P_{flip}\) & 25\% & The probability of flip mutation & Parameter of the algorithm \\ \(P_{slide}\) & 25\% & The probability of slide mutation & Parameter of the algorithm \\ \(P_{drift}\) & 50\% & The probability of drift mutation & Parameter of the algorithm \\ \hline \hline \end{tabular}
\end{table} 
Table 2: TT flow routing simulation parameters. Figure 12: Comparison of traversal routes when the number of salesmen changed: (**a**) traversal route of one salesman; (**b**) traversal routes of three salesmen; (**c**) traversal routes of five salesmen. From the experimental results, we could confirm that it was feasible and effective to solve the routing problem of TT nodes based on the idea of solving the MTSP. With an increase in the number of salesmen, SW hops on the routes decreased and the propagation and processing delays on the longest route were correspondingly reduced. Considering that the number of parallel ingress and egress ports of the central control server is limited and that network wiring has comprehensive limitations from environment and financial costs, the value of \(m\) had to be properly set within a reasonable range. In addition, we observed that the higher the processing delay of the subnetworks, the better the optimization effect. Therefore, the larger the overall network size, the more obvious the optimization effect of the GATTRP. To illustrate the operational efficiency of Algorithm 1, we conducted comparative experiments using several other algorithms. Figure 14 shows GVNS, which is the general variable neighborhood search algorithm proposed by [PERSON] [58], GA2 PC, which is the two-segment GA proposed by [PERSON] et al. [34], TCX, which is the improved GA with a two-part chromosome crossover operator proposed by [PERSON] et al. [59], and GATTRP, which is Algorithm 1 from this paper. All four algorithms were tested using the same \(G(V,E)\) with \(m=5\) and a processing delay of up to \(20\mu s\).