A time window and capacity constraint oriented intelligent logistics vehicle path optimization method

CN122988926APending Publication Date: 2026-10-27CHINA THREE GORGES UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610989714.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-10-27

AI Technical Summary

Benefits of technology

1)本发明采用客户访问顺序编码方式建立客户—访问位置二值矩阵;该技术手段仅通过位置唯一性和客户唯一性两类约束即可刻画合法的物理行车路线结构,从根本上避免了传统弧变量建模中为了消除物理子回路而引入的复杂数学约束;此举缩减了QUBO模型的维度,有效降低了底层计算硬件在路径搜索过程中的内存占用和算力消耗,提升了物流系统的调度响应速度;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122988926A_ABST
    Figure CN122988926A_ABST
Patent Text Reader

Abstract

The application discloses a time window and capacity constraint oriented intelligent logistics vehicle path optimization method, which comprises the following steps: step 1, obtaining the basic data of an intelligent logistics distribution network, setting decision variables, and obtaining basic information and binary decision variables for vehicle path optimization; step 2, constructing a mathematical expression containing constraint penalties and transportation targets by using the basic information and binary decision variables obtained in step 1, and obtaining a basic objective function; step 3, introducing a time window agent penalty term into the basic objective function obtained in step 2 in combination with a time window constraint mechanism, and constructing a guide term based on historical excellent paths, and obtaining a guide type agent objective function embedded with time window violation risks; step 4, solving the guide type agent objective function obtained in step 3 by using a solver, and performing back substitution calculation through a no idle waiting rule to screen and obtain a single vehicle basic path, wherein the single vehicle basic path is a candidate path screened and evaluated through real back substitution; and step 5, in a multi-vehicle distribution scene, based on the single vehicle basic path evaluation standard output in step 4, performing capacity constraint distribution and cross-vehicle iteration correction to finally obtain a multi-vehicle path optimization result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart logistics and transportation route optimization technology, and particularly to vehicle route planning, delivery scheduling optimization, quadratic unconstrained binary optimization modeling and quantum heuristic combinatorial optimization solution technology. It also relates to a smart logistics vehicle route optimization method oriented towards time windows and capacity constraints. Background Technology

[0002] With the rapid development of e-commerce, instant delivery, and smart supply chains, the scale of logistics and distribution systems is constantly expanding. Customer orders are characterized by large numbers, wide distribution, heterogeneous demand, and high timeliness requirements. In actual delivery processes, logistics companies not only need to plan the routes for vehicles to depart from the distribution center, visit multiple customer nodes, and return to the distribution center, but also need to consider various business constraints such as customer demand, vehicle capacity, customer service time, delivery time window, and vehicle collaborative scheduling. Therefore, vehicle route planning and scheduling optimization have become important technical means to improve logistics and distribution efficiency, reduce transportation costs, and enhance service quality.

[0003] In real-world smart logistics and delivery scenarios, the number of customer nodes is often large, and these are frequently accompanied by strict or flexible service time window constraints, multi-vehicle capacity constraints, and customer access uniqueness constraints. Especially under conditions without idle waiting rules, vehicles must begin service immediately upon arrival at a customer node; early arrival time deviations cannot be eliminated through waiting. This means the actual service start time for a customer is entirely determined by the order of previous visits, inter-node transportation time, and service time. In this situation, any change in the customer visit order will trigger a chain reaction in the service start time, early arrival rate, late arrival rate, and time window penalties for subsequent customers, causing the path optimization problem to exhibit characteristics of strong coupling, high dimensionality, and discrete combinatorial explosion.

[0004] To address such problems, existing technologies often employ heuristic or metaheuristic algorithms, such as genetic algorithms, ant colony optimization, simulated annealing, tabu search, and their hybrid improvements. While these methods can reduce solution complexity and obtain feasible path solutions to some extent, they still suffer from drawbacks under the combined effects of a large number of client nodes, complex time window penalties, and multi-vehicle capacity constraints. These issues include reliance on the initial solution, susceptibility to local optima, complex parameter tuning, insufficient result stability, and difficulty in directly adapting to novel quantum optimization frameworks.

[0005] In recent years, the quadratic unconstrained binary optimization model, or QUBO model, has provided a new modeling approach for combinatorial optimization problems such as vehicle routing. The QUBO model can uniformly transform the objective function and constraints in the original problem into an energy function in a binary variable space through a penalty function mechanism, thus adapting it to novel solvers such as quantum annealing, coherent Ising machines, and quantum heuristic simulated annealing. By transforming customer access order, path cost, and constraints into QUBO form, a quantum computing or quantum heuristic approach can be provided for solving complex vehicle routing optimization problems. Existing research and engineering applications have attempted to apply QUBO modeling and quantum heuristic solving to combinatorial optimization problems such as vehicle routing, but these methods are mostly focused on basic path ordering or small-scale constraint scenarios, making it difficult to simultaneously consider factors such as time window penalties, large-scale customer nodes, and multi-vehicle capacity constraints.

[0006] However, if the large-scale vehicle routing problem is directly transformed into a global QUBO model, the size of the binary variables and the number of secondary coupling terms will rapidly expand as the number of customer nodes, vehicles, and access locations increases, making it difficult for the solver to solve stably. Especially when considering service time windows, no idle waiting, unique customer service, vehicle capacity constraints, and multi-vehicle collaborative scheduling, if the traditional arc variable modeling method is used, complex sub-loops to eliminate constraints and a large number of auxiliary variables need to be introduced, which is not conducive to controlling the model size, nor to the compact expression of the QUBO model.

[0007] Furthermore, existing QUBO-based vehicle routing optimization methods primarily focus on basic route ranking or simple traveling salesman problems, failing to adequately characterize time window penalties, no-idle-waiting rules, and the collaborative constraints of multiple vehicle capacity. On one hand, directly introducing the actual service start time and its recursive constraints into the QUBO model significantly increases auxiliary variables and constraint terms, resulting in an excessively large model size. On the other hand, using only distance or transportation time as the optimization objective fails to reflect the actual service cost of customer time window violations, leading to route solutions with shorter transportation distances that may incur significant early or late penalties in actual delivery evaluations.

[0008] In large-scale customer delivery scenarios, the increased number of customer nodes further amplifies the aforementioned problems. Relying solely on global QUBO modeling can easily lead to an excessive number of variables, excessively long solution times, and difficulties in selecting feasible solutions. Conversely, relying solely on traditional heuristic decomposition methods may result in inconsistencies between local path optimization and global path evaluation, making it difficult to simultaneously consider transportation time, time window penalties, and vehicle capacity constraints. For multi-vehicle delivery scenarios, it is also necessary to simultaneously determine the number of vehicles used, customer allocation relationships, and the access order within each vehicle. There is a clear hierarchical relationship between vehicle quantity optimization and path cost optimization; without a reasonable hierarchical modeling and iterative correction mechanism, it is difficult to achieve a balance between minimizing the number of vehicles and optimizing the overall delivery cost.

[0009] In view of this, the applicant proposes a smart logistics vehicle route optimization method oriented towards time windows and capacity constraints. Summary of the Invention

[0010] The purpose of this invention is to address the problems encountered by existing quadratic unconstrained binary optimization techniques such as QUBO when dealing with vehicle routing planning. These problems include the need to explicitly introduce a large number of continuous time auxiliary variables to describe the no-idle waiting rule, and the tendency of existing arc variable modeling to introduce complex elimination of sub-loop constraints. As a result, the solution space of the intelligent logistics vehicle routing optimization topic explodes exponentially, i.e., variable expansion. When facing large-scale customer orders, logistics scheduling servers face huge computational and memory consumption, leading to high response latency of the scheduling system and even the inability to find an effective vehicle scheduling scheme that meets the physical loading capacity and strict delivery time requirements due to limited hardware resources. Therefore, this invention proposes an intelligent logistics vehicle routing optimization method oriented towards time windows and capacity constraints.

[0011] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for optimizing the routing of intelligent logistics vehicles under time windows and capacity constraints includes the following steps: Step 1: Obtain basic data of the smart logistics and distribution network, and set decision variables to obtain basic information and binary decision variables for vehicle route optimization; Step 2: Using the basic information and binary decision variables obtained in Step 1, construct a mathematical expression that includes constraints, penalties, and transportation objectives to obtain the basic objective function; Step 3: Based on the basic objective function obtained in Step 2, a time window surrogate penalty term is introduced in combination with the time window constraint mechanism, and a guiding term is constructed based on historical good paths to obtain a guided surrogate objective function with embedded time window violation risk; Step 4: Solve the guided agent objective function obtained in Step 3 using the solver, and perform back-substitution calculation through the no-idle-wait rule to filter and obtain the basic path of a single vehicle; wherein, the basic path of a single vehicle is a candidate path of a single vehicle obtained after time window agent guidance and real back-substitution evaluation, which is used for subsequent multi-vehicle customer allocation and local path ranking. Step 5: In large-scale or multi-vehicle delivery scenarios, construct a comprehensive distance matrix based on customer time window differences, inter-node transportation time, and spatial distance data between customer nodes. Perform customer clustering, capacity constraint allocation, local path sorting for each vehicle, and cross-vehicle iterative correction to finally obtain the multi-vehicle path optimization results.

