Fresh food terminal delivery vehicle path optimization method and system under time-varying traffic

By using grid maps and particle swarm algorithms combined with artificial bee swarm algorithms to optimize the end delivery path of fresh food in a time-varying traffic environment, the problems of high delivery costs, reduced quality and low customer satisfaction in the existing technology are solved, and the effects of high efficiency, quality assurance and customer satisfaction are achieved.

CN120146343APending Publication Date: 2025-06-13YTO EXPRESS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510214154.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The prior art is difficult to effectively optimize the end delivery path of fresh food in a time-varying traffic environment, resulting in high delivery costs, reduced fresh food quality and low customer satisfaction.

Method used

The fresh food end distribution environment is constructed through a grid diagram, combined with particle swarm algorithm and artificial bee swarm algorithm, optimized path planning, and consider real-time traffic conditions, fresh food product characteristics and customer satisfaction.

Benefits of technology

The end delivery path optimization of fresh food in a time-varying traffic environment has been achieved, reducing distribution costs, ensuring the quality of fresh food products, and improving customer satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146343A_ABST
    Figure CN120146343A_ABST
Patent Text Reader

Abstract

The invention discloses a fresh food terminal distribution vehicle path optimization method and system under time-varying traffic, and aims to reduce the distribution cost, guarantee the quality of fresh goods, improve the customer satisfaction and improve the overall fresh food distribution efficiency in actual fresh food terminal distribution. According to the technical scheme, the method comprises the following steps: constructing a fresh food end distribution environment through a grid map; performing parameter initialization through a particle swarm algorithm; a K-means algorithm is introduced to initialize particle positions; updating the optimal solution and the position of the particle; updating a global optimal solution and an optimal position, and generating a search path suboptimal solution; performing parameter initialization through an artificial bee colony algorithm; the position X1 of the globally optimal solution serves as the nectar source position, and the globally optimal solution is searched again through the artificial bee colony algorithm; updating the position of the nectar source, namely updating the optimal solution; and through circular calculation, searching to obtain a global optimal solution, namely a navigation path with the shortest distance and the optimal smoothness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of optimizing the last-mile delivery routes for fresh food in transportation, and particularly to a method and system for optimizing the routes of fresh food last-mile delivery vehicles considering the real-time changing traffic environment. Background Art

[0002] With the booming development of e-commerce, due to the perishable and short shelf-life characteristics of fresh food products, higher requirements are put forward for the timeliness and quality of delivery. As a key link in the entire logistics distribution system, the efficiency and quality of fresh food last-mile delivery directly affect the market competitiveness of fresh food products and the satisfaction of consumers. However, in the actual process of fresh food last-mile delivery, many challenges and problems are often faced.

[0003] Firstly, the real-time changes in the traffic environment bring great uncertainties to fresh food last-mile delivery. The urban traffic conditions are complex and changeable. Sudden situations such as traffic congestion during morning and evening rush hours, traffic restrictions due to road construction, and traffic accidents will have a significant impact on the traffic efficiency of the delivery routes. For example, during the traffic peak, the delivery vehicles may be stuck on the road, resulting in the fresh food products not being delivered to customers in time, which will trigger a series of chain reactions such as product spoilage and customer complaints. Another example is the traffic restrictions due to road construction, which may force the delivery vehicles to detour a longer distance, increasing the delivery time and cost and reducing the delivery efficiency.

[0004] Secondly, most of the existing fresh food last-mile delivery methods aim to save delivery time and cost, ignoring the quality loss of fresh food products during the delivery process and the change of customer satisfaction. Some traditional delivery methods, such as simple shortest path planning, although can reduce the delivery cost to a certain extent, do not consider the sensitivity of fresh food products to time and temperature during the delivery process. During the delivery process of fresh food products, as time goes by and the temperature changes, their freshness will gradually decline and even deteriorate. If the delivery time is too long or the delivery route is unreasonable, resulting in the fresh food products being exposed to an unfavorable environment for a long time, it will seriously affect the product quality, and then affect the consumer's purchase experience and the enterprise's brand image.

[0005] In addition, fresh food last-mile delivery also faces the problem that it is difficult to guarantee customer satisfaction. Customers have clear time requirements and quality expectations for the delivery of fresh food products. If the delivery service fails to meet these requirements, customer satisfaction will be greatly reduced. For example, customers may hope to receive fresh food products within a specified time period. If the delivery is delayed, customers may be dissatisfied because they cannot enjoy the fresh food products in time. At the same time, if the fresh food products are damaged or deteriorated during the delivery process, it will also lead to a decrease in the overall customer satisfaction with the delivery service.

[0006] In response to the above problems, some related technologies in the current market have attempted to make improvements, but there are still certain limitations. For example, in the path planning method based on free space and artificial bee colony algorithm, although this method can perform path planning, it does not consider the real factors in free space, such as road congestion during peak travel periods and traffic restrictions caused by road construction, and cannot effectively handle the complex traffic conditions in actual distribution. Another example is the reinforcement learning assisted driving decision-making method for dynamic traffic environments. Although it can construct a dynamic traffic model according to the distribution of traffic flow density, in the last-mile fresh food delivery, factors such as road section control and the decline curve of fresh food quality also need to be considered. Moreover, this method mainly focuses on driving decision-making assistance rather than directly optimizing the last-mile fresh food delivery path.

[0007] In summary, there are still many deficiencies in the existing technologies for optimizing the last-mile fresh food delivery path under time-varying traffic environments, and they cannot fully meet the high requirements of fresh food product delivery for timeliness, quality, and customer satisfaction. Therefore, there is an urgent need for a method and system for optimizing the vehicle path of last-mile fresh food delivery that can comprehensively consider various factors such as real-time traffic conditions, fresh food product characteristics, and customer satisfaction, so as to improve the fresh food delivery efficiency, ensure the quality of fresh food products, and enhance customer satisfaction. Summary of the Invention

