## 3 Problem Description and Formulation
### Quadratic Semi-Assignment Model M1 with Capacity Constraints  
Based on the above expanded network, our problem can be formulated as the following quadratic semi-assignment model with capacity constraints (QSAP-C, M1):  
\[\textbf{Min}\sum_{k\in K}\sum_{l\in L}\sum_{j\in J}f_{kj}\textbf{d}_{kl}\textbf{x }_{kl}+\sum_{l\in L}\sum_{l\in L}\sum_{k\in K}\sum_{j\in J}f_{kj}\textbf{d}_{ll} \textbf{x}_{kl}\textbf{y}_{fj}+\sum_{l\in L}\sum_{j\in J}\sum_{k\in K}f_{kj} \textbf{d}_{l}\textbf{y}_{fj} \tag{1}\]  
\[\sum_{l\in L}\textbf{x}_{kl}=\textbf{1}\;\forall\;k\in K \tag{2}\]  
\[\sum_{l\in L}\textbf{y}_{fj}=\textbf{1}\;\forall\;j\in J \tag{3}\]  
\[\sum_{k\in K}\sum_{j\in J}\textbf{x}_{kl}\textbf{f}_{kj}+\sum_{k\in K}\sum_{j \in J}y_{fj}\textbf{f}_{kj}-\sum_{k\in K}\sum_{j\in J}\textbf{x}_{kl}y_{fj} \textbf{f}_{kj}\leq C\textbf{ap}_{(L\textit{f})}\;\forall\;\left(l,\textit{ f}\right)\in\left(L,L^{\textit{\text{\text{\text{\text{\text{\text{\text{\text{\text{\text{\text{ \text{\texttexttexttexttexttexttexttexttexttexttext  
one warehouse can only be covered by a single DC. Constraint (3) requires that one station is assigned to exactly one DC. Constraint (4) specifies that the capacity of DCs cannot be exceeded. Constraints (5) and (6) describe two sets of binary variables.  
The left-hand-side of constraint (4) is interpreted as the incoming (or outgoing) flow summation for the combination of \((l,l^{\prime})\), corresponding to the actual DC \(l\). To be specific, Figure 5 shows a potential feasible solution for the illustrative example shown in Figure 4, which can be further checked to know whether the capacity is sufficient. For DC \(l_{1}\) (combination of \((l_{1},l^{\prime}_{1})\)), the incoming bottleneck should consider the flow on link \((k_{1},l_{1})\), \((l_{2},l^{\prime}_{1})\), and \((l_{3},l^{\prime}_{1})\), as shown in Figure 5(a). Figure 5(b) shows the outgoing bottleneck links, i.e., link \((l_{1},l^{\prime}_{2})\), \((l_{1},l^{\prime}_{3})\), and \((l^{\prime}_{1},l_{3})\). As the flow balance for each node in layer \(L\) (Figure 6(a)) and \(L^{\prime}\) (Figure 6(b)), bottleneck links are links \((l_{1},l^{\prime}_{1})\), \((l_{1},l^{\prime}_{2})\), \((l_{1},l^{\prime}_{3})\), \((l_{2},l^{\prime}_{1})\), and \((l_{3},l^{\prime}_{1})\) (Figure 6(b)). The term of \(\sum_{k\in K}\sum_{j\in I}x_{kl}f_{kj}+\sum_{k\in K}\sum_{j\in I}y_{l^{\prime} j}f_{kj}\) in Equation (4) covers all flow on bottleneck links but calculates the internal transfer link (link \((l_{1},l^{\prime}_{1})\)) twice, where the recalculated flow can be expressed as \(\sum\limits_{k\in K}\sum_{j\in I}x_{kl}y_{l^{\prime}j}f_{kj}\) and we finally obtain constraint (4) by removing this part.  
Figure 5: A potential feasible solution for QSAP-C.  
Figure 6: DC \(l_{1}\) can be a bottleneck as all incoming flow (direct transport + transfers) could exceed outgoing handling capacity.  
The proposed formulation differs from the standard quadratic assignment problem (QAP) (e.g., [51]), in terms of its sets of constraints. In the QAP, facilities need to be allocated to the locations such that each facility is allocated to exactly one location, and every location can only be assigned to one facility to minimize the total transportation costs, which are equal to the sum of the products of flows and distances. The connection between standard QAP and QSAP-C formulation is given in Appendix A.1.