Two-stage vehicle transportation scheme solving method under speed time varying based on heuristic algorithm

By adopting a heuristic algorithm-based method in the two-stage vehicle path planning, a two-stage vehicle path optimization model under the time-varying road network is constructed, and the adaptive large neighborhood search algorithm is used to solve the problem of time-varying vehicle speed and achieve more efficient two-stage distribution.

CN119599544APending Publication Date: 2025-03-11HEFEI UNIV OF TECH
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411644573.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with the time-varying characteristics of vehicle speed in two-stage vehicle path planning, resulting in poor path optimization results.

Method used

Using a heuristic algorithm-based method, a two-stage vehicle path optimization model under a time-varying road network is constructed by obtaining customer needs and two-stage distribution vehicle resources, and a solution is used to obtain the global optimal solution.

Benefits of technology

While meeting the distribution needs, the total driving time of the two-stage distribution vehicles is optimized, the two-stage distribution efficiency is improved, the cost is reduced, and a higher quality solution is obtained.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599544A_ABST
    Figure CN119599544A_ABST
Patent Text Reader

Abstract

The invention provides a two-stage vehicle transportation scheme solving method and system under speed time varying based on a heuristic algorithm, a storage medium and electronic equipment, and relates to the field of two-stage vehicle path planning. The method comprises the following steps: firstly, obtaining customer demands and two-stage distribution vehicle resources; secondly, on the basis of a time-dependent model of travel speed, vehicle running time under speed time variation is determined; taking minimization of the total driving time of the two-stage distribution vehicles as an optimization target, and constructing a two-stage vehicle path optimization model under the time-varying road network; and finally, solving the model by adopting a self-adaptive large neighborhood search algorithm to obtain a global optimal solution, and decoding to obtain an optimal two-stage vehicle transportation scheme. The constructed model considers the influence of road congestion on the vehicle speed, the shortest driving time is obtained while the distribution requirement is met, the reasonable arrangement of the vehicle distribution path is facilitated, the two-stage distribution efficiency is improved, and the cost is reduced. In addition, the proposed algorithm reduces the complexity of solution, and can obtain a solution with higher quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of two-level vehicle path planning, and in particular to a method, system, storage medium and electronic device for solving a two-level vehicle transportation scheme under time-varying speed based on a heuristic algorithm. Background Art

[0002] With the booming development of e-commerce and the increasing diversification of consumer demand, the demand for logistics is growing. The traditional single-level logistics distribution model can no longer meet the needs of modern logistics. Therefore, logistics companies have begun to explore multi-level logistics models, among which the two-level logistics transportation system has received widespread attention. This system divides the logistics network into two levels. In the first level, vehicles depart from the distribution center node to serve one or more transfer center nodes; in the second level, secondary vehicles depart from each transfer center node to serve each underlying customer node. This two-level distribution model is more in line with the distribution situation of modern logistics, can more efficiently meet the distribution needs of customers, and promote the sustainable development of the logistics industry.

[0003] In the related technology, the two-echelon vehicle routing problem (2E-VRP) has always been the focus and difficulty of the research in the field of combinatorial optimization, and belongs to the multi-layer scheduling strategy problem. Since 2E-VRP involves two levels of vehicle scheduling problems, the first-level vehicle and the second-level vehicle routing planning are mutually constrained. At present, most scholars simplify the two-level vehicle routing problem, divide the two-level vehicle routing problem into multiple sub-problems, and then deal with and study each sub-problem separately. In the two-level logistics distribution system, there are close connections and constraints between the distribution center, the transfer station node, and the customer node. In order to reduce the difficulty of solving and speed up the solution, the 2E-VRP is generally split appropriately. The most common method is to regard the first-level routing planning as a traveling salesman problem (TSP) or a single warehouse vehicle routing problem, and the second-level routing planning as a multi-warehouse vehicle routing problem. Before splitting the two-level vehicle routing problem, customers will be allocated, and clustering algorithms are usually used to pre-allocate customers to transfer stations. In the study of solving the 2E-VRP and its deformation problems, some scholars first used a decomposition strategy to decompose the complex problem into multiple relatively simple sub-problems, and then designed an algorithm to solve each sub-problem to obtain the solution to the original problem.

[0004] However, most studies approximate the vehicle delivery speed in the two-level vehicle routing problem as one or several fixed values, which is inconsistent with the actual situation. Summary of the invention

[0005] 1. Technical issues to be solved

[0006] In view of the deficiencies in the prior art, the present invention provides a method, system, storage medium and electronic device for solving a two-level vehicle transportation plan under time-varying speed based on a heuristic algorithm, which solves the path optimization problem under a time-varying road network that conforms to actual traffic conditions.

[0007] (II) Technical solution

[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0009] A method for solving a two-level vehicle transportation scheme under time-varying speed based on a heuristic algorithm, comprising:

[0010] Obtain customer demand and two-level distribution vehicle resources;

[0011] Based on the time-dependent model of the travel speed, determine the vehicle travel time under time-varying speed;

[0012] Based on the customer demand and two-level distribution vehicle resources, and combined with the vehicle travel time under the time-varying speed, a two-level vehicle path optimization model under the time-varying road network is constructed with minimizing the total travel time of the two-level distribution vehicles as the optimization goal;

[0013] An adaptive large neighborhood search algorithm is used to solve the two-level vehicle path optimization model under the time-varying road network to obtain the global optimal solution, and the optimal two-level vehicle transportation solution is decoded.

[0014] Preferably, the time-dependent model based on the travel speed is used to determine the vehicle travel time under time-varying speed; including:

[0015] Assume that the working time U is divided into T time periods, and the vehicle speeds in each time period are known to be v1, v2, …, v T ; The initial time is t0, and the initial distance is d0; the vehicle starts at time t0, travels from node i to node j, and the cumulative travel distance in each time period is d1, d2, ..., d T ;

[0016] Determine the vehicle travel time under time-varying speed according to different situations:

[0017] 1) The vehicle trip does not cross time periods. Assume that the vehicle arrives at time t' and the corresponding distance is d'. The vehicle travels a distance d from node i to node j. ij =d'-d0≤d-d0, then the vehicle travel time is expressed as τ is the symbol of time variable;

[0018] 2) Vehicle travel spans time periods. Assume that the vehicle arrives at time t', and the corresponding distance is d'. The vehicle travels a distance d from node i to node j. ij=d”-d0>d-d0, then the vehicle travel time is expressed as Among them, T' is the time period where time t" is located.

[0019] Preferably, the two-level vehicle path optimization model under the time-varying road network includes:

[0020]

[0021]

[0022] Among them, V d For distribution center, V d ={0};

[0023] V s is the set of transfer station nodes, V s ={1,2,…,s,…,S}, s is the index of the transfer station node, S is the number of transfer station nodes;

[0024] V c is the set of client nodes, V c ={1,2,…,n,…}, n is the index of the client node;

[0025] V1 is a node set consisting of distribution center and transfer station nodes, V1 = V d ∪V s ;

[0026] V2 is a node set consisting of transfer station nodes and customer nodes, V2 = V s ∪V c ;

[0027] V E is the set of all nodes, V E = {V d ∪V s ∪V c};

[0028] K is the set of first-level delivery vehicles, K = {1, 2, ..., k, ..., k0}, k is the index of the first-level delivery vehicle, k0 is the number of first-level delivery vehicles;

