## 3 Mathematical Model  
### Model Description  
Let us consider an enterprise in the logistics field. Such an enterprise is able to provide to the customers multiple products, and each product is made of several parts. Different products are built with different parts, but different products may share some parts; clearly, different products must not be built with the same parts; otherwise, they would be considered coincident. Indeed, since this work focuses on the feeding process, the assembly phase is not considered, which may result in different final products. This approach is perfectly applicable to a kitting line, in which the parts are grouped together to form kits (i.e., products). Products and parts are summarized in the bill of materials (BOM) matrix. The BOM is a logical \(N_{p}\times N_{c}\) matrix (\(M\)), where \(N_{p}\) is the number of products and \(N_{c}\) is the number of parts. The \(M\) elements \(m_{ik}\) are as follows:  
\[M=[m_{ik}]\quad\quad,\quad\quad m_{ik}= \begin{cases}1&\text{if product $i$ is made with part $k$}\\ 0&\text{otherwise}\end{cases}  \tag{1}\]  
As stated before, for each part to be fed, a feeder is required. Thus, with a great number of parts, it is important to reduce the setup time between each changeover, i.e., between two kits. This setup time depends on the number of feeders to be reconfigured; thus, it is important to evaluate its extent. The number of reconfigurations can be calculated directly by comparing the list of parts to be used for two specific products (Table 2): if a product \(i\) uses a certain part \(k\) and another product \(j\) does not, then a reconfiguration is required. Such reconfiguration could be avoided if a very high number of feeders is installed in the workcell, but such a solution is impractical if \(N_{c}\) is high, due to the cost and encumbrance. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{Part \(k\)} & \multicolumn{3}{c}{Product \(j\), \(m_{ik}\)} \\ \cline{2-4}  & & 1 & 0 \\ \hline \multirow{2}{*}{Product \(i\), \(m_{ik}\)} & 1 & 0 & 1 \\ \cline{2-4}  & 0 & 1 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Relationship between two different products in terms of feeder changes for a generic part \(k\). Feeder resetting is to be done if only one of the products uses the specific part (and the other does not). The aforementioned comparison is equal to a XOR operation of two different rows of matrix \(M\). The resulting vector \(D_{ij}\) shows the parts for which the feeder reconfiguration is required. The total number of reconfigurations between two products \(i\) and \(j\), \(S_{ij}\) is as follows:  
\[S_{ij}=\sum_{k=0}^{N_{c}}D_{ij,k} \tag{2}\]  
where \(D_{ij,k}\) is the \(k\)-th element of vector \(D_{ij}\). It is clear that \(S_{ij}\in[1,N_{c}]\) since there is at least one part that differs between the two products (lower bound). If the reconfiguration time of one feeder for a specific part is \(t_{set,k}\), the overall cell setup time between two products \(i\) and \(j\) is as follows:  
\[t_{set,jj}=\sum_{k=0}^{N_{c}}D_{ij,k}t_{set,k} \tag{3}\]  
In Equation (3), the setup time \(t_{set,k}\) can be modified, including similarities between the parts, i.e., the fact that in some cases, it is possible to reconfigure a feeder by changing only a subset of traps, reducing the overall setup time [43]. For the sake of brevity, \(t_{set,k}\) is considered a mean time among all the possible setup times for the specific part. From Equation (3), it is possible to define a \(N_{p}\times N_{p}\) cost matrix \(C\). Such a matrix contains all the reconfiguration times:  
\[C=[c_{ij}]\quad\quad,\quad c_{ij}=t_{set,ij} \tag{4}\]  
To optimize the logistics system, \(C\) can be used: several algorithms are suitable (such as genetic algorithms [14; 21] or tabu search algorithms [15]), but in our case, we choose to use the traveling salesman problem (TSP) [44] to solve the problem, due to its ease of implementation and its non-stochastic properties.