[0012] Step 1 specifically includes the following sub-steps: Step 1-1) Obtain basic data of the smart logistics and distribution network. The basic data includes distribution center nodes, customer node set, customer demand, customer service time, upper and lower bounds of the time window when customers are allowed to start service, transportation time matrix between nodes, spatial distance data between customer nodes, and vehicle capacity limit to obtain basic information. Steps 1-2) Construct a single-vehicle route sequence coding model based on the customer access order, set binary decision variables to describe the correspondence between customers and access locations, and combine them with basic information to finally obtain the basic information and binary decision variables used for vehicle route optimization.

[0013] In step 1-1), the set of delivery network nodes is represented as: ; Where node 0 represents the distribution center, and the set of customer nodes is represented as follows: ; node To node The delivery time is ,client The demand is ,client Service hours are ,client The permitted service start time window is: ; in, For customers Allow the lower bound of the time window for starting service. For customers The upper bound of the time window for allowing service to begin. The total number of customer nodes; the maximum cargo capacity of the vehicle is ;client With customers The spatial distance between them is It should be noted that, and Both represent client node indexes, and , This indicates the customer corresponding to the currently accessed location. Indicates to customers Another customer that is adjacent to or to be compared.

[0014] In step 1-2), the binary decision variable is ,when When indicating customer Arranged in the p Access location, when When indicating customer Not located at this access location p It is a positive integer index representing the position of the vehicle's access sequence.

[0015] Step 2 specifically includes the following sub-steps: Step 2-1) Construct a location uniqueness constraint penalty term for the binary decision variables; Step 2-2) Construct a customer uniqueness constraint penalty term for the binary decision variables; Steps 2-3) Combine the inter-node transportation time matrix and binary decision variables to construct a transportation time objective function that describes the single-vehicle closed-loop path from the distribution center to the destination. Steps 2-4) Combine the location uniqueness constraint penalty term, the customer uniqueness constraint penalty term, and the transportation time objective function to calculate the basic objective function.

[0016] In step 2-1), the formula used to construct the location uniqueness constraint penalty term is: ; in, The penalty function is the position uniqueness constraint. In step 2-2), the formula used to construct the customer uniqueness constraint penalty term is as follows: ; in, Penalty function for customer uniqueness constraint; In steps 2-3), the formula used to construct the objective function for transportation time is: ; in, Let the objective function be transportation time. Indicates the distance from the distribution center to the first customer The delivery time Indicates customer To customers The delivery time Indicates customer Transportation time back to the distribution center; In steps 2-4), the formula used to obtain the basic objective function is: ,in For a single vehicle, the basic objective function is... This is the constraint penalty coefficient used to increase the energy cost of violating constraints.

[0017] Step 3 specifically includes the following sub-steps: Step 3-1) Construct anchor path based on initial path or historical good path according to the no idle waiting rule, and deduce reference start service time sequence; Step 3-2) Calculate the location-based time window proxy cost when client nodes are arranged in different access locations by using the reference start service time sequence and the upper and lower bounds of the time window; Step 3-3) Calculate the adjacent transfer time window proxy cost using the reference start service time sequence and the inter-node transport time matrix; Steps 3-4) merge the location-based time window proxy cost and the adjacent transition-based time window proxy cost, and embed them into the basic objective function to obtain the proxy objective function; Steps 3-5) Construct guiding terms based on historically good paths and add them to the surrogate objective function to finally obtain the guided surrogate objective function used for solving.

[0018] In step 3-1), the reference start time of service satisfies: Let the anchor path be ,in Indicates the first anchor point in the path Each access location corresponds to a client node, and each client node appears only once in the anchor path; ; ; This represents the reference start time of the service corresponding to the p-th access location. Indicates the reference start time of the first access location. From the distribution center to the first anchor node The delivery time For anchor nodes Service hours, The transit time between anchor nodes, where Indicates the first anchor point in the path Each access location corresponds to a client node. This represents the first customer node in the anchor path; In step 3-2), the formula for calculating the location-based time window proxy cost is: ; in, , For location-based time window proxy items, For customers exist p Agent time window penalty for each location Early arrival penalty coefficient, The penalty coefficient for being late. and It is a function for maximizing the value; In step 3-3), the formula for calculating the proxy cost of adjacent transition time windows is as follows: ; in, , , For adjacent transition time window proxy items, This indicates the customer under the adjacent transfer relationship. Time window agent penalty Indicates when the customer Located in the One access location, customer Located in the When accessing a location, the estimated number of customers is... The moment the agent begins service; In steps 3-4), the formula for the proxy objective function is obtained as follows: ; in, Let the objective function be the proxy cost with time window. The overall scaling factor for time window proxy cost. For location-based proxy item weighting coefficients, The weighting coefficients for adjacent transfer-type proxy terms; In steps 3-5), the formula for the guided agent objective function is obtained as follows: ; in, , ; To add the anchor point to guide the objective function, The guiding weight coefficient for anchoring reward items to locations. The guiding weight coefficient for edge connection rewards. For the elements in the customer-location matrix corresponding to the anchor path that take values ​​of 0 or 1, when the anchor path is in the... Each access location corresponds to a customer. hour, ,otherwise, , Anchor rewards for locations, This is a reward item for edge connection.

[0019] Step 4 specifically includes the following sub-steps: Step 4-1) Solve the guided agent objective function using a quantum heuristic solver to obtain candidate binary matrices, and decode the candidate binary matrices into candidate customer access sequences; Step 4-2) Perform a validity check on the candidate customer access sequence, remove sequences that do not meet the location uniqueness constraint or customer uniqueness constraint, and retain feasible candidate paths; Step 4-3) For feasible candidate paths, deduce the actual start time, early arrival time deviation, and late arrival time deviation for each customer point by point according to the no idle waiting rule; Step 4-4) Combine early arrival time deviation, late arrival time deviation and total transportation time to calculate the true comprehensive target value of feasible candidate paths. Finally, select the path with the smallest true comprehensive target value as the single vehicle basic path. The single vehicle basic path is used for customer allocation and local ranking in subsequent large-scale customer stratification processing or multi-vehicle path optimization. In step 4-1), the candidate customer access sequence is represented as follows: ;in, This indicates a closed-loop delivery route for a single vehicle. Indicates the first p The client node sequence number corresponding to each access location. ; In step 4-2), the validity check must satisfy: ; That is, it is considered valid only if each customer appears exactly once and each access location corresponds to exactly one customer; In step 4-3), the formula for calculating the actual start time of service is: , ; in, The moment when the first customer truly begins service. For customers The actual start of service Service time for previous customers. The transit time from the previous customer to the current customer; Early arrival time deviation is ; in, For customers Early arrival deviation, For customers The actual start time of service; Late arrival time deviation is ; in, For customers Late arrival deviation; In step 4-4), the formula used to calculate the true comprehensive target value is: ;in, For the true comprehensive target value, For path The corresponding total transportation time for the actual route.

[0020] Step 5 specifically includes the following sub-steps: Step 5-1) Construct a comprehensive distance matrix based on the transportation time between nodes, the difference in customer time windows, and the spatial distance data between customer nodes. Then, divide the customer nodes into several customer clusters according to the comprehensive distance matrix. The customer clusters are used as candidate structures for the initial allocation of customers and vehicles, or to limit the search range for subsequent customer relocation and customer exchange operations. Step 5-2) Determine the lower bound of the theoretical minimum number of vehicles based on the total customer demand and the maximum cargo capacity of the vehicles; Step 5-3) Construct customer-vehicle allocation rules, set customer-vehicle allocation variables, and divide customer nodes into different vehicle service sets while ensuring that the vehicle loading capacity does not exceed the limit. Step 5-4) For the first Customer service set for each vehicle ,make And set local sequence encoding variables on that subset of customers. ,in Replace the customer set, number of customers, and binary variable in steps 2 to 4 with... , and Calculate the first The actual path cost of the vehicle; Step 5-5) Perform customer shifting and customer exchange operations among the multi-vehicle routing schemes, calculate the target increment brought by each operation, and finally select the multi-vehicle routing optimization result from the candidate schemes that meet the vehicle capacity constraints, customer unique service constraints and vehicle closed-loop constraints, according to the lexicographical order objective of prioritizing the number of vehicles used and minimizing the overall system path cost under the same number of vehicles. In step 5-1), the comprehensive distance matrix is ​​calculated using the following formula: ;in, For customers With customers The combined distance between them , , , These represent the normalized inter-node transportation time, time window center difference, time window width difference, and spatial distance, respectively. , , , The weighting coefficients must satisfy the condition that the sum is 1; In step 5-2), the formula for determining the lower bound of the theoretical minimum number of vehicles is: ,in, ; This is the lower bound of the theoretical minimum number of vehicles. Total demand from all customers This indicates the rounding up operation. For customer z's demand; In step 5-3), the customer-vehicle assignment variable is: , , ,in The initial number of vehicles considered in the current iteration is... ;when Indicates customer Assigned to vehicles v Otherwise, it is 0. v For vehicle identification index; vehicle load capacity is: The capacity constraint is ; In step 5-4), the formula for the actual path cost of each vehicle is: , ;in, For the first v The vehicle's actual path cost Let v be the transportation time for the v-th vehicle. For the first v The number of customers using the car service and The first v The first car k The early arrival deviation and late arrival deviation of each visiting customer, if the first vehicle number The number of visiting customers is ,but , ; For the first v Time window penalty for vehicles; In step 5-5), the target increment formula for the cross-vehicle shifting operation is: ,in, For the target increment of the shift, , The cost of the original path, , Cost of the new path; The target increment for cross-vehicle swapping operations is: ,in, In order to exchange target increments, , The cost of the new path after the exchange, where, and For two different vehicles participating in a customer relocation or customer exchange operation, the vehicle index is provided. The overall system objective value adopts the lexicographical objective formula: ;in, This represents the lexicographical minimization operation, which prioritizes minimizing the number of vehicles in use. K When the number of vehicles used is the same, then minimize the overall path cost of the system. ; The final output includes the number of vehicles used. Customers of each vehicle service Closed-loop access path for each vehicle The actual start time of service for each customer Early arrival deviation of each customer and late arrival deviation Transportation time for each vehicle Penalties for each vehicle during designated time windows .

