To address the HAVDRP problem, the challenges lie not only in correctly allocating delivery tasks to ADVs, VDs, or IDs but also in optimizing the collaborative routes of ADVs and VDs. The Gurobi solver can only find the optimal solution for small-sized HAVDRP problems. However, solving larger problems with Gurobi may require a significant amount of time to reach the optimal solution. Therefore, in this paper, we introduce the Hybrid Clarke and Wright Saving Heuristic (HCWH) algorithm and the IALNS algorithm for more efficient problem-solving. The HCWH algorithm first assigns tasks to ADVs or drones based on customer demand and distance. Then, it constructs the routes for ADVs and drones using heuristics such as the saving heuristic and the greedy insertion heuristic. On the other hand, the IALNS algorithm employs targeted optimization operators and an improved adaptive mechanism to optimize the initial solution generated by the HCWH algorithm, eventually leading to an approximately optimal solution.
4.1. Hybrid Clarke and Wright Saving Heuristic
The HCWH, which is based on the saving algorithm, consists of three main components: ADV route construction (Step 2), VD route construction (Step 3), and ID route construction (Step 4). Pseudo-Code for the HCWH Algorithm is shown in Algorithm 1 and an example of the algorithm is shown in
Figure 3. The algorithm follows the specific steps outlined below.
Step 1: Determine if a customer node can be serviced by an ID based on the distance from the depot node to the customer and the weight of the customer’s demand. Classify customer nodes into two sets: for customers that can be serviced by IDs and for customers that require collaboration between ADVs and VDs for delivery.
Step 2: Construct the local optimal ADV routes for the customers in , treating it as a Capacitated Vehicle Routing Problem (CVRP). Solve the CVRP using the Clarke and Wright saving algorithm. Then, optimize the CVRP solution using well-known local search methods such as 2-opt, swap and shift to obtain the optimal CVRP solution.
Step 3: Assign some nodes from the ADV routes to the VD routes based on the optimal CVRP solution obtained from Step 2. Construct the VD routes using the heuristic named “insert the existing routes first and create new routes second”.
Step 4: Construct the ID routes for the customers in
using the same heuristic in step 3.
Algorithm 1: Pseudo-Code for the HCWH Algorithm |
![Drones 09 00280 i001]() |
4.1.1. ADV Route Construction
To construct the ADV routes for the customers in , which can be viewed as a CVRP, we employ the saving algorithm proposed by Clark and Wright along with classic neighborhood search methods such as 2-opt, swap and shift. The specific steps are as follows:
Step 1: Use the saving algorithm to construct the local optimal ADV routes, considering the constraints of capacity and maximum endurance time for the ADVs.
Step 2: Utilize classic neighborhood search methods, including 2-opt, swap, and shift, to optimize the local optimal ADV routes.
Step 3: Compare the optimized ADV routes with the local optimal ones. If the optimized ADV routes are better, adjust the local optimal ADV routes to the optimized ones and repeat Step 2. Otherwise, the optimal CVRP solution is obtained and the ADV route construction is completed.
4.1.2. VD Route Construction
To construct the VD routes, this paper applies the heuristic named “insert the existing routes first and create new routes second”. This process involves allocating some customer nodes from the ADV routes to the VD routes for delivery. The specific steps for VD route construction are as follows:
Step 1: Starting from the first customer node of each ADV route, determine whether the customer with demand weight can be allocated to a VD for delivery. If cannot be delivered by a VD, continue to the next customer node until a suitable node is found.
Step 2: If there are some existing active VD routes, try to insert into one of the existing active VD routes using the greedy insertion approach to minimize the distance increment of the new inserted route. Check whether the inserted VD route satisfies constraints of payload capacity, maximum endurance time and battery life. If it does, which means the insertion of is successful, go to Step 4; otherwise, move to Step 3.
Step 3: Determine whether is one of the launch or receive nodes for the existing active VD routes. If not, select an available VD and create a new VD flight with as a required node to be visited. The preceding and subsequent nodes in the ADV route with respect to become the launch node and receive node of the VD route for the new flight, respectively. Check whether the VD route for the new flight is feasible. If yes, the new VD route with is successfully created. Otherwise, remains in the ADV route.
Step 4: Repeat Steps 1–3 until all nodes in the ADV routes have been checked for potential allocation to VD routes.
4.1.3. ID Route Construction
To provide delivery service for all customers in set , the ID routes need to be constructed. The method for ID route construction is similar to VD route, following the same heuristic named “insert the existing routes first and create new routes second”. However, there are several differences between ID route construction and VD route construction:
Step 1: Select a customer from . If there are any existing active ID routes, try to insert into one of the existing active ID routes using the greedy insertion approach to minimize the distance increment of the newly inserted route.
Step 2: IDs do not need to be launched and received on the ADVs. Instead, they need to be launched and received at the depot. Each ID has a maximum working time constraint. Therefore, it is necessary to check whether the inserted ID route satisfies constraints of payload capacity, maximum endurance time and maximum working time. If it does, go to Step 4, otherwise, move to Step 3.
Step 3: Create a new flight of an available ID with as a required node to be visited. The ID will be launched and received at the depot in this new flight. Check whether the ID route with this new flight satisfies the constraint of maximum working time. If it does, which means the creation of the new flight is successful, go to Step 4; otherwise, reassign this new flight to another available ID until the creation of the new flight is successful.
Step 4: Repeat Steps 1–3 until all nodes in have been assigned to IDs for delivery.
4.2. Improved Adaptive Large Neighborhood Search
Adaptive Large Neighborhood Search (ALNS), originally proposed by Ropke and Pisinger [
76], has been widely used for solving VRPD problems. This approach has been adapted from the work of Ropke and Pisinger and Pisinger and Ropke [
76,
77]. To address the HAVDRP, we have improved the ALNS algorithm by integrating the Tabu Search algorithm and re-initialization, resulting in the IALNS algorithm.
Due to the complexity of the HAVDRP, the IALNS algorithm needs to optimize three different types of routes: ADV routes, VD routes and ID routes. If destroy and repair operators of the IALNS algorithm are designed separately for each route type, it would be challenging to design the repair operators for all types of routes. To overcome this challenge, in this paper, we combine a pair of destroy and repair operators as an optimization operator. These optimization operators are used to perform a neighborhood search for the solution. This approach not only reduces the difficulty of optimization operators design, but also allows for quantitative analysis of their performance to determine whether or not to keep them.
Furthermore, the destroy and repair process of optimization operators involves a certain degree of randomness, which potentially results in the emergence of duplicate solutions or local optima. To address this problem, the IALNS algorithm incorporates a tabu list and a re-initialization procedure within its acceptance criterion to prevent the re-search of the previously explored solutions and escape the local optima. Additionally, it reduces the weight of optimization operators that frequently result in duplicate solutions, enabling the algorithm to escape local optima more quickly. The pseudocode of Algorithm 2 illustrates the framework of the IALNS algorithm.
Algorithm 2: Pseudo-Code for the IALNS Algorithm |
![Drones 09 00280 i002]() |
The specific steps of the IALNS algorithm are as follows:
Step 1: Input the required parameters and initialize the current solution , the best solution , the number of iterations , and the initial tabu list (Line 1–2). The initial solution is obtained by HCWH algorithm.
Step 2: Use the roulette wheel algorithm to select an optimization operator from the operator set based on their weights. Use this operator to optimize the current solution , obtaining a new solution (Line 6–7).
Step 3: Check if the new solution is in the tabu list . If not, proceed to Step 4. Otherwise, update the operator weights based on the adaptive mechanism (Line 20–21) and return to Step 2 for the next optimization (Line 8).
Step 4: Determine whether to update the current solution and the best solution based on acceptance criteria. Compare the new feasible solution with the current solution . If is better, update to ; otherwise, use the Metropolis acceptance criterion to determine whether to update the current solution. If is better than the best solution , update to (Line 9–16).
Step 5: Update the operator weights, the tabu list and the current temperature (Line 17–19).
Step 6: Repeat Steps 2–5 until reaches the termination temperature , completing one iteration. Update the iteration count , the iteration without improvement count and reset to its initial temperature (Line 4–22).
Step 7: Re-initialize the current solution and reset to 0 if the best solution is not improved after iterations (Line 23–25).
Step 8: Repeat Steps 2–7 until reaches the maximum iteration number , obtaining the final best solution (Line 3–23).
4.2.1. Optimization Operators
The HAVDRP solution consists of three types of routes: ADV routes (), VD routes (), and ID routes (). Additionally, VD routes and ID routes can be divided into sub-routes based on different flights. This paper proposes specific optimization operators for each type of route. The proposed optimization operators include:
- (1)
Operators of the ADV route
Operator 1: Intra-route random removal and random insertion. Randomly remove customers from a specific ADV route (, where and is an integer). Then, insert the customers one by one into a random position of .
Operator 2: Inter-route random removal and greedy insertion. Randomly remove customers from a specific ADV route , and then greedily insert these customers into another ADV route based on the shortest route distance increment.
Operator 3: Inter-route continuous removal and greedy insertion. Randomly remove a continuous set of customers from a specific ADV route . Then, greedily insert these customers into another ADV route based on the shortest route distance increment. If the customers include both the launch and receive nodes of a VD’s flight in ADV route , the flight is also assigned to a VD in ADV route . Instead, if the removal of the customers breaks a VD’s flight in ADV route , the customer nodes in the broken flight are greedily inserted into .
- (2)
Operator of the VD route
Operator 4: Intra-route random removal and greedy insertion. Randomly remove a customer from all of the VD’s sub-route where (, which means the VD serves at least 2 customers in the th flight). Then, greedily insert back into in a way that minimizes the route distance increment.
- (3)
Operators between the ADV route and the VD route
Operator 5: Random removal of VD sub-route and greedy insertion into ADV route. Randomly remove all customers from a sub-route in its th flight of VD . Then, greedily insert the removed customers into the ADV route (the VD is carried by ADV ) based on the shortest route distance increment.
Operator 6: Exchange between the ADV route and the VD route. Randomly select a customer from a sub-route of VD . And randomly select a customer from the ADV route (the VD is carried by ADV ). Then, swap the positions of and .
Operator 7: Random removal and greedy insertion of launch or receive nodes. Select the launch node or the receive node from a random sub-route of VD . Select the one that can lead to more saving after being removed for . Remove (or ) from and , then greedily insert it back as a customer to be served by VD in . The previous one node of (or the next one node of ) in is employed as the new launch node (or receive node) of .
Operator 8: Replacement of launch or receive nodes for VD sub-routes. Randomly select a launch node (or a receive node ) for the sub-route of VD (the VD is carried by ADV ). Replace (or ) with another customer node .
Operator 9: VD sub-route creation. Randomly select a customer node from an ADV route , where is not a launch or receive node and it can be served by a drone. Randomly select an available VD carried by ADV , and create a new sub-route of VD . Place into and let VD serve . The launch and receive node of are the previous one and next one node of in , respectively.
- (4)
Operators of the ID route
Operator 10: Merge of ID sub-routes. Randomly select two sub-routes and from ID . Remove from the route of ID and greedily insert the customer nodes of into based on the shortest route distance increment.
Operator 11: Split of ID sub-routes. Randomly select a sub-route of ID , where . Randomly select a customer from and create a new sub-route for ID , where is to be serve by ID in .
- (5)
Operators between the ADV route and the ID route
Operator 12: Random removal of ID sub-route and greedy insertion into ADV route. Randomly remove a sub-route of ID . Then, greedily insert the customer nodes of into an ADV route .
Operator 13: Random removal from ADV route and greedy insertion into ID route. Randomly remove customers from an ADV route . Then, greedily insert these customers into sub-routes of an ID in based on the shortest route distance increment.
4.2.2. Feasibility Repair of the Solution
While designing the operators, the characteristics of different routes of the solution were considered. However, it is still possible to obtain some infeasible solutions during the optimization. Specifically, when optimizing the routes of ADVs, it may lead to infeasible routes for VDs. To address this issue, two feasibility repair methods are proposed.
Repair Method 1: Repair the launch and receive nodes intra VD sub-route. This method corrects the order of launch and receive nodes within the same VD sub-route. In a VD sub-route, the launch node should be visited before the receive node following the sequence of the ADV route. However, the optimization may lead to an infeasible route, as depicted in
Figure 4a, where the VD lands before taking off for the delivery to customer 8. To rectify this, swap the positions of the incorrectly placed launch and receive nodes. Repair method 1 is employed in this case, and the corrected outcome is illustrated in
Figure 4b.
Repair Method 2: Repair the launch and receive nodes inter VD sub-routes. This method adjusts the sequence of launch and receive nodes for different flights of the same VD. In the sub-routes of different VD flights, the VD should be received in the current flight before being launched for the next flight following the sequence of the ADV route. However, the optimization might lead to an infeasible scenario, as illustrated in
Figure 5a. To resolve this issue, we will swap the receive node of the current flight with the launch node of the next flight. In this case, repair method 2 is applied, and the corrected outcome is presented in
Figure 5b.
It is important to note that these feasibility repair methods can correct some infeasible solutions. But there may still be violations of the assumptions and constraints of the problem. Therefore, it is still necessary to check the feasibility of new solutions based on the problem’s assumptions and constraints proposed in
Section 3.
4.2.3. Adaptive Mechanism
In the HALNS algorithm, an adaptive mechanism is employed to adjust the weights of the operators. This allows for the selection of better-performing operators throughout the search process. In the IALNS algorithm, the adaptive mechanism is further improved by incorporating a tabu list. The operator weights are adjusted in cases of infeasible solutions or solutions in the tabu list, thereby enhancing the algorithm’s suitability for addressing the HAVRPD problem.
During the search process, the operator weights are adaptively adjusted based on their performance. The better an operator performs in each optimization, the greater its weight update and the higher its probability of being selected in the next optimization. The calculation of operator weights is shown in Equation (52), where
is the adjustment speed coefficient
,
and
donate the
th iteration and
th optimization of the
th iteration,
is the weight of the operator,
is the score of the operator, and
is the frequency the operator is used.
The operator score
can be divided into the five conditions (where
) according to the feasibility and improvement of the new solution, as is shown in
Table 3.
4.2.4. Acceptance Criterion
In the IALNS algorithm, new solutions are always accepted if they are better than
or
. Furthermore, a simulated annealing acceptance criterion is adopted for solutions that are worse than
. The probability of accepting a new solution is calculated based on Equation (53), taking the temperature and the gap of objective values into account. Accepting some worse solutions helps prevent the algorithm from getting stuck in local optima.
Furthermore, in the IALNS algorithm, we introduce a re-initialization procedure to prevent the algorithm from converging to local optima. Preliminary computational experiments revealed that one of the main reasons for the algorithm’s entrapment in local optima is due to the incorrect selection of delivery methods (between ADVs or VDs) for customers. Therefore, in the IALNS algorithm, if the optimal solution has not improved after iterations, the best solution is re-initialized as the new current solution to escape the local optimum. The specific steps for the re-initialization are as follows:
Step 1: Select continuous customer nodes from an ADV route and place them into the set .
Step 2: In the sub-route of VDs carried by the ADV, if the launch or receive node of the sub-route is in , remove that sub-route from the VD route and greedily insert these customer nodes into the ADV route.
Step 3: Repeat the step 1~2 steps until all ADV and VD routes in have been re-initialized.
Additionally, to improve search efficiency and avoid accepting duplicate solutions, a tabu list is incorporated in the IALNS algorithm. The tabu list includes a certain number of different solutions that have been obtained in the past optimizations. When a new solution appears, the tabu list will remove the first solution in the list and place the new solution at the end, thus completing the update of the tabu list. If a new solution is in the tabu list, it will not be accepted, and the algorithm will proceed to the next optimization after updating the operator weights.