## 3 Hybrid Algorithm--RSO-IGA
For each Space in residual_spaces:
15: Calculate placement score f(\(p\), Space) based on Equations (15) and (16)
16: f(\(p\), Space) represents the placement score, a measure of how well parcel \(p\) fits in the given space
17: c. If \(f>0\): # Placement is feasible
18: Place parcel \(p\) in the space with the highest \(f\) value
19: Split residual space into 3 subspaces (based on current parcel placement)
20: Update residual_spaces with new subspaces (Figure 4)
21: Increment placement counter (\(s=s+1\))
22: d. If no further feasible placements are found for parcel \(p\) in the current residual spaces:
23: Break out of the loop (to check the next parcel)
24: If no feasible placement (space) is found for a parcel:
25: Return False (packing not possible)
26: If all parcels are successfully placed:
27: Calculate the loading rate \(V=total\_parel\_volume\)/(\(L\times W\times H\))
28: Return True (packing is successful), \(V\) (loading rate)
29: End Algorithm
30:
```

**Algorithm 2** RSO 3D Packing Validation

### IGA Algorithm

#### 3.2.1 Encoding and Decoding

(1) Encoding

The encoding part requires that the chromosome contains all the basic information of an individual. Currently, the most common encoding method for solving vehicle routing problems is real-number encoding, which encodes the visiting sequence of customer points. The solution space is the full permutation of the visiting sequence, and the corresponding space complexity is related to the number of customer points. However, this paper also needs to consider three-dimensional loading constraints and the practical conditions of campus delivery. Therefore, while considering the route as the visiting sequence, a three-layer real-number encoding method is adopted. As shown in Figure 6, a simple schematic diagram of the three-layer encoding method is provided. The first layer, _R_chrom, represents the route encoding. The sequence reflects the order in which the delivery vehicle visits the customer points, and the numbers correspond to the sequential indices of the customer points. The second layer, _L-chrom_, represents the loading sequence. The sequence indicates the order in which parcels are loaded, and the numbers correspond to the parcel demand indices associated with _R_chrom_. The third layer, _P_chrom_, represents the parcel placement encoding. The numbers correspond to the placement methods of the parcels in the vehicle, where only two placement methods are considered for the parcels in the vehicle. (2) Decoding

The decoding process involves transforming the solution represented by the encoding into specific executable operational steps. For the three-layer encoding method proposed in this paper, since the _R_chrom_ layer represents the vehicle's visiting sequence, the legality of the route must be ensured during the decoding of the _R_chrom_ layer. This requires considering the impact of three-dimensional constraints on the route. Therefore, under loading constraints, the route needs to be divided into multiple sub-routes, and a \"0 gene\" is added at the beginning and end of each sub-route to represent a complete delivery route for the delivery vehicle. Additionally, to obtain valid solutions, the _L_chrom_ and _P_chrom_ layers must undergo three-dimensional constraint verification during each decoding step. As shown in Figure 7, the red dashed line represents the pass segmentation. The first route is \"0\(\rightarrow\)6\(\rightarrow\)1\(\rightarrow\)2\(\rightarrow\)4\(\rightarrow\)0,\" and the second route is \"0\(\rightarrow\)3\(\rightarrow\)5\(\rightarrow\)7\(\rightarrow\)0.\" By repeating the above decoding process, the route plan for each trip of the delivery vehicle under this individual can be restored. Figure 6: One chromosome (taking 7 customer points as an example). Figure 7: Encoding and decoding. #### 3.2.2 Introduction of the Improved CW Savings Algorithm

To more effectively converge to the optimal solution, the CW savings algorithm is introduced, and the solution generated by the CW savings algorithm is used as the initial solution.