## 4 Simulations  
This section aims at comparing the performance of the standard TSP to the TSP with clusters (which, from now on, we refer to as \"cluster TSP\"). To achieve this result, the mathematical model described in Section 3 is simulated in Matlab by varying the ruling parameters:  
* The number of parts \(N_{c}\). * The number of products \(N_{p}\). The BOM matrix \(M\) is randomly generated, and for each part, \(t_{set,k}\) is randomly assigned. As a result, the total number of reconfigurations between two products (\(S_{ij}\)) is calculated by means of Equation (2). For each set of \(N_{c}\) and \(N_{p}\), the simulations are run 20 times for statistical relevance. Figure 1: Optimization process. Starting from the matrix \(BOM\) as an input, it is possible to obtain the optimal sequence to be applied to the system. Figure 2: An example of the multi-clustering process: starting from the first family \(F_{1}\) (with 3 parts), multiple clusters are created by dividing the first clusters based on the families \(F_{2}\) and \(F_{3}\) (each with 2 parts). Clusters in the green box are used for the TSP. The results are shown in Figures 3 and 4. As expected, in general, the overall cost provided by the solution of the cluster TSP (Figure 3b) is higher than the one of the full TSP (Figure 3a). This result is perfectly reasonable since the full TSP aims at finding the best solution to the problem, while the cluster TSP applies some constraints on the connections that force the final solution to diverge from the optimal one. In this sense, the cluster TSP provides a sub-optimal solution which satisfies the constraints provided during the definition of the problem. However, the final cost of the cluster TSP is generally very close to the cost of the full TSP (Figure 3c). In this sense, an enterprise could apply some constraints to the problem (maybe not directly related to the setup time) without the worry of drastically reducing the performance of the system. Figure 3: Simulation results: overall cost. (**a**) The cost of the solution of the Full TSP; (**b**) The cost of the solution of the Cluster TSP; (**c**) The cost of the solution of Cluster TSP divided per the corresponding cost of the solution of Full TSP. On the other hand, the computational time (Figure 4) is where generally the cluster TSP outperforms the full TSP. In fact, the performance of the solver depends on the implementation itself, but we have found that for most of the tests, the cluster TSP requires less computational time than that of the full TSP. This result is also highly influenced by the punctual load of the PC, and it can be found sometimes (Figure 3c) that the full TSP is faster than the cluster TSP. Furthermore, this influence is even more relevant with lower \(N_{c}\) and \(N_{p}\), where the computational time of the two TSP is generally lower than a tenth of a second. In this scenario, the TSP implementation is of no use, and the SMED approach should be used. By analyzing Figure 3c, it is worth noting that the cluster TSP is more appealing if the number of products to be handled is high. In this way, it is possible to obtain a sub-optimal solution in a reasonable time. Figure 3a,b shows how, in general, with equal \(N_{p}\), the computational time decreases with \(N_{c}\). This is due to the number of constraints applied to the problem: if the number of parts is low, the clusters usually contain a higher number of products, thus applying more constraints. Moreover, with a high number of products and a low number of parts, it is more likely to have very similar \(S_{ij}\) (Equation (2)), so it is more difficult for the algorithm to  
Figure 4: Simulation results: computational time. (**a**) The computational time of the Full TSP; (**b**) The computational time of the Cluster TSP; (**c**) The computational time of Cluster TSP divided per the corresponding computational time of Full TSP. find an optimal solution. This issue can be solved by improving the algorithm that solves the TSP [48].