[0029] B is the set of secondary delivery vehicles, B = {1, 2, ..., b, ..., b0}, b is the index of the secondary delivery vehicle, and b0 is the number of secondary delivery vehicles;

[0030] Formula (1) is the objective function to minimize the total travel time of two-level delivery vehicles; min is the minimization function; are the travel time of the first-level delivery vehicle k and the second-level delivery vehicle b from node i to node j; x ijkis a 0-1 variable, which is 1 if the first-level delivery vehicle k goes from node i to node j, otherwise it is 0; y ijb is a 0-1 variable, which is 1 if the secondary delivery vehicle b is from node i to node j, otherwise it is 0;

[0031] Constraint (2) indicates that the vehicles entering and leaving each node in the first-level distribution network are the same; x jik is a 0-1 variable, which is 1 if the first-level delivery vehicle k goes from node j to node i, otherwise it is 0;

[0032] Constraint (3) indicates that each transfer station node can be served by at most one first-level delivery vehicle once;

[0033] Constraint (4) indicates that there are no subpaths between warehouses;

[0034] Constraint (5) indicates that the vehicles entering and leaving each node in the two-level distribution network are the same; jib is a 0-1 variable, which is 1 if the secondary delivery vehicle b is from node j to node i, otherwise it is 0;

[0035] Constraint (6) indicates that each customer node is served only once by a secondary delivery vehicle;

[0036] Constraint (7) indicates that there are no sub-paths between transfer station nodes; is is a 0-1 variable, which is 1 if the client node i is assigned to the relay node s service, otherwise it is 0;

[0037] Constraint (8) indicates that each client node is served by only one transit node;

[0038] Constraint (9) means that the first-level delivery vehicle departs from the distribution center and returns to the distribution center after completing the delivery task;

[0039] Constraint (10) indicates that the secondary delivery vehicle departs from the transfer station node and returns to the transfer station node after completing the delivery task;

[0040] Constraint (11) indicates that the number of vehicles departing from a distribution center cannot exceed the maximum number it has;

[0041] Constraint (12) indicates that the number of vehicles departing from a transfer station node cannot exceed the maximum number it has;

[0042] Constraints (13) and (14) represent the capacity constraints of the first-level distribution vehicles and the second-level distribution vehicles respectively; Q k is the vehicle capacity of the first-level delivery vehicle k; Q b is the vehicle capacity of the secondary delivery vehicle b;

[0043] Constraints (15) and (16) indicate that the first-level distribution vehicle is empty when it returns to the distribution center and the second-level distribution vehicle is empty when it returns to the transfer station node; is the load of first-level delivery vehicle k from node i to node j; is the load of the secondary delivery vehicle b from node i to node j;

[0044] Constraint (17) indicates that the load of the first-level delivery vehicle is conserved and meets the demand of each transfer station node; is the load of the first-level delivery vehicle k from node j to node i; is the demand of transfer station node j;

[0045] Constraint (18) indicates that the load of the secondary delivery vehicle is conserved and meets the needs of each customer node; is the load of the secondary delivery vehicle b from node j to node i; is the demand of customer node j;

[0046] Constraint (19) indicates that the demand of each relay node is the sum of the total demands of the client nodes it serves; is the demand of transfer station node i;

[0047] Constraint (20) indicates that the start time of the first-level delivery vehicle at the distribution center is zero; is the arrival time of the first-level delivery vehicle k at the transfer station node i;

[0048] Constraint (21) represents the time it takes for the first-level delivery vehicle to arrive at the transfer station node; is the arrival time of the first-level delivery vehicle k at the transfer station node j; is the waiting time of the first-level delivery vehicle k at the transfer station node i; is the service time of the first-level delivery vehicle k at the transfer station node i; M represents a large number;

[0049] Constraint (22) indicates that the second-level delivery vehicle arrives at the transfer station node later than the first-level delivery vehicle; is the arrival time of the secondary delivery vehicle b at customer node j;

[0050] Constraint (23) represents the time it takes for the secondary delivery vehicle to arrive at the customer node; is the arrival time of the secondary delivery vehicle b at customer node i; is the waiting time of the secondary delivery vehicle b at the customer node i; is the service time of secondary delivery vehicle b at customer node i;

[0051] Constraint (24) represents the client node time window constraint; [e i ,l i] is the service time window of customer node i in the two-level distribution network, where e i is the earliest service start time, l i The latest time for the service to start;

[0052] Constraints (25) to (27) represent the value range of the decision variables.

[0053] Preferably, the adopting of an adaptive large neighborhood search algorithm to solve the two-level vehicle path optimization model under the time-varying road network to obtain a global optimal solution includes:

[0054] Step 100: Construct an initial solution, cluster customers using the K-means clustering algorithm with a time window, and use the first-serve-customer priority algorithm to generate a feasible initial solution;

[0055] Step 200, set the initial solution to the optimal solution;

[0056] Step 300, select the neighborhood operator by roulette according to the operator weight, and perform neighborhood operation on the initial solution to generate a new solution;

[0057] Step 400, determine whether the new solution is better than the optimal solution, if so, update the optimal solution, otherwise, determine whether the new solution meets the Metropolis acceptance criterion;

[0058] Step 500, update the scores, weights, selection probabilities of the neighborhood operators and the temperature of the simulated annealing algorithm;

[0059] Step 600, determine whether the iteration termination condition is met, if so, output the global optimal solution; otherwise, return to Step 300.

[0060] Preferably, the method of clustering customers by using a K-means clustering algorithm with a time window and generating a feasible initial solution by using a first-serve-customer priority algorithm includes:

[0061] Step 100a, let S transfer station nodes be the initial cluster centers;

[0062] Step 100b, for each customer node, calculate its three-dimensional Euclidean distance with each cluster center by the following formula, and assign customer node i to d(x i ,c s )The cluster to which the cluster center with the smallest value belongs;

[0063]

[0064] Among them, x i1 、x i2 、x i3are the horizontal coordinate, vertical coordinate and central time window of customer node i respectively, c s1 、c s2 、c s3 are the horizontal coordinate, vertical coordinate and central time window of the transfer station node s, [e s ,l s ] is the receiving time window of the transfer station node s in the first-level distribution network, where e s is the earliest start time of receiving, l s The latest start time for receiving;

[0065] Step 100c, for each cluster, calculate the mean distance of all its client nodes and use the mean as the new cluster center;

[0066] Step 100d. Repeat Step 100b to Step 100c until the cluster center no longer changes.

[0067] Preferably, an adaptive adjustment mechanism is used to update the scores, weights, and selection probabilities of neighborhood operators; including:

[0068] In the initial stage, all neighborhood operators are assigned the same score, weight and probability;

[0069] After each subsequent neighborhood operation is completed, the scores, weights, and probabilities of the operators used previously are updated by comparing the generated new solution with the current solution and the optimal solution; the update steps are as follows:

[0070] The roulette method is used to select the neighborhood operator so that the probability of the neighborhood operator being selected is proportional to its weight, including the following four scoring situations:

[0071] (1) When the new solution obtained after destruction / repair is greater than the optimal solution: +2 points;

[0072] (2) If the new solution obtained after destruction / repair is not greater than the optimal solution but greater than the current solution: +1 point;

[0073] (3) If the new solution obtained after destruction / repair is neither greater than the current solution nor greater than the optimal solution, but is retained with a certain probability: +0.5 points;