[0008] The following gives a brief overview of one or more aspects to provide a basic understanding of these aspects. This overview is not an exhaustive survey of all contemplated aspects, and neither is it intended to identify key or decisive elements of all aspects nor to define the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that follows.

[0009] The object of the present invention is to solve the above problems, and provides a method and system for optimizing the vehicle path of last-mile fresh food delivery under time-varying traffic, reducing the distribution cost in actual last-mile fresh food delivery, ensuring the quality of fresh food goods, improving customer satisfaction, and enhancing the overall fresh food delivery efficiency.

[0010] The technical solution of the present invention is as follows: The present invention discloses a method for optimizing the vehicle path of last-mile fresh food delivery under time-varying traffic, and the method includes:

[0011] Step S1: Construct the last-mile fresh food delivery environment through a grid map;

[0012] Step S2: Initialize the parameters through the particle swarm algorithm, where the initialized parameters include: the number of populations, the weight factor, the learning factor, and the maximum speed;

[0013] Step S3: Introduce the K-means algorithm to initialize the particle positions;

[0014] Step S4: Update the particle optimal solution and position;

[0015] Step S5: Update the global optimal solution and optimal position, and generate a sub-optimal solution of the search path;

[0016] Step S6: Initialize parameters through the artificial bee colony algorithm. The initialized parameters include: the number of nectar sources, control parameters, and the maximum number of iterations;

[0017] Step S7: Use the position X_1 of the global optimal solution output in Step S4 to search for the global optimal solution again through the artificial bee colony algorithm;

[0018] Step S8: Update the position of the nectar source, that is, update the optimal solution;

[0019] Step S9: Through iterative calculations, search for the global optimal solution, that is, the navigation path with the shortest distance and the optimal smoothness.

[0020] According to an embodiment of the fresh food last-mile delivery vehicle path optimization method under time-varying traffic of the present invention, Step S3 further includes:

[0021] Step S31: Randomly select k particles from the particle swarm set as the centers of the initial clusters;

[0022] Step S32: Calculate the Euclidean distance from each particle to each cluster center, and divide each particle into the cluster represented by the center point closest to it;

[0023] Step S33: Obtain the center point of the cluster from the center points of all sample points in each cluster;

[0024] Step S34: Repeat the iterations of S32 and Step S33 until the center point of the cluster remains unchanged or the set number of iterations is reached.

[0025] According to an embodiment of the fresh food last-mile delivery vehicle path optimization method under time-varying traffic of the present invention, the calculation formula for the Euclidean distance in Step S32 is:

[0026]

[0027] Where, X i represents the i-th particle, C j represents the j-th cluster center, the value range of i is: [1, n], and the value range of j is: [1, k]; X it represents the t-th attribute of the i-th particle, C jt represents the t-th attribute of the j-th cluster center, the value range of t is: [1, m], n represents the number of particles, k represents the number of clusters, and m represents the number of attributes.

[0028] According to an embodiment of the method for optimizing the vehicle routing of fresh food terminal distribution under time-varying traffic according to the present invention, the updating of the particle optimal solution and position in step S4 is specifically calculated by the following equations:

[0029]

[0030] Where: v id ={v i1 , v i2 , v i3 ,..., v id} T represents the particle velocity, represents the velocity of the d-th dimension in the k-th iteration, x i =(x i1 , x i2 , x i3 ,..., x id ) T represents the particle position, represents the position of the d-th dimension in the (k + 1)-th iteration, P id represents the individual extreme value that has occurred for each practice of particle i so far, P gd represents the global extreme value that has occurred for all practices of the particle so far, that is, the inertia weight, c 1·rand (0, 1) and c 2·rand (0, 1) are the products of the learning factor and the random number.

[0031] According to an embodiment of the method for optimizing the vehicle routing of fresh food terminal distribution under time-varying traffic according to the present invention, in step S8, after all employed bees complete the initial search stage of the search, the employed bees dance in the recruitment area to transmit the position information of the bee source to the follower bees, and the follower bees will select each solution and calculate the probability of selecting each solution through the formula. The specific calculation formula is as follows:

[0032]

[0033] P i represents the probability of selecting the i-th solution,

[0034] fit i represents the fitness value of the i-th solution,

[0035] FN represents the total number of nectar sources,

[0036] represents the sum of the fitness values of all nectar sources.

[0037] According to an embodiment of the method for optimizing the path of fresh food terminal distribution vehicles under time-varying traffic of the present invention, in step S9, after all follower peaks are searched, discard the solutions that have not been updated after the control parameter number of cycles, that is, these solutions are trapped in local optima, then the corresponding follower bees are transformed into scout bees, generate new bee sources to replace the original bee sources, and then return to the employed bee search process, start repeating the cycle, and finally find the optimal solution through cyclic search.

[0038] The present invention also discloses a system for optimizing the path of fresh food terminal distribution vehicles under time-varying traffic, the system includes:

[0039] Fresh food terminal distribution environment construction module, used to construct the fresh food terminal distribution environment through a grid map;

[0040] Particle swarm parameter initialization module, used to initialize the parameters of the particle swarm algorithm, wherein the initialized parameters include: the number of populations, weight factors, learning factors, and maximum speed;

[0041] K-means particle position initialization module, used to initialize the particle positions by introducing the K-means algorithm;

[0042] Particle optimal solution and position update module, used to update the particle optimal solution and position;

[0043] Search path sub-optimal solution generation module, used to update the global optimal solution and optimal position, and generate the search path sub-optimal solution;

[0044] Artificial ant colony parameter initialization module, used to initialize the parameters through the artificial bee colony algorithm, and the initialized parameters include: the number of nectar sources SN, control parameters, and maximum number of iterations;

