## 3 Problem Definition and Formulations
### Graphical Formulation
#### 3.2.2 Network Flow Constraints  
As shown in Table 3, there is no direct arc between depots because empty containers are usually transported between the terminal, depots, and customers. The balance of empty containers at various depots can be handled during the scheduling process, and thus the unprofitable transportation of empty containers between depots is prohibited. Additionally, there is also no direct arc between identical vertices. In such cases, the truck is essentially waiting at that vertex, which can be explicitly reflected in the model.  
In addition to the common arcs that are disallowed in Table 3, there is also a special arc for the IE and OE requests, referred to as the forbidden arc. The forbidden arc indicates that no flow is permitted from an IE request vertex to an OE request vertex. If an IE request is paired with an OE request, then the transportation of the empty container within the terminal is, in essence, a transshipment operation that can be carried out by an internal truck. This, however, falls outside the scope of our study. Therefore, although the vertices of IE and OE requests are within the same terminal, they are still assigned unique numbers to ensure that each request is executed and the direction from IE to OE is forbidden.  
Furthermore, to reduce the number of arcs within the network, hyperarcs are introduced for IF or OF requests, which must be transported between the terminal and customer vertices. For example, if a truck departs from a depot \(i\in N_{d}\) to serve an IF request vertex \(j\in N_{DFC}\), the truck must proceed to the designated place at the terminal to pick up the inbound full container and finally deliver it to the customer vertex with the transfer time \(t_{i0}+t_{0}+t_{0j}\). Note that the detour through the terminal is a necessity and the total transfer time on arc \((i,j)\) can be easily calculated. Therefore, for the arc \((i,j)\), where \(i\in N_{PFC}\) or \(j\in N_{DFC}\), the terminal node can be considered a bypass node, and thus the arc \((i,j)\) is called a hyperarc.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \((i,j)\) & \(j\in N_{d}\) & \(j\in N_{DEC}\) & \(j\in N_{DEC}\) & \(j\in N_{PEC}\) & \(j\in N_{PFC}\) \\ \hline \multirow{4}{*}{\(i\in N_{d}\)} & \multirow{4}{*}{/} & Picking up an empty container from the depot \(i\) and proceeding to vertex & \multirow{4}{*}{/} & Proceeding to vertex and proceeding to the \(j\) & \multirow{4}{*}{Proceeding to the \(i\) shipper \(j\)} \\  & & \(j\) & & & \\  & & \(t_{ij}\) & \(t_{0}+t_{0}+t_{0j}\) & & \\  & & & & & \\  & & & & & \\  & & & & & \\ \multirow{4}{*}{\(i\in N_{DEC}\)} & Returning to the depot \(j\) & \multirow{4}{*}{/} & \multirow{4}{*}{/} & \multirow{4}{*}{/} & \multirow{4}{*}{Proceeding to the \(j\) shipper \(j\)}  
Due to capacity constraints, sometimes a truck is unable to perform any activity between two specific vertices. Consider, for instance, a scenario where a truck is assigned two requests, \(i\in N_{PFC}\) and \(j\in N_{PFC}\), in the same journey. If a truck has picked up a full container from the customer, it will not have the capacity to accommodate an empty container. Before visiting vertex \(j\in N_{DEC}\), it must first deliver the full container to the terminal. After unloading, the truck should then proceed to a vertex that can supply an empty container.  
Apart from the above constraints, two vertices can be freely connected, as long as the maximum working time of trucks is not exceeded. In this study, a truck's journey is deemed complete upon its departure from a depot and subsequent return to the same or another depot. Should sufficient working time remain after the completion of a journey, the truck may be dispatched to fulfill additional requests. However, in such cases, a new index number will be assigned to the truck and each journey will be treated as independent of the others.  
To effectively incorporate these network flow constraints, Equations (9)-(22) are integrated into the mathematical model.