Urban and rural logistics distribution path planning method based on heuristic algorithm
By building a collaborative distribution model in urban and rural logistics distribution, and using genetic algorithms and ant colony algorithms to optimize the distribution path, the problems of separation of transportation systems and low resource intensiveness in urban and rural logistics distribution are solved, and efficient and convenient logistics distribution is achieved, reducing the number of The cost.
Patent Information
- Application Number
- CN202411451077.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology is difficult to effectively solve the problems of separation of transportation systems and low resource intensiveness in urban and rural logistics distribution, resulting in high logistics costs and unable to meet the efficient and convenient urban and rural logistics needs.
The urban and rural logistics distribution path planning method is adopted based on heuristic algorithms. By constructing a urban-rural collaborative distribution model, combining genetic algorithms and ant colony algorithms, the vehicle distribution plan is optimized and the optimal distribution path is determined.
It has achieved reasonable optimization of urban and rural logistics distribution paths, reduced logistics costs, improved logistics benefits, and provided a satisfactory logistics experience.
Smart Images

Figure CN119444033A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to application fields such as urban and rural logistics distribution, e-commerce, etc., and in particular to an urban and rural logistics distribution path planning method based on a heuristic algorithm. Background Art
[0002] With the continuous advancement of the process of urban-rural integration, the scope of urban and rural logistics services has gradually expanded, and the construction of the logistics distribution system has significantly improved the accessibility and convenience of logistics services. At the same time, the country has issued a series of support policies to promote the development of logistics in recent years, including the "last mile" with efficiency and convenience as the core and the "reverse logistics" with green environmental protection as the core, and other policies, and the logistics field has developed rapidly. However, in the face of efficient and convenient urban and rural logistics needs, the old and simple logistics distribution model in the past can no longer meet the current market demand. How to effectively solve the distribution problem in urban and rural areas has become a focus of general concern.
[0003] At present, known heuristic algorithms include economizing, simulated annealing, deterministic annealing, taboo search, genetic algorithm, ant colony algorithm, etc. The existing single algorithm can effectively solve the logistics distribution problem of distribution center-customer, but urban and rural logistics have the problems of separation of transportation system and low resource concentration. It is difficult to deal with this situation with only a single algorithm. Therefore, how to select and optimize algorithms and reduce logistics costs is the key to solving the problem of urban and rural logistics distribution path planning. This requires the reasonable selection of vehicle distribution logistics models and path planning solutions in urban and rural logistics distribution, so that enterprises can improve logistics efficiency while allowing customers to obtain satisfactory logistics experience. Summary of the invention
[0004] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and provide a method for urban and rural logistics distribution path planning based on a heuristic algorithm, which can reasonably optimize the vehicle distribution plan in urban and rural logistics distribution, so that enterprises can improve logistics efficiency while allowing customers to obtain a satisfactory logistics experience. Technical solution:
[0005] A method for urban and rural logistics distribution path planning based on a heuristic algorithm includes the following steps:
[0006] Step S1, constructing an urban-rural collaborative distribution model including logistics enterprises, assisting distribution centers, distribution nodes, and customers, and obtaining customer information and information of each distribution node;
[0007] Step S2, constructing a multi-delivery node path planning mathematical model, and determining the required delivery nodes and the optimal paths between the delivery nodes and the customer nodes through a genetic algorithm;
[0008] Step S3, determine the optimal path between the assisting distribution center and the distribution node through the ant colony algorithm to determine the best distribution plan.
[0009] Furthermore, the urban-rural collaborative distribution model is as follows: the logistics company transports the goods to the assisting distribution center, and synchronizes the customer information including the customer location information and the customer goods demand information to the assisting distribution center; the distribution node synchronizes the distribution node location information and the vehicle capacity information to the assisting distribution center, and the assisting distribution center distributes the goods to the distribution nodes, and each distribution node transports the goods to the customer node; the assisting distribution center numbers the customers and distribution nodes.
[0010] Further, step S2 includes:
[0011] Step S21, constructing a multi-distribution node path planning mathematical model:
[0012] S211 defines the model parameters:
[0013] Assist Distribution Center C
[0014] A set of M distribution nodes - G = {m|m = 1, 2, ..., M};
[0015] N customer node sets - H = {i|i = M+1, M+2, ..., M+N};
[0016] The node position coordinates of the distribution node and the customer node are expressed as (x a ,y a )(a∈S);
[0017] The set of all distribution nodes and customer points - S = {G} ∪ {H};
[0018] K from delivery node m m Vehicle collection V m ={k|k=1,2,…,K m};
[0019] Vehicle capacity – q;
[0020] The quantity of goods demanded by customer i——g i (i∈H,g i <q);
[0021] S212 defines the decision variables:
[0022]
[0023] S213 defines the objective function:
[0024]
[0025] Where F represents the total distance traveled by the vehicle, d ab represents the transportation cost from node a to node b;
[0026] S213 sets constraints:
[0027] Ensure that the number of vehicles dispatched by each distribution node does not exceed the number of vehicles owned by the distribution node;
[0028] Ensure that vehicles start from their respective delivery nodes and finally return to the original delivery node;
[0029] Ensure that each customer can only be served once by the same car;
[0030] Specify constraints on vehicle capacity;
[0031] It is stipulated that vehicles cannot go from distribution center to distribution center;
[0032] Step S22, determining the required delivery nodes and the optimal paths between the delivery nodes and the customer nodes through a genetic algorithm.
[0033] Furthermore, the constraint conditions set in step S213 are specifically:
[0034]
[0035] The above formula ensures that the number of vehicles dispatched by each distribution node does not exceed the number of vehicles owned by the distribution node;
[0036]
[0037] The above formula ensures that all vehicles start from their respective delivery nodes and finally return to the original delivery node;
[0038]
[0039] The above formula ensures that each customer can only be served once by the same car;
[0040]
[0041] The above formula specifies the constraints on vehicle capacity;
[0042]
[0043] The above formula stipulates that vehicles cannot go from distribution center to distribution center.
[0044] Furthermore, in step S22, the method for determining the required delivery nodes and the optimal path between the delivery nodes and the customer nodes by means of a genetic algorithm is as follows:
[0045] S221 Input genetic algorithm parameters, including population size G, crossover ratio P c , the variation ratio P m , maximum number of iterations g, number of iterations g0 = 1;
[0046] S222 randomly sorts the customer nodes to generate paths and initializes the chromosome population; calculates the distance between nodes, that is, the transportation cost from node a to node b, and constructs a distance matrix D;
[0047] S223 performs crossover and mutation operations to generate offspring chromosomes; calculates chromosome fitness values, including allocating distribution nodes, constructing complete loops, and calculating fitness values; allocating distribution nodes means that the vehicle moves in the order of a chromosome gene sequence, and the sum of the cargo demands of the customers involved is calculated. If the sum of the demands exceeds the vehicle capacity, the nearest distribution node is found as the departure distribution node of the vehicle, otherwise, it continues to determine whether the total customer demand exceeds the vehicle capacity after adding the demand of the next customer node; constructs a complete loop, and after traversing each gene of the chromosome, a complete loop is constructed in order by the customer nodes and distribution nodes; the length of each chromosome loop in the population is calculated according to the distance matrix D and the objective function, as the chromosome fitness value F;
[0048] S224 updates the population, selecting G chromosomes with smaller fitness values from the offspring chromosomes and the parent chromosomes as the new population;
[0049] S225 performs optimization to obtain an optimal path between the delivery node and the customer node;
[0050] S226 If the number of iterations g0 is greater than g, the iteration is terminated and the optimal path is output; otherwise, g0=g0+1, and the process returns to step S223.
[0051] Further, step S225 performs optimization to obtain the optimal path between the delivery node and the customer node. The specific steps are:
[0052] The first step is to select the chromosome with the smallest fitness value in the population, assign distribution nodes, and build a complete circuit;
[0053] The second step is to randomly change the order of the gene sequence fragments belonging to the same vehicle in the chromosome to generate offspring chromosomes. If the fitness value of the offspring chromosome is less than that of the parent chromosome, the parent chromosome will be replaced, otherwise the parent chromosome will continue to be retained;
[0054] In the third step, replace the vehicle and repeat the second step, and use the optimized parent chromosome as the optimal path of the population, that is, the optimal path between the delivery node and the customer node.
[0055] Furthermore, in step S3, the optimal path between the assisting distribution center and the distribution node is determined by using an ant colony algorithm. The method for determining the optimal distribution plan is:
[0056] Step S31, inputting the parameters of the ant colony algorithm, including the number of ants n, the pheromone factor α, the heuristic function factor β, the pheromone volatility factor ρ, the pheromone constant Q, the number of iterations t0=1, the maximum number of iterations t, and the initial pheromone concentration τ0;
[0057] Step S32, calculating the distance between the distribution node and the auxiliary distribution center used in the optimal path in step S2, and constructing a distance matrix D';
[0058] Step S33, placing all ants at the assisting distribution center as the starting position;
[0059] Step S34, each ant selects the next delivery node according to the path transfer probability to construct a solution space; represents the path transfer probability of ant k (k = 1, 2, ..., n) from distribution node i to distribution node j at time t, and the calculation formula is
[0060]
[0061] Among them, τ ij (t) represents the pheromone concentration on the path between delivery node i and delivery node j at time t. Initially, the pheromone concentration of each path is the same as τ0, allowed k Indicates the distribution node to be visited by ant k. The larger the pheromone factor α is, the greater the effect of pheromone concentration on the transfer. The larger the heuristic function factor β is, the greater the probability that ant k will transfer to a distribution node with a short distance.
[0062] Step S35: As the ants move forward, the pheromones on the path between the delivery nodes gradually evaporate or increase, and the pheromones are updated. The formula is as follows:
[0063]
[0064] Among them, (1-ρ) is used to control the volatilization of pheromones. It is used to control the increase of pheromone. When the path taken by ant k is shorter, the concentration of pheromone released is higher. The pheromone constant Q represents the total concentration of pheromone that each ant can produce. L k Represents the total length of the path traversed by ant k; find the minimum total distance traversed by each ant in this iteration. Compared with the optimal path of the previous iteration, the minimum total distance is recorded as the optimal path between the assisting distribution center and the distribution node;
[0065] Step S36, if the number of iterations t0 is greater than t, the iteration is terminated and the total path with the minimum total distance is output; otherwise, t0=t0+1, and the process returns to step S34;
[0066] Step S37, the final vehicle distributes the goods to each distribution node via the assisting distribution center according to the optimal path between the assisting distribution center and the distribution node, and each distribution node dispatches a vehicle to transport the goods to each customer node according to the optimal path between the distribution node and the customer node.
[0067] The beneficial effects of the present invention are as follows: by constructing an urban-rural collaborative distribution model, simulating the actual process of urban-rural distribution, and dividing the nodes according to the transportation characteristics of the urban-rural collaborative distribution model. Constructing a collaborative distribution center-distribution node model, using an ant colony algorithm for path planning; constructing a distribution node-customer node model, using a genetic algorithm for path planning. Reasonably selecting vehicle distribution logistics models and path planning schemes in urban and rural logistics distribution, so that enterprises can improve logistics efficiency while allowing customers to obtain a satisfactory logistics experience. Performing opt optimization on the genetic algorithm to reduce the random influence brought by the crossover mutation operation, and further improve the ability of the genetic algorithm to search for the global optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 It is a flowchart of the urban and rural logistics distribution path planning method;
[0069] Figure 2 It is a model of coordinated urban and rural distribution;
[0070] Figure 3 It is a flow chart of the genetic algorithm adopted by the present invention;
[0071] Figure 4 It is a complete circuit diagram generated after traversing every gene on the chromosome;
[0072] Figure 5 It is a flow chart of the ant colony algorithm adopted by the present invention;
[0073] Figure 6 It is a location diagram to assist the distribution center, distribution points and customer nodes;
[0074] Figure 7 It is a path map of the optimal distribution plan. DETAILED DESCRIPTION
[0075] The following further illustrates how to utilize the urban and rural logistics distribution path planning method based on heuristic algorithm proposed in the present invention in conjunction with the accompanying drawings and specific implementation methods.
[0076] The present invention is realized by the following technical scheme. The flow chart of the method for planning the path of urban and rural logistics distribution is as follows: Figure 1 As shown, the specific steps of the present invention are:
[0077] Step S1, construct an urban-rural collaborative distribution model of enterprise-assisting distribution center-distribution node-customer, and obtain customer information and information of each distribution node.
[0078] The present invention adopts Figure 2 In the urban-rural collaborative distribution model shown in the figure, the logistics enterprise transports the goods to the auxiliary distribution center and synchronizes the customer information including the customer location information and the customer cargo demand information to the auxiliary distribution center. The distribution node synchronizes the distribution node location information and vehicle capacity information to the auxiliary distribution center, distributes the goods to the distribution nodes through the auxiliary distribution center, and each distribution node transports the goods to the customer node. The auxiliary distribution center numbers the customers and distribution nodes, the customer numbers are 1, 2, ..., N, and the distribution nodes are numbered N+1, N+2, ..., N+M.
[0079] Step S2, construct a mathematical model for multi-distribution node path planning, and determine the required distribution nodes and the optimal path between the distribution nodes and the customer nodes through a genetic algorithm. Compared with other heuristic algorithms, the genetic algorithm has simpler parameter settings, stronger adaptability and faster convergence speed. The introduction of opt optimization reduces the random influence brought by crossover and mutation operations, greatly improves the ability of the genetic algorithm to search for the global optimal solution, and can efficiently handle the multi-distribution node path planning problem.
[0080] Step S21, constructing a multi-distribution node path planning mathematical model.
[0081] Define the model parameters:
[0082] A set of CM distribution nodes assisting the distribution center - G = {m|m = 1,2,…,M};
[0083] N customer node sets - H = {i|i = M+1, M+2, ..., M+N};
[0084] The node position coordinates of the distribution node and the customer node are expressed as (x a ,y a )(a∈S);
[0085] The set of all distribution nodes and customer points - S = {G} ∪ {H};
[0086] K from delivery node m m Vehicle collection V m ={k|k=1,2,…,K m};
[0087] Vehicle capacity – q;
[0088] The quantity of goods demanded by customer i——g i (i∈H,g i <q);
[0089] Define the decision variables:
[0090]
[0091] Define the objective function:
[0092]
[0093] Where F represents the total distance traveled by the vehicle, d ab Represents the transportation cost from node a to node b.
[0094] Set up constraints:
[0095]
[0096] The above formula ensures that the number of vehicles dispatched by each distribution node does not exceed the number of vehicles owned by the distribution node;
[0097]
[0098] The above formula ensures that all vehicles start from their respective delivery nodes and finally return to the original delivery node;
[0099]
[0100] The above formula ensures that each customer can only be served once by the same car;
[0101]
[0102] The above formula specifies the constraints on vehicle capacity;
[0103]
[0104] The above formula stipulates that vehicles cannot go from distribution center to distribution center.
[0105] Step S22, according to Figure 3 The genetic algorithm flow chart shown in the figure determines the required delivery nodes and the optimal path between the delivery nodes and the customer nodes through the genetic algorithm.
[0106] (1) Input genetic algorithm parameters, including population size G, crossover ratio P c , the variation ratio P m , maximum number of iterations g, number of iterations g0 = 1;
[0107] (2) Randomly sort the customer nodes to generate paths and initialize the chromosome population. Using the formula
[0108]
[0109] Calculate the distance between customer nodes, that is, the transportation cost from node a to node b, and construct the distance matrix D.
[0110] Perform crossover and mutation operations to generate offspring chromosomes. Crossover uses the sequential crossover method, and the specific process is as follows:
[0111] In the first step, two parent chromosomes are selected, two crossover points are randomly generated, and the gene sequence between the crossover points is used as the crossover gene;
[0112] The second step is to copy the crossover genes in the first parent chromosome to the first daughter chromosome set, and select the uncopied genes in the second parent chromosome in order and fill them into the first daughter chromosome to ensure no duplication;
[0113] The third step is to copy the crossover genes in the second parent chromosome to the second daughter chromosome group, and select the uncopied genes in the first parent chromosome in order and fill them into the second daughter chromosome to ensure no duplication.
[0114] The mutation adopts the exchange mutation method, that is, two genes are randomly selected from a parent chromosome, the positions of the two genes are exchanged, and a new daughter chromosome is formed.
[0115] Calculating the fitness value of the chromosome includes allocating distribution nodes, constructing a complete loop and calculating the fitness value. Allocating distribution nodes means that the vehicle moves forward in the order of a chromosome gene sequence, and the sum of the cargo demands of the customers included is calculated. If the sum of the demands exceeds the vehicle capacity, the nearest distribution node is found as the departure distribution node of the vehicle. Otherwise, it continues to determine whether the total customer demand exceeds the vehicle capacity after adding the demand of the next customer node. Constructing a complete loop means that after traversing each gene of the chromosome, a complete loop is formed in sequence by the customer nodes and distribution nodes. Taking 12 customer nodes and 3 distribution nodes as an example, a complete loop is as follows: Figure 4 Finally, the length of each chromosome loop in the population is calculated according to the distance matrix D and the objective function as the chromosome fitness value F.
[0116] Update the population and select G chromosomes with smaller fitness values among the offspring chromosomes and the parent chromosomes as the new population.
[0117] Perform opt optimization to obtain the optimal path between the distribution node and the customer node. The specific steps are:
[0118] The first step is to select the chromosome with the smallest fitness value in the population, assign distribution nodes, and build a complete circuit;
[0119] The second step is to randomly change the order of the gene sequence fragments belonging to the same vehicle in the chromosome to generate offspring chromosomes. If the fitness value of the offspring chromosome is less than that of the parent chromosome, the parent chromosome will be replaced, otherwise the parent chromosome will continue to be retained;
[0120] In the third step, replace the vehicle and repeat the second step, and use the optimized parent chromosome as the optimal path of the population, that is, the optimal path between the delivery node and the customer node.
[0121] If the number of iterations g0 is greater than g, the iteration is terminated and the optimal path is output; otherwise, g0=g0+1, and the process returns to step (3).
[0122] Step S3, as follows Figure 5 The ant colony algorithm flowchart shown in Figure 1 determines the optimal path between the auxiliary distribution center and the distribution node through the ant colony algorithm, and determines the best distribution plan. Compared with other heuristic algorithms, the ant colony algorithm has stronger parallel processing capabilities, does not require high computing resources, has a strong ability to find the global optimal solution, and can effectively find the optimal path between the auxiliary distribution center and the distribution node.
[0123] Step S31, inputting the parameters of the ant colony algorithm, including the number of ants n, the pheromone factor α, the heuristic function factor β, the pheromone volatility factor ρ, the pheromone constant Q, the number of iterations t0=1, the maximum number of iterations t, and the initial pheromone concentration τ0.
[0124] Step S32, using formula
[0125]
[0126] Calculate the distance between the distribution node and the auxiliary distribution center used in the optimal path in step S2, and construct a distance matrix D';
[0127] Step S33, placing all ants at the assisting distribution center as the starting position;
[0128] Step S34: Each ant selects the next delivery node according to the path transfer probability to construct a solution space. represents the path transfer probability of ant k (k = 1, 2, ..., n) from distribution node m to distribution node m' at time t, and the calculation formula is
[0129]
[0130] Among them, τ mm' (t) represents the pheromone concentration on the path between delivery node m and delivery node m' at time t. Initially, the pheromone concentration of each path is the same as τ0, allowed kIt indicates the distribution node to be visited by ant k. The larger the pheromone factor α is, the greater the effect of pheromone concentration on the transfer. The larger the heuristic function factor β is, the greater the probability that ant k will transfer to a distribution node with a short distance.
[0131] Step S35: As the ants move forward, the pheromones on the path between the delivery nodes gradually evaporate or increase, so the pheromones need to be updated. The formula is as follows:
[0132]
[0133] Among them, (1-ρ) is used to control the volatilization of pheromones. It is used to control the increase of pheromone. When the path taken by ant k is shorter, the concentration of pheromone released is higher. The pheromone constant Q represents the total concentration of pheromone that each ant can produce. L k Represents the total length of the path traversed by ant k. Find the minimum total distance traversed by each ant in this iteration. Compared with the optimal path of the previous iteration, the minimum total distance is recorded as the optimal path between the assisting distribution center and the distribution node;
[0134] Step S36, if the number of iterations t0 is greater than t, the iteration is terminated and the total path with the minimum total distance is output; otherwise, t0=t0+1, and the process returns to step S34;
[0135] Step S37, the final vehicle distributes the goods to each distribution node via the assisting distribution center according to the optimal path between the assisting distribution center and the distribution node, and each distribution node dispatches a vehicle to transport the goods to each customer node according to the optimal path between the distribution node and the customer node.
[0136] This embodiment takes the distribution path of a logistics company as an example. The distribution path includes 50 distribution points and 4 distribution centers. The maximum capacity of each distribution vehicle is 80 units. The location diagram of the distribution center, distribution points and customer nodes is as follows: Figure 6 As shown, the customer demand of each customer is shown in Table 1.
[0137] Table 1
[0138]
[0139]
[0140] After 100 iterations of the genetic algorithm and the ant colony algorithm, the optimal path length between the distribution node and the customer node is 618.9521, and the optimal path length between the auxiliary distribution center and the distribution node is 127.9669. The path diagram of the optimal distribution plan is shown in the figure below: Figure 7 As shown, the routes of each delivery vehicle are:
[0141] Delivery vehicle 1: Assisting the distribution center - Distribution node 2 - Distribution center 1 - Distribution node 3 - Distribution node 4 - Assisting the distribution center
[0142] Delivery vehicle 2: delivery node 1—18—17—37—44—delivery node 1;
[0143] Delivery vehicle 3: delivery node 3—49—30—34—delivery node 3;
[0144] Delivery vehicle 4: delivery node 2—11—2—1—32—delivery node 2;
[0145] Delivery vehicle 5: delivery node 2—48—23—7—43—24—delivery node 2;
[0146] Delivery vehicle 6: delivery node 3—9—50—21—16—38—5—delivery node 3;
[0147] Delivery vehicle 7: delivery node 2—46—12—4—47—delivery node 2;
[0148] Delivery vehicle 8: delivery node 2—27—8—26—31—28—22—delivery node 2;
[0149] Delivery vehicle 9: delivery node 3—15—45—33—39—10—delivery node 3;
[0150] Delivery vehicle 10: delivery node 2—25—14—6—delivery node 2;
[0151] Delivery vehicle 11: delivery node 1—13—41—40—19—42—delivery node 1;
[0152] Delivery vehicle 12: delivery node 4—29—20—3—36—35—delivery node 4.
Claims
1. A method for urban and rural logistics distribution path planning based on a heuristic algorithm, comprising the following steps: Step S1, constructing an urban-rural collaborative distribution model including logistics enterprises, assisting distribution centers, distribution nodes, and customers, and obtaining customer information and information of each distribution node; Step S2, constructing a multi-delivery node path planning mathematical model, and determining the required delivery nodes and the optimal paths between the delivery nodes and the customer nodes through a genetic algorithm; Step S3, determine the optimal path between the assisting distribution center and the distribution node through the ant colony algorithm to determine the best distribution plan.
2. The method for planning a path for urban and rural logistics distribution according to claim 1, characterized in that: The urban-rural collaborative distribution model is as follows: the logistics enterprise transports the goods to the assisting distribution center, and synchronizes the customer information including the customer location information and the customer goods demand information to the assisting distribution center; the distribution node synchronizes the distribution node location information and the vehicle capacity information to the assisting distribution center, and the assisting distribution center distributes the goods to the distribution nodes, and each distribution node transports the goods to the customer node; the assisting distribution center numbers the customers and distribution nodes.
3. The method for planning a path for urban and rural logistics distribution according to claim 1, characterized in that: Step S2 includes: Step S21, constructing a multi-distribution node path planning mathematical model: S211 defines the model parameters: Assist Distribution Center C A set of M distribution nodes - G = {m|m = 1, 2, ..., M}; N customer node sets - H = {i|i = M+1, M+2, ..., M+N}; The node position coordinates of the distribution node and the customer node are expressed as (x a ,y a )(a∈S); The set of all distribution nodes and customer points - S = {G} ∪ {H}; K from delivery node m m Vehicle collection V m ={k|k=1,2,…,K m }; Vehicle capacity – q; The quantity of goods demanded by customer i——g i (i∈H,g i <q); S212 defines the decision variables: S213 defines the objective function: Where F represents the total distance traveled by the vehicle, d ab represents the transportation cost from node a to node b; S213 sets constraints: Ensure that the number of vehicles dispatched by each distribution node does not exceed the number of vehicles owned by the distribution node; Ensure that vehicles start from their respective delivery nodes and finally return to the original delivery node; Ensure that each customer can only be served once by the same car; Specify constraints on vehicle capacity; It is stipulated that vehicles cannot go from distribution center to distribution center; Step S22, determining the required delivery nodes and the optimal paths between the delivery nodes and the customer nodes through a genetic algorithm.
4. The method for planning a path for urban and rural logistics distribution according to claim 3, characterized in that: The constraints set in step S213 are specifically: The above formula ensures that the number of vehicles dispatched by each distribution node does not exceed the number of vehicles owned by the distribution node; The above formula ensures that all vehicles start from their respective delivery nodes and finally return to the original delivery node; The above formula ensures that each customer can only be served once by the same car; The above formula specifies the constraints on vehicle capacity; The above formula stipulates that vehicles cannot go from distribution center to distribution center.
5. The method for planning a path for urban and rural logistics distribution according to claim 3, characterized in that: Step S22 determines the required delivery nodes and the optimal path between the delivery nodes and the customer nodes by using a genetic algorithm: S221 Input genetic algorithm parameters, including population size G, crossover ratio P c , the variation ratio P m , maximum number of iterations g, number of iterations g0 = 1; S222 randomly sorts the customer nodes to generate paths and initializes the chromosome population; calculates the distance between nodes, that is, the transportation cost from node a to node b, and constructs a distance matrix D; S223 performs crossover and mutation operations to generate offspring chromosomes; calculates chromosome fitness values, including allocating distribution nodes, constructing complete loops, and calculating fitness values; allocating distribution nodes means that the vehicle moves in the order of a chromosome gene sequence, and the sum of the cargo demands of the customers involved is calculated. If the sum of the demands exceeds the vehicle capacity, the nearest distribution node is found as the departure distribution node of the vehicle, otherwise, it continues to determine whether the total customer demand exceeds the vehicle capacity after adding the demand of the next customer node; constructs a complete loop, and after traversing each gene of the chromosome, a complete loop is constructed in order by the customer nodes and distribution nodes; the length of each chromosome loop in the population is calculated according to the distance matrix D and the objective function, as the chromosome fitness value F; S224 updates the population, selecting G chromosomes with smaller fitness values from the offspring chromosomes and the parent chromosomes as the new population; S225 performs optimization to obtain an optimal path between the delivery node and the customer node; S226 If the number of iterations g0 is greater than g, the iteration is terminated and the optimal path is output; otherwise, g0=g0+1, and the process returns to step S223.
6. The method for planning a path for urban and rural logistics distribution according to claim 3, characterized in that: Step S225 performs optimization to obtain the optimal path between the delivery node and the customer node. The specific steps are: The first step is to select the chromosome with the smallest fitness value in the population, assign distribution nodes, and build a complete circuit; The second step is to randomly change the order of gene sequence fragments belonging to the same vehicle in the chromosome to generate offspring chromosomes. If the fitness value of the offspring chromosome is less than that of the parent chromosome, the parent chromosome will be replaced, otherwise the parent chromosome will continue to be retained; In the third step, replace the vehicle and repeat the second step, and use the optimized parent chromosome as the optimal path of the population, that is, the optimal path between the delivery node and the customer node.
7. The method for planning a path for urban and rural logistics distribution according to claim 3, characterized in that: Step S3 determines the optimal path between the assisting distribution center and the distribution node through the ant colony algorithm. The method for determining the best distribution plan is: Step S31, inputting the parameters of the ant colony algorithm, including the number of ants n, the pheromone factor α, the heuristic function factor β, the pheromone volatility factor ρ, the pheromone constant Q, the number of iterations t0=1, the maximum number of iterations t, and the initial pheromone concentration τ0; Step S32, calculating the distance between the distribution node and the auxiliary distribution center used in the optimal path in step S2, and constructing a distance matrix D'; Step S33, placing all ants at the assisting distribution center as the starting position; Step S34, each ant selects the next delivery node according to the path transfer probability to construct a solution space; represents the path transfer probability of ant k (k = 1, 2, ..., n) from distribution node i to distribution node j at time t, and the calculation formula is Among them, τ ij (t) represents the pheromone concentration on the path between delivery node i and delivery node j at time t. Initially, the pheromone concentration of each path is the same as τ0, allowed k Indicates the distribution node to be visited by ant k. The larger the pheromone factor α is, the greater the effect of pheromone concentration on the transfer. The larger the heuristic function factor β is, the greater the probability that ant k will transfer to a distribution node with a short distance. Step S35: As the ants move forward, the pheromones on the path between the delivery nodes gradually evaporate or increase, and the pheromones are updated. The formula is as follows: Among them, (1-ρ) is used to control the volatilization of pheromones. It is used to control the increase of pheromone. When the path taken by ant k is shorter, the concentration of pheromone released is higher. The pheromone constant Q represents the total concentration of pheromone that each ant can produce. L k Represents the total length of the path traversed by ant k; find the minimum total distance traversed by each ant in this iteration. Compared with the optimal path of the previous iteration, the minimum total distance is recorded as the optimal path between the assisting distribution center and the distribution node; Step S36, if the number of iterations t0 is greater than t, the iteration is terminated and the total path with the minimum total distance is output; Otherwise, t0=t0+1, return to step S34; Step S37, the final vehicle distributes the goods to each distribution node via the assisting distribution center according to the optimal path between the assisting distribution center and the distribution node, and each distribution node dispatches a vehicle to transport the goods to each customer node according to the optimal path between the distribution node and the customer node.
Citation Information
Patent Citations
Multi-distribution-center vehicle path optimization method based on improved ant colony algorithm
CN110705741A
Logistics distribution path optimization method by considering traffic conditions and double time windows
CN111445084A
AGV scheduling method based on ant colony and genetic algorithm
CN111860754A
Delivery path planning method
CN114971044A
Route planning method, device and equipment based on carbon emission and storage medium
CN115860289A