[0045] Artificial ant colony global optimal solution search module, used to search for the global optimal solution again through the artificial bee colony algorithm for the position X_1 of the global optimal solution output by the particle optimal solution and position update module;

[0046] Nectar source position update module, used to update the position of the nectar source, that is, update the optimal solution;

[0047] Optimal solution search module, used to search for the global optimal solution.

[0048] The present invention also discloses a computer system for optimizing the path of fresh food terminal distribution vehicles under time-varying traffic, including a memory, a processor, and program instructions stored in the memory and executable by the processor, wherein the processor executes the program instructions to implement the steps of the method for optimizing the path of fresh food terminal distribution vehicles under time-varying traffic as described above.

[0049] The present invention also discloses a computer-readable storage medium for optimizing the vehicle routing of fresh food at the end under time-varying traffic, which stores program instructions executable by a processor to implement the steps of the method for optimizing the vehicle routing of fresh food at the end under time-varying traffic as described above.

[0050] The present invention also discloses a computer program product, including a computer program, which implements the steps of the method for optimizing the vehicle routing of fresh food at the end under time-varying traffic as described above when executed by a processor.

[0051] The present invention has the following beneficial effects compared with the prior art: By constructing a real-time traffic model to reflect the dynamic traffic conditions, and combining constraints such as the minimum freshness of fresh food, the real-time road conditions, and the minimum customer satisfaction, with the goal of reducing distribution costs, improving customer satisfaction, and ensuring the quality of fresh food products, the present invention constructs an optimization model for the vehicle routing of fresh food at the end under time-varying traffic, and designs an adaptive improved artificial bee colony algorithm according to the characteristics of the model. Compared with the prior art, the main features of the present invention are, first, in constructing the model of time-varying traffic, second, in optimizing the artificial bee colony algorithm, and third, in combining the characteristics of fresh food products, considering the time cost while paying attention to the quality change of fresh food products, so as to solve the problems of increased time cost of fresh food distribution, decreased fresh food quality, and reduced user satisfaction caused by traffic congestion, real-time road condition information, and traffic control in the process of fresh food end distribution. Through the establishment of the model and the optimization of the artificial bee colony algorithm, the path optimization based on time-varying traffic can be realized, and the fresh food distribution efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] After reading the detailed description of the embodiments of the present disclosure in conjunction with the following drawings, the above features and advantages of the present invention can be better understood. In the drawings, the components are not necessarily drawn to scale, and components with similar related characteristics or features may have the same or similar reference numerals.

[0053] Figure 1 Shows the overall flowchart of an embodiment of the method for optimizing the vehicle routing of fresh food at the end under time-varying traffic of the present invention.

[0054] Figure 2 Shows a schematic diagram of an example of a grid map.

[0055] Figure 3 Shows the flowchart of optimizing the end distribution path by the artificial bee colony algorithm.

[0056] Figure 4 Shows the schematic diagram of an embodiment of the system for optimizing the vehicle routing of fresh food at the end under time-varying traffic of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0057] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. Note that the aspects described below in conjunction with the accompanying drawings and specific embodiments are merely exemplary and should not be construed as imposing any limitations on the protection scope of the present invention.

[0058] Figure 1 Fig. shows the overall process of an embodiment of the method for optimizing the path of fresh food last-mile delivery vehicles under time-varying traffic of the present invention. Please refer to Figure 1 The implementation steps of the method of this embodiment are described in detail as follows.

[0059] Step S1: Construct a fresh food last-mile delivery environment through a grid map.

[0060] Specifically, the logistics environment information is segmented using grids of the same size and shape, and the fresh food logistics last-mile environment is transformed into a two-dimensional grid map. Obstacles (i.e., non-delivery areas) are represented by black grids, and navigable areas are represented by white grids. Figure 2 Fig. shows an example of the grid map.

[0061] In the process of constructing a fresh food last-mile delivery environment through a grid map, it is first necessary to conduct detailed geographical information collection and analysis of the logistics distribution area. This includes surveying and data collection of the road network, buildings, terrain, etc. within the distribution area to accurately reflect the logistics environment characteristics of the area. Then, according to the collected geographical information, the entire distribution area is divided into several grid cells of the same size and shape. The size of the grid cells can be determined according to actual delivery requirements and the accuracy of geographical information, usually being appropriate to clearly represent obstacles and navigable areas.

[0062] In the grid map, black grids are used to represent obstacles, i.e., non-delivery areas. These obstacles may include buildings, large facilities, construction areas, natural terrain obstacles, etc., which will impede the passage of delivery vehicles. By marking the areas where these obstacles are located as black grids, it can visually show the areas that delivery vehicles need to avoid during the delivery process, thus providing an important reference basis for the planning of delivery routes. For example, in an urban delivery environment, some high-rise buildings or large shopping malls may occupy a large area, and delivery vehicles cannot directly pass through these areas, so these obstacles need to be represented by black grids in the grid map.

[0063] White grids are used to represent navigable areas, that is, areas where delivery vehicles can travel normally. These areas include roads, squares, parking lots, etc., which provide passages for delivery vehicles. In the grid map, white grids clearly show the areas where delivery vehicles can travel freely, making the planning of delivery routes more flexible and efficient. For example, in an urban road network, roads of various widths can be represented by white grids, and delivery vehicles can choose appropriate routes for delivery in these navigable areas according to actual traffic conditions and delivery needs.

[0064] Figure 2 An example of a grid map is shown, through which the construction process and representation of the grid map can be more intuitively understood. In the figure, the entire distribution area is divided into neat grid units, with black grids and white grids staggered, clearly showing the distribution of obstacles and navigable areas. Through this grid map representation method, distribution personnel can quickly identify key information in the distribution environment, providing strong support for subsequent distribution route planning and optimization.