[0021] Compared with the prior art, the present invention has the following technical effects: 1) This invention uses a customer access sequence encoding method to establish a customer-access location binary matrix; this technique can characterize the legal physical driving route structure with only two types of constraints: location uniqueness and customer uniqueness, fundamentally avoiding the complex mathematical constraints introduced in traditional arc variable modeling to eliminate physical sub-loops; this reduces the dimension of the QUBO model, effectively reduces the memory occupation and computing power consumption of the underlying computing hardware in the path search process, and improves the scheduling response speed of the logistics system; 2) To address the technical challenge of large model size caused by time window constraints, this invention innovatively proposes a modeling approach that combines location-based time window proxy costs with adjacent transfer-based time window proxy costs. This approach eliminates the need to explicitly introduce a large number of continuous service time variables into the model. Instead, it cleverly embeds the time window default risk into the penalty term in the QUBO objective function. While maintaining model compactness, this approach enables quantum heuristic solvers to successfully handle the physical logistics network scheduling problem with strict timeliness requirements, avoiding solution failures caused by model overload. 3) This invention adopts a proxy QUBO search-real-time evaluation mechanism. During the search phase, the proxy objective function is used for energy guidance. Before the results are output, the actual arrival time, transportation time and time window penalty of the vehicle are deduced point by point according to the real "no idle waiting rule" in the physical logistics scenario. This mechanism takes into account both the solution efficiency of the algorithm model and ensures that the final output vehicle scheduling plan conforms to traffic conditions and customer business rules, reducing the service cost caused by vehicle parking space occupation due to "early arrival" or time window violation caused by "late arrival". 4) For real-world logistics scenarios with a massive number of customer nodes, this invention constructs a comprehensive distance matrix that integrates road network transportation time, time window center differences, time window width differences, and spatial distances between customer nodes. It also employs a hierarchical dimensionality reduction strategy that combines balanced clustering, inter-cluster ranking, intra-cluster optimization, and global correction. This approach reduces the risk of system crashes caused by directly constructing an ultra-large-scale global QUBO model and effectively improves the computability and solution generation efficiency of large-scale customer route planning. 5) To address the physical limitations of fixed capacity for multiple vehicles, this invention constructs a decompositional collaborative optimization framework consisting of outer-layer customer allocation, inner-layer single-route QUBO sorting, and cross-vehicle iterative correction and coordination. Under the premise of meeting hard constraints such as unique customer service, single-vehicle physical load not exceeding limits, and physical route closed loop, the upper limit of the required number of vehicles is compressed first, and then the comprehensive driving mileage is optimized. This helps logistics companies minimize vehicle procurement and maintenance costs on a macro level and reduce the overall fuel or electricity consumption of the fleet on a micro level. 6) The compact optimization model constructed in this invention can be adapted to the Kaiwu SDK platform and is compatible with various heterogeneous computing hardware such as simulated annealing solvers, quantum annealers, and coherent Ising machines. This makes the method have good technology transfer capabilities, and enterprises can integrate it into their existing smart supply chain IT architecture at low cost, laying the engineering foundation for future full access to quantum computing power. Attached Figure Description

[0022] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 The overall architecture diagram of the intelligent logistics vehicle route optimization method oriented towards time windows and capacity constraints; Figure 2 Flowchart of sequential coding and QUBO modeling for single-vehicle closed-loop path optimization; Figure 3 This is an energy evolution curve of the single-vehicle basic path QUBO solution process in the embodiment; Figure 4 Flowchart for constructing a single-vehicle time window penalty path optimization model; Figure 5This is a timeline diagram of customer service moments in a single-vehicle scenario in the embodiment, used to illustrate a small-scale schematic scenario of the single-vehicle route optimization process, and the number of customers in the embodiment is not limited. Figure 6 This is the energy evolution curve of the QUBO model with time window penalty in the embodiment; Figure 7 A flowchart for hierarchical dimensionality reduction and hybrid solution in large-scale customer scenarios; Figure 8 This is a comparison chart of the customer service start time and time window in a large-scale single-vehicle scenario in the example. Figure 9 This is a sensitivity analysis diagram of the scheduling target under different vehicle number conditions in the example, which is only used to illustrate the impact of changes in vehicle number on the comprehensive path cost. Figure 10 The energy evolution curves for solving the QUBO problem for a representative subpath in a multi-vehicle scenario are shown. Detailed Implementation

[0023] like Figure 1 As shown, a smart logistics vehicle route optimization method oriented towards time windows and capacity constraints includes the following steps: (It should be noted that the "single-vehicle basic path" in this invention is not limited to the original path obtained solely from the basic QUBO model without considering time windows, but rather refers to the single-vehicle candidate path obtained under the single-vehicle path model after basic QUBO modeling, time window proxy target guidance, and evaluation of real back-substitution without idle waiting. This path is used as the basis for subsequent large-scale customer segmentation, multi-vehicle customer allocation, and local path ranking for each vehicle.)

[0024] Step 1: Obtain the basic data of the smart logistics and distribution network. The basic data includes distribution center nodes, customer node set, customer demand, customer service time, upper and lower bounds of the time window when customers are allowed to start service, transportation time matrix between nodes, spatial distance data between customer nodes, and vehicle capacity limit. Step 2: Construct a single-vehicle route sequence coding model based on customer access order, set binary decision variables of customer-access location, and establish a single-vehicle closed-loop route optimization model based on location uniqueness constraints and customer uniqueness constraints; Step 3: Transform the single-vehicle closed-loop path optimization model in Step 2 into a quadratic unconstrained binary optimization QUBO model. Incorporate the location uniqueness constraint and customer uniqueness constraint into the objective function through the penalty function, and use a quantum heuristic solver to solve the basic path of the single vehicle. Step 4: Based on the model obtained in Step 3, introduce the no-idle-waiting rule and the customer time window penalty mechanism, construct the location-type time window agency cost and the adjacent transfer-type time window agency cost, embed the customer access order, transportation time, and time window violation risk into the QUBO search objective function, and obtain the single-vehicle route optimization model with time window agency guidance. Step 5: Perform a real back-to-back evaluation on the candidate paths obtained in Step 4. Calculate the actual start time of each customer, early arrival time deviation, late arrival time deviation, time window penalty value, and total transportation time of the path according to the no idle waiting rule. Use the sum of the total transportation time and the total time window penalty as the real comprehensive cost to select the path scheme. Step 6: When the number of customer nodes exceeds a preset scale, construct a comprehensive distance matrix. This comprehensive distance matrix integrates transportation time between nodes, customer time window attributes, and spatial distance data between customer nodes. Based on the comprehensive distance matrix, perform balanced clustering of customer nodes to obtain several customer clusters and inter-cluster access orders. These customer clusters and inter-cluster access orders are used to generate large-scale single-vehicle route optimization schemes, or as the initial structure for multi-vehicle customer allocation and local route ranking. Step 7: In a multi-vehicle delivery scenario, determine the lower bound of the theoretical number of vehicles based on the total customer demand and the upper limit of single-vehicle capacity, and construct a customer-vehicle allocation model with the hard constraints of unique customer service and vehicle capacity not exceeding the limit, and divide customer nodes into different vehicle service sets. Step 8: For the first Customer service set for each vehicle Construct local sequential encoding variables on this subset of customers ,in , And according to the single-vehicle sequential coding, QUBO penalty function transformation, time window proxy cost and real retracement evaluation mechanism, the first vehicle is evaluated. The order of accessing vehicles inside the vehicle has been optimized; Step 9: Perform cross-vehicle customer shifting, customer exchange, and route rearrangement iterative corrections on the multi-vehicle routing scheme to ensure that each vehicle route satisfies capacity constraints, unique customer service constraints, and vehicle head-tail closed-loop constraints. Step 10: Based on the lexicographical objective of prioritizing the number of vehicles used and minimizing the comprehensive path cost with the minimum number of feasible vehicles, select the final multi-vehicle path optimization result from the candidate solutions that satisfy the customer unique service constraint, vehicle capacity constraint, and vehicle head-tail closed loop constraint. The result includes the number of vehicles used, the access path of each vehicle, the service start time of each customer, the degree of time window violation, and the comprehensive path cost.

