# Logistics Distribution Vehicle Routing Problem with Time Window under Pallet 3D Loading Constraint
## 3 Modeling
### Load Design  
For the loading design of the pallet and carriage, this study uses the layer theory for the 3D loading constraint design. As shown in Figure 2(a),b, the specific steps are as follows.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \begin{tabular}{c} **Total Length of** \\ **the Path (km)** \\ \end{tabular} & \begin{tabular}{c} **Distribution** \\ **Cost (CNY)** \\ \end{tabular} & \begin{tabular}{c} **Unloading Time** \\ **Consumed (h)** \\ \end{tabular} & \begin{tabular}{c} **Cost of Time** \\ **Window** \\ **Violation (CNY)** \\ \end{tabular} & \
\begin{tabular}{c} **Total Cost (CNY)** \\ \end{tabular} &
\begin{tabular}{c} **Loading Rate** \\ **Violation (CNY)** \\ \end{tabular} \\ \hline Traditional 3D & 70 & 280 & 2 & 69.3 & 349.3 & 87.5\% \\ loading solution & 70 & 280 & 0.83 & 0 & 280 & 84.4\% \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of distribution optimization schemes considering pallet loading.  
Figure 3: Scheme flow.  
Step 1: Reorder the 3D of the goods being loaded in the order of \(l>w>h\).  
Step 2: The initial traversal sequence is generated by sorting the volume of the goods in order from largest to smallest.  
Step 3: The pallet is given to the height of the carriage as a height constraint, and the leftmost-outer side of the pallet is used as the coordinate origin to check whether the three dimensions of the goods satisfy \(l\leq L,w\leq W,h\leq H\).  
Step 4: For goods that do not exceed the pallet constraint, first check \(z_{kmn}+h_{kmn}\leq H_{km}\), if they exceed the condition and then check the next goods. If they do not exceed the pallet height, then check \(y_{kmn}+w_{kmn}\leq w_{kmn}\), or else update the \(y\) coordinate, that is, go up one level for loading. If they do not exceed the pallet height, then continue to check if the length of the goods can fit into the current x-axis, that is \(x_{kmn}+l_{kmn}\leq L_{km}\). If they exceed, then update the x coordinate and go back to one level for loading, or else put the goods in the current position and update the x, y, and z coordinates again. For example, if the first cargo is loaded in an empty pallet and is detected as not exceeding the pallet in three dimensions, the new detection nodes are updated as \(x_{2}=x_{0}+l_{1}\), \(y_{2}=y_{0}\) and \(z_{2}=z_{0}\).  
Before the \(m\) pallet in the \(kth\) vehicle is placed into the \(n\) goods, the rightmost-outer coordinates, \(x_{km}\), \(y_{km}\), and \(z_{km}\), of the layer of existing loads are checked to determine if the length, \(L_{km}\), width, \(W_{km}\), and height, \(H_{km}\), of the pallet do not exceed after the \(nth\) load is placed, as expressed by the following:  
\[0\leq x_{kmn}\leq L_{km}-l_{kmn}, \tag{1}\]  
\[0\leq y_{kmn}\leq W_{km}-w_{kmn}, \tag{2}\]  
and  
\[0\leq z_{kmn}\leq H_{km}-h_{kmn}, \tag{3}\]  
where \(l_{kmn}\), \(w_{kmn}\), and \(h_{kmn}\) denote the length, width, and height of the \(nth\) goods, respectively.  
After completing the pallets at each customer point, the individual pallets are seen as rectangular bodies of the same length and width and different heights. They continue to the next level of 3D loading using machinery to move each pallet into the vehicle compartment, as shown in Figure 3.