[0065] Step S2: Initialize parameters through particle swarm algorithm, where the initialized parameters include: population number m, weight factor O, learning factor C i and maximum speed v m .

[0066] The swarm number m refers to the total number of particles in the particle swarm algorithm, that is, the number of candidate solutions representing the fresh food terminal delivery path.

[0067] The meaning in the scenario of the present invention is: in the terminal delivery of fresh food, each particle corresponds to a possible delivery path solution. The number of groups determines the breadth of the algorithm when searching the delivery path solution space. A larger number of groups means that more delivery path combinations can be considered, thereby increasing the probability of finding the optimal or better delivery path, but it will also increase the amount of calculation and running time. For example, if the number of groups is set to 50, the algorithm will explore 50 different delivery paths at the same time and find the optimal delivery solution from these paths.

[0068] The weight factor O is used to adjust the influence of the previous speed on the current speed during the update process of the particle speed, and its value range is generally between [0,1].

[0069] Its significance in the scenario of the present invention is as follows: In the optimization of the fresh food last-mile delivery route, the weight factor affects the movement trend of particles (delivery routes) in the search space. A larger weight factor makes the particles more inclined to maintain their original movement direction, which is conducive to the particles exploring more extensively in the search space, helping to jump out of local optimal solutions and avoid missing the global optimal solution due to premature entrapment in local optimal solutions. For example, in the face of complex traffic conditions and changing delivery demands, a larger weight factor can help the particles explore more path possibilities. A smaller weight factor makes the particles focus more on local search, which is conducive to accelerating the convergence speed of the algorithm and quickly finding a relatively optimal delivery route. However, if it is too small, the algorithm may fall into a local optimal solution and fail to fully consider the impact of changes in traffic conditions on the delivery route.

[0070] The learning factors are used to adjust the degree of dependence of particles on their own experience and the group experience during the search process. There are usually two learning factors, corresponding to the individual learning factor and the group learning factor respectively.

[0071] Its significance in the scenario of the present invention is as follows: In fresh food last-mile delivery, the individual learning factor affects the degree of dependence of particles on their own historical optimal delivery routes. A larger individual learning factor makes the particles more inclined to adjust the delivery route according to their own experience, which is conducive to the particles conducting detailed searches in local areas and optimizing the details of the delivery route, such as adjusting the delivery order in a certain community or street. The group learning factor affects the degree of learning and reference of particles to the optimal delivery routes of other particles in the group. A larger group learning factor enables the particles to better utilize the wisdom of the group and quickly approach the global optimal solution. Thus, in a complex traffic environment, a better combination of delivery routes can be found, improving the overall delivery efficiency. For example, when a certain particle discovers a more optimal delivery route under specific traffic conditions, other particles can quickly learn and reference this route through a larger group learning factor, thereby enhancing the efficiency of the entire delivery team.

[0072] The maximum speed v m is used to limit the maximum movement speed of particles in the search space, preventing the particles from moving too fast and skipping potential optimal solution regions.

[0073] Its significance in the scenario of the present invention is as follows: In the optimization of the fresh food last-mile delivery route, the maximum speed limits the amplitude of the delivery route adjustment. An overly large amplitude of route adjustment may lead to drastic changes in the delivery route, thus skipping some possible relatively optimal routes. For example, if the maximum speed is set too large, the particle may jump directly from a relatively reasonable delivery route to a completely different route, ignoring some more optimal route options that may exist in between. By reasonably setting the maximum speed, it can be ensured that the particles can fully explore the route space during the search process, while avoiding insufficient search caused by too large an adjustment amplitude, thereby increasing the probability of finding the optimal delivery route.

[0074] By reasonably setting the above parameters, the particle swarm optimization algorithm can be effectively initialized, enabling it to exhibit good performance in the optimization problem of the fresh food end - distribution vehicle routing, finding the optimal distribution route that meets various constraint conditions, reducing the distribution cost, and improving the distribution efficiency and customer satisfaction.

[0075] Step S3: Introduce the K - means algorithm to initialize the particle positions.

[0076] The specific process of introducing the K - means algorithm to initialize the particle positions includes the following steps:

[0077] Step S31: Randomly select k particles from the particle swarm set as the centers of the initial clusters.

[0078] Step S32: Calculate the Euclidean distance from each particle to each cluster center, and divide each particle into the cluster represented by the center point closest to it. The calculation formula for the Euclidean distance is:

[0079]

[0080] where, X i represents the i - th particle, C j represents the j - th cluster center, the value range of i is: [1, n], the value range of j is: [1, k]; X it represents the t - th attribute of the i - th particle, C jt represents the t - th attribute of the j - th cluster center, the value range of t is: [1, m], n represents the number of particles, k represents the number of clusters, m represents the number of attributes. The 2* in the formula means squaring the difference of each attribute, then summing the squared differences of all attributes, and finally taking the square root, that is, calculating the Euclidean distance. This formula is used to calculate the distance between each particle and each cluster center, so as to assign each particle to the cluster represented by the closest cluster center.

[0081] Step S33: Obtain the center points of the clusters from the center points of all sample points in each cluster, and assign particles to the clusters.

[0082] In step S32, by calculating the Euclidean distance from each particle to each cluster center, each particle is assigned to the cluster represented by the cluster center closest to it. Specifically, for each particle i, find the cluster center j that minimizes the Euclidean distance d ij and assign particle i to cluster j.

[0083] Calculate the center points of the clusters:

[0084] For each cluster j, calculate the mean value of all particles in the cluster as the new cluster center point. The specific calculation formula is as follows:

[0085] Wherein:

[0086]

[0087] In the above formula, C j represents the set of all particles in the j-th cluster,

[0088] ∣Cj∣ represents the number of particles in the j-th cluster,

