An unmanned aerial vehicle distribution and road inspection path optimization method considering no-fly zones
By combining a two-stage optimization framework and ant colony algorithm with Dijkstra's algorithm, and integrating heterogeneous drones, delivery-inspection collaboration, no-fly zones, and battery replacement constraints, the optimal path scheme is generated. This solves the problem of models being out of touch with reality in existing technologies and improves the practicality and solution efficiency of path optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU UNIV
- Filing Date
- 2026-07-02
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies fail to effectively integrate the four elements of heterogeneous drones, delivery-inspection collaboration, no-fly zone constraints, and battery replacement, resulting in a disconnect between the path optimization model and actual application scenarios, low solution efficiency, and poor feasibility of planning schemes.
A two-stage nested optimization framework is adopted. The first stage generates the task sequence, and the second stage divides the path sequence. Combining the ant colony algorithm and Dijkstra's algorithm, and considering the constraints of no-fly zones and battery replacement, the total operating cost is optimized.
It improves the practicality and feasibility of path optimization, and is applicable to complex urban low-altitude operation scenarios with multiple constraints and tasks. It accurately calculates energy consumption and range, and outputs the optimal path solution.
Smart Images

Figure CN122491639A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for optimizing drone delivery and road inspection routes considering no-fly zones, belonging to the fields of drone application, intelligent scheduling and route optimization technology. Background Technology
[0002] With the rapid development of the low-altitude economy, drones are increasingly being used in logistics delivery and road inspection. Their collaborative operation can significantly improve urban operational efficiency and reduce labor costs. Currently, existing technologies in this field mainly focus on single-task optimization or simple collaboration, as detailed below:
[0003] 1. Drone delivery route optimization: In existing technologies, some studies have addressed the route planning problem for drone delivery by considering constraints such as battery replacement and order splitting, and designed dynamic optimization frameworks based on rolling time domain. However, most of these methods ignore the significant impact of route detours caused by no-fly zones on energy consumption and range, which can easily lead to the planning scheme failing to be implemented due to insufficient range. Other studies have used a hybrid algorithm combining genetic algorithms and multi-agent reinforcement learning to optimize the route, but have not considered the need for multi-task collaboration.
[0004] 2. Optimization of UAV inspection paths: In existing technologies, some studies have proposed a road surface defect detection scheme that combines UAVs and ground vehicles, and constructed a mixed integer linear programming model to improve detection efficiency and coverage. Other studies have transformed the task allocation problem of multi-UAV remote sensing observation into a vehicle path problem with the goal of minimizing observation time. However, such methods are only for a single inspection task and have not been integrated with delivery tasks.
[0005] 3. Unmanned Aerial Vehicle (UAV) Collaborative Path Optimization: Existing research mostly focuses on single-task collaboration between similar UAVs or collaboration between different platforms (such as UAVs and ground vehicles), and has not yet integrated delivery and inspection—two different types of tasks—into a unified path optimization framework for heterogeneous UAVs. Furthermore, most existing methods do not simultaneously consider multiple practical constraints such as no-fly zone avoidance, battery replacement, and performance differences among heterogeneous UAVs, resulting in insufficient practicality of the optimization schemes.
[0006] 4. Path optimization algorithms: In existing technologies, Ant Colony Optimization (ACO) and its hybrid strategies are widely used for vehicle and drone path optimization, such as two-stage hybrid ant colony algorithm and ACO algorithm combined with Q-learning. However, these algorithms are mostly designed for single tasks or single constraints. When directly applied to complex scenarios such as "heterogeneous drones + delivery inspection collaboration + no-fly zones + battery replacement", they cannot effectively handle the coupling effect of multiple constraints, and the solution efficiency and optimization quality are difficult to meet the actual needs.
[0007] The shortcomings of existing technologies can be summarized as follows:
[0008] 1. The four core elements of heterogeneous drones, delivery-inspection collaboration, no-fly zone constraints, and battery replacement were not integrated into a unified optimization framework, resulting in a disconnect between the model and actual application scenarios;
[0009] 2. Existing algorithms are not specifically designed for complex scenarios with multiple constraints and multiple tasks, resulting in low solution efficiency and difficulty in adapting to application scenarios of different scales.
[0010] 3. Ignoring the impact of flight detours caused by no-fly zones leads to inaccurate energy consumption and range calculations, resulting in poor feasibility of the planning scheme. Summary of the Invention
[0011] The purpose of this invention is to provide a method for optimizing the delivery and road inspection routes of drones in no-fly zones. By modeling delivery and inspection tasks in a unified manner and adopting a two-stage nested optimization framework, the first stage generates a task sequence, and the second stage divides the path into feasible sub-paths and feeds back the cost to guide pheromone updates. This minimizes the total operating cost of heterogeneous drone collaborative operations under various constraints, solving the problems of models being detached from reality and constraints not being fully considered in the prior art.
[0012] To achieve the above objectives, the present invention is implemented using the following technical solution.
[0013] This invention provides a method for optimizing drone delivery and road inspection routes considering no-fly zones, the method comprising:
[0014] Obtain task scenario information, which includes warehouses, customer points to be delivered and the demand for goods and service time windows, road segments to be inspected, no-fly zone boundaries, battery replacement stations, and the payload capacity, endurance and fixed usage costs of at least two types of heterogeneous drones.
[0015] A pre-built path optimization model is invoked, and a two-stage optimization algorithm is used to solve the path optimization model. The two-stage optimization algorithm includes:
[0016] In the first stage, multiple path sequences covering all customer points to be delivered and the endpoints of road segments to be inspected are generated iteratively;
[0017] In the second stage, each path sequence generated in the first stage is segmented to obtain a UAV sub-path sequence that meets the constraints of the path optimization model, and the total operating cost corresponding to the UAV sub-path sequence is returned.
[0018] The first stage updates the pheromone based on the total operating cost of all UAV sub-path sequences returned by the second stage, and repeats the above process until the termination condition is met, outputting the optimal path scheme.
[0019] Furthermore, the objective function of the path optimization model takes the task scenario information as input and aims to minimize the total operating cost.
[0020] The constraints of the path optimization model include path constraints, UAV activation status constraints, mission coverage constraints, payload constraints, traffic conservation constraints, endurance constraints, inspection route-specific constraints, time window constraints, no-fly zone constraints, battery replacement constraints, and departure time initialization constraints.
[0021] Furthermore, the objective function of the path optimization model is expressed as follows:
[0022] ,
[0023] In the formula, Z represents the total operating cost; p represents the cost per unit flight distance of the drone; k represents the index in K, where K represents the set of drones; i and j represent the indices in V, where V represents the set of all nodes. , This represents the set of endpoints of the road segments to be inspected. Let F represent the set of customer points to be delivered, F represent the set of battery swapping stations, and B represent the set of no-fly zone boundary points. This represents the flight distance from node i to node j; For 0-1 decision variables, when When, it means that the drone flies from node i to node j. When, it means that the drone does not fly from node i to node j; w represents the index in W, where W represents the set of drone take-off and landing fields; g represents the index in G, where G represents the set of drone models; This indicates the fixed operating cost of drone model g; A subset of K This represents the set of drones of model number g belonging to warehouse w; For 0-1 decision variables, when When, it indicates that drone k is used, when At this time, it indicates that drone k is not in use.
[0024] Furthermore, the implementation of the no-fly zone constraint includes:
[0025] Select any two nodes from the set of all nodes to form a node pair;
[0026] Determine whether the straight line between the node pairs crosses a no-fly zone;
[0027] If the straight line does not cross the no-fly zone, then a feasible path is constructed with the node pair as the endpoint; the weight of the feasible path is the Euclidean distance between the node pair.
[0028] If the straight line crosses a no-fly zone, then there is no direct feasible path between the node pairs;
[0029] The shortest feasible path matrix between all node pairs is generated based on Dijkstra's algorithm.
[0030] Furthermore, in the first stage, an ant colony algorithm is used to iteratively generate multiple path sequences covering all customer points to be delivered and endpoints of road segments to be inspected. The method includes:
[0031] Select an initialization strategy based on the customer locations to be delivered;
[0032] Based on the initialization strategy, ants are guided to traverse all nodes using pheromones and heuristic factors; wherein, all nodes include customer points to be delivered and road segment endpoints to be inspected.
[0033] Each ant visits each node in turn, and after passing through each edge, it reduces the immediate attractiveness of that edge, and generates a path sequence after visiting all the nodes.
[0034] After all ants in the ant colony have completed one iteration, pheromone evaporation is performed on all edges.
[0035] Based on the total operating cost corresponding to each path sequence, pheromone enhancement is applied to the path segments traversed by ants with low total operating costs to guide subsequent ants to construct path sequences with lower costs.
[0036] Repeat the above steps until the termination condition is met, and output the optimal path solution.
[0037] Further, the step of selecting an initialization strategy based on the customer point to be delivered, wherein the initialization strategy includes:
[0038] When the number of customer points to be delivered is not greater than the preset initialization threshold, the ant starting point is randomly initialized, and the ant selects the next node from all unvisited nodes during the path construction process.
[0039] When the number of customer points to be delivered is greater than the preset initialization threshold, the ant starting point is initialized in a hybrid manner, and during the path construction process, the ant selects the next node from the preset number of unvisited nodes closest to the current node.
[0040] Furthermore, in the second stage, each path sequence generated in the first stage is segmented using different splitting strategies based on the number of customer points to be delivered. These splitting strategies include:
[0041] When the number of customer points to be delivered is not greater than a preset splitting threshold, the path sequence is split using dynamic programming labeling method;
[0042] When the number of customer points to be delivered is greater than the preset splitting threshold, the path sequence is split using a greedy splitting method.
[0043] Furthermore, the dynamic programming notation method includes:
[0044] The path sequence is treated as a directed acyclic graph, and a set of labels is maintained for each node in the path sequence;
[0045] For any segment between two nodes in the path sequence, if the constraint is satisfied after being assigned to a drone, a new tag is generated and added to the tag list of the corresponding node;
[0046] Traverse the labels of all nodes in the path sequence to divide the path sequence into multiple UAV sub-paths that satisfy the constraints.
[0047] Furthermore, the greedy decomposition method includes:
[0048] Starting from the beginning of the path sequence, select a drone with a strong load capacity as the drone currently performing the task, and assign task nodes to the sub-path of the current drone in sequence until the load capacity or endurance of the current drone reaches its limit.
[0049] When the battery life is insufficient, evaluate and select the battery replacement station with the lowest detour cost to insert into the current drone subpath, and continue to assign tasks after replacing the battery.
[0050] Repeat the above allocation steps to divide the path sequence into multiple UAV sub-paths that satisfy the constraints.
[0051] Furthermore, before solving the path optimization model using the two-stage optimization algorithm, the method also includes preprocessing:
[0052] Based on the ability of drones to filter out invalid decision variables, if the current drone payload cannot meet the cargo demand of the current customer point to be delivered, or if the distance between two nodes exceeds the current drone's maximum endurance, then the current drone is prohibited from serving the current customer point to be delivered or the flight path between the two nodes.
[0053] Based on the non-overlapping nature of the service time windows of the customer points to be delivered, path connections that are not feasible in terms of time are eliminated.
[0054] Set usage sequence constraints for drones of the same model within the same warehouse to eliminate symmetric solutions.
[0055] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0056] The task scenario information acquired in this invention includes warehouses, customer points awaiting delivery and their cargo demand and service time windows, road segment endpoints to be inspected, no-fly zone boundaries, battery replacement stations, and the payload capacity, endurance, and fixed operating costs of at least two types of heterogeneous drones. Compared to existing technologies that typically consider only one or a few display factors, this invention integrates four core elements—heterogeneous drones, delivery-inspection collaboration, no-fly zone constraints, and battery replacement—into a unified optimization framework, preventing the model from deviating from reality and improving its practicality and feasibility. This invention proposes a two-stage optimization algorithm to solve the path optimization model. The first stage iteratively generates multiple routes covering all customer points awaiting delivery and inspection points. The first stage involves the path sequence of the road segment endpoints; the second stage divides each sequence to obtain the UAV sub-path that meets all constraints and returns the total operating cost corresponding to the sequence; the first stage updates the pheromone based on all returned costs, repeating until the termination condition is met, and outputs the optimal path scheme. This invention integrates multiple constraints into the path optimization, and compared with existing single-stage path planning algorithms, it is particularly suitable for complex urban low-altitude operation scenarios with multiple constraints and multiple tasks. This invention does not ignore the impact of path detours caused by no-fly zones, but proposes to generate the shortest feasible path matrix between all node pairs based on the Dijkstra algorithm, thereby improving the accuracy of energy consumption and endurance calculations and the feasibility of the planning scheme. Attached Figure Description
[0057] Figure 1 This is a schematic diagram of the path optimization model proposed in this invention;
[0058] Figure 2 This is a flowchart illustrating a two-stage optimization algorithm for a drone delivery and road inspection route optimization method considering no-fly zones proposed in this invention.
[0059] Figure 3 This is a schematic diagram showing the results of path optimization in a representative case of this invention;
[0060] Figure 4 This is a schematic diagram illustrating the impact of drone payload and delivery requirements on total operating costs in this invention.
[0061] Figure 5 This is a schematic diagram illustrating the impact of drone payload and delivery requirements on the number of drones used in this invention;
[0062] Figure 6 This is a schematic diagram illustrating the impact of the drone's flight time on the total operating cost in this invention;
[0063] Figure 7 This is a schematic diagram illustrating the impact of drone battery life on the number of drones used and the number of battery replacements in this invention. Detailed Implementation
[0064] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations thereof. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0065] The term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0066] This embodiment provides a method for optimizing drone delivery and road inspection routes considering no-fly zones. The core objective of this route optimization method is to address the problems of high operating costs and low efficiency caused by the separation of drone inspection and delivery tasks, neglect of no-fly zones, insufficient battery life, and unreasonable scheduling of heterogeneous drone fleets in existing technologies. Therefore, this embodiment uses a two-stage optimization algorithm to solve a pre-built route optimization model, and simultaneously achieves task-coordinated optimization under various constraints, ensuring the practicality and economy of the solution.
[0067] As a specific implementation method, this embodiment is applied in an urban low-altitude airspace environment, integrating road inspection and logistics distribution in a collaborative operation, specifically covering a square area of 15km × 15km. (See also...) Figure 1 The area includes multiple delivery customer points, roads to be inspected, drone take-off and landing warehouses, battery replacement stations, and multiple polygonal no-fly zones, which are suitable for the smart logistics and infrastructure inspection needs of small and medium-sized cities and can be directly applied to actual scenarios such as municipal road inspection and last-mile logistics delivery.
[0068] A method for optimizing drone delivery and road inspection routes considering no-fly zones specifically includes: Step S1: Obtaining task scenario information, which includes a warehouse, customer points to be delivered and their demand for goods and service time windows, endpoints of road segments to be inspected, no-fly zone boundaries, battery replacement stations, and the payload capacity, endurance, flight cost, and fixed operating cost of at least two types of heterogeneous drones. Here, a no-fly zone refers to an area where drones are prohibited from traversing; in this embodiment, the no-fly zone is preferably a polygonal area; heterogeneous drones refer to drones of different models with different payload capacities, endurance, and fixed operating costs.
[0069] By obtaining task scenario information, the core scenario of the collaborative delivery-inspection route optimization problem can be identified. The basic parameters and data settings in the core scenario are as follows:
[0070] 1. The order quantity for goods to be delivered to the customer's location is randomly generated within the range of 0-4kg;
[0071] 2. The road section to be inspected needs to cover both ends to ensure the integrity of the inspection process;
[0072] 3. Service time windows are set up at customer points to be delivered and at the ends of road sections to be inspected, and time periods are randomly assigned to ensure timely service.
[0073] 4. The unit cost of drone flight is 55 yuan per kilometer. The fixed usage cost of drones varies depending on the model. The fixed usage cost of model G1 drones is 20 yuan per drone, and the fixed usage cost of model G2 drones is 30 yuan per drone.
[0074] 5. There is no additional cost for replacing the battery at the battery replacement station for drones; only the replacement time of 5 minutes is counted.
[0075] Step S2: Invoke the pre-built path optimization model. The objective function of the path optimization model takes the task scenario information as input and aims to minimize the total operating cost.
[0076] As a specific implementation method, this embodiment preferably uses a mixed-integer linear programming (MILP) model as the pre-built path optimization model. The MILP model, through rigorous branch-and-bound mathematical algorithms, finds the global optimal solution to the problem within a finite search space and provides proof of optimality. This makes it the only reliable benchmark in this invention for verifying the accuracy of heuristic algorithms and ensuring the feasibility of the solution under all coupled constraints, thus providing irreplaceable theoretical support for accurate solutions and algorithm comparisons in small-scale scenarios.
[0077] The MILP model primarily describes the path planning problem for heterogeneous drone collaborative delivery and road inspection in no-fly zones, which this embodiment aims to solve. The objective function of the MILP model minimizes the total operating cost, and its expression is shown below:
[0078] (1),
[0079] In the formula, Z represents the total operating cost; p represents the cost per unit flight distance of the drone; k represents the index in K, where K represents the set of drones; i and j represent the indices in V, where V represents the set of all nodes. , This represents the set of endpoints of the road segments to be inspected. Let F represent the set of customer points to be delivered, F represent the set of battery swapping stations, and B represent the set of no-fly zone boundary points. This represents the flight distance from node i to node j; For 0-1 decision variables, when When, it means that the drone flies from node i to node j. When, it means that the drone does not fly from node i to node j; w represents the index in W, where W represents the set of drone take-off and landing fields; g represents the index in G, where G represents the set of drone models; This indicates the fixed operating cost of drone model g; A subset of K This represents the set of drones of model number g belonging to warehouse w; For 0-1 decision variables, when When, it indicates that drone k is used, when At this time, it indicates that drone k is not in use.
[0080] Expression (1) is the objective function of the MILP model, which aims to minimize the sum of the total flight cost and the fixed usage cost of the UAV. This objective function can balance the operating costs of different types of UAVs while ensuring the coordinated completion of road inspection and material delivery tasks.
[0081] To avoid the situation where the total payload capacity of the deployed drones in the relaxation solution cannot cover all customer demand (i.e., the total payload capacity of all deployed drones must not be less than the total demand of all customer locations), this embodiment introduces a lower bound lifting inequality based on the total payload demand, as shown in the following expression:
[0082] (2),
[0083] In the formula, This represents the quantity of goods required at node i, the customer point to be delivered. This indicates the maximum payload of the drone model number g.
[0084] Based on graph theory analysis, this embodiment constructs a lower bound inequality for the objective function. The theoretical minimum cost of the problem is calculated beforehand. To achieve the theoretical minimum cost Introducing a path optimization model as the objective function The lower bound constraint accelerates the solution process, as shown in the following expression:
[0085] (3),
[0086] In the formula, This represents the effective lower bound of the cost of drone flight. This represents the effective lower bound of the fixed usage cost of the drone; (a,b) represents the index of E, where E represents the set of road segments to be inspected; This represents the flight distance from node a of the road segment to be inspected to node b of the road segment to be inspected. This represents the flight distance from node j to node i.
[0087] against All inspection sections must be explicitly traversed, resulting in a necessary mileage of [missing information]. In addition, each delivery node All nodes must be visited, requiring each node to have at least one incoming edge and one outgoing edge. Summing the minimum incoming and outgoing edge mileage of all delivery customer nodes and multiplying by 1 / 2 ensures that no edges are counted twice in the worst-case scenario. Multiplying this minimum necessary mileage by the unit flight cost p yields a strictly valid lower bound on the flight cost.
[0088] against To meet the needs of all customers Any feasible solution requires the deployment of a certain number of drone combinations. Since the maximum payload of a single drone is... Therefore, the lower bound of the absolute minimum number of drones required is Multiply the minimum fleet size by the lowest fixed operating cost among the available options. It can be guaranteed Strictly less than or equal to the actual fixed cost of any feasible fleet configuration.
[0089] In summary, for all feasible integer solutions, The relationship always holds true, and there is no risk of incorrect pruning.
[0090] The constraints of the path optimization model include path constraints, drone activation status constraints, mission coverage constraints, payload constraints, traffic conservation constraints, endurance constraints, inspection route-specific constraints, time window constraints, no-fly zone constraints, battery replacement constraints, and departure time initialization constraints.
[0091] 1. Path constraints
[0092] The path constraint primarily ensures that each UAV departs from its respective takeoff and landing site and ultimately returns to the same takeoff and landing site as its destination, as shown in the following expression:
[0093] (4),
[0094] In the formula, Represents a 0-1 decision, when At that time, drone k starts from the origin of drone k belonging to warehouse w. Fly to node j, when At that time, drone k does not originate from the starting point of drone k belonging to warehouse w. Fly to node j; Represents a 0-1 decision, when At that time, drone k flies from node i to the destination of drone k belonging to warehouse w. ,when At that time, drone k does not fly from node i to the destination of drone k belonging to warehouse w. .
[0095] 2. Drone Activation State Constraints
[0096] (1) The drone activation status constraint associates the drone activation status with the actual task execution: the drone is only considered to be in the activation status when participating in road inspection or service delivery points, as shown in the following expression:
[0097] (5),
[0098] In the formula, Represents a 0-1 decision, when When, it means that drone k flies from node a to node b. When, it means that drone k does not fly from node a to node b; Represents a 0-1 decision, when When, it means that drone k flies from node b to node a. When, it means that drone k does not fly from node b to node a.
[0099] (2) The UAV activation status constraint also establishes a logical relationship between the UAV activation status and flight path allocation: ensuring that flight paths are allocated only to UAVs in the activation status, as shown in the following expression:
[0100] (6).
[0101] 3. Task Coverage Constraints
[0102] (1) The task coverage constraint requires that only one drone visits each customer point to be delivered, to ensure the integrity of the delivery service, as described in the following expression:
[0103] (7).
[0104] (2) The task coverage constraint requires that at least one drone passes through both ends of the road segment to be inspected, to avoid The situation where any inspection segment is missed occurs, as shown in the following expression:
[0105] (8).
[0106] 4. Load constraints
[0107] The payload constraint limits the cargo capacity of each drone to no more than the maximum effective payload corresponding to its model, as shown in the following expression:
[0108] (9),
[0109] In the formula, This represents the demand for goods at node j.
[0110] 5. Flow conservation constraint
[0111] The flow conservation constraint ensures that the in-degree and out-degree of each intermediate node are equal in path planning, thereby guaranteeing the formation of continuous and feasible flight paths, as shown in the following expression:
[0112] (10)
[0113] In the formula, h represents the index of H, and H represents the set of intermediate nodes. ; For 0-1 decision variables, when When, it means that drone k flies from node i to node h, when When, it means that drone k flies from node i to node h; For 0-1 decision variables, when When, it means that drone k flies from node h to node j. When, it means that drone k does not fly from node h to node j.
[0114] 6. Battery life constraints
[0115] (1) When the drone departs from the warehouse or battery swapping station, its range is reset to full range, as shown in the following expression:
[0116] (11),
[0117] In the formula, This represents the cumulative mileage traveled by drone k at node j; This indicates the maximum range of the drone model number g.
[0118] (2) Range Constraints: When the UAV departs from other nodes (not the starting point or battery swapping station), the cumulative mileage of the UAV must be greater than or equal to the remaining range when reaching the current node minus the flight distance from the current node to the next node, as shown in the following expression:
[0119] (12)
[0120] In the formula, This represents the cumulative mileage traveled by drone k at node i.
[0121] (3) The cumulative mileage of the drone must not be less than zero at any point, nor can it exceed the inherent maximum mileage of the model, to ensure that the battery power is always within a feasible range, as shown in the following expression:
[0122] (13).
[0123] (4) The endurance constraint restricts the cumulative mileage of the UAV to 0 at the time of departure from the warehouse, ensuring that the UAV has not performed other tasks at the beginning of the mission, as shown in the following expression:
[0124] (14)
[0125] In the formula, This indicates the starting point of drone k within the warehouse w. The cumulative mileage at the location.
[0126] (5) Range Constraints: When the UAV completes all tasks and returns to the warehouse endpoint, its cumulative mileage must be less than or equal to the inherent maximum range of the model, thereby ensuring that the UAV can return safely without running out of power en route, as shown in the following expression:
[0127] (15)
[0128] In the formula, This indicates that drone k returns to the destination of drone k belonging to warehouse w. The cumulative mileage at the location.
[0129] 7. Specific constraints for patrol sections
[0130] The specific constraint for each inspection segment requires that each road segment to be inspected, regardless of the direction of travel, be covered by at least one drone at a time to meet basic road inspection needs, as shown in the following expression:
[0131] (16).
[0132] 8. Time window constraints
[0133] (1) Time window constraint: For each road segment to be inspected, the time when the UAV arrives at the endpoint of the road segment must not be earlier than the start time of the time window of that endpoint. That is, it is not allowed to leave the endpoint before the time window opens, but it can wait until the start time before starting the inspection, as shown in the following expression:
[0134] (17)
[0135] In the formula, This indicates the time when drone k arrives at node i; Indicates the start time of the time window for node i; Indicates a sufficiently large constant. The specific value depends on the actual range of values of the variables in the problem; For 0-1 decision variables, when When, it means that drone k meets the time window requirement of node i, when When this occurs, it indicates that drone k does not meet the time window requirement of node i.
[0136] (2) Time window constraint: For each road segment to be inspected, the time when the UAV arrives at the endpoint of the road segment must be no later than the end time of the time window of that endpoint. That is, it is not allowed to leave the endpoint after the service time window has closed, as shown in the following expression:
[0137] (18)
[0138] In the formula, This indicates the end time of the service time window for node i.
[0139] (3) Time window constraint: For each inspection road, at least one UAV must visit the road to meet the service time window requirement, as shown in the following expression:
[0140] (19).
[0141] (4) Time window constraint: Bind the time window satisfaction to the access action. (If drone k satisfies the time window of point i), then the drone must have visited node i. Conversely, if the drone has not visited node i, the right-hand side is 0, and the constraint is enforced. ,Right now Specifically, as shown in the following expression:
[0142] (20).
[0143] (5) Time window constraint: The arrival time of the drone must strictly meet the service time window given by the customer to be delivered, that is, the arrival time is no earlier than the start time of the earliest service time window and no later than the end time of the latest service time window. Early delivery or delayed delivery is not allowed, as shown in the following expression:
[0144] (twenty one).
[0145] (6) The time window constraint is based on the Miller-Tucker-Zemlin (MTZ) method to ensure that the route time sequence is reasonable, eliminate sub-loops, and maintain the monotonically increasing characteristic of the time variable, as shown in the following expression:
[0146] (twenty two),
[0147] In the formula, This indicates the time when drone k arrives at node j; This represents the flight time of the drone from node i to node j; This indicates the duration of the drone's stay at the battery swapping station; It represents a sufficiently large constant, the specific value of which depends on the actual range of values of the variables in the problem.
[0148] In the time window constraint, if as well as Setting it too large will cause the lower bound after relaxation in linear programming to be too loose, weakening the tightness of the model; conversely, if... as well as Setting the value too small may result in the rejection of valid feasible solutions. Therefore, to enhance the model's solution performance, this embodiment adopts a more compact value. as well as Specifically, as shown in the following expression:
[0149] (twenty three),
[0150] 9. No-fly zone restrictions
[0151] Select any two nodes i and j from the set of all nodes to form a node pair; the set of all nodes V contains all warehouses, customer points to be delivered, road segment endpoints to be inspected, battery swapping stations, and no-fly zone boundary points;
[0152] Construct an undirected graph (Graph) and determine whether a straight line between pairs of nodes crosses a no-fly zone.
[0153] If the straight line does not cross the no-fly zone, then construct a feasible path with the node pair as the endpoint, add an edge (i,j) to the undirected graph Graph, and set the weight of the feasible path corresponding to the node pair to the Euclidean distance between the node pairs;
[0154] If the straight line crosses a no-fly zone, there is no direct feasible path between the node pairs;
[0155] The shortest feasible path between all node pairs is calculated using Dijkstra's algorithm. A new distance matrix D is then generated based on these shortest feasible paths, where each element represents the shortest feasible flight distance from node i to node j. This embodiment transforms no-fly zone constraints into path distance calculations, simplifying the assessment of path feasibility while ensuring that all flight routes comply with airspace safety regulations.
[0156] 10. Battery Replacement Constraints
[0157] The battery replacement constraint is implemented through the reset logic of the cumulative mileage variable: when the drone departs from the battery swapping station, its cumulative mileage is updated to 0 and will not inherit the previously accumulated mileage. That is, it starts flying with full range, thus simulating the action of replacing the battery.
[0158] Battery replacement constraints limit the full recovery of flight capability after a battery replacement is performed, and the battery replacement time for drones is fixed.
[0159] 11. Initialize constraints at departure time
[0160] The initialization constraint for the departure time is set so that drone k arrives at the starting point of drone k belonging to warehouse w. The time at that point is 0, that is .
[0161] In addition to the constraints mentioned above, this embodiment also sets the flight time between any two nodes as the ratio of the flight distance between the two nodes to the flight speed of the UAV, i.e. ; v represents the flight speed of the drone.
[0162] Step S3: Before solving the path optimization model using the two-stage optimization algorithm, the path optimization method for drone delivery and road inspection considering no-fly zones proposed in this embodiment also includes a preprocessing step. The core of the preprocessing is to utilize the physical characteristics and logical constraints of the problem to identify and eliminate infeasible decision variables in advance, while optimizing model parameters and improving the solution quality of linear relaxation. The preprocessing includes:
[0163] 1. Screening invalid decision variables based on UAV type
[0164] Based on the physical limitations of drone payload and range, the decision variables are... The process involves filtering; if the payload of a certain type of drone cannot meet the cargo demand of the current customer point to be delivered, or if the distance between two nodes exceeds the maximum range of the current type of drone, then this type of drone is prohibited from serving the current customer point to be delivered or the flight path between the two nodes, as shown in the following expression:
[0165] (twenty four),
[0166] 2. Disable relevant invalid variables based on service time windows.
[0167] Using drones to filter out invalid decision variables can significantly reduce the density of the decision variable matrix. Building on this, the solution space is further compressed by utilizing the non-overlapping nature of time windows. The end time of the service time window for customer node i to be delivered... The start time of the service time window earlier than that of customer node j to be delivered That is, when At that time, drone k cannot fly directly from node j to node i. Therefore, the corresponding associated variable should be disabled, i.e. .
[0168] 3. Set usage sequence based on drones
[0169] To address the symmetric solution problem arising from drones of the same model within a heterogeneous drone swarm, this embodiment sets strict usage order constraints to prevent the solver from inefficiently searching among essentially identical feasible solutions. Specifically, for any takeoff and landing field w and drone type g, the drones in set K are sorted by their numbers as k1, k2, ..., kn, where k1 represents drone number 1 in set K, k2 represents drone number 2 in set K, and kn represents drone number n in set K; drones of the same model within the same takeoff and landing field must be activated sequentially according to their numbers.
[0170] Step S4: Solve the path optimization model using a two-stage optimization algorithm, which includes:
[0171] In the first stage, multiple path sequences covering all customer points to be delivered and the endpoints of road segments to be inspected are generated iteratively;
[0172] In the second stage, each path sequence generated in the first stage is segmented to obtain UAV sub-paths that meet the constraints, and the total operating cost corresponding to the UAV sub-path sequence is returned.
[0173] In the first stage, the pheromone is updated based on the total operating cost of all path sequences returned in the second stage, and the above process is repeated until the termination condition is met, and the optimal path solution is output.
[0174] As one specific implementation method, see [link / reference] Figure 2 The two-stage optimization algorithm in this embodiment is the Two-Stage Ant Colony Optimization (TSACO) algorithm.
[0175] In the first phase, this implementation utilizes the positive feedback mechanism of the ant colony algorithm to generate a path sequence covering all customer points to be delivered and the endpoints of road segments to be inspected.
[0176] In this embodiment, the second stage segments each path sequence generated in the first stage using different splitting strategies based on the number of customer points to be delivered. The splitting strategies include:
[0177] When the number of customer points to be delivered is not greater than the preset splitting threshold, the path sequence is split using dynamic programming labeling method.
[0178] When the number of customer points to be delivered exceeds the preset splitting threshold, a greedy splitting method is used to divide the path sequence.
[0179] Specifically, the TSACO algorithm includes:
[0180] Step S4A1: Set the initial pheromone value Initial optimal path scheme Empty, optimal cost The pheromone heuristic factor is infinite. Expected heuristic factor pheromone evaporation factor Pseudo-random proportional rule parameters Local pheromone update parameters The total pheromone reward is Q. Here, Q represents the total amount of pheromone released by a single ant in one iteration, which is used to control the pheromone enhancement magnitude of the globally optimal path. The value of Q is [10, 1000].
[0181] Step S4A2: Select different initialization strategies based on the number of customer points. The initialization strategy includes initializing the ant starting node and the next node determination strategy:
[0182] Based on a comparison between the number of customer points to be delivered and a preset initialization threshold, different initialization strategies are selected. As a specific implementation, this embodiment sets the preset initialization threshold to 20.
[0183] When the number of customer points to be delivered is ≤20, the solution space is small and the number of path combinations between nodes is within an acceptable range. Randomly initializing the ant starting point can ensure the diversity of the ant population and disclose the computational cost. During the path construction process, the ant selects the next node from all unvisited nodes.
[0184] When the number of customer points to be delivered is greater than 20, the solution space is large, and the search efficiency of completely random initialization of ant starting points decreases significantly. Therefore, a hybrid initialization of ant starting points is adopted. By introducing distance guidance and clustering guidance, the quality of the initial solution is improved, and the algorithm convergence is accelerated. In the process of path construction, the ant selects the next node from the number of unvisited nodes closest to the current node. The hybrid initialization includes 30% distance guidance, 30% clustering guidance, and 40% random initialization.
[0185] In this embodiment, the preset initialization threshold is set to 20. However, the preset initialization threshold should be adjusted accordingly in different scenarios.
[0186] When the customer points to be delivered show obvious clustering in space, the preset initialization threshold can be increased to 25~30, because clustering guidance has a stronger positive effect in clustered distribution scenarios, which is suitable for expanding the scope of application of hybrid initialization.
[0187] When the customer points to be delivered are obviously dispersed in space, the preset initialization threshold can be lowered to 15~18. At this time, random initialization is more conducive to maintaining the diversity of the population and avoiding getting trapped in local optima.
[0188] When there are many no-fly zones or the shapes of the no-fly zones are complex, the number of detours by drones increases significantly. The actual flight distance between nodes is no longer linearly related to the Euclidean distance, and the effectiveness of distance guidance decreases. The preset initialization threshold can be increased to 15-20 to reduce the proportion of distance guidance in the initialization and enhance randomness to cover more detour path schemes. When there are many types of heterogeneous drones, such as more than 2 types, the complexity of task allocation will increase. Therefore, stronger exploration capabilities are needed to explore the optimal allocation scheme under different combinations of drone types. The initialization threshold can be decreased to 15-18 to expand the search range of random initialization.
[0189] Step S4A3: Each ant starts from the initial node and selects the next node in sequence; if the current node is an endpoint of the inspection path, the other endpoint of the inspection path is selected as the next node to ensure that the inspection path is completely covered; if the current node is not an endpoint of the inspection path, the next node is selected according to the pseudo-random ratio rule: generate random numbers. ,like Then choose to make The largest node, The pheromone representing the path (i,j); Represents heuristic information between paths (i,j). ;
[0190] like Then, according to the roulette wheel method, nodes are selected based on the probability distribution of path pheromone concentration.
[0191] Step S4A4: After the ant reaches node j from node i, it immediately updates the pheromone of the path (i,j). The update expression is as follows:
[0192] (25),
[0193] Updating pheromones can reduce the immediate attractiveness of the path, prevent ant aggregation, and ensure population diversity.
[0194] Step S4A5: After all nodes have been visited, each ant generates a path sequence containing all task nodes. This path sequence is then used as input for the second stage.
[0195] Based on a comparison between the number of customer points to be delivered and a preset splitting threshold, different splitting strategies are selected for segmentation:
[0196] When the number of customer points is ≤20, the number of combinations of sub-segments between any two nodes in the path sequence is within a controllable range. Using the labeling method for segmentation can achieve accurate splitting within an acceptable time cost, ensuring the global optimality of the sub-path scheme. As a specific implementation method, this embodiment uses dynamic programming labeling as the specific implementation method of the labeling method. The path sequence obtained from the first stage is regarded as a directed acyclic graph. A set of labels is maintained for each node. The label contains partial route schemes from the start point of the sequence to that node, including cumulative cost, remaining range, drone type, and predecessor label. Starting from the first node of the sequence, the route is expanded sequentially. For the sub-segment from i to j in the sequence, an attempt is made to assign it to a certain type of drone, and it is determined whether the sub-segment meets the constraints of payload, range, and time window. If it does, a new label is generated and added to the label list of node j. By traversing the labels of all nodes, the complete route set with the lowest cost is selected, which is the optimal splitting scheme for the path sequence. In the dynamic programming labeling method, a label list V(i) is established for each node in the customer access sequence. Each label L is defined as: L = (id, pre, type, C, R, q1, q2, ...,qk,...,qm). Here, id is the current label number, pre is the predecessor label number, type is the type of drone used in the current path segment, C is the cumulative path cost from the virtual parking lot to the current node, R is the remaining range after reaching the current node, qk represents the number of drones of type k that have been used, and m is the number of drone types. The initial state is the virtual parking lot label L0 = (1, 1,null, 0, +∞, 0, ...,0,..., 0). For any consecutive node segment i to j in the access sequence, drone type k is enumerated. If the path segment satisfies the load constraint, time window constraint, drone number constraint, range constraint, and battery swapping station reachability constraint, a new label W is generated from the feasible label of the predecessor node i-1, and its cumulative cost, remaining range, and the number of drones of the corresponding type used are updated. When a new marker W is inserted into the marker list of node j, inferior markers are deleted. For two markers W and L at the same node, if the cumulative cost of W is not greater than L, the remaining range is not less than L, and the total number of used drones is not greater than L, then W is determined to dominate L, L is deleted, and W is retained; if L meets the above conditions but W does not, then W is discarded; if the two do not dominate each other, both are retained. Before insertion, it is also determined whether the total demand of the remaining unserved nodes does not exceed the remaining available drone capacity; if not, the marker is discarded. After all nodes are expanded, the marker with the lowest cumulative cost is selected from the marker list of the last customer node as the termination marker. Based on the predecessor marker number pre in the termination marker, the path split points are determined sequentially.For each path segment obtained, the corresponding drone type number is added to the beginning and end of the path to form a drone delivery and inspection route. If a split point would split the two endpoints of the inspection road into different paths, the split is canceled and the route is continued to be merged into the current path segment. Finally, necessary battery swapping station nodes are added to each path segment to obtain the optimal complete route set.
[0197] When using dynamic programming to segment path sequences, constraints for UAVs of the same type within the same landing zone, activated in numerical order, are executed in the following way:
[0198] For each drone sub-path corresponding to a tag, the drone number used is recorded. When generating a new tag from the sub-segment from node i to node j, it is first determined whether the drone model g to be assigned to this sub-segment has already been used in the current tag. If the drone model g has already been used, the new tag can only use the next drone with a higher number than that model. If the drone model g has not been used, the new tag starts using the drone with the smallest drone number of model g. Through the above tag expansion rules, it is ensured that in the splitting scheme of the same path sequence, the numbers of drones of the same model are always used in ascending order, and there will be no situation where the number is skipped.
[0199] When the number of customer points exceeds 20, using dynamic programming for labeling leads to an exponential increase in the number of labels as the number of nodes increases, drastically increasing computation time. Therefore, a greedy strategy can be employed to partition the path with linear time complexity, significantly improving efficiency within an acceptable cost margin and enhancing practicality in large-scale scenarios. As a specific implementation, this embodiment uses a greedy partitioning method. Starting from the beginning of the path sequence, the drone with the highest load is prioritized, loading as many task nodes as possible until the drone reaches its load or endurance limit. If the drone's endurance is insufficient, the location of nearby battery replacement stations is assessed, and the station with the lowest detour cost is selected to insert into the route. After battery replacement, the task continues. This process is repeated to partition the path sequence into feasible routes for multiple drones, ensuring all task nodes are covered and all constraints are met. When using the greedy partitioning method to partition the path sequence, constraints for drones of the same model within the same landing zone, activated in numerical order, are executed as follows:
[0200] Starting from the beginning of the path sequence, drone sub-paths are constructed sequentially. For the current sub-path to be constructed, the set of currently activated drone IDs is first determined. If a drone of model g has already been activated, the new marker can only activate the next drone with a higher ID than that model; if a drone of model g has not been activated, the new marker starts activating the drone with the smallest ID among drones of model g. Through the above marker expansion rules, in each iteration of the greedy split, the newly activated drones are strictly selected according to the above ascending ID order, ensuring that the activation IDs of drones of the same model are consecutive and ascending.
[0201] The execution rules of the above-mentioned segmentation stage are aligned with the actual solution process of the two-stage optimization algorithm:
[0202] The first stage (ant colony algorithm) generates a path sequence that only contains the access order of task nodes. This stage does not involve the specific drone number assignment, thereby decoupling the search of the path sequence from the allocation of drone resources and reducing the search complexity of the ant colony algorithm.
[0203] In the second stage (segmentation stage), when the path sequence is divided into UAV sub-paths, the enabled number status of each UAV model is maintained in real time, and UAVs are assigned to execute sub-paths in strict order of number.
[0204] After the segmentation is completed, the total operating cost returned from the second phase to the first phase already includes the fixed usage cost of the drones under the constraint of "activation in numerical order". Therefore, the impact of this constraint indirectly guides the path sequence search of the first phase through the cost feedback mechanism.
[0205] The aforementioned coordination mechanism enables the symmetric solution elimination strategy in the preprocessing to take effect without modifying the path construction process of the ant colony algorithm, thereby decoupling constraint processing from path search and ensuring the applicability of the algorithm to instances of different sizes.
[0206] In this embodiment, the preset splitting threshold is set to 20. However, the preset splitting threshold should be adjusted accordingly in different scenarios.
[0207] When hardware computing resources are sufficient, or when the solution accuracy requirement is high, the preset splitting threshold can be increased to 25~30, so that a better splitting scheme can be obtained by using dynamic programming labeling in larger-scale implementations.
[0208] When a fast response is required or hardware resources are limited, the preset splitting threshold can be lowered to 10-15 so that the greedy splitting method can be switched earlier to ensure that a feasible solution is obtained within a limited time or resources.
[0209] When the time window constraint is strict, the computational complexity of the feasibility check increases. At this time, the success rate of label expansion of the dynamic programming labeling method decreases. The preset difference threshold can be lowered to 15~18 to reduce the computational resources consumed by invalid label generation.
[0210] When there are a large number of drones, the number of sub-path segmentation combinations increases significantly. The preset segmentation threshold can be lowered to 12-15 to prioritize solution efficiency and avoid uncontrolled computation time.
[0211] After path segmentation, the drone's remaining range is used to determine whether it needs to enter a battery swapping station for a battery change. If the remaining range is insufficient for the drone to complete the task, the drone is sent to a battery swapping station for a battery change. When the drone travels from node i to the target node j, if the remaining range is insufficient to support subsequent access, a battery swapping station insertion operation is performed. The set of battery swapping stations is F, the current remaining range is R, the full charge range is Rmax, the distance function is d(·), and the unit distance cost for the k-th type of drone is ck. For any candidate battery swapping station f∈F, its reachability is first determined: if R≥d(i,f) and Rmax≥d(f,j), then the battery swapping station is considered feasible; otherwise, the battery swapping station is removed from the candidate set. For feasible battery swapping stations, the detour distance increment is calculated: Δd(f)=d(i,f)+d(f,j)-d(i,j). Further, the detour cost can be expressed as: ΔC(f)=Δd(f)×ck. Among all feasible battery swapping stations, the station f* with the smallest ΔC(f) is selected as the insertion node, i.e., f*=argmin{ΔC(f)|f∈F, R≥d(i,f), Rmax≥d(f,j)}, where argmin(·) represents the value of f when ΔC(f) is minimized. After selecting battery swapping station f*, the original path segment i→j is modified to i→f*→j, and the drone's endurance status is updated: the drone travels from node i to f* and consumes d(i,f*) of its endurance. After completing the battery swap at f*, the endurance is restored to Rmax, and then the drone travels from f* to node j and consumes d(f*,j) of its endurance. If nodes i and j form a roadside that must be continuously inspected, a battery swapping station is not inserted between nodes i and j. Instead, the battery swap is completed before the inspection road to ensure that the inspection road is not split. After replacement, proceed to step S4A6; if the battery life is sufficient to support the drone in completing the mission, proceed directly to step S4A6.
[0212] Step S4A6: Calculate the flight cost and fixed operating cost of each drone, and sum them up to obtain the total operating cost of the ant. ;like Then update the optimal path scheme. and optimal cost .
[0213] Step S4A7: Repeat steps S4A3 to S4A6 until all ants in the ant colony have completed one iteration, and obtain the total operating cost corresponding to all path sequences.
[0214] Step S4A8: After all ants in the ant colony have completed one iteration, pheromone evaporation is performed on all path segments; specifically, the pheromones on all path segments are evaporated according to the following steps: Evaporation can prevent excessive pheromone accumulation from causing premature convergence of the algorithm.
[0215] Step S4A9: Based on the cost of each ant generating a corresponding path, pheromone enhancement is applied to low-cost paths to guide subsequent ants to build even lower-cost paths; specifically, for each ant, based on its total operating cost... Calculate the path pheromone increment ; Let represent the total cost of the solution constructed by the m-th ant; if path (i,j) is within the path of this ant, then Otherwise, it is 0. Based on the path pheromone increment, high-quality paths with low total operating costs are classified according to... The pheromone is updated, where popsize is the number of ants in the colony, to increase the pheromone concentration on high-quality paths and guide subsequent ants to move towards these paths.
[0216] The value of Q is determined based on the number of customer points to be delivered to:
[0217] When the number of customer points is ≤20, the solution space is small. In order to strengthen the guiding role of the optimal path, a smaller value of Q is selected during the implementation process. The range of Q is reduced to [10,50] to accelerate convergence.
[0218] When the number of customer points is greater than 20, the solution space increases dramatically. To prevent the algorithm from getting stuck in a local optimum too early, a larger value for Q is selected during implementation. The range of Q becomes [100, 1000] to enhance the global exploration capability.
[0219] As a specific implementation method, this embodiment sets Q=100 for medium-to-large-scale instances with 8-100 customer points. This allows high-quality paths to maintain a high probability of being selected even after pheromone evaporates, while avoiding premature algorithm convergence caused by excessively rapid pheromone accumulation.
[0220] Step S4A10: Repeat steps S4A3 to S4A9 until the maximum number of iterations is reached, and output the optimal path solution. .
[0221] As a specific implementation method, this embodiment uses Gurobi 13.0 as a comparison method: within a time limit of 3600 seconds, the MILP model is solved using Gurobi 13.0 to obtain the exact solution of Gurobi. In this embodiment, the optimal cost of the TSACO algorithm is completely consistent with the exact solution of Gurobi, and the average solution time is shortened from 260.43 seconds to 8.7 seconds, showing a significant improvement in efficiency. For medium-to-large-scale instances with 8-100 customer points, the solution time and cost stability of the TSACO algorithm are evaluated. For an instance with 18 customer points, the solution time of the policy greedy splitting method is shortened from 1481.66 seconds of the dynamic programming labeling method to 37.62 seconds, and the cost deviation is controlled within an acceptable range. For an instance with 100 customer points, the TSACO algorithm can complete the solution within 560 seconds, and the standard deviation of cost across multiple runs is small, indicating good stability.
[0222] See Figure 3 , Figure 3 A schematic diagram illustrating the path optimization results of a representative case study of a method for optimizing drone delivery and road inspection routes in no-fly zones is provided. Figure 3 The scenario involves three warehouses, two battery swapping stations, and three no-fly zones distributed across different areas. The task set involves eight nodes, including four delivery task points and two inspection routes that need to be covered (located between nodes 2 and 3, and between nodes 6 and 7, respectively). Three drones depart from their respective warehouses to perform delivery and inspection tasks, and finally return to their departure warehouses, ensuring sufficient battery power throughout the flight. Taking drone 2 (UAV2) as an example, its planned path is: Depot2 → Node 6 → Node 7 → Node 8 → Battery Swapping Station 2 → Depot2. The specific flight process is as follows: UAV2 first takes off from Depot2 and heads to Node 6. Then, it performs an inspection task along the trajectory from Node 6 to Node 7. After completing the inspection, the drone flies to Node 8 to deliver goods. At Node 8, the remaining battery power is insufficient to support its direct return to the warehouse, so it must be recharged en route. During its departure from Node 8 to Battery Swapping Station 2, UAV2 avoids the intermediate no-fly zones. Finally, the drone returns to Depot2 after completing the battery swap.
[0223] See Figure 4 , Figure 4This paper presents a schematic diagram illustrating the impact of drone payload and delivery demand on total operating costs, considering a method for optimizing drone delivery and road inspection routes in no-fly zones. The payload scaling factor is set to vary between 0.5 and 1.5, specifically 0.5, 0.75, 1.00, 1.25, and 1.50. This implies that the drone payload fluctuates between 6 kg and 18 kg and between 10 kg and 30 kg, respectively. Simultaneously, customer demand is scaled according to the ratios of 0.5, 0.75, 1.00, 1.25, and 1.50 to simulate different logistics scenarios from off-season to peak season. Figure 4 As shown, with the increase in payload capacity, the total system cost exhibits a significant monotonic decreasing trend across all demand levels, demonstrating a clear economies of scale. The cost curve decreases most steeply within the range where the payload scaling factor increases from 0.5 to 1.0, indicating that increasing payload capacity at this stage yields the highest marginal benefit, significantly reducing operating expenses by decreasing the frequency of round-trip deliveries. When the payload scaling factor exceeds 1.2, the slopes of all cost curves gradually flatten, meaning that the benefits of further increasing payload capacity begin to diminish; at this point, simply increasing the payload capacity of a single drone is no longer sufficient to achieve significant cost savings. Observing the curve distribution under different demand levels reveals that although the overall cost is higher in high-demand scenarios, the curve decreases more sharply in the low-payload range, indicating that heavy-duty drones have a stronger cost mitigation capability when dealing with high-density delivery demands.
[0224] See Figure 5 , Figure 5 This paper presents a schematic diagram illustrating the impact of drone payload and delivery demand on the number of drones used, which is a method for optimizing drone delivery and road inspection routes in no-fly zones. By observing the changing trend of the number of drones used, it can be found that the increase in payload capacity directly reduces the required fleet size. This reduction in quantity is one of the main drivers of cost reduction. However, after the payload reaches a certain threshold, the fleet size tends to stabilize, and further increasing the payload will result in capacity redundancy.
[0225] See Figure 6 , Figure 6 This paper presents a schematic diagram illustrating the impact of drone range on total operating cost, considering a method for optimizing drone delivery and road inspection routes in no-fly zones. The diagram is created by scaling the drone's range within a range of 0.7 to 1.5 times. Figure 6 The experimental results revealed a non-linear relationship between driving range and operating costs. As the driving range increased, the total cost showed a clear step-like decreasing trend, rather than a smooth linear decrease.
[0226] See Figure 7 , Figure 7This paper presents a schematic diagram illustrating the impact of drone endurance on the number of drones used and the number of battery replacements, considering a method for optimizing drone delivery and road inspection routes in no-fly zones. When the endurance scaling factor is low, between 0.7 and 0.85, limited by battery capacity, drones must frequently perform battery swaps, resulting in a high battery swap frequency curve. This leads to increased detour distances and reduced effective service time, forcing the system to deploy more drones to meet strict time window constraints, thus increasing both fixed and variable costs. As the endurance scaling factor increases to 1.1 and above, the number of battery swaps drops sharply, allowing some mission paths to become independent of battery swapping stations. This not only eliminates the additional detour costs associated with battery swapping but also releases the effective carrying capacity of drones, enabling the system to complete tasks of the same scale with fewer drones. When the endurance scaling factor reaches 1.3, the number of battery swaps drops to its lowest level, and the cost curve also enters a plateau, indicating that endurance is no longer a bottleneck restricting system efficiency, and further increasing battery capacity contributes negligibly to reducing total costs.
[0227] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0228] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0229] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0230] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0231] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for optimizing drone delivery and road inspection routes considering no-fly zones, characterized in that, The method includes: Obtain task scenario information, which includes warehouses, customer points to be delivered and the demand for goods and service time windows, road segments to be inspected, no-fly zone boundaries, battery replacement stations, and the payload capacity, endurance and fixed usage costs of at least two types of heterogeneous drones. A pre-built path optimization model is invoked, and the task scenario information is used as input. A two-stage optimization algorithm is then applied to solve the path optimization model. The two-stage optimization algorithm includes: In the first stage, multiple path sequences covering all customer points to be delivered and the endpoints of road segments to be inspected are generated iteratively; In the second stage, each path sequence generated in the first stage is segmented to obtain a UAV sub-path sequence that meets the constraints of the path optimization model, and the total operating cost corresponding to the UAV sub-path sequence is returned. The first stage updates the pheromone based on the total operating cost of all UAV sub-path sequences returned by the second stage, and repeats the above process until the termination condition is met, outputting the optimal path scheme.
2. The method for optimizing drone delivery and road inspection routes considering no-fly zones according to claim 1, characterized in that, The constraints of the path optimization model include path constraints, UAV activation status constraints, mission coverage constraints, payload constraints, traffic conservation constraints, endurance constraints, inspection route-specific constraints, time window constraints, no-fly zone constraints, battery replacement constraints, and departure time initialization constraints.
3. The method for optimizing drone delivery and road inspection routes considering no-fly zones according to claim 2, characterized in that, The objective function of the path optimization model aims to minimize the total operating cost, and the expression of the objective function is as follows: , In the formula, Z represents the total operating cost; p represents the cost per unit flight distance of the drone; k represents the index in K, where K represents the set of drones; i and j represent the indices in V, where V represents the set of all nodes. , This represents the set of endpoints of the road segments to be inspected. Let F represent the set of customer points to be delivered, F represent the set of battery swapping stations, and B represent the set of no-fly zone boundary points. This represents the flight distance from node i to node j; For 0-1 decision variables, when When, it means that the drone flies from node i to node j. When, it means that the drone does not fly from node i to node j; w represents the index in W, where W represents the set of drone take-off and landing fields; g represents the index in G, where G represents the set of drone models; This indicates the fixed operating cost of drone model g; A subset of K This represents the set of drones of model number g belonging to warehouse w; For 0-1 decision variables, when When, it indicates that drone k is used, when At this time, it indicates that drone k is not in use.
4. The method for optimizing drone delivery and road inspection routes considering no-fly zones according to claim 3, characterized in that, The implementation of the no-fly zone constraint includes: Select any two nodes from the set of all nodes to form a node pair; Determine whether the straight line between the node pairs crosses a no-fly zone; If the straight line does not cross the no-fly zone, then a feasible path is constructed with the node pair as the endpoint, wherein the weight of the feasible path is the Euclidean distance between the node pair; If the straight line crosses a no-fly zone, then there is no direct feasible path between the node pairs; The shortest feasible path matrix between all node pairs is generated based on Dijkstra's algorithm.
5. The method for optimizing drone delivery and road inspection routes considering no-fly zones according to claim 1, characterized in that, The first stage uses an ant colony algorithm to iteratively generate multiple path sequences covering all customer points to be delivered and endpoints of road segments to be inspected. The iterative process of the ant colony algorithm includes: Select an initialization strategy based on the customer locations to be delivered; Based on the initialization strategy, ants are guided to traverse all nodes using pheromones and heuristic factors; wherein, all nodes include customer points to be delivered and road segment endpoints to be inspected. Each ant visits each node in turn, and after passing through each edge, it reduces the immediate attractiveness of that edge, and generates a path sequence after visiting all the nodes. After all ants in the ant colony have completed one iteration, pheromone evaporation is performed on all edges. Based on the total operating cost corresponding to each path sequence, pheromone enhancement is applied to the path segments traversed by ants with low total operating costs to guide subsequent ants to construct path sequences with lower costs. Repeat the above steps until the termination condition is met, and output the optimal path solution.
6. The method for optimizing drone delivery and road inspection routes considering no-fly zones according to claim 5, characterized in that, The initialization strategy includes: When the number of customer points to be delivered is not greater than the preset initialization threshold, the ant starting point is randomly initialized, and the ant selects the next node from all unvisited nodes during the path construction process. When the number of customer points to be delivered is greater than the preset initialization threshold, the ant starting point is initialized in a hybrid manner, and during the path construction process, the ant selects the next node from the preset number of unvisited nodes closest to the current node.
7. The method for optimizing drone delivery and road inspection routes considering no-fly zones according to claim 1, characterized in that, In the second stage, each path sequence generated in the first stage is segmented using different splitting strategies based on the number of customer points to be delivered. These splitting strategies include: When the number of customer points to be delivered is not greater than a preset splitting threshold, the path sequence is split using dynamic programming labeling method; When the number of customer points to be delivered is greater than the preset splitting threshold, the path sequence is split using a greedy splitting method.
8. The method for optimizing drone delivery and road inspection routes considering no-fly zones according to claim 7, characterized in that, The dynamic programming notation method includes: The path sequence is treated as a directed acyclic graph, and a set of labels is maintained for each node in the path sequence; For any two nodes in the path sequence, if the sub-segment satisfies the constraints of the path optimization model after being assigned to a drone, a new tag is generated and added to the tag list of the corresponding node. Traverse the labels of all nodes in the path sequence and divide the path sequence into multiple UAV sub-paths that satisfy the constraints of the path optimization model.
9. The method for optimizing drone delivery and road inspection routes considering no-fly zones according to claim 7, characterized in that, The greedy decomposition method includes: Step a: Starting from the beginning of the path sequence, select a drone with a strong load capacity as the drone currently performing the task, and assign task nodes to the sub-path of the current drone in sequence until the load capacity or endurance of the current drone reaches its limit. Step b: When the battery life is insufficient, evaluate and select the battery replacement station with the lowest detour cost to insert into the current drone sub-path, replace the battery and continue to assign tasks. Repeat steps a and b to divide the path sequence into multiple UAV sub-paths that satisfy the constraints of the path optimization model.
10. The method for optimizing drone delivery and road inspection routes considering no-fly zones according to claim 1, characterized in that, Before solving the path optimization model using a two-stage optimization algorithm, the method further includes preprocessing: Based on the ability of drones to filter out invalid decision variables, if the current drone payload cannot meet the cargo demand of the current customer point to be delivered, or if the distance between two nodes exceeds the current drone's maximum endurance, then the current drone is prohibited from serving the current customer point to be delivered or the flight path between the two nodes. Based on the non-overlapping nature of the service time windows of the customer points to be delivered, path connections that are not feasible in terms of time are eliminated. Set usage sequence constraints for drones of the same model within the same warehouse to eliminate symmetric solutions.