[0025] In step 1, the basic data of the smart logistics distribution network is obtained. The basic data includes distribution center nodes, customer node set, customer demand, customer service time, upper and lower bounds of the time window when customers are allowed to start service, transportation time matrix between nodes, spatial distance data between customer nodes, and vehicle capacity limit.

[0026] Let the set of delivery network nodes be: ; Where node 0 represents the distribution center, and the set of customer nodes is: ; node To node The delivery time is ,client The demand is ,client Service hours are ,client The permitted service start time window is: ; in, For customers Allow the lower bound of the time window for starting service. For customers The upper bound of the time window for allowing service to begin. The total number of customer nodes; the maximum cargo capacity of the vehicle is ,client With customers The spatial distance between them is It should be noted that, and Both represent client node indexes, and When the formula contains both and hour, This indicates the customer corresponding to the currently accessed location. Indicates to customers Another customer that is adjacent to or to be compared.

[0027] In one specific embodiment, the distribution center is fixed as the vehicle departure and return point. All vehicles depart from the distribution center and return to the distribution center after completing the assigned customer node service. The transportation time between nodes is determined by a given transportation time matrix, and the customer demand, service time, and time window are all known parameters.

[0028] In step 2, a single-vehicle sequential coding path model is constructed based on the customer access order. A binary variable representing the customer and their access location is set. Used to describe customers Was it arranged in the Access locations: ; Therefore, a single-vehicle closed-loop delivery route can be represented as a... A 0-1 sequential encoding matrix. Rows in the matrix correspond to customer node numbers, and columns correspond to access locations. Since the distribution center is fixed as the start and end point of the path, no separate sequential encoding variable is set for the distribution center.

[0029] To ensure the validity of the path structure, location uniqueness constraints and customer uniqueness constraints are set.

[0030] The location uniqueness constraint means that only one customer can be assigned to each access location: ; The customer uniqueness constraint means that each customer is visited only once in the entire path: ; Once the sequential encoding matrix is ​​determined, access positions are... By sequentially reading customer IDs with values ​​of 1, the customer access sequence can be restored, and distribution center node 0 can be added at the beginning and end of the path to form a closed-loop delivery path for a single vehicle. ; in, Indicates the first Each access location corresponds to a client node.

[0031] In step 3, based on the sequential coded path model constructed in step 2, a single-vehicle basic QUBO model is constructed, and the single-vehicle basic path is solved using a QUBO solver or a quantum heuristic solver.

[0032] First, we construct the objective function for the transportation time of a single-vehicle closed-loop path. The vehicle departs from the distribution center, visits all customer nodes sequentially, and returns to the distribution center. Its transportation time consists of three parts: the transportation time from the distribution center to the first customer node, the transportation time between adjacent customer nodes, and the transportation time from the last customer node back to the distribution center. The objective function for transportation time is: ; in, Let the objective function be transportation time. Indicates the distance from the distribution center to the first customer The delivery time Indicates customer To customers The delivery time Indicates customer Transportation time back to the distribution center; To transform the path constraint into a quadratic unconstrained binary optimization form, the location uniqueness constraint and the customer uniqueness constraint are incorporated into the objective function using a squared penalty function. The location uniqueness constraint penalty function is: ; The penalty function for customer uniqueness constraint is: ; The basic QUBO model for a single vehicle is then: ; in, This is a constraint penalty coefficient. The constraint penalty coefficient is used to increase the energy cost of violating the location uniqueness constraint and the customer uniqueness constraint. Preferably, Set to a positive number greater than the possible variation in the target transport time for a single path, so that illegal paths are suppressed during the QUBO search process.

[0033] Expand all binary variables into vectors in a fixed order. Then the above QUBO model can be written as: ; in, This is the QUBO coefficient matrix. This is a constant term. Since the constant term does not affect the location of the optimal solution, optimization is performed during the actual solution process. That's all.

[0034] In step 4, based on the single-vehicle basic QUBO model obtained in step 3, a no-idle-waiting rule and a customer time window penalty mechanism are introduced to construct a single-vehicle path optimization model with time window agent guidance.

[0035] It should be noted that in this invention, the customer unique service constraint, vehicle capacity constraint, and vehicle head-tail closed loop constraint are hard constraints; the customer time window is a soft constraint, which allows the customer to actually start service earlier or later than the time window boundary, but the early arrival deviation and late arrival deviation are included in the comprehensive path cost through an asymmetric squared penalty function.

[0036] In vehicle routing optimization with time windows, a no-idle-waiting rule is adopted, meaning that service begins immediately upon vehicle arrival at the customer node, and early arrival deviations cannot be eliminated by waiting. Using the vehicle's departure time from the distribution center as time reference 0, if the route decoding yields the customer access sequence: ; The actual start time of service for the first customer is: ; For the For each customer, the actual start time of service is recursively calculated as follows: ; Set up a customer The actual start time of service is Then the customer The early arrival deviation and late arrival deviation are respectively: ; ; client The actual time window penalty is: ; in, Early arrival penalty coefficient, The late arrival penalty coefficient can be set according to the sensitivity of the delivery business to early and late arrivals. In one embodiment, it is set to: ; Directly introducing the actual service start time and its recursive relationship into the QUBO model would significantly increase the number of auxiliary variables and constraints. Therefore, this invention constructs location-based time window proxy costs and adjacent transition-based time window proxy costs, embedding the time window violation risk into the QUBO search objective function. First, the location-based time window proxy cost is constructed. Let the... Each access location corresponds to a reference start time of service. The reference start time of service. It is obtained by back-substituting from the anchor path or the initial path according to the no-idle-wait rule. If the anchor path is: ; Then the reference start service time sequence satisfies: ; ; When no good historical path exists, an initial anchor path can be generated based on the nearest neighbor rule, the time window center priority rule, or a random legal path, and the reference start service time sequence can be deduced according to the no idle waiting rule.

[0037] If the customer Arranged in the For each access location, then... Approximately replacing its actual service start time, customers In the The proxy time window penalty for each location is: ; The location-based time window proxy item is: ; Secondly, construct the adjacent transition time window proxy cost. Assume the client... Located in the One access location, customer Located in the

[0038] Access location. Based on the reference service start time. ,client Service Hours and customers To customers Transportation time Estimate the customer The agent's service start time is: ; Then the customer The penalty for adjacent agent transfers at the moment the agent starts service is: ; The adjacent transition time window proxy is: ; Combining location-based time window surrogate terms and adjacent transition-based time window surrogate terms yields the time window surrogate cost: ; in, and These are the weight coefficients for location-based proxy terms and adjacent transfer proxy terms, respectively.

[0039] The objective function for the QUBO search with time window proxy cost is: ; in, The scaling factor for the overall cost of time window proxy.

[0040] To improve the solver's search efficiency in complex discrete solution spaces, anchor paths are constructed based on heuristic paths or historically optimal paths. Let the client-position matrix corresponding to the anchor path be... If the customer Located at the first in the anchor point path If there are multiple access locations, then: ; otherwise: ; Construction of location anchoring bonus items: ; Construction edge connection reward items: ; The QUBO objective function after adding anchor guidance can be written as: ; in, and Weighting coefficients are assigned to anchor points. This is achieved by setting different weighting coefficients. , , , , The search is combined to form multiple sets of QUBO search configurations, and each set of configurations is solved independently multiple times to reduce the randomness of random search.

[0041] Step 5: Evaluate and screen candidate paths using real-world back-generation methods. Decode the candidate binary matrix obtained from the QUBO solution to recover the client access path: ; And the following feasibility verification was performed: ; A path is considered a feasible candidate path only if each customer appears exactly once, each access location corresponds to exactly one customer, and the path begins and ends at a distribution center. For feasible candidate paths, the actual start time of service for each customer is recalculated according to the no-idle-wait rule described in step 4. Early arrival deviation Late arrival deviation And calculate the true comprehensive target value: ; Finally, select from all feasible candidate paths The shortest path is taken as the optimization result for a single vehicle with a time window. For path The corresponding total transportation time of the actual route. The QUBO target value is only used for energy guidance during the search process and is not directly used as the final business evaluation indicator. The final route quality is still judged according to the actual comprehensive objective function.