[0074] (4) If the new solution obtained after destruction / repair is neither greater than the current solution nor greater than the optimal solution and is not retained: +0.3 points;

[0075] After the scores of the neighborhood operators are updated, the weights of the neighborhood operators are updated as follows:

[0076]

[0077] Among them, W i is the weight of the neighborhood operator i, D i is the score of the neighborhood operator i, Z i is the number of times the neighborhood operator i is used, and ω∈(0,1) is the weight update coefficient.

[0078] Preferably, the Metropolis acceptance criteria specifically refer to:

[0079] If the new solution is better than the current solution, the new solution is accepted; otherwise, the new solution is accepted with an acceptance probability P. The acceptance probability P is related to the degree to which the new solution is inferior to the current solution. The calculation formula is as follows:

[0080]

[0081] Where T represents the current temperature, f(x') represents the objective function value of the current solution, and f(x) represents the objective function value of the new solution;

[0082] After calculating the acceptance probability P, a number η is randomly generated in [0,1]. If η<P, the inferior solution is accepted, otherwise it is not accepted.

[0083] A two-level vehicle transportation solution system with time-varying speed based on a heuristic algorithm, comprising:

[0084] The acquisition module is used to obtain customer demand and two-level distribution vehicle resources;

[0085] A determination module, for determining a vehicle travel time under time-varying speed based on a time-dependent model of the travel speed;

[0086] A construction module is used to construct a two-level vehicle path optimization model under a time-varying road network based on the customer demand and two-level distribution vehicle resources, and in combination with the vehicle travel time under the time-varying speed, with minimizing the total travel time of the two-level distribution vehicles as the optimization goal;

[0087] The solution module is used to solve the two-level vehicle path optimization model under the time-varying road network by using an adaptive large neighborhood search algorithm to obtain a global optimal solution and decode to obtain an optimal two-level vehicle transportation solution.

[0088] A storage medium stores a computer program for solving a two-level vehicle transportation solution under time-varying speed based on a heuristic algorithm, wherein the computer program enables a computer to execute the method for solving a two-level vehicle transportation solution under time-varying speed as described above.

[0089] An electronic device, comprising:

[0090] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, the programs including a method for executing the two-level vehicle transportation solution method under time-varying speed as described above.

[0091] (III) Beneficial effects

[0092] The present invention provides a method, system, storage medium and electronic device for solving a two-level vehicle transportation scheme under time-varying speed based on a heuristic algorithm. Compared with the prior art, it has the following beneficial effects:

[0093] In the present invention, firstly, customer demand and two-level distribution vehicle resources are obtained; secondly, based on the time-dependent model of the travel speed, the vehicle travel time under time-varying speed is determined; thirdly, the two-level vehicle path optimization model under the time-varying road network is constructed with the optimization goal of minimizing the total travel time of the two-level distribution vehicles; finally, the model is solved by an adaptive large neighborhood search algorithm to obtain the global optimal solution, and the optimal two-level vehicle transportation plan is decoded. The constructed model takes into account the impact of road congestion on vehicle speed, and obtains the shortest travel time while meeting the distribution demand, which helps to reasonably arrange the vehicle distribution path, improve the efficiency of two-level distribution and reduce costs. In addition, the proposed algorithm reduces the complexity of the solution and can obtain a higher quality solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0094] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0095] Figure 1 A block diagram of a method for solving a two-level vehicle transportation scheme under time-varying speed based on a heuristic algorithm provided by an embodiment of the present invention;

[0096] Figure 2 A schematic diagram of a scenario of a two-level vehicle routing problem with time-varying speed provided by an embodiment of the present invention;

[0097] Figure 3 An example diagram of calculating vehicle travel time under time-varying speed provided by an embodiment of the present invention;

[0098] Figure 4 A flowchart of an adaptive large neighborhood search algorithm provided by an embodiment of the present invention;

[0099] Figure 5A schematic diagram of an initial solution construction provided by an embodiment of the present invention;

[0100] Figure 6 A schematic diagram of a random removal operator provided by an embodiment of the present invention;

[0101] Figure 7 A schematic diagram of a path deletion operator provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0102] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0103] The embodiments of the present application solve the path optimization problem in a time-varying road network that conforms to actual traffic conditions by providing a method, system, storage medium and electronic device for solving a two-level vehicle transportation plan under time-varying speed based on a heuristic algorithm.

[0104] The technical solution in the embodiment of the present application is to solve the above technical problems, and the overall idea is as follows:

[0105] The embodiment of the present invention proposes a two-echelon vehicle routing problem under a new scenario, namely, a two-echelon vehicle routing problem under time-varying speed (Time-dependent Two-echelon Vehicle Routing Planning, referred to as TD2E-VRP), taking into account the time-varying characteristics of vehicle driving speed, by constructing a piecewise function of driving speed, using a cross-time domain method to calculate the vehicle driving time using discrete speed, and establishing a mixed integer linear programming model with the goal of minimizing the total driving time of the two-level distribution path. Based on this problem, the present invention proposes an adaptive large neighborhood search algorithm, firstly divides and clusters customers through K-means clustering with time window, then uses the first serviceable customer priority algorithm to generate an initial solution, designs 3 destruction operators and 2 repair operators for neighborhood operations, uses an adaptive adjustment mechanism to update the scores, weights and probabilities of the neighborhood operators used, and combines the Metropolis criterion in the simulated annealing algorithm to formulate a solution acceptance strategy to better avoid falling into a local optimum.

[0106] Accordingly, the key points of the embodiments of the present invention mainly involve the following two aspects:

[0107] 1. Problem modeling: The proposed two-level vehicle routing problem under time-varying conditions is a new research problem. The modeling process needs to consider the impact of different time periods on vehicle speed in the two-level vehicle road network. For this purpose, the vehicle's driving speed in different time periods is defined to obtain the vehicle's driving time. When using the time-varying road network model to calculate the vehicle's driving time, the biggest difficulty lies in determining whether the vehicle crosses time periods during driving and calculating the driving time in different time periods. In the present invention, the working hours of a day are divided into several time periods, each of which has the same length, and each time period corresponds to a different driving speed. By determining the time period in which the vehicle's starting time is located, the distance that the vehicle can travel in the remaining time in this time period is calculated, and it is determined whether the vehicle has entered the next time period when it arrives at the next node, thereby obtaining a more realistic vehicle driving time.

[0108] 2. Algorithm solution:

[0109] The key point of the algorithm lies in the construction of the initial solution and the design of the neighborhood operator:

[0110] In the construction of the initial solution, the present invention designs a K-means clustering method combined with a time window, clusters customers based on the vehicle's driving distance and service time window, and assigns customers to transfer station nodes. It is mainly based on the horizontal and vertical coordinates of the customer node and the time window to find the three-dimensional Euclidean clustering of the customer, assign the customer according to the cluster center, and then continuously update the cluster center to achieve the assignment of customers, thereby reducing the complexity of solving the two-level vehicle path. Then, an algorithm that prioritizes the transfer station node that can be served first is used to construct the initial solution. When the vehicle departs from the distribution center, the transfer station node that can start service earliest from the current distribution transfer station node is preferentially selected and inserted into the current path. For the earliest transfer station node that can be served, it is necessary to comprehensively calculate the geographical location of the user and its time window, and repeat the insertion operation until all transfer station nodes are served. Then, this algorithm is also used for the customer to finally generate the initial path.