[0089] x ik represents the k-th attribute of the i-th particle,

[0090] C j represents the new center point of the j-th cluster, which is an m-dimensional vector, and the value of each dimension is the value of all particles in the cluster in this dimension.

[0091] Step S34: Repeat the iterations of S32 and step S33, where step S32 reassigns each particle to the nearest cluster center, and then step S33 is executed again to update the cluster center until the stopping condition is met, usually that the center point of the cluster remains unchanged or the set number of iterations is reached. This enables the K-means algorithm to gradually optimize the cluster partitioning, making the particles within each cluster as closely aggregated as possible, while keeping the clusters as separated as possible from each other.

[0092] Particle (data point): In the fresh food last-mile delivery, each particle can represent a delivery task or a delivery node (such as a customer address). The attributes of these particles can include geographical location (longitude and latitude), estimated delivery time window, type of goods, etc.

[0093] Cluster center: The cluster center represents the center point of a delivery area, which can be the gathering point or transfer station of delivery vehicles. The update process of the cluster center aims to find the optimal gathering point, making the delivery tasks within each cluster as concentrated as possible, reducing the driving distance and time of delivery vehicles.

[0094] Step S34 is the iteration of repeating S32 and step S33, wherein:

[0095] Iteration process: The K-means algorithm gradually optimizes the cluster partitioning through the iteration process, making the particles within each cluster as closely aggregated as possible, while keeping the clusters as separated as possible from each other. The specific meaning of this process in the fresh food last-mile delivery is as follows:

[0096] Reassign particles to the nearest cluster center: In each iteration, based on the current cluster centers, recalculate the distances from each delivery task (particle) to each cluster center, and assign each task to the delivery area represented by the nearest cluster center. This step ensures that each delivery task is assigned to the most suitable delivery area, thereby reducing the total length of the delivery route.

[0097] Update the cluster centers: After reassigning the particles, calculate the mean of all particles within each cluster and update the positions of the cluster centers. This step causes the cluster centers to gradually move to the central positions of the particles within the clusters, further optimizing the division of the delivery areas.

[0098] Specific meaning in the actual application scenario

[0099] Optimize the division of delivery areas: Through the K-means algorithm, the entire delivery area can be divided into multiple sub-areas, each represented by a cluster center. This division method can reduce the shuttling of delivery vehicles between different areas and improve the delivery efficiency.

[0100] Reduce delivery time and cost: By optimizing the division of clusters, the tasks within each delivery area become more concentrated, and the delivery vehicles can complete more delivery tasks in a shorter time, thereby reducing the total delivery time and cost.

[0101] Improve customer satisfaction: A more reasonable division of delivery areas can ensure that delivery tasks are completed within the scheduled time window, reduce customer waiting time, and improve customer satisfaction.

[0102] Step S4: Update the particle optimal solution and position, and the specific equation is:

[0103]

[0104] where: v id = {v i1 , v i2 , v i3 , …, v id} T represents the particle velocity. represents the velocity of the d-th dimension in the k-th iteration. x i = (x i1 , x i2 , x i3 , …, x id ) T represents the position of the particle. represents the position of the d-th dimension in the (k + 1)-th iteration. P id represents the individual extreme value that has occurred for each practice of particle i so far. P gdIt represents the global extreme value obtained by all practices of the particle so far, which is the inertia weight. Practice refers to the behavior or practice process of the particle during the search process, such as the movement and position update of the particle. Here, it represents the individual extreme value that appears in each behavior of particle i so far.

[0105] c 1·rand (0,1) and c 2·rand (0,1) is the product of the learning factor and a random number, which is used to increase the randomness of the search.

[0106] Step S5: Update the global optimal solution P gd and the optimal position Generate a sub-optimal solution of the search path.

[0107] Step S6: Initialize the parameters through the artificial bee colony algorithm. The initialized parameters include: the number of food sources SN (Source Number), the control parameter limit, and the maximum number of iterations MCN (Maximum Cycle Number). The specific process of optimizing the end-delivery path by the artificial bee colony algorithm is shown in Figure 3 as shown.

[0108] The number of food sources SN refers to the total number of food source points set during the initialization of the algorithm. In the artificial bee colony algorithm, each food source point represents a potential solution, that is, a possible candidate solution for the delivery path. The value of SN affects the search width of the algorithm. A larger SN value means that the algorithm will consider more candidate solutions at the beginning of the search, which may increase the probability of finding the global optimal solution, but also increase the computational cost.

[0109] The control parameter limit is usually used to determine how many unsuccessful searches a bee can perform before abandoning a certain food source point. This parameter is related to the search behavior of the bee, especially the number of iterations of the onlooker bee performing local search around the food source point. If the onlooker bee fails to find a better solution after limit searches, then this food source point may be abandoned, and the corresponding bee (onlooker bee) may turn into a scout bee to search for a new food source point.

[0110] The maximum number of iterations MCN is the upper limit of the total number of iterations for the algorithm to run. This parameter determines the search depth of the algorithm, that is, how many iterations the algorithm can perform before stopping the search. The value of MCN needs to be set according to the complexity of the problem and the requirements of the solution accuracy. A larger MCN value can give the algorithm more time to explore the search space, which may increase the chance of finding a better solution, but also increase the running time of the algorithm.

[0111] In the artificial bee colony algorithm, the reasonable setting of these parameters is crucial for the performance of the algorithm. Together, they determine the search strategy and efficiency of the algorithm, affecting the convergence speed and solution quality when the algorithm solves optimization problems. Usually, the values of these parameters need to be determined through experiments and adjustments to adapt to specific problems and computing environments.

[0112] In step S6, in the initial stage of the search process of the artificial bee colony algorithm, that is, the employed bee stage, the formula for each employed bee to find a new nectar source is:

[0113] V ij = X ij + Ψ ij (X ij - X kj )