[0042] In step 6, when the number of customer nodes exceeds a preset scale, a comprehensive distance matrix is ​​constructed to perform balanced clustering of customer nodes. A large-scale customer path optimization scheme is then formed through inter-cluster ranking, intra-cluster optimization, and global correction, or it serves as the initial structure for multi-vehicle customer allocation and local path ranking. Let the customer... The center and width of the time window are as follows: ; client With customers The differences in the center of the time window and the differences in the width of the time window are as follows: ; Constructing customers With customers Overall distance between: ; in, , , , These are the normalized transit time, time window center difference, time window width difference, and customer. With customers Spatial distance; , , , Let be the weighting coefficients, and satisfy: ; Based on the comprehensive distance matrix The customer nodes are divided into several customer clusters of similar size: ; m represents the number of customer clusters.

[0043] And satisfy: ; This reduces the size of a single QUBO solution and improves the computability of large-scale customer path optimization.

[0044] Furthermore, inter-cluster sorting and intra-cluster initial path generation are performed. Sort the inter-cluster access order for each client cluster. Assume the cluster access order is: ; When the number of clusters is small, all inter-cluster access orders can be enumerated, and a global initial path can be constructed for each inter-cluster order. The path is then evaluated based on the actual comprehensive objective value, and the inter-cluster order with the smallest objective value is selected. After fixing the inter-cluster access order, a spatiotemporal coupling greedy rule is used to generate the initial intra-cluster access sequence. Let the end node of the current path be... The current cumulative service completion time is Candidate customers within the cluster are Then the customer The evaluation score for accessing the end of the current path is defined as: ; in: ; Each step selection The smallest client enters through the current path until all clients within the cluster have been sorted. After obtaining the global initial path, client node swapping, client node shifting, and sequence reversal operations are performed on the sub-paths within each cluster to generate local candidate paths. These candidate local paths are then embedded back into the global path, and the objective value is recalculated according to the true synthesis objective function. If the locally optimized objective value decreases, the local update is accepted; otherwise, the original path remains unchanged.

[0045] After completing intra-cluster optimization, swap, shift, inversion, and block adjustment operations are performed on the current path at the global level. Let the global candidate path be... The current path is ,like: ; The global correction result is then accepted. Through multiple rounds of intra-cluster optimization and global correction, a large-scale customer path optimization result is obtained.

[0046] In step 7, in a multi-vehicle delivery scenario, the lower bound of the theoretical number of vehicles is determined based on the total customer demand and the upper limit of single-vehicle capacity, and a customer-vehicle allocation model is constructed to divide customer nodes into different vehicle service sets.

[0047] To describe the allocation relationship between customers and vehicles, a customer-vehicle allocation variable is set up: ; The customer's sole service constraint is: ; Vehicle capacity constraints are: ; No. The customer service set corresponding to a vehicle can be represented as: ; The customer-vehicle allocation variable form and the customer service set form are equivalent expressions. The former is used to characterize allocation decisions, while the latter is used to describe vehicle routing and load calculations.

[0048] Based on the above customer-vehicle allocation variables, the equivalent result can be obtained as follows: Customer service collection for vehicles Furthermore, the vehicle load and vehicle route cost are calculated.

[0049] In a multi-vehicle delivery scenario, let the final number of vehicles used be... , No. The customer base for car services is The corresponding path is: ; in, For the first The number of customers using the vehicle service.

[0050] No. The vehicle's load capacity is: ; The capacity constraint is: ; All customers must be served by one and only one vehicle, with the unique service constraint being: ; The lower bound of the number of vehicles is determined by the total customer demand and the upper limit of the capacity per vehicle. Let the total customer demand be: ; The theoretical minimum number of vehicles is then lowered as follows: ; from Start searching for a feasible number of vehicles. If the current number of vehicles cannot form a customer allocation plan that meets the capacity constraints, gradually increase the number of vehicles until a feasible plan is found.

[0051] In step 8, for the first Customer service set for each vehicle On this subset of customers, local sequential encoding variables are constructed, and the first vehicle is evaluated according to single-vehicle sequential encoding, QUBO penalty function transformation, time window proxy cost, and true back-substitution evaluation mechanism. The order of accessing vehicles inside the vehicle has been optimized.

[0052] Let the first The number of customers served by the vehicle is Its local sequential encoding variables are: ; in,

[0053] No. The QUBO objective for partial transport time of vehicles is: ; No. The penalty functions for the vehicle's location uniqueness and the customer's uniqueness constraints are as follows: ; After combining with the time window proxy item, the first The single-route QUBO model for a vehicle is as follows:

[0054] in, For the first Vehicle location-based time window proxy item, For the first Adjacent transfer time window proxy for vehicles, , The first The weights of positional surrogate terms and adjacent transition surrogate terms in the vehicle local model. Where: ,

[0055]

[0056]

[0057]

[0058] in, Indicates the first The first in the local path of the vehicle The reference start time for each access location.

[0059] No. The customer base for car services is The corresponding path is: ; The start times for the remaining customers are recursively calculated as follows: ; No. The transportation time for the vehicle is: ; in: ; No. The time window penalty for vehicles is: ; in, ,

[0060] and The first v The first car k The early arrival deviation and late arrival deviation of each visiting customer, if the first vehicle number The number of visiting customers is ,but ,

[0061] No. The actual path cost of the vehicle is: ; In the outer customer allocation phase, a customer priority sequence is constructed according to customer deadline, time window center, distance priority, or a combination thereof, and customers are allocated to vehicle routes using the optimal insertion method. Let the customer be... Insert vehicle The path costs before and after are respectively and Then the insertion increment is: ; Among the candidate vehicles that meet the capacity constraints, select the one that... The smallest vehicle completes the customer insertion. If there is no insertable vehicle that satisfies the capacity constraint under the current number of vehicles K, then the current number of vehicles is determined to be infeasible, the number of vehicles is increased, and the customer allocation process is re-executed.

[0062] In step 9, cross-vehicle customer shifting, customer exchange, and route rearrangement are iteratively corrected for the multi-vehicle routing scheme to ensure that each vehicle route satisfies capacity constraints, unique customer service constraints, and vehicle head-tail closed-loop constraints, and to continuously improve the overall route cost.

[0063] Suppose the current multi-vehicle routing scheme is as follows: ; If customers From vehicles Move to vehicle Then, the affected paths are re-inserted and rearranged to obtain new paths. and The target increment for cross-vehicle movement operations is: ; If vehicles are exchanged Customers in With vehicles Customers in and obtain the cost of the new path. and The target increment for cross-vehicle swapping operations is:

[0064] When the modified scheme satisfies the capacity constraint, and or The system accepts the cross-vehicle correction and then calls the single-route QUBO sorting module again to perform local rearrangement of the affected vehicle paths. When the corrected solution meets the capacity constraint but the target increment is not less than 0, the original solution is retained, or the corrected solution is accepted according to a preset acceptance probability to expand the search range and reduce the risk of getting trapped in local optima. The system iterates alternately through cross-vehicle adjustments and single-route QUBO rearrangements until the overall target value no longer decreases. During the iteration process of cross-vehicle shifts, customer swaps, and single-route QUBO rearrangements, the historical best feasible solution that meets the capacity constraint, the customer unique service constraint, and the vehicle head-tail closed loop constraint is continuously recorded. When the maximum number of iterations is reached or the overall path cost no longer decreases, the historical best feasible solution is output as the final multi-vehicle scheduling result.

[0065] In step 10, the final multi-vehicle path optimization result is selected from candidate solutions that satisfy the customer unique service constraint, vehicle capacity constraint, and vehicle head-tail closed loop constraint, according to the lexicographical order objective of prioritizing the number of vehicles used and minimizing the comprehensive path cost under the minimum feasible number of vehicles.

[0066] The overall lexicographical target can be represented as: ; That is, prioritize the comparison of vehicle numbers When the number of vehicles is the same, then compare the comprehensive path costs. ; Sensitivity analysis under different vehicle numbers reveals the changing relationship between vehicle resource input and overall path cost, without altering the final selection principle of the lexicographical order objective. The final solution should prioritize selecting the minimum feasible number of vehicles that satisfies all hard constraints. And under the condition of the number of vehicles, select the scheduling scheme with the minimum comprehensive path cost.

