Logistics distribution path generation method based on fishing algorithm
Through the logistics distribution path generation method based on the fishing algorithm, the existing algorithm's slow convergence speed and easy to fall into local optimality are solved, and the global optimal path is quickly found, reducing logistics costs and improving efficiency.
Patent Information
- Application Number
- CN202411623843.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-14
AI Technical Summary
The existing logistics distribution path generation algorithm converges slowly when searching for optimal solutions, and is prone to falling into local optimal solutions, making it difficult to meet real-time requirements.
The logistics distribution path generation method based on fishing algorithm is adopted, and the global optimal distribution path is quickly found by establishing mathematical models and optimizing the path using fishing algorithm.
Generate global optimal logistics distribution paths in a short time, reduce logistics distribution distance, time and energy consumption, and improve logistics distribution efficiency.
Smart Images

Figure CN119599558A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of logistics distribution, and in particular relates to a logistics distribution path generation method based on a fishing algorithm. Background Art
[0002] The logistics distribution path refers to the route that the goods take from the distribution center (or warehouse) through a series of transportation activities to finally deliver the goods to the customer in order to meet the customer's order needs. It is one of the key links in the logistics distribution process. Through reasonable path planning and optimization methods and the application of advanced technologies, logistics efficiency can be significantly improved, logistics costs can be reduced, and customer satisfaction can be improved. At the same time, with the continuous advancement of technology and the enhancement of environmental awareness, the optimization of logistics distribution paths will also pay more attention to green environmental protection and sustainable development.
[0003] In the prior art, the intelligent algorithms commonly used to generate logistics distribution routes include genetic algorithms, ant colony algorithms, particle swarm algorithms, etc. In the process of searching for the optimal solution, genetic algorithms and ant colony algorithms often require a large number of iterative calculations, and the convergence speed is slow, which means that a long computing time is required to obtain a satisfactory result. It is not suitable for logistics distribution scenarios with high real-time requirements. The particle swarm algorithm is prone to fall into the local optimal solution during the search process, resulting in the inability to find the global optimal distribution route. This is because the intelligent algorithm may be affected by the initial solution during the search process, or fall into the local optimal area during the search process and cannot jump out. Therefore, it is necessary to improve the prior art. Summary of the invention
[0004] The present invention proposes a logistics distribution path generation method based on a fishing algorithm, which finds the optimal logistics distribution path in a relatively short time through the fishing algorithm, so as to reduce the cost input of logistics distribution distance, time, energy consumption, etc. in practical applications, and improve the logistics distribution efficiency.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] A method for generating a logistics distribution path based on a fishing algorithm comprises the following steps:
[0007] S1: Establish a mathematical model for the logistics distribution path problem, as follows:
[0008] Assume that the logistics distribution path problem has M distribution points, and a feasible distribution path is represented by a vector θ = (p 1 p 2 …p k …p M ), where the integer p k ∈[1,M], indicating the pth kThe delivery point is located at the kth position in the delivery route;
[0009] Let T i (p M ,p M+1 )=T i (p M ,p 1 ), then the objective function of the logistics distribution path problem is:
[0010]
[0011] Among them, T i (p k ,p k+1 ) represents the distribution point p k Arrival at delivery point k+1 The required value of the i-th cost indicator; W i Represents the weight coefficient of the i-th cost indicator, which must satisfy N represents the number of cost indicators to be considered;
[0012] Therefore, the optimal solution to the logistics distribution routing problem is min(C(θ));
[0013] S2: Determine the cost index value T i and weight coefficient W i ;
[0014] S3: According to the determined cost index value T i and weight coefficient W i Calculate the distribution cost matrix Q M ;
[0015]
[0016] S4: Randomly generate a set of feasible delivery paths as the initial positions of the fishermen in the fishing algorithm, and set the corresponding parameter values of the fishing algorithm according to the scale, characteristics and constraints of the problem;
[0017] S5: According to the principle of the fishing algorithm, at the beginning of the iteration, each fisherman casts a fishing net at the current location; then, using the distribution cost matrix Q M Or the objective function calculates the fitness values of all individual fishermen; then, the positions and states of the fishermen are updated, and the fishermen that do not meet the update conditions are randomly initialized; finally, the position of the optimal individual fisherman is obtained;
[0018] S6: The algorithm ends and outputs the optimal delivery path sequence and the corresponding total cost value based on the position of the optimal fisherman individual.
[0019] Furthermore, in step S1, the cost indicators include delivery distance, delivery time, and delivery energy consumption.
[0020] Furthermore, in step S2, the cost index can be selected according to the actual situation, or selected from the cost items of the current historical data, so as to determine the corresponding cost index value T i ; Then, weigh and determine the weights W corresponding to the selected cost indicators according to the actual situation including specific requirements or priorities. i .
[0021] Furthermore, in step S2, for the N selected cost indicators, if they involve different measurement units or have large differences in magnitude, their values T need to be adjusted. i Normalization is performed; if only a single cost indicator is considered, no processing is required.
[0022] Furthermore, in step S3, in practical applications, T i (k,k+1) and T i The values of (k+1, k) can be the same or different. In addition, if the delay factors including the time spent on loading and unloading or handover at the distribution point are not considered, T i (k,k)=0, then we can get:
[0023]
[0024] Furthermore, in step S5, the position and status of the fisherman are updated by using a moving search or a shrinking search.
[0025] Due to the adoption of the above technical solution, the present invention has the following beneficial effects:
[0026] 1. The present invention establishes a mathematical model for the logistics distribution path problem, which can simultaneously consider multiple cost-related indicator values that need to be optimized, namely cost indicators, such as distribution distance, distribution time or distribution energy consumption, and can adjust the relative importance or importance between different cost indicators by setting weight coefficients, which is conducive to the subsequent generation of the optimal distribution path.
[0027] 2. The present invention adopts the fishing algorithm to optimize the logistics distribution path, which has the characteristics of fast convergence speed, good robustness, and not easy to fall into local optimality. It can generate the globally optimal feasible path sequence in a short time and effectively realize the rapid generation of logistics distribution paths.
[0028] 3. The present invention uses the total cost as the criterion for judging the quality of the logistics distribution path. At the end of the optimization, in addition to obtaining the optimal logistics distribution path, the corresponding cost value for comparison can also be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flow chart of the method for generating a logistics distribution path provided by the present invention;
[0030] Figure 2 is a convergence curve diagram of the fishing algorithm in the present invention; DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] like Figure 1 As shown, a method for generating a logistics distribution path based on a fishing algorithm includes steps S1-S6.
[0033] S1: Establish a mathematical model for the logistics distribution path problem, as follows:
[0034] Assume that the logistics distribution path problem has M distribution points, and a feasible distribution path is represented by a vector θ = (p 1 p 2 …p k …p M ), where the integer p k ∈[1,M], indicating the pth k The delivery point is located at the kth position in the delivery route.
[0035] Let T i (p M ,p M+1 )=T i (p M ,p 1 ), then the objective function of the logistics distribution path problem is:
[0036]
[0037] Among them, T i (p k ,p k+1 ) represents the distribution point p k Arrival at delivery point k+1 The required value of the i-th cost indicator; W i Represents the weight coefficient of the i-th cost indicator, which must satisfy N represents the number of cost indicators to be considered.
[0038] Cost indicators are cost factors to be considered in distribution, including distribution distance, distribution time, and distribution energy consumption. In practical applications, it is generally necessary to normalize different cost indicators. The weight coefficient of the cost indicator is the weight value corresponding to the cost indicator, which indicates the relative importance of the indicator.
[0039] Therefore, the optimal solution to the logistics distribution path problem is min(C(θ)), that is, finding the one with the lowest total cost among all feasible distribution paths as the optimal solution.
[0040] S2: Determine the cost index value T i and weight coefficient W i The cost index can be selected according to the actual situation, or selected from the cost items of the current historical data, so as to determine the corresponding cost index value T i For the N selected cost indicators, if they involve different measurement units or have large differences in magnitude, their values need to be adjusted. i Normalization is performed. If only a single cost indicator is considered, no processing is required. Afterwards, the weights W corresponding to the selected cost indicators are determined in turn according to the actual situation including specific requirements or priorities. i .
[0041] S3: According to the determined cost index value T i and weight coefficient W i Calculate the distribution cost matrix Q M , the cost matrix Q M The calculation method is as follows:
[0042]
[0043] In practical applications, T i (k,k+1) and T i The values of (k+1, k) can be the same or different. In addition, if the delay factors including the time spent on loading and unloading or handover at the distribution point are not considered, T i (k,k)=0, then we can get:
[0044]
[0045] S4: Randomly generate a set of feasible delivery paths as the initial positions of individual fishermen in the fishing algorithm, and set the corresponding parameter values of the fishing algorithm according to the scale, characteristics and constraints of the problem. Randomly generate a set of feasible delivery paths by generating random permutations of M delivery points through a random function, and the number of random permutations generated is the same as the number of individual fishermen. That is, one random permutation corresponds to the initial position of one fisherman.
[0046] S5: According to the principle of the fishing algorithm, at the beginning of the iteration, each fisherman casts a fishing net at the current location; then, using the distribution cost matrix Q M Or the objective function calculates the fitness value of all fishermen; then, the position and state of the fishermen are updated, and the fishermen who do not meet the update conditions are randomly initialized; finally, the position of the optimal fisherman is obtained. Specifically, the position and state of the fishermen are updated by moving search or shrinking search.
[0047] S6: The algorithm ends and outputs the optimal delivery path sequence and the corresponding total cost value based on the position of the optimal fisherman individual.
[0048] Example
[0049] The present invention will be further described below by means of specific examples.
[0050] S1: Establish a mathematical model for the logistics distribution path problem.
[0051] S2: Determine the cost index value T i and weight coefficient W i In this example, only the delivery time is selected as the cost indicator, so its corresponding weight is equal to 1.
[0052] S3: Calculate the cost matrix Q M , since delivery time is selected as the cost indicator in S2, the weight is 1, so Q M =QW=Q. Assuming that the delay factor of loading and unloading points is not taken into account, the distribution cost matrix including 8 distribution points is calculated based on the historical distribution time data:
[0053]
[0054] S4: Randomly generate a set of feasible distribution paths, and set the corresponding parameter values of the fishing algorithm according to the scale, characteristics and constraints of the problem. In this example, the logistics distribution path contains 8 distribution points, so the position of the jth fisherman can be represented by the vector Initialize the algorithm bulletin board and set the basic parameters of the fishing algorithm to: number of fishermen 3, net radius 5, number of net casting 6, shrinkage coefficient 0.8, invalid shrinkage threshold 3, and number of iterations 100. Then, the randomly generated initial position of the fisherman can be obtained by θ 1 ,θ 2 and θ 3 express.
[0055] S5: Obtain the location of the optimal fisherman based on the fishing algorithm. According to the cost data and algorithm parameters in step S3 and step S4, the optimal logistics distribution path is found through the fishing algorithm. The specific method is as follows:
[0056] (1) All fishermen must be at their current position θ j Cast the fishing net 6 times and get 6 different casting points. Specifically, the casting point set of the jth fisherman is represented as in, represents the current position of the jth fisherman, that is, Each casting point is Any κ in j The number of pairs is randomly exchanged, κ j is the current radius of the jth fisherman’s net.
[0057] (2) Using the distribution cost matrix Q M Or the objective function calculates the fitness values of all individual fishermen, including the fitness values corresponding to the fishermen's positions and the points where they cast their nets. If the current optimal value of the group is better than the bulletin board, the bulletin board is updated.
[0058] The specific calculation method of fitness value is as follows. Substitute it into the objective function of the aforementioned logistics distribution path problem In
[0059]
[0060] So there is
[0061]
[0062] Right now
[0063]
[0064] As described in step S2, in this example, only the delivery time is selected as the cost indicator, that is, N = 1, so the above formula can be simplified to
[0065]
[0066] The distribution cost matrix Q in step S3 M Substituting the value of
[0067]
[0068] Therefore, point The corresponding fitness value is 51.6149.
[0069] (3) Each individual fisherman needs to be judged according to the following conditions and perform the corresponding update operation. Specifically, if Then the jth fisherman performs mobile search, that is, updates the current position of the jth fisherman to θ j ', and reset its invalid contraction times to zero. If the number of invalid contractions is less than the invalid contraction threshold, the jth fisherman performs contraction search, that is, the number of invalid contractions of the jth fisherman is increased by 1, and then the current net radius is multiplied by the contraction coefficient and then rounded down, and the obtained number is used as the current net radius value of the fisherman, that is, let If the above two conditions are not met, the jth fisherman is randomly initialized.
[0070] (4) If the number of iterations does not reach 100, go to (1); otherwise, go to step S6.
[0071] S6: According to the position of the optimal fisherman, the optimal logistics distribution path sequence and the corresponding total cost value recorded in the bulletin board are output. Based on the data and parameter settings of the above embodiment, the fishing algorithm is run once, and the optimal logistics distribution sequence obtained is (1 6 7 5 8 4 2 3), and the corresponding cost is 29.88491.
[0072] In addition, to further verify the reliability and feasibility of the present invention, the algorithm was run independently for 50 times in a row. The optimal sequence obtained each time was consistent with the result of the above single run, and the average cost obtained from 50 runs was also 29.88491; the average fitness convergence curve corresponding to the 50 runs is shown in Figure 2 shown.
[0073] The present invention establishes a mathematical model for the logistics distribution path problem, which can simultaneously consider multiple cost-related index values that need to be optimized, namely cost indexes, such as distribution distance, distribution time or distribution energy consumption, and can adjust the relative importance or importance between different cost indexes by setting weight coefficients, which is conducive to the subsequent generation of the optimal distribution path. The present invention uses a fishing algorithm to optimize the logistics distribution path, which has the characteristics of fast convergence speed, good robustness, and not easy to fall into local optimality. It can generate a globally optimal feasible path sequence in a short time and effectively realize the rapid generation of logistics distribution paths. The present invention uses the total cost as the criterion for judging the quality of the logistics distribution path. At the end of the optimization, in addition to obtaining the optimal logistics distribution path, the corresponding cost value for comparison can also be obtained.
[0074] The above description is a detailed description of the preferred feasible embodiments of the present invention, but the embodiments are not intended to limit the scope of the patent application of the present invention. All equivalent changes or modified changes completed under the technical spirit suggested by the present invention should fall within the patent scope covered by the present invention.
Claims
1. A method for generating a logistics distribution path based on a fishing algorithm, characterized in that: The following steps are involved: S1: Establish a mathematical model for the logistics distribution path problem, as follows: Assume that the logistics distribution path problem has M distribution points, and a feasible distribution path is represented by a vector θ = (p1 p2…p k …p M ), where the integer p k ∈[1,M], indicating the pth k The delivery point is located at the kth position in the delivery route; Let T i (p M ,p M+1 )=T i (p M ,p1), then the objective function of the logistics distribution path problem is: Among them, T i (p k ,p k+1 ) represents the distribution point p k Arrival at delivery point k+1 The required value of the i-th cost indicator; W i Represents the weight coefficient of the i-th cost indicator, which must satisfy N represents the number of cost indicators to be considered; Therefore, the optimal solution to the logistics distribution routing problem is min(C(θ)); S2: Determine the cost index value T i and weight coefficient W i ; S3: According to the determined cost index value T i and weight coefficient W i Calculate the distribution cost matrix Q M ; S4: Randomly generate a set of feasible delivery paths as the initial positions of the fishermen in the fishing algorithm, and set the corresponding parameter values of the fishing algorithm according to the scale, characteristics and constraints of the problem; S5: According to the principle of the fishing algorithm, at the beginning of the iteration, each fisherman casts a fishing net at the current location; then, using the distribution cost matrix Q M Or the objective function calculates the fitness values of all individual fishermen; then, the positions and states of the fishermen are updated, and the fishermen that do not meet the update conditions are randomly initialized; finally, the position of the optimal individual fisherman is obtained; S6: The algorithm ends and outputs the optimal delivery path sequence and the corresponding total cost value based on the position of the optimal fisherman individual.
2. According to the method for generating a logistics distribution path based on a fishing algorithm according to claim 1, it is characterized in that: In step S1, the cost indicators include delivery distance, delivery time, and delivery energy consumption.
3. The method for generating a logistics distribution path based on a fishing algorithm according to claim 1, characterized in that: In step S2, the cost index can be selected according to the actual situation, or selected from the cost items of the current historical data, so as to determine the corresponding cost index value T i ; Then, weigh and determine the weights W corresponding to the selected cost indicators according to the actual situation including specific requirements or priorities. i .
4. The method for generating a logistics distribution path based on a fishing algorithm according to claim 3 is characterized in that: In step S2, for the N selected cost indicators, if they involve different measurement units or have large differences in magnitude, their values T i Perform normalization processing; If only a single cost indicator is considered, no processing is required.
5. The method for generating a logistics distribution path based on a fishing algorithm according to claim 1, characterized in that: In step S3, in actual application, T i (k,k+1) and T i The values of (k+1, k) can be the same or different. In addition, if the delay factors including the time spent on loading and unloading or handover at the distribution point are not considered, T i (k,k)=0, then we can get:
6. The method for generating a logistics distribution path based on a fishing algorithm according to claim 1, characterized in that: In step S5, the fisherman's position and status are updated using a mobile search or a shrink search.
Citation Information
Patent Citations
Logistics distribution vehicle path optimization method based on discrete bat algorithm
CN110472792A
Optimal scheduling method for emergency material logistics distribution
CN113743874A
Logistics path planning method based on improved hybrid ant colony algorithm
CN115759917A
Material distribution path optimization method and system based on improved whale optimization algorithm
CN116579513A