[0111] In the design process of the neighborhood operator, the present invention designs three destruction operators and two repair operators. The destruction operators include random removal operators, worst-case removal operators and path removal operators. Among them, the random removal operator randomly selects some customers and removes them from the original path, and then puts them into the customer pool, and removes the empty paths without customers. In the worst-case removal operator, in order to avoid repeatedly removing the same customer from the solution, and in order to be more random when selecting the customer who reduces the objective function value the most, the operator introduces a degree of freedom parameter p>1 for controlling the removed customers. The repair operators include random insertion operators and greedy insertion operators. The greedy insertion operator mainly adopts the core idea of ​​the greedy algorithm. During iteration, a certain customer node is inserted into the current path, and the insertion method that causes the smallest change in the objective function value is selected, that is, the customer with the shortest travel time is inserted into the path.

[0112] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0113] Embodiment 1:

[0114] like Figure 1 As shown, an embodiment of the present invention provides a method for solving a two-level vehicle transportation scheme under time-varying speed based on a heuristic algorithm, comprising:

[0115] S1. Obtain customer demand and two-level distribution vehicle resources;

[0116] S2, determining the vehicle travel time under time-varying speed based on the time-dependent model of the travel speed;

[0117] S3, based on the customer demand and two-level distribution vehicle resources, and combined with the vehicle travel time under the time-varying speed, with minimizing the total travel time of the two-level distribution vehicles as the optimization goal, construct a two-level vehicle path optimization model under the time-varying road network;

[0118] S4. Adopting an adaptive large neighborhood search algorithm to solve the two-level vehicle path optimization model under the time-varying road network, obtain a global optimal solution, and decode to obtain an optimal two-level vehicle transportation solution.

[0119] The model constructed by the embodiment of the present invention takes into account the impact of road congestion on vehicle speed, and obtains the shortest travel time while meeting the distribution demand, which helps to reasonably arrange the vehicle distribution path, improve the efficiency of two-level distribution and reduce costs. In addition, the proposed algorithm reduces the complexity of the solution and can obtain a higher quality solution.

[0120] It should be noted that the embodiment of the present invention is directed to the two-level vehicle routing problem with time-varying speed (TD2E-VRP), combined with Figure 2 , the relevant problem description is as follows:

[0121] The system of the two-level vehicle routing problem with time windows under time-varying conditions includes a distribution center node, multiple transfer station nodes, and some customer nodes with deterministic demand. In the distribution system, the demand of customer nodes is known, and the positions of all nodes are known and fixed. In the primary transportation network, the primary vehicle delivers products from the distribution center to the transfer station node and then returns to the distribution center; in the secondary transportation network, the secondary vehicle delivers products from the transfer station node to each customer node, and returns to the transfer station node after completing the delivery task. In this process, all customer nodes can only be served once, and one delivery can meet the needs of customer nodes. In addition, in order to ensure the timeliness of delivery, the time window of customer nodes is also considered. And due to traffic congestion, road surface differences, etc., the driving speed of vehicles in different time periods will change, resulting in changes in travel time. With the goal of minimizing the total driving time of two-level vehicles, the optimal vehicle distribution plan is planned.

[0122] In addition, in order to obtain a feasible solution, the embodiment of the present invention also makes the following reasonable assumptions:

[0123] a): The time that delivery vehicles spend loading and unloading goods at transfer station nodes is negligible.

[0124] b): Delivery vehicles travel at different speeds in different time periods, while delivery vehicles of the same level travel at the same speed at the same time point.

[0125] c): The models of the first-level distribution vehicles are the same, and the models of the second-level distribution vehicles are also the same.

[0126] d): The distribution center has sufficient inventory to meet the needs of all transfer station nodes.

[0127] On this basis, the following will introduce the various steps of the above scheme in detail:

[0128] In step S1, customer demand and two-level distribution vehicle resources are obtained.

[0129] This step obtains data such as customer demand and two-level distribution vehicle resources for subsequent model construction. The symbol settings are shown in Table 1:

[0130] Table 1

[0131]

[0132]

[0133] In step S2, based on the time-dependent model of the travel speed, the vehicle travel time under time-varying speed is determined;

[0134] The embodiment of the present invention adopts a speed transition function to describe the time-varying road network, that is, the vehicle speed is a fixed value within a certain period of time. Specifically, a time-dependent model based on the travel speed is selected to characterize the time variation, and the model meets the first-in-first-out principle. In the model, a day is divided into several time periods, and the vehicle speed in different time periods is expressed in the form of a piecewise function, and the discrete speed is used to calculate the driving time of the vehicle between any two nodes. Usually, the time period needs to be very short so that the average speed of the vehicle in the time period can be regarded as the fixed speed in the time period.

[0135] In a time-varying network, the formal time required for a vehicle to travel from node i to node j should be calculated based on the speed change:

[0136] Assume that the working time U is divided into T time periods, and the vehicle speeds in each time period are known to be v1, v2, …, v T ; The initial time is t0, and the initial distance is d0; the vehicle starts at time t0, travels from node i to node j, and the cumulative travel distance in each time period is d1, d2, ..., d T ;

[0137] Determine the vehicle travel time under time-varying speed according to different situations:

[0138] 1) The vehicle trip does not cross time periods. Assume that the vehicle arrives at time t' and the corresponding distance is d'. The vehicle travels a distance d from node i to node j. ij =d'-d0≤d-d0, then the vehicle travel time is expressed as τ is the symbol of time variable;

[0139] 2) Vehicle travel spans time periods. Assume that the vehicle arrives at time t', and the corresponding distance is d'. The vehicle travels a distance d from node i to node j. ij =d”-d0>d-d0, then the vehicle travel time is expressed as Where T' is the time period at time t".

[0140] For example, in order to facilitate understanding of the solution idea of ​​the vehicle travel time under the above-mentioned time-varying speed, the following specific example is provided:

[0141] like Figure 3 As shown in the figure, it is assumed that a day is divided into 4 periods. It is known that the vehicle speeds in each period are v1, v2, v3, and v4 respectively; the initial time is t0, and the initial distance is d0; the vehicle starts at time t0, travels from node i to node j, and the cumulative travelable distance in each period is d1, d2, ..., d4;

[0142] Determine the vehicle travel time under time-varying speed according to different situations:

[0143] 1) The vehicle trip does not cross time periods. Assume that the vehicle arrives at time t' and the corresponding distance is d'. The vehicle travels a distance d from node i to node j. ij =d'-d0≤d-d0, then the vehicle travel time is expressed as τ is the symbol of time variable;

[0144] 2) The vehicle trip spans across time periods and only spans one time period. Assume that the vehicle arrives at time t' and the corresponding distance is d'. The vehicle travels a distance d from node i to node j. ij =d”-d0>d-d0, then the vehicle travel time is expressed as

[0145] In step S3, based on the customer demand and two-level distribution vehicle resources, and in combination with the vehicle travel time under the time-varying speed, a two-level vehicle path optimization model under the time-varying road network is constructed with minimizing the total travel time of the two-level distribution vehicles as the optimization goal.

[0146] The two-level vehicle routing optimization model under the time-varying road network constructed in this step includes:

[0147]

[0148]

[0149] Wherein, formula (1) is the objective function to minimize the total travel time of two-level delivery vehicles; min is the minimization function;