[0114] where: k takes values from {1, 2, …, SN}, j takes values from {1, 2, …, D}, and k ≠ i; Ψ ij takes values in [-1, 1].

[0115] After determining the location of the new nectar source, that is, finding a new solution, calculate the fit i value of the new solution and compare it with the original solution, that is, compare it with the sub-optimal solution obtained in step S4: if the new solution is greater than the original solution, replace the old solution with the new solution, otherwise continue to retain the original solution.

[0116] SN: The number of nectar sources, representing the total number of nectar source points set during the algorithm initialization. Each nectar source point represents a potential solution, that is, a possible candidate solution for the delivery route.

[0117] D: The dimension of the solution, representing the number of attributes in the delivery route solution. In the optimization of the fresh food last-mile delivery vehicle route, this includes geographical location (longitude and latitude), expected delivery time window, cargo type, etc.

[0118] X ij : Represents the position of the i-th particle in the j-th dimension. In the optimization of the delivery route, this represents the coordinate of the i-th delivery task in the j-th dimension (such as longitude or latitude).

[0119] V ij : Represents the velocity of the i-th particle in the j-th dimension. In the optimization of the delivery route, this represents the velocity or change rate of the i-th delivery task in the j-th dimension.

[0120] Ψ ij : This is a random number, usually in the range of [-1, 1], used to simulate the dancing behavior of bees near the nectar source and increase the randomness of the search.

[0121] X kj:Represents the position of the k-th nectar source in the j-th dimension. In the optimization of the delivery route, this represents the coordinates of the k-th nectar source (such as a distribution center or customer address) in the j-th dimension.

[0122] i: Takes values from {1, 2, …, SN}, representing the index of the nectar source point.

[0123] j: Takes values from {1, 2, …, D}, representing the dimension index of the solution.

[0124] k: Takes values within a specific range, which depends on the design of the algorithm and is related to the local search of the nectar source point.

[0125] fit i Represents the fitness value of the new solution, which is used to evaluate the quality of the new solution. In the optimization of the fresh food last-mile delivery vehicle route, the fitness value represents evaluation indicators such as the total distance, total time, and customer satisfaction of the delivery route. The fitness value is used to compare the advantages and disadvantages of the new solution and the original solution.

[0126] In the artificial bee colony algorithm, the formula for the employed bees to find new nectar sources usually involves a small perturbation of the current nectar source position to explore the nearby solution space. The specific formula is as follows:

[0127] x ij new = x ij old + φ ij

[0128] x ij new is the position of the new nectar source (new solution),

[0129] x ij old is the position of the current nectar source (old solution),

[0130] φ ij is a perturbation term, usually a random number, used to simulate the dancing behavior of bees near the nectar source.

[0131] After calculating the fit i value of the new solution, it is compared with the fitness value of the original solution. If the fitness value of the new solution is better than that of the original solution, that is, the new solution represents a better delivery route, then the new solution will replace the old solution and become the new nectar source position. Otherwise, the original solution is retained.

[0132] For the artificial bee colony algorithm, the quality of the nectar source is the better the larger it is, that is, the larger the fit i value, the better the quality of the solution. Among them, the calculation formula of the fit i value is:

[0133]

[0134] fi: This is the fitness value of the nectar source, usually represented as a numerical value, used to evaluate the quality of the nectar source (solution). In an optimization problem, this value may be the value of the objective function. For example, in a minimization problem, fi may represent the total length or total cost of a path.

[0135] abs: This is the absolute value function, representing the absolute value of fi. In mathematics, the absolute value represents the magnitude of a number regardless of its sign, and |X| represents the absolute value of X.

[0136] When evaluating a new nectar source, a greedy selection method is adopted. The specific formula is:

[0137]

[0138] V i : Represents the position of the i-th nectar source, that is, a new potential solution.

[0139] fit(V i ): Represents the fitness value of the new nectar source V i , used to evaluate the quality of this nectar source. The larger the fitness value, the better the nectar source.

[0140] X i : Represents the position of the current nectar source, that is, the current solution.

[0141] fit(X i ): Represents the fitness value of the current nectar source X i , used to evaluate the quality of the current nectar source.

[0142] Among them, during the search process, tabu search is introduced to avoid repeated searches. By using a tabu list to record the local optimal points that have been reached, in the next search, the information in the tabu list is used to not search or selectively search these points. These points include the sub-optimal solutions calculated by the particle algorithm.

[0143] Step S7: Use the position X_1 of the global optimal solution output in Step S4 as the nectar source position, and search for the global optimal solution again through the artificial bee colony algorithm.

[0144] Step S8: Update the position of the nectar source, that is, update the optimal solution.

[0145] In Step S8, after all employed bees complete the initial search stage of the search, the employed bees dance in the recruitment area to transmit the position information of the bee source to the follower bees. The follower bees will select each solution and calculate the probability of selecting each solution through a formula. The specific calculation formula is as follows:

[0146]

[0147] Pi : It represents the probability of selecting the \(i\)-th solution.

[0148] fit i : It represents the fitness value of the \(i\)-th solution. The fitness value is used to evaluate the quality of the solution and is usually related to the objective function of the problem. In an optimization problem, the higher the fitness value, the better the solution.

[0149] FN: It represents the total number of nectar sources (solutions). In the artificial bee colony algorithm, each nectar source represents a potential solution.

[0150] It represents the sum of the fitness values of all nectar sources. This sum is used to normalize the fitness value of each nectar source to ensure that the sum of all selection probabilities is 1.

[0151] The probability of each solution being selected is proportional to its fitness value. The higher the fitness value of the solution, the greater the probability of being selected. This selection mechanism ensures that the algorithm is more inclined to select better solutions, thereby gradually improving the quality of the solutions found by the entire bee colony.

