## 3 Hybrid Algorithm--RSO-IGA
The core idea of the CW algorithm is to calculate and compare the \"savings\" between different customer points, which refers to the distance saved by merging two customer points into the same route, thereby gradually constructing the optimal route. The initial solution is direct delivery, where a single vehicle serves each customer point separately. Although the initial solution can meet the required cargo demands, it results in excessive vehicle trips, long delivery routes, and low loading rates. In the CW Algorithm, the \"savings\" are illustrated in Figure 8. Customer points \(s\) and \(t\) are served by the distribution center \(\mathsf{o}\). Here, \(l(o,s)\) and \(l(o,t)\) represent the shortest feasible distances from the distribution center to customer points \(s\) and \(t\), respectively, and \(l(s,t)\) represents the shortest feasible distance between customer points \(s\) and \(t\). The savings from merging customer points \(s\) and \(t\) is calculated as \(\left\lvert l(s,t)+l(o,s)+l(o,t)-2l(l,o)+l(o,t)\right\rvert.\)

In the traditional CW savings algorithm, \(l(o,s)\), \(l(o,t)\), and \(l(s,t)\) are calculated using the Manhattan distance equation. However, in the context of a campus environment, the routes are more complex. Therefore, this paper utilizes the Gaode Maps API to calculate the actual road distances based on latitude and longitude rather than simple straight-line distances. The improved CW savings algorithm is implemented as follows:

1. Initialization: calculate the distance matrix \(D\) for all customer points and set the initial solution as individual routes containing the distribution center and each customer point;
2. Calculate savings: based on the distance matrix \(D\), compute the savings between all customer points and construct the savings matrix \(S\);
3. Sort savings: sort the savings matrix \(S\) in descending order to obtain the savings list \(L\);
4. Merge savings: randomly select a customer point and, following the order of the savings list \(L\), sequentially check whether merging the next customer point satisfies the three-dimensional constraints. If not, skip that customer point and proceed to the next;
5. Update routes: after each successful merge, update the current route and the set of unvisited customer points;
6. Termination: the algorithm terminates when all customer points have been visited. The improved CW savings algorithm generates feasible solutions during the route merging process and evaluates the distance savings. Simultaneously, it assesses the feasibility of merging routes based on three-dimensional constraints. As a result, the initial solutions generated by the improved CW savings algorithm are feasible and stable, facilitating the optimization of feasible solutions in the second stage using the improved GA. Unlike the traditional GA, which employs a random strategy to generate the initial population, the introduction of the CW savings algorithm provides better initial solutions, aiding convergence to the optimal solution. Additionally, the elite retention strategy is incorporated to ensure that a certain number of elite individuals are preserved during the iteration process, thereby improving the accuracy of the optimization results. Therefore, compared to the traditional GA, the proposed IGA combines the improved CW savings algorithm and the elite retention strategy, enhancing the stability of the hybrid algorithm and its global search capability for finding optimal solutions. The specific pseudocode of the improved CW savings Algorithm 3 is as follows:

Figure 8: (a,b) represent the principle of CW saving algorithm. Fitness Function Construction: The optimization objectives in this study are to minimize the route length and maximize the average loading rate. During the population iteration process, the route length is expected to decrease gradually until the optimal solution is reached. In the population evolution process, individuals with higher fitness values are more likely to be retained.