[0150] Constraint (2) indicates that the vehicles entering and leaving each node in the first-level distribution network are the same;

[0151] Constraint (3) indicates that each transfer station node can be served by at most one first-level delivery vehicle once;

[0152] Constraint (4) indicates that there are no subpaths between warehouses;

[0153] Constraint (5) indicates that the vehicles entering and leaving each node in the two-level distribution network are the same;

[0154] Constraint (6) indicates that each customer node is served only once by a secondary delivery vehicle;

[0155] Constraint (7) indicates that there are no subpaths between transfer station nodes;

[0156] Constraint (8) indicates that each client node is served by only one transit node;

[0157] Constraint (9) means that the first-level delivery vehicle departs from the distribution center and returns to the distribution center after completing the delivery task;

[0158] Constraint (10) indicates that the secondary delivery vehicle departs from the transfer station node and returns to the transfer station node after completing the delivery task;

[0159] Constraint (11) indicates that the number of vehicles departing from a distribution center cannot exceed the maximum number it has;

[0160] Constraint (12) indicates that the number of vehicles departing from a transfer station node cannot exceed the maximum number it has;

[0161] Constraints (13) and (14) represent the capacity constraints of the first-level delivery vehicles and the second-level delivery vehicles, respectively;

[0162] Constraints (15) and (16) indicate that the first-level distribution vehicle is empty when it returns to the distribution center and the second-level distribution vehicle is empty when it returns to the transfer station node;

[0163] Constraint (17) indicates that the load of the first-level delivery vehicle is conserved and meets the demand of each transfer station node;

[0164] Constraint (18) indicates that the load of the secondary delivery vehicle is conserved and meets the needs of each customer node;

[0165] Constraint (19) indicates that the demand of each relay node is the sum of the total demands of the client nodes it serves;

[0166] Constraint (20) indicates that the start time of the first-level delivery vehicle at the distribution center is zero;

[0167] Constraint (21) represents the time it takes for the first-level delivery vehicle to arrive at the transfer station node;

[0168] Constraint (22) indicates that the second-level delivery vehicle arrives at the transfer station node later than the first-level delivery vehicle;

[0169] Constraint (23) represents the time it takes for the secondary delivery vehicle to arrive at the customer node;

[0170] Constraint (24) represents the client node time window constraint;

[0171] Constraints (25) to (27) represent the value range of the decision variables.

[0172] In step S4, an adaptive large neighborhood search algorithm is used to solve the two-level vehicle path optimization model under the time-varying road network to obtain a global optimal solution, and then decode to obtain the optimal two-level vehicle transportation solution.

[0173] like Figure 4 As shown, Figure 4 The flowchart of the adaptive large neighborhood search algorithm is given.

[0174] Combination Figure 4In this step, an adaptive large neighborhood search algorithm is used to solve the two-level vehicle path optimization model under the time-varying road network to obtain the global optimal solution, including:

[0175] Step 100: Construct an initial solution, cluster customers using the K-means clustering algorithm with a time window, and use the first-serve-customer priority algorithm to generate a feasible initial solution;

[0176] Step 200, set the initial solution to the optimal solution;

[0177] Step 300, select the neighborhood operator by roulette according to the operator weight, and perform neighborhood operation on the initial solution to generate a new solution;

[0178] Step 400, determine whether the new solution is better than the optimal solution, if so, update the optimal solution, otherwise, determine whether the new solution meets the Metropolis acceptance criterion;

[0179] Step 500, update the scores, weights, selection probabilities of the neighborhood operators and the temperature of the simulated annealing algorithm;

[0180] Step 600, determine whether the iteration termination condition is met, if so, output the global optimal solution; otherwise, return to Step 300.

[0181] In an optional implementation, the embodiment of the present invention uses a clustering algorithm to effectively decompose a large-scale vehicle routing problem into several small-scale sub-problems, which can reduce the complexity of the calculation and facilitate the subsequent generation of an initial solution. In the study of solving the two-level vehicle distribution path optimization under time-varying speed, the embodiment of the present invention uses a K-means clustering method with a time window, which can divide customers in the entire domain into several clusters. Each cluster is provided with distribution services by vehicles from a distribution center. The customer demand in each cluster must be less than the demand of the transfer station to ensure that every customer in the cluster can be delivered. The K-means clustering method with a time window is a clustering method based on K-means clustering, which is characterized by the customer's horizontal and vertical coordinates and the central time window. Among them, the central time window is the average value of the customer's service time window.

[0182] Accordingly, in step 100, the customers are clustered by using the K-means clustering algorithm with a time window, and a feasible initial solution is generated by using the first serviceable customer priority algorithm; specifically, the following are included:

[0183] Step 100a, let S transfer station nodes be the initial cluster centers;

[0184] Step 100b, for each customer node, calculate its three-dimensional Euclidean distance with each cluster center by the following formula, and assign customer node i to d(x i,c s )The cluster to which the cluster center with the smallest value belongs;

[0185]

[0186] Among them, x i1 、x i2 、x i3 are the horizontal coordinate, vertical coordinate and central time window of customer node i respectively, c s1 、c s2 、c s3 are the horizontal coordinate, vertical coordinate and central time window of the transfer station node s, [e s ,l s ] is the receiving time window of the transfer station node s in the first-level distribution network, where e s is the earliest start time of receiving, l s The latest start time for receiving;

[0187] Step 100c, for each cluster, calculate the mean distance of all its client nodes and use the mean as the new cluster center;

[0188] Step 100d. Repeat Step 100b to Step 100c until the cluster center no longer changes.

[0189] Note that if client node i is assigned to d(x i ,c s ) value is the smallest cluster, the total demand in the cluster exceeds the demand of the transfer station node, and the customer node i can be assigned to d(x i ,c s ) is located in the cluster with the next smallest cluster centroid; and so on, until all customers are assigned.

[0190] After using the K-means clustering method with time window to assign customer nodes to transfer station node services, the service scope of all transfer station nodes is determined, where the demand of the transfer station node is the sum of the product demand of the customer nodes it serves.

[0191] In the initial deconstruction stage, Figure 5 As shown in the figure, the first-level vehicle driving path is constructed using the first serviceable transfer station node priority algorithm. The idea of ​​the first serviceable customer node priority algorithm is that when the vehicle departs from the distribution center, the transfer station node that can be served the earliest after the current location is selected and inserted into the current path. The earliest serviceable transfer station node needs to be comprehensively calculated based on its geographical location and its time window, and the insertion operation is repeated until all transfer station nodes are served.

[0192] like Figure 5 As shown, after determining the primary vehicle path, the construction of the secondary vehicle path can be divided into several vehicle path problems with time windows. The present invention then uses the first serviceable customer node priority algorithm to construct the secondary vehicle path, thereby obtaining a complete initial feasible solution to the problem.

[0193] In an optional implementation, the embodiment of the present invention adopts an adaptive adjustment mechanism to update the scores, weights, and selection probabilities of neighborhood operators. The adaptive large neighborhood search algorithm (ALNS) is based on the destruction and repair principles of the large neighborhood search algorithm (LNS), and adds an adaptive mechanism to select and adjust the weights of each destruction and repair operator based on past performance, increase the probability of operators with better performance being selected, improve the algorithm's optimization ability, and thus find the optimal solution.