[0152] In practical applications, this probability-based selection mechanism can help the algorithm jump out of local optimal solutions and increase the chance of finding the global optimal solution. By simulating the social behavior of bees, the artificial bee colony algorithm can effectively search the solution space and find high-quality solutions.

[0153] Next, a random number is generated in the interval [-1, 1]. If the value of \(P\) i is greater than this value, the onlooker bee calculates a new solution and verifies the fit value of the new solution. If the fit value of the new solution is greater than the original fit value, the new solution is retained; otherwise, the original solution is retained.

[0154] Step S9: Through the algorithm loop calculation, the global optimal solution is searched, that is, the navigation path with the shortest distance and the optimal smoothness. Finally, after all onlooker bees complete the search, those solutions that have not been updated after \(limit\) times of loops are discarded, that is, these solutions fall into local optima, and the corresponding onlooker bees turn into scout bees to generate new nectar sources to replace the original ones. Then return to the employed bee search process, start repeating the loop, and finally find the optimal solution through loop search.

[0155] Figure 4 shows the principle of an embodiment of the fresh food end - distribution vehicle path optimization system under time - varying traffic of the present invention. Please refer to Figure 4 As shown, the system of this embodiment includes: a fresh food end - distribution environment construction module, a particle swarm parameter initialization module, a K - means particle position initialization module, a particle optimal solution and position update module, a sub - optimal solution generation module for the search path, an artificial ant colony parameter initialization module, an artificial ant colony global optimal solution search module, a nectar source position update module, and an optimal solution search module.

[0156] The fresh food last-mile delivery environment construction module is used to construct the fresh food last-mile delivery environment through a grid map. For the specific processing of this module, please refer to step S1 in the foregoing method embodiment, and details are not described herein again.

[0157] The particle swarm parameter initialization module is used to initialize the parameters of the particle swarm algorithm. Among them, the initialized parameters include: the number of populations m, the weight factor O, and the learning factor C j and the maximum velocity v m . For the specific processing of this module, please refer to step S2 in the foregoing method embodiment, and details are not described herein again.

[0158] The K-means particle position initialization module is used to initialize the particle positions by introducing the K-means algorithm. For the specific processing of this module, please refer to step S3 in the foregoing method embodiment, and details are not described herein again.

[0159] The particle optimal solution and position update module is used to update the particle optimal solution and position. For the specific processing of this module, please refer to step S4 in the foregoing method embodiment, and details are not described herein again.

[0160] The search path sub-optimal solution generation module is used to update the global optimal solution and the optimal position, and generate the search path sub-optimal solution. For the specific processing of this module, please refer to step S5 in the foregoing method embodiment, and details are not described herein again.

[0161] The artificial ant colony parameter initialization module is used to initialize the parameters through the artificial bee colony algorithm. The initialized parameters include: the number of nectar sources SN (Source Number), the control parameter limit, and the maximum number of iterations MCN (Maximum CycleNumber). For the specific processing of this module, please refer to step S6 in the foregoing method embodiment, and details are not described herein again.

[0162] The artificial ant colony global optimal solution search module searches for the global optimal solution again through the artificial bee colony algorithm for the position X_1 of the global optimal solution output by the particle optimal solution and position update module. For the specific processing of this module, please refer to step S7 in the foregoing method embodiment, and details are not described herein again.

[0163] The nectar source position update module is used to update the position of the nectar source, that is, to update the optimal solution. For the specific processing of this module, please refer to step S8 in the foregoing method embodiment, and details are not described herein again.

[0164] The optimal solution search module is used to search for the global optimal solution. For the specific processing of this module, please refer to step S9 in the foregoing method embodiment, and details are not described herein again.

[0165] The present invention also discloses a computer system for optimizing the vehicle routing of fresh food end - distribution under time - varying traffic, including a memory, a processor, and program instructions stored in the memory and executable by the processor, wherein the processor executes the program instructions to implement the steps of the embodiment of the method for optimizing the vehicle routing of fresh food end - distribution under time - varying traffic as described above.

[0166] The present invention also discloses a computer - readable storage medium for optimizing the vehicle routing of fresh food end - distribution under time - varying traffic, which stores program instructions executable by a processor to implement the steps of the embodiment of the method for optimizing the vehicle routing of fresh food end - distribution under time - varying traffic as described above.

[0167] The present invention also discloses a computer program product, including a computer program, which when executed by a processor implements the steps of the embodiment of the method for optimizing the vehicle routing of fresh food end - distribution under time - varying traffic as described above.

[0168] Although the above - described methods are illustrated and described as a series of acts for simplicity of explanation, it should be understood and appreciated that these methods are not limited by the order of the acts, because according to one or more embodiments, some acts may occur in a different order and / or concurrently with other acts not illustrated and described herein but understood by those skilled in the art.

[0169] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability of hardware and software, the various illustrative components, blocks, modules, circuits, and steps are described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

[0170] The various illustrative logical blocks, modules, and circuits described in connection with the embodiments disclosed herein can be implemented using a general - purpose processor, a digital signal processor (DSP), an application - specific integrated circuit (ASIC), a field - programmable gate array (FPGA) or other programmable logic device, discrete gates or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general - purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, micro - controller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors cooperating with a DSP core, or any other such configuration.

[0171] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read from, and write to, the storage medium. In an alternative, the storage medium may be integrated into the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside as discrete components in a user terminal.

[0172] In one or more exemplary embodiments, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions may be stored on or transmitted via a computer-readable medium as one or more instructions or code. The computer-readable medium includes both a computer storage medium and a communication medium including any medium that facilitates transfer of a computer program from one place to another. The storage medium may be any available medium that can be accessed by a computer. By way of example and not limitation, such computer-readable medium can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a web site, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disk generally reproduces data magnetically, while disc uses lasers optically to reproduce data. Combinations of the above should also be included within the scope of computer-readable medium.