[0067] The final output includes the number of vehicles used. Customers of each vehicle service Closed-loop access path for each vehicle The actual start time of service for each customer Early arrival deviation of each customer and late arrival deviation Transportation time for each vehicle Penalties for each vehicle during designated time windows The overall target value of the system is: ; Example: The proposed embodiments include the following steps: Step 1: Obtain the basic data of the smart logistics and distribution network. The basic data includes distribution center nodes, customer node set, customer demand, customer service time, upper and lower bounds of the time window when customers are allowed to start service, transportation time matrix between nodes, spatial distance data between customer nodes, and vehicle capacity limit. Step 2: Construct a single-vehicle route sequence coding model based on customer access order, set binary decision variables of customer-access location, and establish a single-vehicle closed-loop route optimization model based on location uniqueness constraints and customer uniqueness constraints; Step 3: Transform the single-vehicle closed-loop path optimization model in Step 2 into a quadratic unconstrained binary optimization QUBO model. Incorporate the location uniqueness constraint and customer uniqueness constraint into the objective function through the penalty function, and use a quantum heuristic solver to solve the basic path of the single vehicle. Step 4: Based on the model obtained in Step 3, introduce the no-idle-waiting rule and the customer time window penalty mechanism, construct the location-type time window agency cost and the adjacent transfer-type time window agency cost, embed the customer access order, transportation time, and time window violation risk into the QUBO search objective function, and obtain the single-vehicle route optimization model with time window agency guidance. Step 5: Perform a real back-to-back evaluation on the candidate paths obtained in Step 4. Calculate the actual start time of each customer, early arrival time deviation, late arrival time deviation, time window penalty value, and total transportation time of the path according to the no idle waiting rule. Use the sum of the total transportation time and the total time window penalty as the real comprehensive cost to select the path scheme. Step 6: When the number of customer nodes exceeds a preset scale, construct a comprehensive distance matrix. The comprehensive distance matrix integrates the transportation time between nodes, customer time window attributes, and spatial distance data between customer nodes. Based on the comprehensive distance matrix, perform balanced clustering of customer nodes to obtain several customer clusters and the access order between clusters. The customer clusters and the access order between clusters are used to generate large-scale single-vehicle route optimization schemes, or as the initial structure for multi-vehicle customer allocation and local route sorting. Step 7: In a multi-vehicle delivery scenario, determine the lower bound of the theoretical number of vehicles based on the total customer demand and the upper limit of single-vehicle capacity, and construct a customer-vehicle allocation model with the hard constraints of unique customer service and vehicle capacity not exceeding the limit, and divide customer nodes into different vehicle service sets. Step 8: For the first Customer service set for each vehicle Construct local sequential encoding variables on this subset of customers ,in And according to the single-vehicle sequential coding, QUBO penalty function transformation, time window proxy cost and real retracement evaluation mechanism, the first vehicle is evaluated. The order of accessing vehicles inside the vehicle has been optimized; Step 9: Perform cross-vehicle customer shifting, customer exchange, and route rearrangement iterative corrections on the multi-vehicle routing scheme to ensure that each vehicle route satisfies capacity constraints, unique customer service constraints, and vehicle head-tail closed-loop constraints. Step 10: Based on the lexicographical objective of prioritizing the number of vehicles used and minimizing the comprehensive path cost with the minimum number of feasible vehicles, select the final multi-vehicle path optimization result from the candidate solutions that satisfy the customer unique service constraint, vehicle capacity constraint, and vehicle head-tail closed loop constraint. The result includes the number of vehicles used, the access path of each vehicle, the service start time of each customer, the degree of time window violation, and the comprehensive path cost.

[0068] In one specific embodiment, 50 customer nodes are selected to form a smart logistics vehicle routing optimization scenario. The distribution center node is numbered 0, and the customer nodes are numbered from 1 to 50. The maximum capacity of each vehicle is set to Q=60. Customer demand, customer service time, upper and lower bounds of the time window during which customers are allowed to start service, and the inter-node transportation time matrix are all known input data. The method of the present invention is executed according to steps 1 to 10 to obtain multi-vehicle routing optimization results oriented towards time windows and capacity constraints.

[0069] The basic input parameters for this embodiment are shown in Table 1.

[0070] Table 1: Basic Input Parameters Table for Embodiments of the Invention;

[0071] As shown in Table 1, this embodiment pertains to a large-scale multi-vehicle delivery scenario with 50 customer nodes. Due to the large number of customers, directly constructing a global customer-vehicle-access location joint decision model would result in a large number of binary variables and coupling terms, which would be detrimental to solving the QUBO model. Therefore, this embodiment first constructs a comprehensive distance matrix according to step 6, performs balanced clustering of customer nodes based on the comprehensive distance matrix, and then performs customer allocation and local path ranking in the multi-vehicle scenario.

[0072] First, before introducing multi-vehicle capacity allocation, large-scale single-vehicle hierarchical optimization was performed on 50 customer nodes to verify the feasibility of the comprehensive distance matrix, balanced clustering, and hierarchical dimensionality reduction solution mechanism. The results are shown in Table 2.

[0073] Table 2: Results of large-scale single-vehicle hierarchical optimization;

[0074] The large-scale single-vehicle routes corresponding to Table 2 are: 0→27→28→12→26→21→2→40→13→37→5→6→18→7→31→1→50→3→33→9→20→30→32→10→11→19→47→36→49→48→8→46→45→17→16→44→38→14→43→15→42→41→22→23→39→25→4→24→29→34→35→0 As shown in Table 2, the hierarchical paths obtained based on the comprehensive distance matrix and balanced clustering can form legal paths that satisfy the single-vehicle access constraint under the condition of 50 customers, indicating that the large-scale hierarchical dimensionality reduction mechanism in this invention can effectively reduce the scale pressure of direct global solution. However, when a single vehicle continuously serves 50 customer nodes, although the total transportation time is 59, due to the continuous accumulation of customer service time along the path under the no idle waiting rule, 45 customers eventually violate the time window, with a time window penalty of 4,962,570 and the total objective value reaching 4,962,629. Therefore, in large-scale customer scenarios, using only single-vehicle continuous service will lead to a large risk of time window violation, and it is necessary to further introduce multi-vehicle capacity constraint allocation and multi-vehicle collaborative path optimization. The single-vehicle hierarchical paths in Table 2 are only used to verify the feasibility of the comprehensive distance matrix, balanced clustering, and single-route sorting mechanism, and are not used as the final delivery scheme that satisfies the vehicle capacity constraint; the final capacity feasible scheme is based on the multi-vehicle path results shown in Tables 4 to 10.

[0075] Further, following step 7, the theoretical minimum number of vehicles is determined based on the total demand from all customers and the maximum capacity per vehicle. In this embodiment, the total demand from all customers is: The maximum capacity of a single vehicle is: Therefore, the theoretical minimum number of vehicles is lower bounded as follows: ,in, This indicates the rounding up operation.

[0076] Table 3 shows the capacity feasibility analysis under different vehicle numbers.

[0077] Table 3: Capacity Feasibility Table under Different Vehicle Numbers;

[0078] Table 3 shows that when the number of vehicles is 4, the total vehicle capacity is 240, which is less than the total demand of all customers (271), and therefore cannot meet the delivery needs of all customers. When the number of vehicles is 5, the total vehicle capacity is 300, which meets the capacity constraint and is the theoretical minimum feasible number of vehicles. When the number of vehicles increases to 6 or 7, although the capacity constraint is still met, the number of vehicles used increases, which does not conform to the lexicographical objective of "prioritizing the number of vehicles used and minimizing the comprehensive path cost under the minimum feasible number of vehicles" in this invention. Therefore, this embodiment selects 5 vehicles as the number of vehicles for the multi-vehicle delivery scheme, and further optimizes customer allocation and in-vehicle access order under this vehicle number condition.

[0079] Following steps 7 to 10, this embodiment performs customer-vehicle allocation, local QUBO path sorting for each vehicle, real-time evaluation without idle wait, and cross-vehicle iterative correction under the condition of 5 vehicles. The overall solution results are shown in Table 4.

[0080] Table 4: Overall Solution Results of Multi-Vehicle Route Optimization;

[0081] As shown in Table 4, under the conditions of a total demand of 271 and a vehicle capacity of 60, the final number of vehicles selected is 5, which is consistent with the lower bound of the theoretical minimum number of vehicles, indicating that the obtained scheme meets the optimization requirement of prioritizing vehicle usage. Furthermore, all five final paths were solved using the Kaiwu SDK, demonstrating that the outer layer customer allocation, inner layer single-route QUBO sorting, and cross-vehicle iterative correction mechanism constructed in this invention can be fully applied to multi-vehicle capacity constraint scenarios. The final scheme has a total transportation time of 92, a total time window penalty of 17470, and a total objective value of 17562.

[0082] The routes, loads, transportation times, time window penalties, and target values ​​for each vehicle are shown in Table 5.

[0083] Table 5: Route, load, and actual route cost for each vehicle;

[0084] Table 5 shows that the final scheduling scheme uses 5 vehicles, each serving 10 customer nodes, indicating a relatively balanced distribution of customers. The load capacities of the 5 vehicles are 59, 59, 56, 45, and 52 respectively, all within the single-vehicle capacity limit of 60, indicating that the scheme meets the vehicle capacity constraint. The transportation times of the 5 vehicles are 20, 21, 19, 16, and 16 respectively, with a total transportation time of 92. The time window penalties for the 5 vehicles are 5440, 4860, 2760, 2350, and 2060 respectively, with a total time window penalty of 17470. Therefore, although different vehicles serve the same number of customers, the time window penalties vary for each vehicle due to differences in customer time windows and transportation times between nodes.

[0085] Further statistical analysis was conducted on the load utilization rate and time window penalty ratio of each vehicle in Table 5, and the results are shown in Table 6.

[0086] Table 6: Statistics on the utilization rate of each vehicle's capacity and the proportion of time window penalties;