[0194] Therefore, based on the constructed two-level vehicle path optimization model under time-varying road network, the embodiment of the present invention essentially designs an adaptive large neighborhood search algorithm. Among them, the steps of updating the scores, weights, and selection probabilities of neighborhood operators are as follows:

[0195] In the initial stage, all neighborhood operators are assigned the same score, weight and probability.

[0196] After each subsequent neighborhood operation is completed, the scores, weights, and probabilities of the operators used previously are updated by comparing the generated new solution with the current solution and the optimal solution; the update steps are as follows:

[0197] The roulette method is used to select the neighborhood operator so that the probability of the neighborhood operator being selected is proportional to its weight, including the following four scoring situations:

[0198] (1) When the new solution obtained after destruction / repair is greater than the optimal solution: +2 points;

[0199] (2) If the new solution obtained after destruction / repair is not greater than the optimal solution but greater than the current solution: +1 point;

[0200] (3) If the new solution obtained after destruction / repair is neither greater than the current solution nor greater than the optimal solution, but is retained with a certain probability: +0.5 points;

[0201] (4) If the new solution obtained after destruction / repair is neither greater than the current solution nor greater than the optimal solution and is not retained: +0.3 points;

[0202] After the scores of the neighborhood operators are updated, the weights of the neighborhood operators are updated as follows:

[0203]

[0204] Among them, W iis the weight of the neighborhood operator i, D i is the score of the neighborhood operator i, Z i is the number of times the neighborhood operator i is used, and ω∈(0,1) is the weight update coefficient.

[0205] It should be noted that the embodiments of the present invention do not limit the specific type of the neighborhood operator, and technicians can determine it according to actual needs.

[0206] Exemplarily, several feasible neighborhood operators are provided here, including:

[0207] (1) Destruction operator

[0208] Operator 1: Randomly remove the operator, such as Figure 6 As shown in the figure, it means that the number of nodes in the current solution is known to be N. The random removal operator randomly selects q customer nodes from the path of the current solution, where q is a random integer in the interval [10%N, 20%N], removes the selected q customer nodes from the path to which they belong, and puts these q customer nodes into the customer node pool, waiting for the repair operator to reinsert them into the new path;

[0209] Operator 2: Worst removal operator, which refers to iteratively removing q customer nodes that can reduce the travel time the most from the path of the current solution. The travel time reduction here specifically refers to the difference between the travel time generated when the vehicle serves a customer and the travel time after removing the customer from the current path; and the worst removal operator introduces a degree of freedom parameter p>1 to control the removed customers;

[0210] Operator 3: Path removal operator, such as Figure 7 As shown, it means to iteratively remove a secondary path randomly from the current solution, and remove all the customer nodes served by the secondary path and put them into the customer node pool until the number of removed customers is greater than or equal to q;

[0211] (2) Repair Operator

[0212] Operator 4: Random insertion operator, which means randomly selecting a customer node from the set of customer nodes to be arranged in each iteration, and randomly selecting a feasible path to determine whether to insert it according to the rules, until all customer nodes to be arranged for service are inserted; if there is no such feasible path, then continue to randomly select the next route to find a feasible solution, and if there is no feasible path, then do not serve the customer node;

[0213] Operator 5: Greedy insertion operator, which uses a greedy algorithm to insert a customer node into the current path during iteration, and selects the insertion method that causes the smallest change in the objective function value, that is, the insertion path with the shortest time, until all customer nodes to be arranged are inserted into the path.

[0214] In an optional implementation manner, the Metropolis acceptance criteria proposed in the embodiment of the present invention specifically refers to:

[0215] If the new solution is better than the current solution, the new solution is accepted; otherwise, the new solution is accepted with an acceptance probability P. The acceptance probability P is related to the degree to which the new solution is inferior to the current solution. The calculation formula is as follows:

[0216]

[0217] Where T represents the current temperature, f(x') represents the objective function value of the current solution, and f(x) represents the objective function value of the new solution;

[0218] After calculating the acceptance probability P, a number η is randomly generated in [0,1]. If η<P, the inferior solution is accepted, otherwise it is not accepted.

[0219] It is understandable that the purpose of the Metropolis criterion is to overcome the problem of being trapped in a local optimal solution during the search process. By accepting inferior solutions with a certain probability, the flexibility of the search is increased, so that there is a chance to jump out of the local optimal solution and find the global optimal solution. The probability of accepting inferior solutions will decrease as the temperature decreases.

[0220] In an optional implementation manner, the embodiment of the present invention provides the following two iteration termination conditions:

[0221] 1) Maximum temperature T max By continuously cooling down to reach the end temperature T min , the inner loop terminates, outputs the global optimal solution, and enters the next iteration; or

[0222] 2) By continuously iterating until the maximum number of iterations is reached, the outer loop stops, the algorithm ends, and the global optimal solution is output.

[0223] After obtaining the global optimal solution, the optimal two-level vehicle transportation solution under time-varying speed is obtained through decoding. So far, the embodiment of the present invention completes the entire process of the method for solving the two-level vehicle transportation solution under time-varying speed based on the heuristic algorithm.

[0224] Embodiment 2:

[0225] The embodiment of the present invention provides a two-level vehicle transportation solution solution system under time-varying speed based on a heuristic algorithm, comprising:

[0226] The acquisition module is used to obtain customer demand and two-level distribution vehicle resources;

[0227] A determination module, for determining a vehicle travel time under time-varying speed based on a time-dependent model of the travel speed;

[0228] A construction module is used to construct a two-level vehicle path optimization model under a time-varying road network based on the customer demand and two-level distribution vehicle resources, and in combination with the vehicle travel time under the time-varying speed, with minimizing the total travel time of the two-level distribution vehicles as the optimization goal;

[0229] The solution module is used to solve the two-level vehicle path optimization model under the time-varying road network by using an adaptive large neighborhood search algorithm to obtain a global optimal solution and decode to obtain an optimal two-level vehicle transportation solution.

[0230] Embodiment 3:

[0231] An embodiment of the present invention provides a storage medium storing a computer program for solving a two-level vehicle transportation scheme under time-varying speed based on a heuristic algorithm, wherein the computer program enables a computer to execute the method for solving a two-level vehicle transportation scheme under time-varying speed as described in Example 1.

[0232] Embodiment 4:

[0233] An embodiment of the present invention provides an electronic device, including:

[0234] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing a two-level vehicle transportation solution method under time-varying speed as described in Example 1.

[0235] It can be understood that the two-level vehicle transportation scheme solving system under time-varying speed based on heuristic algorithm, storage medium and electronic device provided in the embodiment of the present invention correspond to the two-level vehicle transportation scheme solving method under time-varying speed based on heuristic algorithm provided in the embodiment of the present invention. The explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the two-level vehicle transportation scheme solving method under time-varying speed, and will not be repeated here.

[0236] In summary, compared with the prior art, the present invention has the following beneficial effects:

[0237] 1. In the embodiment of the present invention, firstly, customer demand and two-level distribution vehicle resources are obtained; secondly, based on the time-dependent model of the travel speed, the vehicle travel time under time-varying speed is determined; again, the two-level vehicle path optimization model under the time-varying road network is constructed with the optimization goal of minimizing the total travel time of the two-level distribution vehicles; finally, the adaptive large neighborhood search algorithm is used to solve the model, obtain the global optimal solution, and decode to obtain the optimal two-level vehicle transportation plan. The constructed model takes into account the impact of road congestion on vehicle speed, and obtains the shortest travel time while meeting the distribution demand, which helps to reasonably arrange the vehicle distribution path, improve the efficiency of two-level distribution and reduce costs. In addition, the proposed algorithm reduces the complexity of the solution and can obtain a higher quality solution.