[0173] The foregoing description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for optimizing the path of fresh food terminal delivery vehicles under time-varying traffic, characterized in that: Methods include: Step S1: construct the fresh food terminal delivery environment through a grid map; Step S2: Initializing parameters by particle swarm algorithm, wherein the initialized parameters include: swarm number, weight factor, learning factor and maximum speed; Step S3: Introduce K-means algorithm to initialize the particle position; Step S4: Update the optimal solution and position of particles; Step S5: Update the global optimal solution and the optimal position, and generate a suboptimal solution for the search path; Step S6: Initializing parameters through the artificial bee colony algorithm, the initialized parameters include: the number of nectar sources, control parameters, and the maximum number of iterations; Step S7: The position X_1 of the global optimal solution outputted in step S4 is searched for the global optimal solution again through the artificial bee colony algorithm; Step S8: Update the location of the honey source, i.e. update the optimal solution; Step S9: After cyclic calculation, the global optimal solution is searched, that is, the navigation path with the shortest distance and the best smoothness.

2. The method for optimizing the path of fresh food terminal delivery vehicles under time-varying traffic according to claim 1 is characterized in that: Step S3 further comprises: Step S31: randomly select k particles from the particle swarm set as the center of the initial cluster; Step S32: Calculate the Euclidean distance from each particle to the center of each cluster, and divide each particle into the cluster represented by the center point closest to it; Step S33: obtaining the center point of the cluster from the center points of all sample points in each cluster; Step S34: Repeat the iterations of S32 and S33 until the center point of the cluster remains unchanged or the set number of iterations is reached.

3. The method for optimizing the path of fresh food terminal delivery vehicles under time-varying traffic according to claim 2 is characterized in that: The calculation formula of the Euclidean distance in step S32 is: Among them, X i represents the i-th particle, C j represents the nth cluster center, the value range of i is: [1, n], the value range of j is: [1, k]; X it represents the tth attribute of the i-th particle, C jt represents the tth attribute of the jth cluster center, the value range of t is: [1, m], n represents the number of particles, k represents the number of clusters, and m represents the number of attributes.

4. The method for optimizing the path of fresh food terminal delivery vehicles under time-varying traffic according to claim 1 is characterized in that: The optimal solution and position of the updated particles in step S4 are as follows: Where: v id = {v i1 ,v i2 ,v i3 ,...,v id } T represents the particle speed, represents the velocity of the dth dimension in the kth iteration, x i =(x i1 ,x i2 ,x i3 ,…,x id ) T represents the position of the particle, represents the position of the dth dimension in the k+1th iteration, P id represents the individual extreme value of particle i in each practice so far, P gd represents the global extreme value of all particle practices so far, i.e., the inertia weight, c 1·rand (0,1) and c 2·rand (0,1) is the product of the learning factor and the random number.

5. The method for optimizing the path of fresh food terminal delivery vehicles under time-varying traffic according to claim 1 is characterized in that: In step S8, after all employed bees complete the initial search phase, the employed bees dance in the recruitment area to pass the location information of the bee source to the follower bees. The follower bees will select each solution and calculate the probability of selecting each solution through the formula. The specific calculation formula is as follows: P i represents the probability of selecting the i-th solution, fit i represents the fitness value of the i-th solution, FN represents the total number of nectar sources. Represents the sum of all nectar source fitness values.

6. The method for optimizing the path of fresh food terminal delivery vehicles under time-varying traffic conditions according to claim 1 is characterized in that: In step S9, until all follower peaks have completed the search, those solutions that have not been updated after the control parameter cycles are discarded, that is, these solutions are trapped in the local optimum, and their corresponding follower bees are transformed into scout bees, generating new bee sources to replace the original bee sources, and then returning to the employed bee search process, starting a repeated cycle, and finally finding the optimal solution through a cyclic search.

7. A route optimization system for fresh food terminal delivery vehicles under time-varying traffic, characterized in that: The system includes: Fresh food terminal delivery environment construction module, used to construct the fresh food terminal delivery environment through raster map; The particle swarm parameter initialization module is used to initialize the parameters of the particle swarm algorithm, where the initialization parameters include: the number of swarms, weight factors, learning factors and maximum speed; K-means particle position initialization module, used to introduce K-means algorithm to initialize particle positions; Particle optimal solution and position update module, used to update the particle optimal solution and position; A search path suboptimal solution generation module, used to update the global optimal solution and the optimal position, and generate a search path suboptimal solution; The artificial ant colony parameter initialization module is used to initialize parameters through the artificial bee colony algorithm. The initialized parameters include: the number of nectar sources SN, control parameters, and the maximum number of iterations; The artificial ant colony global optimal solution search module is used to search for the global optimal solution again through the artificial bee colony algorithm based on the particle optimal solution and the position X_1 of the global optimal solution output by the position update module; The honey source location update module is used to update the location of the honey source, that is, to update the optimal solution; The optimal solution search module is used to search for the global optimal solution.

8. A computer system for optimizing the path of fresh food terminal delivery vehicles under time-varying traffic, characterized in that: The method comprises a memory, a processor and program instructions stored in the memory and executable by the processor, wherein the processor executes the program instructions to implement the steps of the method for optimizing the path of fresh food terminal delivery vehicles under time-varying traffic as described in any one of claims 1 to 6.

9. A computer-readable storage medium for optimizing the path of fresh food terminal delivery vehicles under time-varying traffic, characterized in that: It stores program instructions executable by a processor to implement the steps of the method for optimizing the path of fresh food terminal delivery vehicles under time-varying traffic as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for optimizing the path of fresh food terminal delivery vehicles under time-varying traffic conditions as described in any one of claims 1 to 6 are implemented.