[0087] Table 6 shows that both Vehicle 1 and Vehicle 2 have a load capacity of 59 and a capacity utilization rate of 98.33%, indicating that some vehicles are operating close to full capacity under the minimum number of vehicles. The overall capacity utilization rate is 90.33%, indicating that vehicle resources are being utilized relatively fully. In terms of the proportion of time window penalties, the combined time window penalties for Vehicle 1 and Vehicle 2 account for 58.96%, which is the main source of the system's total time window penalties. This indicates that multi-vehicle routing optimization not only needs to meet capacity limits but also needs to coordinate the time window risks between different vehicles through methods such as customer relocation, customer swapping, and in-vehicle route rearrangement.

[0088] Further path feasibility verification was performed on the multi-vehicle scheduling scheme shown in Table 5, and the results are shown in Table 7.

[0089] Table 7: Feasibility Verification Table for Multi-Vehicle Dispatch Scheme;

[0090] As shown in Table 7, each vehicle route starts and ends at Distribution Center 0, satisfying the closed-loop constraint; the load of each vehicle does not exceed the capacity limit of 60, satisfying the capacity constraint; both node validity and route uniqueness are "yes", indicating that there are no invalid customer nodes or duplicate access nodes within each vehicle. Combining this with the five vehicle routes in Table 5, it can be seen that all 50 customer nodes are assigned to a specific vehicle service set, and there is no situation where the same customer is served repeatedly by multiple vehicles. Therefore, the obtained solution satisfies the customer uniqueness service constraint.

[0091] To further illustrate the completeness of customer node allocation, statistics were performed on the customer set of 5 vehicles, and the results are shown in Table 8.

[0092] Table 8: Customer Allocation Integrity Verification Table;

[0093] As shown in Table 8, the service customer sets of the 5 vehicles are non-overlapping and cover all customer nodes from 1 to 50, indicating that the multi-vehicle routing scheme obtained in this embodiment meets the requirements of unique customer service and full customer coverage.

[0094] Furthermore, to illustrate the improvement effect of multi-vehicle capacity constraint allocation on time window penalties, the hierarchical path results for 50 customers per vehicle shown in Table 2 are compared with the multi-vehicle path optimization results shown in Tables 4 and 5, and the results are shown in Table 9.

[0095] Table 9: Comparison of Single-Vehicle Routes and Multi-Vehicle Routes for 50 Customers;

[0096] As shown in Table 9, when 50 customers are served continuously by a single vehicle, although the total transportation time is 59 seconds, the total time window penalty reaches 4,962,570 seconds, and the total comprehensive path cost is 4,962,629 seconds. When 5 vehicles are used for multi-vehicle capacity constraint allocation, the total transportation time increases to 92 seconds, but the total time window penalty decreases to 17,470 seconds, and the total comprehensive path cost decreases to 17,562 seconds. This result indicates that in delivery scenarios with a large number of customers and time window constraints, multi-vehicle collaborative delivery can effectively disperse the time window conflicts caused by continuous service by a single vehicle, thereby reducing the time window violation penalty.

[0097] To further reflect the lexicographical objective of "prioritizing the number of vehicles used and minimizing the comprehensive path cost under the minimum feasible number of vehicles" in this invention, the process of determining the number of vehicles, capacity feasibility, and final selection results are further summarized as shown in Table 10.

[0098] Table 10: Vehicle Quantity Selection and Lexicographical Order Target Verification Table;

[0099] As shown in Table 10, the final number of vehicles selected in this embodiment is consistent with the theoretical minimum number of vehicles, indicating that the obtained scheme first satisfies the priority requirement of the number of vehicles used. Under the condition of the minimum feasible number of vehicles, a multi-vehicle path scheme with a total comprehensive path cost of 17562 is obtained through local QUBO sorting and real back-substitution evaluation, thereby satisfying the secondary optimization requirement in the lexicographical order objective.

[0100] In this embodiment, the true comprehensive cost of each vehicle path is not directly given by the QUBO agent objective function value, but is obtained by performing a true back-substitution evaluation on the candidate paths based on the no-idle-wait rule. This evaluation method ensures that the output results are consistent with the no-idle-wait service rule and the time window penalty mechanism.

[0101] Furthermore, to illustrate the feasibility of the inner-layer single-route QUBO ranking process, this embodiment constructs local QUBO ranking models for the customer sub-paths corresponding to the five vehicles. The QUBO solution status of each vehicle sub-path is shown in Table 11.

[0102] Table 11: QUBO solution status table for each vehicle sub-path;

[0103] As shown in Table 11, under the condition of a fixed number of 5 vehicles, this embodiment does not directly construct a single large-scale global QUBO model for the 50 customer nodes. Instead, it first divides the 50 customer nodes into 5 vehicle service sets through outer customer allocation, and then constructs local order encoding variables and local QUBO ranking models for each vehicle's customer subset. The QUBO values ​​of each vehicle sub-path show a trend of rapid decrease in the early stage and tendency to stabilize in the later stage, indicating that each sub-path model can gradually converge to a relatively stable low-energy region. This result shows that the decompositional solution framework of the present invention can reduce the scale of a single QUBO solution and is applicable to large-scale customer path optimization scenarios under multiple vehicle capacity constraints.

[0104] In summary, this embodiment first obtains a hierarchical path for a large-scale single-vehicle network of 50 customers using a comprehensive distance matrix and balanced clustering, illustrating the dimensionality reduction solution process in a large-scale customer scenario. Then, based on the total demand of all customers and the upper limit of single-vehicle capacity, the theoretical minimum feasible number of vehicles is determined to be 5. Further, through customer-vehicle allocation, local QUBO sorting of each vehicle, real-time feedback evaluation without idle waiting, and cross-vehicle iterative correction, a multi-vehicle path optimization result satisfying the customer unique service constraint, capacity constraint, and vehicle closed-loop constraint is obtained. The final solution uses 5 vehicles to complete the delivery to 50 customer nodes, with a total transportation time of 92 seconds, a total time window penalty of 17470, and a total comprehensive path cost of 17562, which can comprehensively demonstrate the technical effect of this invention in optimizing intelligent logistics vehicle paths under time window and capacity constraints.

Claims

1. A method for optimizing intelligent logistics vehicle routes under time windows and capacity constraints, characterized in that, Includes the following steps: Step 1: Obtain basic data of the smart logistics and distribution network, and set decision variables to obtain basic information and binary decision variables for vehicle route optimization; Step 2: Using the basic information and binary decision variables obtained in Step 1, construct a mathematical expression that includes constraints, penalties, and transportation objectives to obtain the basic objective function; Step 3: Based on the basic objective function obtained in Step 2, a time window surrogate penalty term is introduced in combination with the time window constraint mechanism, and a guiding term is constructed based on historical good paths to obtain a guided surrogate objective function with embedded time window violation risk; Step 4: Solve the guided agent objective function obtained in Step 3 using the solver, and perform back-substitution calculation through the no-idle-wait rule to filter and obtain the basic path of a single vehicle; wherein, the basic path of a single vehicle is a candidate path of a single vehicle obtained after time window agent guidance and real back-substitution evaluation, which is used for subsequent multi-vehicle customer allocation and local path ranking. Step 5: In large-scale or multi-vehicle delivery scenarios, construct a comprehensive distance matrix based on customer time window differences, inter-node transportation time, and spatial distance data between customer nodes. Perform customer clustering, capacity constraint allocation, local path sorting for each vehicle, and cross-vehicle iterative correction to finally obtain the multi-vehicle path optimization results.

2. The method according to claim 1, characterized in that, Step 1 specifically includes the following sub-steps: Step 1-1) Obtain basic data of the smart logistics and distribution network. The basic data includes distribution center nodes, customer node set, customer demand, customer service time, upper and lower bounds of the time window when customers are allowed to start service, transportation time matrix between nodes, spatial distance data between customer nodes, and vehicle capacity limit to obtain basic information. Steps 1-2) Construct a single-vehicle route sequence coding model based on the customer access order, set binary decision variables to describe the correspondence between customers and access locations, and combine them with basic information to finally obtain the basic information and binary decision variables used for vehicle route optimization.

3. The method according to claim 2, characterized in that, In step 1-1), the set of delivery network nodes is represented as: ; Where node 0 represents the distribution center, and the set of customer nodes is represented as follows: ; node To node The delivery time is ,client The demand is ,client Service hours are ,client The permitted service start time window is: ; in, For customers Allow the lower bound of the time window for starting service. For customers The upper bound of the time window for allowing service to begin. The total number of customer nodes; the maximum cargo capacity of the vehicle is ;client With customers The spatial distance between them is It should be noted that, and Both represent client node indexes, and , This indicates the customer corresponding to the currently accessed location. Indicates to customers Another customer that is adjacent to or to be compared.

4. The method according to claim 2, characterized in that, In step 1-2), the binary decision variable is ,when When indicating customer Arranged in the p Access location, when When indicating customer Not located at this access location p It is a positive integer index representing the position of the vehicle's access sequence.

