Open type vehicle path optimization method based on protozoa algorithm
Optimizing the open vehicle path through discrete algorithms based on protozoa algorithms, the problems of low distribution efficiency and high cost in the existing technology are solved, and more efficient, reliable and environmentally friendly logistics distribution is achieved.
Patent Information
- Application Number
- CN202510087587.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-13
AI Technical Summary
The existing technology is difficult to effectively optimize the open vehicle path, resulting in low distribution efficiency and high cost, and cannot meet the needs of complex distribution networks and variable customer.
A discrete algorithm based on protozoa algorithm is adopted, through integer encoding and population initialization, an objective function is established to minimize the total driving distance of the vehicle, and the path is optimized through cross-operation and local search strategies.
It improves distribution efficiency, reduces transportation costs, shortens transportation time, enhances service reliability and customer satisfaction, and reduces carbon emissions, making it environmentally friendly.
Smart Images

Figure CN119990960A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of logistics distribution scheme design, in particular to an open vehicle path optimization method based on a protozoan algorithm. Background Art
[0002] At present, the development of the logistics industry is undergoing unprecedented changes. With the regional agglomeration of product production and sales, logistics demand presents the characteristics of small batches and high frequency. The growth of market demand and the improvement of quality requirements have gradually exposed the problems existing in the logistics industry. The complexity of the distribution environment, the dispersion of freight points, the complexity of the path network, and the uneven distribution of distribution points have put forward higher requirements for the optimization of logistics distribution paths. Unlike traditional closed paths, open paths allow vehicles to not have to return to the starting point after completing the distribution task, which is more common in practical applications, such as outsourced distribution, shuttle services, etc. Therefore, open vehicle path planning is of great significance in logistics distribution. Through reasonable open path planning, the empty driving rate of vehicles can be reduced, the vehicle utilization rate can be improved, and thus the transportation cost can be reduced. At the same time, it also helps to improve customer satisfaction because it can meet customers' distribution needs more flexibly, especially in emergency distribution and personalized services. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide an open vehicle path optimization method based on a protozoan algorithm that can improve distribution efficiency and reduce distribution costs in view of the shortcomings of the prior art.
[0004] The technical problem to be solved by the present invention is achieved by the following technical solution. The present invention is an open vehicle path optimization method based on a protozoan algorithm, which is characterized by: providing a discrete protozoan algorithm for solving an open vehicle path optimization problem;
[0005] The open vehicle path optimization method based on the protozoan algorithm comprises the following steps:
[0006] Step 1: Input data, input the coordinates of customer points and distribution centers, customer point demand and distance matrix;
[0007] Step 2: To solve the actual open vehicle routing optimization problem, it is necessary to encode the protozoan individuals. The number of customers is N, and the distribution center allows a maximum of K vehicles to provide services. Integer encoding is used to represent the solution to the open vehicle routing optimization problem. Each integer represents the number of a customer point or a delivery vehicle. In an individual, a number only appears once and is not allowed to appear repeatedly. Each individual contains N customer points and K-1 delivery vehicles. The length of the protozoan individual is recorded as N+K-1, and the individual structure is represented as (1,2,3,…,N,N+1,…,N+K-1);
[0008] Step 3: Population initialization: Generate the initial population using random initialization method. Each individual in the population is a randomly generated non-repeating integer between N+K-1 [1, N+K-1];
[0009] Step 4: With the minimum total driving distance of vehicles as the goal, establish the objective function of the open vehicle routing optimization problem, with the constraints of no more than K delivery vehicles, meeting customer demand and the maximum vehicle load, and at the same time satisfying that one customer can only be delivered by one vehicle. Each vehicle starts from the distribution center and goes to the customer point on the distribution route. After delivering the goods to the last customer on its own delivery route, it decides its own route. The distance of the self-determined route is not considered in the total driving distance of the distribution plan; add a penalty term to the delivery route that violates the load constraint, and the calculation formula is: f(s) = c(s) + β × q(s), Where s is the distribution plan decoded by the current protozoa, f(s) is the penalty function, c(s) is the total driving distance of the vehicle, q(s) is the sum of the load constraints violated when the vehicle leaves the distribution center on each distribution route, β is the penalty factor, K is the number of vehicles in the distribution center, N is the number of customers, and the node set is V = {0, 1, 2, ..., N}, where 0 is the distribution center, q i (i∈V\{0}) is the demand of customer i, Q is the maximum load of each vehicle, x ijk is a 0-1 variable, x ijk is whether vehicle k travels from node i to node j, and
[0010] Step 5: Calculate the objective function value of the individual and perform K-Means clustering on the population. The clustering object is the objective function value of the population.
[0011] Step 6: Select individuals with the top 70% of the objective function value and update their positions; considering the characteristics of the open vehicle routing problem, the position update formulas of the foraging, dormancy and reproduction stages are discretized and converted into crossover operations and local search strategies. The specific steps are as follows:
[0012] Step 1: Let the proportion fraction be pf, Where rand is a random number between [0,1], gen is the current number of iterations, MaxGen represents the maximum number of iterations; A = pf × ps, ps is the population size;
[0013] Step 2: Randomly select A individuals in the population to update their positions during the dormancy or reproduction phase, and the remaining individuals to update their positions during the foraging phase;
[0014] Step 3: Let the probability of dormancy or reproduction be pdr , p dr =0.5(1+cos(π×(1-i / ps)), where i is the i-th individual in the population and ps is the population size; a random number B between [0,1] is randomly generated. When B <p dr The first crossover method is used when B ≥ p dr Perform local search when
[0015] Step 4: Let the foraging probability be p ah , p ah =0.5[1+cos(π×gen / MaxGen)], where gen is the current number of iterations and MaxGen is the maximum number of iterations; a random number C between [0,1] is randomly generated, and when C>p ah When C≤p ah Perform local search when
[0016] Step 7: Merge the updated protozoan individuals with the initial population, and calculate the objective function value of the individuals in the merged population; then find the individuals with the same route length in the population. When there are multiple individuals with the same route length in the population, retain one of the multiple individuals with the same route length, and remove the remaining individuals with the same route length. In order to keep the population size unchanged, replace the removed individuals with randomly generated individuals;
[0017] Step 8: Determine whether the iteration termination condition is met. If the iteration termination condition is met, output the optimal solution and optimal value; otherwise, go to step 5;
[0018] Step 9: Decode the global optimal individual into a distribution plan, divide the individual into several parts with K-1 distribution vehicles as breakpoints, each part represents the distribution route of a vehicle, and the distribution routes of all parts are summarized into an open vehicle distribution path plan; output the final open vehicle path optimized distribution plan.
[0019] The technical problem to be solved by the present invention can be further achieved by the following technical solution, wherein step five comprises the following steps:
[0020] Step 1: Randomly select m individuals from the population as the initial cluster centers;
[0021] Step 2: Calculate the absolute value of the difference between each individual in the population and the m cluster centers, and merge the individuals with the smallest absolute value of the distance difference into one category until every individual in the population belongs to a certain category;
[0022] Step 3: Calculate the centroid of each class and use it as the new cluster center;
[0023] Step 4: Determine whether the cluster center has changed. If so, go to step 2. Otherwise, the clustering process ends and the clustering results are output.
[0024] The technical problem to be solved by the present invention can be further achieved by the following technical solutions. The first crossover method in step six is as follows:
[0025] Step 1: Use the roulette wheel selection method to randomly select two individuals X1 and X2 from the population. First, randomly select an element w1 at position b1 in X1, then find the element w2 at position b1 in X2, find the position b2 corresponding to the element w2 in X1, and then find the element w3 at position b2 in X2. Repeat until a ring is formed. The positions of all elements in the ring are the last selected positions.
[0026] Step 2: The selected elements in X1 generate the child individual X11, and ensure that the position remains unchanged, then put the remaining elements in individual X2 into X11, while keeping the position and order unchanged;
[0027] Step 3: Use the selected elements in X2 to generate the child individual X22, and ensure that the position remains unchanged, then put the remaining elements in X1 into X22 while keeping the position and order unchanged.
[0028] The technical problem to be solved by the present invention can be further achieved by the following technical solution. The second crossover method in step six is as follows:
[0029] Step 1: First, use the roulette wheel selection method to randomly select two individuals X1 and X2 from the population, randomly select a set of elements T1 in X1, and find the positions of all elements in T1 in X2;
[0030] Step 2: Keep the unselected elements in X1 and X2 unchanged, swap the positions of the selected elements in X1 and X2 in the order in which the selected elements appear, and generate new individuals X11 and X22.
[0031] The technical problem to be solved by the present invention can be further achieved by the following technical solution. The local search in step six is as follows:
[0032] Step 1: Randomly select two positions of an individual and flip the elements between the two positions left and right; when the flipped individual is better than the unflipped individual, replace the unflipped individual with the flipped individual, otherwise, do not replace it;
[0033] Step 2: Randomly select two positions on the individual that performs the left-right flip operation, and insert the element at the first position after the second element; when the individual after insertion is better than the individual before insertion, replace the individual before insertion with the individual after insertion, otherwise, do not replace it.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] (1) The present invention optimizes the delivery path of open vehicles, which can promote the development of logistics. On the basis of theoretical research, the open vehicle path optimization based on the protozoan algorithm is applied to the transportation and distribution of products, which can improve the distribution efficiency, reduce the transportation cost, shorten the transportation time, improve the service quality, enhance the service reliability and customer satisfaction. In addition, the optimized delivery path can reduce the mileage, help reduce carbon emissions, and enhance environmental friendliness.
[0036] (2) The open vehicle routing optimization method based on the protozoan algorithm proposed in the present invention is not only applicable to the transportation and distribution of a single product, but also can play an important role in the entire logistics system. This method can solve the distribution path problem with high efficiency and high quality for complex distribution networks and changing customer needs, provide fast and accurate solutions, and can adapt to diversified distribution needs. The present invention provides greater operating space and flexibility for logistics distribution. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a schematic diagram of the process of the present invention;
[0038] Figure 2 Schematic diagram of the open vehicle routing optimization problem;
[0039] Figure 3 This is a schematic diagram of the first crossover method;
[0040] Figure 4 This is a schematic diagram of the second crossover method;
[0041] Figure 5 This is a schematic diagram of the reversal operation;
[0042] Figure 6 This is a schematic diagram of the insertion operation. DETAILED DESCRIPTION
[0043] The specific technical solutions of the present invention are further described below to help those skilled in the art further understand the present invention without limiting the rights thereof.
[0044] Reference Figure 1-Figure 6 , an open vehicle routing optimization method based on a protozoan algorithm, comprising the following steps:
[0045] The technical problem to be solved by the present invention is achieved through the following technical solution. The present invention is an open vehicle path optimization method based on a protozoan algorithm, which is characterized by: providing a discrete protozoan algorithm for solving an open vehicle path optimization problem;
[0046] The open vehicle path optimization method based on the protozoan algorithm comprises the following steps:
[0047] Step 1: Input data, input the coordinates of customer points and distribution centers, customer point demand and distance matrix;
[0048] Step 2: To solve the actual open vehicle routing optimization problem, it is necessary to encode the protozoan individuals. The number of customers is N, and the distribution center allows a maximum of K vehicles to provide services. Integer encoding is used to represent the solution to the open vehicle routing optimization problem. Each integer represents the number of a customer point or a delivery vehicle. In an individual, a number only appears once and is not allowed to appear repeatedly. Each individual contains N customer points and K-1 delivery vehicles. The length of the protozoan individual is recorded as N+K-1, and the individual structure is represented as (1,2,3,…,N,N+1,…,N+K-1);
[0049] Step 3: Population initialization: Generate the initial population using random initialization method. Each individual in the population is a randomly generated non-repeating integer between N+K-1 [1, N+K-1];
[0050] Step 4: With the minimum total driving distance of vehicles as the goal, establish the objective function of the open vehicle routing optimization problem, with the constraints of no more than K delivery vehicles, meeting customer demand and the maximum vehicle load, and at the same time satisfying that only one vehicle can deliver goods to one customer. Each vehicle starts from the distribution center and goes to the customer point on the delivery route. After delivering the goods to the last customer on its own delivery route, it decides its own route. The distance of the self-determined route is not within the consideration of the total driving distance of the delivery plan; add penalties to the delivery routes that violate the load constraint
[0051] is the delivery plan decoded by the current protozoa, f(s) is the penalty function, c(s) is the total driving distance of the vehicle, q(s) is the sum of the load constraints violated when the vehicle leaves the distribution center on each delivery route, β is the penalty factor, K is the number of vehicles in the distribution center, N is the number of customers, and the node set is V = {0, 1, 2, ..., N}, where 0 is the distribution center, q i (i∈V\{0}) is the demand of customer i, Q is the maximum load of each vehicle, x ijk is a 0-1 variable, x ijk is whether vehicle k travels from node i to node j, and
[0052] Step 5: Calculate the objective function value of the individual and perform K-Means clustering on the population. The clustering object is the objective function value of the population.
[0053] Step 6: Select individuals with the top 70% of the objective function value and update their positions; considering the characteristics of the open vehicle routing problem, the position update formulas of the foraging, dormancy and reproduction stages are discretized and converted into crossover operations and local search strategies. The specific steps are as follows:
[0054] Step 1: Let the proportion fraction be pf, Where rand is a random number between [0,1], gen is the current number of iterations, MaxGen represents the maximum number of iterations; A = pf × ps, ps is the population size;
[0055] Step 2: Randomly select A individuals in the population to update their positions during the dormancy or reproduction phase, and the remaining individuals to update their positions during the foraging phase;
[0056] Step 3: Let the probability of dormancy or reproduction be p dr , p dr =0.5(1+cos(π×(1-i / ps)), where i is the i-th individual in the population and ps is the population size; a random number B between [0,1] is randomly generated. When B <p dr The first crossover method is used when B ≥ p dr Perform local search when
[0057] Step 4: Let the foraging probability be p ah , p ah =0.5[1+cos(π×gen / MaxGen)], where gen is the current number of iterations and MaxGen is the maximum number of iterations; a random number C between [0,1] is randomly generated, and when C>p ah When C≤p ah Perform local search when
[0058] Step 7: Merge the updated protozoan individuals with the initial population, and calculate the objective function value of the individuals in the merged population; then find the individuals with the same route length in the population. When there are multiple individuals with the same route length in the population, retain one of the multiple individuals with the same route length, and remove the remaining individuals with the same route length. In order to keep the population size unchanged, replace the removed individuals with randomly generated individuals;
[0059] Step 8: Determine whether the iteration termination condition is met. If the iteration termination condition is met, output the optimal solution and optimal value; otherwise, go to step 5;
[0060] Step 9: Decode the global optimal individual into a distribution plan, divide the individual into several parts with K-1 distribution vehicles as breakpoints, each part represents the distribution route of a vehicle, and the distribution routes of all parts are summarized into an open vehicle distribution path plan; output the final open vehicle path optimized distribution plan.
[0061] The technical problem to be solved by the present invention can be further achieved by the following technical solution, and the coding in step 2 is as follows:
[0062] For example: the number of customers is 5, numbered 1 to 5, the distribution center is numbered 0, the number of vehicles is 3, and the protozoan individual contains a total of 7 numbers, of which 1 to 5 represent customer points, 6 and 7 represent distribution centers, and the numbers 6 and 7 divide the protozoan individual into 3 parts, each part represents a distribution route. For example, the individuals are (1, 3, 6, 2, 4, 7, 5), and the distribution plan is: the first distribution route: 0→1→3, the second distribution route: 0→2→4, the third distribution route: 0→5.
[0063] Reference Figure 3 The technical problem to be solved by the present invention can be further achieved by the following technical solutions. The first crossover method in step six is as follows:
[0064] Step 1: Use the roulette wheel selection method to randomly select two individuals X1 and X2 from the population. First, randomly select an element w1 at position b1 in X1, then find the element w2 at position b1 in X2, find the position b2 corresponding to the element w2 in X1, and then find the element w3 at position b2 in X2. Repeat until a ring is formed. The positions of all elements in the ring are the last selected positions.
[0065] Step 2: The selected elements in X1 generate the child individual X11, and ensure that the position remains unchanged, then put the remaining elements in individual X2 into X11, while keeping the position and order unchanged;
[0066] Step 3: Generate the child individual X22 with the selected elements in X2, and ensure that the position remains unchanged, then put the remaining elements in X1 into X22, while keeping the position and order unchanged;
[0067] For example: the number of customers is 5, numbered 1 to 5, the distribution center number is 0, the number of vehicles is 3, and the roulette wheel selects two protozoan individuals X1 and X2: X1 = (1, 2, 7, 5, 4, 6, 3), X2 = (7, 5, 1, 6, 3, 2, 4). The first crossover method is as follows:
[0068] Step 1: First, randomly select an element w1=6 at position b1 in X1, then find the element w2=2 at position b1 in X2, then find the position b2 with number 2 in X1, then find the element w3=5 at position b2 in X2, then find the position b3 with number 5 in X1, then find the element w4=6 at position b3 in X2, w4=w1, forming a ring, and the positions of all elements in the ring are the last selected positions;
[0069] Step 2: Copy the selected elements w1=6, w2=2, w3=5 in X1 to the child X11, with the same position and order of the elements as in X1, and then insert the remaining elements 7, 1, 3, 4 in X2 into the remaining positions of X11 in order;
[0070] Step 3: Copy the selected elements w1=6, w2=2, w3=5 in X2 to the offspring X22, with the position and order of each element the same as X2, and then insert the remaining elements 1, 7, 4, 3 in X1 into the remaining positions of X22 in sequence; generate two protozoan individuals X11 and X22, X11=(7, 2, 1, 5, 3, 6, 4), X22=(1, 5, 7, 6, 4, 2, 3).
[0071] Reference Figure 4 The technical problem to be solved by the present invention can be further achieved by the following technical solutions. The second crossover method in step 5 is as follows:
[0072] Step 1: First, use the roulette wheel selection method to randomly select two individuals X1 and X2 from the population, randomly select a set of elements T1 in X1, and find the positions of all elements in T1 in X2;
[0073] Step 2: Keep the unselected elements in X1 and X2 unchanged, swap the positions of the selected elements in X1 and X2 in the order in which the selected elements appear, and generate new individuals X11 and X22 at the same time;
[0074] For example: Step 1: First, use the roulette wheel selection method to randomly select two individuals X1 and X2 from the population, X1 = (1, 2, 7, 5, 4, 6, 3), X2 = (7, 5, 1, 6, 3, 2, 4), randomly select a set of elements T1 in X1, T1 includes 2, 5, 6, 3, then find the positions of all elements in T1 in X2, corresponding to the four elements in X2 are 5, 6, 3, 2;
[0075] Step 2: Keep the unselected elements in individuals X1 and X2 unchanged. The unselected elements of X1 include 1, 7, and 4, and the unselected elements of X2 include 7, 1, and 4. Swap the positions of the selected elements in X1 and X2 in the order in which the selected elements appear, and generate new individuals X11 and X22 at the same time. X11 = (1, 5, 7, 6, 4, 3, 2), and X22 = (7, 2, 1, 5, 6, 3, 4).
[0076] Reference Figure 5 and Figure 6 The technical problem to be solved by the present invention can be further achieved by the following technical solution. The local search in step 5 is as follows:
[0077] Step 1: Randomly select two positions of an individual and flip the elements between the two positions left and right; when the flipped individual is better than the unflipped individual, replace the unflipped individual with the flipped individual, otherwise, do not replace it;
[0078] Step 2: Randomly select two positions on the individual that performs the left-right flip operation, and insert the element at the first position after the second element; when the individual after insertion is better than the individual before insertion, replace the individual before insertion with the individual after insertion, otherwise, do not replace;
[0079] For example: taking the open vehicle routing optimization problem with 5 customers and a maximum of 3 vehicles allowed as an example, if the protozoan individuals are (1, 6, 3, 2, 4, 7, 5), the distribution plan after decoding the individuals is: the first distribution route 0→1; the second distribution route 0→3→2→4→0; the third distribution route 0→5→0; if the randomly selected left-right flipping positions are the third and sixth positions, the elements between these two positions are flipped left-right, then the individuals after the left-right flipping are (1, 6, 7, 4, 2, 3, 5), and the decoding plan of the individuals is: the first distribution route 0→1; the second distribution route 0→4→2→3→5; the individuals (1, 6, 7, 4, 2, 3, 5) after left-right flipping are used as the objects of the insertion operation, the insertion positions are the first and third positions, and the element at the first position is inserted after the second element. The solution after insertion can be expressed as (6, 7, 1, 4, 2, 3, 5), and the decoded distribution plan is: 0→1→4→2→3→5.
[0080] The technical problem to be solved by the present invention can be further achieved by the following technical solution. The decoding in step nine is as follows:
[0081] For example: the number of customers is 5, numbered 1 to 5, the distribution center number is 0, the number of vehicles is 3, and the protozoan contains a total of 7 numbers, of which 1 to 5 represent customer points, 6 and 7 represent distribution centers, and the numbers 6 and 7 divide the protozoan into 3 parts, each part represents a distribution route. The following five situations will appear during decoding:
[0082] (1) The individuals are (1, 3, 7, 2, 6, 4, 5), and the distribution plans are: the first distribution route: 0→1→3, the second distribution route: 0→2, and the third distribution route: 0→4→5;
[0083] (2) The individuals are (1, 3, 2, 4, 6, 7, 5), and the distribution plan is: the first distribution route: 0→1→3→2→4, the second distribution route: 0→5;
[0084] (3) The individuals are (6, 7, 1, 3, 2, 4, 5), and the distribution plan is: 0→1→3→2→4→5;
[0085] (4) The individuals are (1, 3, 2, 4, 5, 6, 7), and the distribution plan is: 0→1→3→2→4→5;
[0086] (5) The individuals are (7, 1, 3, 2, 4, 5, 6) and the distribution plan is: 0→1→3→2→4→5.
Claims
1. An open vehicle path optimization method based on a protozoan algorithm, characterized in that: A discrete protozoan algorithm for solving the open vehicle routing optimization problem is presented; The open vehicle path optimization method based on the protozoan algorithm comprises the following steps: Step 1: Input data, input the coordinates of customer points and distribution centers, customer point demand and distance matrix; Step 2: To solve the actual open vehicle routing optimization problem, it is necessary to encode the protozoan individuals. The number of customers is N, and the distribution center allows a maximum of K vehicles to provide services. Integer encoding is used to represent the solution to the open vehicle routing optimization problem. Each integer represents the number of a customer point or a delivery vehicle. In an individual, a number only appears once and is not allowed to appear repeatedly. Each individual contains N customer points and K-1 delivery vehicles. The length of the protozoan individual is recorded as N+K-1, and the individual structure is represented as (1,2,3,…,N,N+1,…,N+K-1); Step 3: Population initialization: Generate the initial population using random initialization method. Each individual in the population is a randomly generated non-repeating integer between N+K-1 [1, N+K-1]; Step 4: With the minimum total driving distance of vehicles as the goal, establish the objective function of the open vehicle routing optimization problem, with the constraints of no more than K delivery vehicles, meeting customer demand and the maximum vehicle load, and at the same time satisfying that one customer can only be delivered by one vehicle. Each vehicle starts from the distribution center and goes to the customer point on the distribution route. After delivering the goods to the last customer on its own delivery route, it decides its own route. The distance of the self-determined route is not considered in the total driving distance of the distribution plan; add a penalty term to the delivery route that violates the load constraint, and the calculation formula is: f(s) = c(s) + β × q(s), Where s is the distribution plan decoded by the current protozoa, f(s) is the penalty function, c(s) is the total driving distance of the vehicle, q(s) is the sum of the load constraints violated when the vehicle leaves the distribution center on each distribution route, β is the penalty factor, K is the number of vehicles in the distribution center, N is the number of customers, and the node set is V = {0, 1, 2, ..., N}, where 0 is the distribution center, q i (i∈V\{0}) is the demand of customer i, Q is the maximum load of each vehicle, x ijk is a 0-1 variable, x ijk is whether vehicle k travels from node i to node j, and Step 5: Calculate the objective function value of the individual and perform K-Means clustering on the population. The clustering object is the objective function value of the population. Step 6: Select individuals with the top 70% of the objective function value and update their positions; considering the characteristics of the open vehicle routing problem, the position update formulas of the foraging, dormancy and reproduction stages are discretized and converted into crossover operations and local search strategies. The specific steps are as follows: Step 1: Let the proportion fraction be pf, Where rand is a random number between [0,1], gen is the current number of iterations, MaxGen represents the maximum number of iterations; A = pf × ps, ps is the population size; Step 2: Randomly select A individuals in the population to update their positions during the dormancy or reproduction phase, and the remaining individuals to update their positions during the foraging phase; Step 3: Let the probability of dormancy or reproduction be p dr , p dr =0.5(1+cos(π×(1-i / ps)), where i is the i-th individual in the population and ps is the population size; a random number B between [0,1] is randomly generated. When B <p dr The first crossover method is used when B ≥ p dr Perform local search when Step 4: Let the foraging probability be p ah , p ah =0.5[1+cos(π×gen / MaxGen)], where gen is the current number of iterations and MaxGen is the maximum number of iterations; a random number C between [0,1] is randomly generated, and when C>p ah When C≤p ah Perform local search when Step 7: Merge the updated protozoan individuals with the initial population, and calculate the objective function value of the individuals in the merged population; then find the individuals with the same route length in the population. When there are multiple individuals with the same route length in the population, retain one of the multiple individuals with the same route length, and remove the remaining individuals with the same route length. In order to keep the population size unchanged, replace the removed individuals with randomly generated individuals; Step 8: Determine whether the iteration termination condition is met. If the iteration termination condition is met, output the optimal solution and optimal value; otherwise, go to step 5; Step 9: Decode the global optimal individual into a distribution plan, divide the individual into several parts with K-1 distribution vehicles as breakpoints, each part represents the distribution route of a vehicle, and the distribution routes of all parts are summarized into an open vehicle distribution path plan; output the final open vehicle path optimized distribution plan.
2. The open vehicle path optimization method based on the protozoan algorithm according to claim 1 is characterized in that: The step five comprises the following steps: Step 1: Randomly select m individuals from the population as the initial cluster centers; Step 2: Calculate the absolute value of the difference between each individual in the population and the m cluster centers, and merge the individuals with the smallest absolute value of the distance difference into one category until every individual in the population belongs to a certain category; Step 3: Calculate the centroid of each class and use it as the new cluster center; Step 4: Determine whether the cluster center has changed. If so, go to step 2. Otherwise, the clustering process ends and the clustering results are output.
3. The open vehicle path optimization method based on protozoan algorithm according to claim 1, characterized in that: The first crossover method in step six is as follows: Step 1: Use the roulette wheel selection method to randomly select two individuals X1 and X2 from the population. First, randomly select an element w1 at position b1 in X1, then find the element w2 at position b1 in X2, find the position b2 corresponding to the element w2 in X1, and then find the element w3 at position b2 in X2. Repeat until a ring is formed. The positions of all elements in the ring are the last selected positions. Step 2: The selected elements in X1 generate the child individual X11, and ensure that the position remains unchanged, then put the remaining elements in individual X2 into X11, while keeping the position and order unchanged; Step 3: Use the selected elements in X2 to generate the child individual X22, and ensure that the position remains unchanged, then put the remaining elements in X1 into X22 while keeping the position and order unchanged.
4. The open vehicle path optimization method based on protozoan algorithm according to claim 1 is characterized in that: The second crossover method in step six is as follows: Step 1: First, use the roulette wheel selection method to randomly select two individuals X1 and X2 from the population, randomly select a set of elements T1 in X1, and find the positions of all elements in T1 in X2; Step 2: Keep the unselected elements in X1 and X2 unchanged, swap the positions of the selected elements in X1 and X2 in the order in which the selected elements appear, and generate new individuals X11 and X22.
5. The open vehicle path optimization method based on protozoan algorithm according to claim 1, characterized in that: The local search steps in step six are as follows: Step 1: Randomly select two positions of an individual and flip the elements between the two positions left and right; when the flipped individual is better than the unflipped individual, replace the unflipped individual with the flipped individual, otherwise, do not replace it; Step 2: Randomly select two positions on the individual that performs the left-right flip operation, and insert the element at the first position after the second element; when the individual after insertion is better than the individual before insertion, replace the individual before insertion with the individual after insertion, otherwise, do not replace it.