[0238] 2. The two-level vehicle routing problem addressed by the embodiments of the present invention is an extension of the vehicle routing problem and is also the basis of the multi-level vehicle routing problem, and has great academic research significance and practical application value. At present, improvements have been made to the traditional two-level vehicle routing allocation scheme at home and abroad to make it more in line with the actual logistics distribution process, mainly considering factors such as vehicle capacity limitations, time window limitations, and customer dynamic needs, and corresponding results have been achieved. However, as far as the author knows, there is currently no literature that considers the time-varying vehicle speed in the two-level vehicle routing problem. Therefore, the two-level vehicle routing optimization model under the time-varying road network constructed by the present invention takes into account the impact of road congestion on vehicle speed, and obtains the shortest driving time while meeting the distribution needs, which helps to reasonably arrange vehicle distribution routes, improve the efficiency of two-level distribution and reduce costs.

[0239] 3. The two-level vehicle routing problem has always been the focus and difficulty of research in the field of combinatorial optimization, and it belongs to a multi-layer scheduling strategy problem. Since 2E-VRP involves two levels of vehicle scheduling problems, the first-level vehicles and the second-level vehicles are mutually constrained during path planning, and the two-level paths must remain coherent, and must also meet the various needs of the corresponding service objects at the same time. Therefore, most scholars adopt a method of simplifying the complex, that is, dividing the two-level vehicle routing problem into multiple sub-problems, and then processing and studying each sub-problem separately. The embodiment of the present invention first uses a clustering algorithm combined with K-mains with a time window to pre-assign customers to transfer stations, and then uses the first serviceable transfer station / customer priority algorithm to construct an initial solution for the transfer station and the customer. Finally, an adaptive large neighborhood search algorithm is used to design three destruction operators and two repair operators to optimize the initial solution, which reduces the complexity of the solution and can obtain a higher quality solution.

[0240] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0241] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for solving a two-level vehicle transportation scheme under time-varying speed based on a heuristic algorithm, characterized in that: include: Obtain customer demand and two-level distribution vehicle resources; Based on the time-dependent model of the travel speed, determine the vehicle travel time under time-varying speed; Based on the customer demand and two-level distribution vehicle resources, and combined with the vehicle travel time under the time-varying speed, a two-level vehicle path optimization model under the time-varying road network is constructed with minimizing the total travel time of the two-level distribution vehicles as the optimization goal; An adaptive large neighborhood search algorithm is used to solve the two-level vehicle path optimization model under the time-varying road network to obtain the global optimal solution, and the optimal two-level vehicle transportation solution is decoded.

2. The method for solving a two-level vehicle transportation scheme under time-varying speed as claimed in claim 1, characterized in that: The time-dependent model based on the travel speed determines the vehicle travel time under time-varying speed; including: Assume that the working time U is divided into T time periods, and the vehicle speeds in each time period are known to be v1, v2, …, v T ; The initial time is t0, and the initial distance is d0; the vehicle starts at time t0, travels from node i to node j, and the cumulative travel distance in each time period is d1, d2, ..., d T ; Determine the vehicle travel time under time-varying speed according to different situations: 1) The vehicle trip does not cross time periods. Assume that the vehicle arrives at time t' and the corresponding distance is d'. The vehicle travels a distance d from node i to node j. ij =d'-d0≤d-d0, then the vehicle travel time is expressed as τ is the symbol of time variable; 2) Vehicle travel spans time periods. Assume that the vehicle arrives at time t', and the corresponding distance is d'. The vehicle travels a distance d from node i to node j. ij =d”-d0>d-d0, then the vehicle travel time is expressed as Among them, T' is the time period where time t" is located.

3. The method for solving a two-level vehicle transportation scheme under time-varying speed as claimed in claim 2, characterized in that: The two-level vehicle path optimization model under the time-varying road network includes: Among them, V d For distribution center, V d ={0}; V s is the set of transfer station nodes, V s ={1,2,…,s,…,S}, s is the index of the transfer station node, S is the number of transfer station nodes; V c is the set of client nodes, V c ={1,2,…,n,…}, n is the index of the client node; V1 is a node set consisting of distribution center and transfer station nodes, V1 = V d ∪V s ; V2 is a node set consisting of transfer station nodes and customer nodes, V2 = V s ∪V c ; V E is the set of all nodes, V E = {V d ∪V s ∪V c }; K is the set of first-level delivery vehicles, K = {1, 2, ..., k, ..., k0}, k is the index of the first-level delivery vehicle, k0 is the number of first-level delivery vehicles; B is the set of secondary delivery vehicles, B = {1, 2, ..., b, ..., b0}, b is the index of the secondary delivery vehicle, and b0 is the number of secondary delivery vehicles; Formula (1) is the objective function to minimize the total travel time of two-level delivery vehicles; min is the minimization function; are the travel time of the first-level delivery vehicle k and the second-level delivery vehicle b from node i to node j; x ijk is a 0-1 variable, which is 1 if the first-level delivery vehicle k goes from node i to node j, otherwise it is 0; y ijb is a 0-1 variable, which is 1 if the secondary delivery vehicle b is from node i to node j, otherwise it is 0; Constraint (2) indicates that the vehicles entering and leaving each node in the first-level distribution network are the same; x jik is a 0-1 variable, which is 1 if the first-level delivery vehicle k goes from node j to node i, otherwise it is 0; Constraint (3) indicates that each transfer station node can be served by at most one first-level delivery vehicle once; Constraint (4) indicates that there are no subpaths between warehouses; Constraint (5) indicates that the vehicles entering and leaving each node in the two-level distribution network are the same; jib is a 0-1 variable, which is 1 if the secondary delivery vehicle b is from node j to node i, otherwise it is 0; Constraint (6) indicates that each customer node is served only once by a secondary delivery vehicle; Constraint (7) indicates that there are no sub-paths between transfer station nodes; is is a 0-1 variable, which is 1 if the client node i is assigned to the relay node s service, otherwise it is 0; Constraint (8) indicates that each client node is served by only one transit node; Constraint (9) means that the first-level delivery vehicle departs from the distribution center and returns to the distribution center after completing the delivery task; Constraint (10) indicates that the secondary delivery vehicle departs from the transfer station node and returns to the transfer station node after completing the delivery task; Constraint (11) indicates that the number of vehicles departing from a distribution center cannot exceed the maximum number it has; Constraint (12) indicates that the number of vehicles departing from a transfer station node cannot exceed the maximum number it has; Constraints (13) and (14) represent the capacity constraints of the first-level distribution vehicles and the second-level distribution vehicles respectively; Q k is the vehicle capacity of the first-level delivery vehicle k; Q b is the vehicle capacity of the secondary delivery vehicle b; Constraints (15) and (16) indicate that the first-level distribution vehicle is empty when it returns to the distribution center and the second-level distribution vehicle is empty when it returns to the transfer station node; is the load of first-level delivery vehicle k from node i to node j; is the load of the secondary delivery vehicle b from node i to node j; Constraint (17) indicates that the load of the first-level delivery vehicle is conserved and meets the demand of each transfer station node; is the load of the first-level delivery vehicle k from node j to node i; is the demand of transfer station node j; Constraint (18) indicates that the load of the secondary delivery vehicle is conserved and meets the needs of each customer node; is the load of the secondary delivery vehicle b from node j to node i; is the demand of customer node j; Constraint (19) indicates that the demand of each relay node is the sum of the total demands of the client nodes it serves; is the demand of transfer station node i; Constraint (20) indicates that the start time of the first-level delivery vehicle at the distribution center is zero; is the arrival time of the first-level delivery vehicle k at the transfer station node i; Constraint (21) represents the time it takes for the first-level delivery vehicle to arrive at the transfer station node; is the arrival time of the first-level delivery vehicle k at the transfer station node j; is the waiting time of the first-level delivery vehicle k at the transfer station node i; is the service time of the first-level delivery vehicle k at the transfer station node i; M represents a large number; Constraint (22) indicates that the second-level delivery vehicle arrives at the transfer station node later than the first-level delivery vehicle; is the arrival time of the secondary delivery vehicle b at customer node j; Constraint (23) represents the time it takes for the secondary delivery vehicle to arrive at the customer node; is the arrival time of the secondary delivery vehicle b at customer node i; is the waiting time of the secondary delivery vehicle b at the customer node i; is the service time of secondary delivery vehicle b at customer node i; Constraint (24) represents the client node time window constraint; [e i ,l i ] is the service time window of customer node i in the two-level distribution network, where e i is the earliest service start time, l i The latest time for the service to start; Constraints (25) to (27) represent the value range of the decision variables.