5. The method according to claim 1, characterized in that, Step 2 specifically includes the following sub-steps: Step 2-1) Construct a location uniqueness constraint penalty term for the binary decision variables; Step 2-2) Construct a customer uniqueness constraint penalty term for the binary decision variables; Steps 2-3) Combine the inter-node transportation time matrix and binary decision variables to construct a transportation time objective function that describes the single-vehicle closed-loop path from the distribution center to the destination. Steps 2-4) Combine the location uniqueness constraint penalty term, the customer uniqueness constraint penalty term, and the transportation time objective function to calculate the basic objective function.

6. The method according to claim 5, characterized in that, In step 2-1), the formula used to construct the location uniqueness constraint penalty term is: ; in, The penalty function is the position uniqueness constraint. In step 2-2), the formula used to construct the customer uniqueness constraint penalty term is as follows: ; in, Penalty function for customer uniqueness constraint; In steps 2-3), the formula used to construct the objective function for transportation time is: ; in, Let the objective function be transportation time. Indicates the distance from the distribution center to the first customer The delivery time Indicates customer To customers The delivery time Indicates customer Transportation time back to the distribution center; In steps 2-4), the formula used to obtain the basic objective function is: ,in For a single vehicle, the basic objective function is... This is the constraint penalty coefficient used to increase the energy cost of violating constraints.

7. The method according to any one of claims 1 to 6, characterized in that, Step 3 specifically includes the following sub-steps: Step 3-1) Construct anchor path based on initial path or historical good path according to the no idle waiting rule, and deduce reference start service time sequence; Step 3-2) Calculate the location-based time window proxy cost when client nodes are arranged in different access locations by using the reference start service time sequence and the upper and lower bounds of the time window; Step 3-3) Calculate the adjacent transfer time window proxy cost using the reference start service time sequence and the inter-node transport time matrix; Steps 3-4) merge the location-based time window proxy cost and the adjacent transition-based time window proxy cost, and embed them into the basic objective function to obtain the proxy objective function; Steps 3-5) Construct guiding terms based on historically good paths and add them to the surrogate objective function to finally obtain the guided surrogate objective function used for solving.

8. The method according to claim 7, characterized in that, In step 3-1), the reference start time of service satisfies: Let the anchor path be ,in Indicates the first anchor point in the path Each access location corresponds to a client node, and each client node appears only once in the anchor path; ; ; This represents the reference start time of the service corresponding to the p-th access location. Indicates the reference start time of the first access location. From the distribution center to the first anchor node The delivery time For anchor nodes Service hours, The transit time between anchor nodes, where Indicates the first anchor point in the path Each access location corresponds to a client node. This represents the first customer node in the anchor path; In step 3-2), the formula for calculating the location-based time window proxy cost is: ; in, , For location-based time window proxy items, For customers exist p Agent time window penalty for each location Early arrival penalty coefficient, The penalty coefficient for being late. and It is a function for maximizing the value; In step 3-3), the formula for calculating the proxy cost of adjacent transition time windows is as follows: ; in, , , For adjacent transition time window proxy items, This indicates the customer under the adjacent transfer relationship. Time window agent penalty Indicates when the customer Located in the One access location, customer Located in the When accessing a location, the estimated number of customers is... The moment the agent begins service; In steps 3-4), the formula for the proxy objective function is obtained as follows: ; in, Let the objective function be the proxy cost with time window. The overall scaling factor for time window proxy cost. For location-based proxy item weighting coefficients, The weighting coefficients for adjacent transfer-type proxy terms; In steps 3-5), the formula for the guided agent objective function is obtained as follows: ; in, , ; To add the anchor point to guide the objective function, The guiding weight coefficient for anchoring reward items to locations. The guiding weight coefficient for edge connection rewards. For the elements in the customer-location matrix corresponding to the anchor path that take values ​​of 0 or 1, when the anchor path is in the... Each access location corresponds to a customer. hour, ,otherwise, , Anchor rewards for location, This is a reward item for edge connection.

9. The method according to claim 1, 2, 3, 4, 5, 6, or 8, characterized in that, Step 4 specifically includes the following sub-steps: Step 4-1) Solve the guided agent objective function using a quantum heuristic solver to obtain candidate binary matrices, and decode the candidate binary matrices into candidate customer access sequences; Step 4-2) Perform a validity check on the candidate customer access sequence, remove sequences that do not meet the location uniqueness constraint or customer uniqueness constraint, and retain feasible candidate paths; Step 4-3) For feasible candidate paths, deduce the actual start time, early arrival time deviation, and late arrival time deviation for each customer point by point according to the no idle waiting rule; Step 4-4) Combine early arrival time deviation, late arrival time deviation and total transportation time to calculate the true comprehensive target value of feasible candidate paths. Finally, select the path with the smallest true comprehensive target value as the single vehicle basic path. The single vehicle basic path is used for customer allocation and local ranking in subsequent large-scale customer stratification processing or multi-vehicle path optimization. In step 4-1), the candidate customer access sequence is represented as follows: ;in, This indicates a closed-loop delivery route for a single vehicle. Indicates the first p The client node sequence number corresponding to each access location. ; In step 4-2), the validity check must satisfy: ; That is, it is considered valid only if each customer appears exactly once and each access location corresponds to exactly one customer; In step 4-3), the formula for calculating the actual start time of service is: , ; in, The moment when the first customer truly begins service. For customers The actual start of service Service time for previous customers. The transit time from the previous customer to the current customer; Early arrival time deviation is ; in, For customers Early arrival deviation, For customers The actual start time of service; Late arrival time deviation is ; in, For customers Late arrival deviation; In step 4-4), the formula used to calculate the true comprehensive target value is: ;in, For the true comprehensive target value, For path The corresponding total transportation time for the actual route.

10. The method according to claim 9, characterized in that, Step 5 specifically includes the following sub-steps: Step 5-1) Construct a comprehensive distance matrix based on the transportation time between nodes, the difference in customer time windows, and the spatial distance data between customer nodes. Then, divide the customer nodes into several customer clusters according to the comprehensive distance matrix. The customer clusters are used as candidate structures for the initial allocation of customers and vehicles, or to limit the search range for subsequent customer relocation and customer exchange operations. Step 5-2) Determine the lower bound of the theoretical minimum number of vehicles based on the total customer demand and the maximum cargo capacity of the vehicles; Step 5-3) Construct customer-vehicle allocation rules, set customer-vehicle allocation variables, and divide customer nodes into different vehicle service sets while ensuring that the vehicle loading capacity does not exceed the limit. Step 5-4) For the first Customer service set for each vehicle ,make And set local sequence encoding variables on that subset of customers. ,in Replace the customer set, number of customers, and binary variable in steps 2 to 4 with... , and Calculate the first The actual path cost of the vehicle; Step 5-5) Perform customer shifting and customer exchange operations among the multi-vehicle routing schemes, calculate the target increment brought by each operation, and finally select the multi-vehicle routing optimization result from the candidate schemes that meet the vehicle capacity constraints, customer unique service constraints and vehicle closed-loop constraints, according to the lexicographical order objective of prioritizing the number of vehicles used and minimizing the overall system path cost under the same number of vehicles. In step 5-1), the comprehensive distance matrix is ​​calculated using the following formula: ;in, For customers With customers The combined distance between them , , , These represent the normalized inter-node transportation time, time window center difference, time window width difference, and spatial distance, respectively. , , , The weighting coefficients must satisfy the condition that the sum is 1; In step 5-2), the formula for determining the lower bound of the theoretical minimum number of vehicles is: ,in, ; This is the lower bound of the theoretical minimum number of vehicles. Total demand from all customers This indicates the rounding up operation. For customer z's demand; In step 5-3), the customer-vehicle assignment variable is: , , ,in The initial number of vehicles considered in the current iteration is... ;when Indicates customer Assigned to vehicles v Otherwise, it is 0. v For vehicle identification index; vehicle load capacity is: The capacity constraint is ; In step 5-4), the formula for the actual path cost of each vehicle is: , ;in, For the first v The vehicle's actual path cost Let v be the transportation time for the v-th vehicle. For the first v The number of customers using the car service and The first v The first car k The early arrival deviation and late arrival deviation of each visiting customer, if the first vehicle number The number of visiting customers is ,but , ; For the first v Time window penalty for vehicles; In step 5-5), the target increment formula for the cross-vehicle shifting operation is: ,in, For the target increment of the shift, , The cost of the original path, , Cost of the new path; The target increment for cross-vehicle swapping operations is: ,in, In order to exchange target increments, , The cost of the new path after the exchange, where, and For two different vehicles participating in a customer relocation or customer exchange operation, the vehicle index is provided. The overall system objective value adopts the lexicographical objective formula: ;in, This represents the lexicographical minimization operation, which prioritizes minimizing the number of vehicles in use. K When the number of vehicles used is the same, then minimize the overall path cost of the system. ; The final output includes the number of vehicles used. Customers of each vehicle service Closed-loop access path for each vehicle The actual start time of service for each customer Early arrival deviation of each customer And late arrival deviation Transportation time for each vehicle Penalties for each vehicle's time window .