4. The method for solving a two-stage vehicle transportation scheme under time-varying speed as claimed in claim 3, characterized in that: The method of using an adaptive large neighborhood search algorithm to solve the two-level vehicle path optimization model under the time-varying road network to obtain a global optimal solution includes: Step 100: Construct an initial solution, cluster customers using the K-means clustering algorithm with a time window, and use the first-serve-customer priority algorithm to generate a feasible initial solution; Step 200, set the initial solution to the optimal solution; Step 300, select the neighborhood operator by roulette according to the operator weight, and perform neighborhood operation on the initial solution to generate a new solution; Step 400, determine whether the new solution is better than the optimal solution, if so, update the optimal solution, otherwise, determine whether the new solution meets the Metropolis acceptance criterion; Step 500, update the scores, weights, selection probabilities of the neighborhood operators and the temperature of the simulated annealing algorithm; Step 600, determine whether the iteration termination condition is met, if so, output the global optimal solution; otherwise, return to Step 300.

5. The method for solving a two-level vehicle transportation scheme under time-varying speed as claimed in claim 4, characterized in that: The method clusters the customers using the K-means clustering algorithm with a time window, and generates a feasible initial solution using the first-served-customer priority algorithm; including: Step 100a, let S transfer station nodes be the initial cluster centers; Step 100b, for each customer node, calculate its three-dimensional Euclidean distance with each cluster center by the following formula, and assign customer node i to d(x i ,c s )The cluster to which the cluster center with the smallest value belongs; Among them, x i1 、x i2 、x i3 are the horizontal coordinate, vertical coordinate and central time window of customer node i respectively, c s1 、c s2 、c s3 are the horizontal coordinate, vertical coordinate and central time window of the transfer station node s, [e s ,l s ] is the receiving time window of the transfer station node s in the first-level distribution network, where e s is the earliest start time of receiving, l s The latest start time for receiving; Step 100c, for each cluster, calculate the mean distance of all its client nodes, and use the mean as the new cluster center; Step 100d. Repeat Step 100b to Step 100c until the cluster center no longer changes.

6. The method for solving a two-level vehicle transportation scheme under time-varying speed as claimed in claim 4, characterized in that: Adopt an adaptive adjustment mechanism to update the scores, weights, and selection probabilities of neighborhood operators; including: In the initial stage, all neighborhood operators are assigned the same score, weight and probability; After each subsequent neighborhood operation is completed, the scores, weights, and probabilities of the operators used previously are updated by comparing the generated new solution with the current solution and the optimal solution; the update steps are as follows: The roulette method is used to select the neighborhood operator so that the probability of the neighborhood operator being selected is proportional to its weight, including the following four scoring situations: (1) When the new solution obtained after destruction / repair is greater than the optimal solution: +2 points; (2) If the new solution obtained after destruction / repair is not greater than the optimal solution but greater than the current solution: +1 point; (3) If the new solution obtained after destruction / repair is neither greater than the current solution nor greater than the optimal solution, but is retained with a certain probability: +0.5 points; (4) If the new solution obtained after destruction / repair is neither greater than the current solution nor greater than the optimal solution and is not retained: +0.3 points; After the scores of the neighborhood operators are updated, the weights of the neighborhood operators are updated as follows: Among them, W i is the weight of the neighborhood operator i, D i is the score of the neighborhood operator i, Z i is the number of times the neighborhood operator i is used, and ω∈(0,1) is the weight update coefficient.

7. The method for solving a two-stage vehicle transportation scheme under time-varying speed as claimed in claim 4, characterized in that: The Metropolis acceptance criteria specifically refer to: If the new solution is better than the current solution, the new solution is accepted; otherwise, the new solution is accepted with an acceptance probability P. The acceptance probability P is related to the degree to which the new solution is inferior to the current solution. The calculation formula is as follows: Where T represents the current temperature, f(x') represents the objective function value of the current solution, and f(x) represents the objective function value of the new solution; After calculating the acceptance probability P, a number η is randomly generated in [0,1]. If η<P, the inferior solution is accepted, otherwise it is not accepted.

8. A two-level vehicle transportation solution system based on a heuristic algorithm with time-varying speed, characterized in that: include: The acquisition module is used to obtain customer demand and two-level distribution vehicle resources; A determination module, for determining a vehicle travel time under time-varying speed based on a time-dependent model of the travel speed; A construction module is used to construct a two-level vehicle path optimization model under a time-varying road network based on the customer demand and two-level distribution vehicle resources, and in combination with the vehicle travel time under the time-varying speed, with minimizing the total travel time of the two-level distribution vehicles as the optimization goal; The solution module is used to solve the two-level vehicle path optimization model under the time-varying road network by using an adaptive large neighborhood search algorithm to obtain a global optimal solution and decode to obtain an optimal two-level vehicle transportation solution.

9. A storage medium, characterized in that: It stores a computer program for solving a two-level vehicle transportation scheme under time-varying speed based on a heuristic algorithm, wherein the computer program enables the computer to execute the method for solving a two-level vehicle transportation scheme under time-varying speed as described in any one of claims 1 to 7.

10. An electronic device, characterized in that: include: one or more processors; Memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, the programs including a method for executing the method for solving a two-level vehicle transportation solution under time-varying speed as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Algorithm for solving single-depot time-varying associated logistics transportation vehicle routing problem

    CN104036333A

  • Dynamic vehicle path optimization method based on two-stage heuristic algorithm

    CN112766614A

  • Green cold chain vehicle path optimization method considering time-varying speed

    CN115310659A

  • Hybrid local search method for solving multi-target two-stage vehicle path problem

    CN117557185A

  • Two-stage fresh vehicle path planning method based on two-stage heuristic algorithm

    CN118228901A