A Material Transshipment and Distribution Method Based on Particle Swarm and Improved Ant Colony Algorithm

Through particle swarm and improved ant colony algorithm, the integration of information before and after transport and optimization of path planning is solved, and the global optimal solution and slow convergence speed in material transport and distribution problems are achieved, efficient material delivery is achieved.

CN118863206BActive Publication Date: 2025-07-08NO 15 INST OF CHINA ELECTRONICS TECH GRP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411114067.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2025-07-08
Estimated Expiration
2044-08-14

AI Technical Summary

Technical Problem

In the material transfer and distribution problem, the problem of solving the vehicle path before and after the transfer is staged, resulting in incomplete solution space, making it difficult to find the global optimal solution. The ant colony algorithm converges slowly in the early stage and is prone to fall into the local optimal.

Method used

The particle swarm algorithm is used to determine the material transport points and vehicle allocation, and combined with the improved ant colony algorithm, the path planning is optimized using public taboo tables and genetic algorithms, and the information before and after transport is integrated through particle expressions, and the pheromone concentration initialization is improved to accelerate convergence.

Benefits of technology

It realizes the global optimal solution for material transfer, shortens the delivery time, improves the convergence speed of the algorithm, avoids local optimal traps, and meets the requirements of high timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_1
    Figure SMS_1
  • Figure SMS_8
    Figure SMS_8
  • Figure SMS_9
    Figure SMS_9
Patent Text Reader

Abstract

The present invention discloses a material transfer and distribution method based on particle swarm and improved ant colony algorithms. The present invention uses the particle swarm algorithm to plan the shipping vehicles and transfer nodes of materials, realizing that the positions and quantities of the goods transfer points change according to the changes in the goods information; at the same time, it uses the ant colony algorithm with an improved common taboo table to perform the optimal path planning of the vehicles; the present invention regards the pre-transfer and post-transfer as a whole, fully considering the situation that the two stages of pre-transfer and post-transfer affect each other, ensuring the integrity of the solution space of this problem, and being more conducive to finding the global optimal solution. The present invention effectively shortens the distribution time by shortening the total driving path of the vehicles participating in the distribution task, meeting the requirements for distribution materials with relatively high timeliness requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of swarm intelligence and material transfer and distribution, and particularly relates to a material transfer and distribution method based on particle swarm and improved ant colony algorithms. Background Art

[0002] With the development of economic globalization, modern logistics has attracted more and more general attention. Modern logistics connects production and consumption, is an important support for extending the industrial chain, enhancing the value chain, and building the supply chain, and is an important starting point for promoting the smooth circulation of the national economic cycle.

[0003] Among them, the problem of material distribution is an important issue in the field of modern logistics. The efficiency and quality of problem-solving largely affect the intelligence and sustainable development of modern logistics.

[0004] Currently, in the field of solving material transfer and distribution, there are mainly material transfer and distribution with fixed transfer point positions and quantities, and material transfer and distribution with variable transfer point positions and quantities.

[0005] In terms of material transfer and distribution with fixed transfer point positions and quantities, generally, a vehicle scheduling model with corresponding constraint conditions is first established (the transfer nodes in the model are selected from a limited number of fixed nodes), and then ant colony algorithms, genetic algorithms, etc. are designed to solve the model.

[0006] In terms of material transfer and distribution with variable transfer point positions and quantities, generally, a vehicle scheduling model is first established. In the process of model solving, the transfer point of each material and the vehicles for transporting goods before and after material transfer are obtained from the particle position vector of the particle swarm algorithm, and then the transfer points are added to the taboo list of the ant colony algorithm. The ant colony algorithm is used to optimize the vehicle paths before and after material transfer, and then the particle swarm algorithm evaluates and screens the particles according to the optimization objective, and the above steps are repeated until the termination condition is met. During the solving process of the algorithm, the positions and quantities of the material transfer points are variable. Compared with the case where the positions and quantities of the material transfer points are fixed, it is easier to achieve the optimal solution.

[0007] Although the above methods have achieved good results in solving the problem of material transfer and distribution, there are still some deficiencies:

[0008] (1) In the process of solving the problem of material transfer and distribution by the above methods, the positions and quantities of the material transfer points are realized to change according to the material information. However, the situation before and after transfer is not regarded as a whole for solving, but is divided into two independent stages, and the ant colony algorithm is used to solve the vehicle paths respectively. Since the two stages before and after transfer affect each other and are not completely separated, dividing them into two independent stages results in an incomplete solution space, and thus the global optimal solution cannot be obtained.

[0009] For example, in the case where a certain vehicle in a certain mission participates in the distribution mission before the transfer of material a and also participates in the distribution mission after the transfer of material b, it is the global optimal solution. The method of dividing the period before and after the transfer into two independent stages will not find the global optimal solution for this situation.

[0010] (2) When the above method uses the ant colony algorithm to solve the material transfer and distribution problem, there is a problem of slow convergence speed in the initial stage. Since the initial value of pheromone is the same, it tends to randomly select the next node, and it takes a long time to play the role of positive feedback, which greatly affects the timeliness of the algorithm.

[0011] (3) When the ant colony algorithm used in the above method solves the material transfer and distribution problem, although the positive feedback gradually plays a role and will make the algorithm have a better convergence speed, if the relatively optimal solution obtained at the beginning of the algorithm is a sub-optimal solution, then the positive feedback will quickly make the sub-optimal solution dominant, easily causing the algorithm to fall into a local optimum and difficult to jump out of the local optimum. Summary of the Invention

[0012] In view of this, the present invention provides a material transfer and distribution method based on particle swarm and improved ant colony algorithm, which can use as few vehicles as possible to complete the required distribution of materials within the shortest total distribution time, and is the global optimum, meeting the requirements for distributing materials with relatively high timeliness requirements.

[0013] The material transfer and distribution method based on particle swarm and improved ant colony algorithm of the present invention includes:

[0014] Step 1, using the particle swarm algorithm to determine the material transfer points, and allocate the materials to the corresponding vehicles, and set the position vector and velocity vector of each particle;

[0015] Among them, the particle expression is:

[0016]

[0017] A material O ij Corresponding to a column of the particle expression; for material O ij where i is the starting point of material O ij and j is the ending point of material O ij ; the first row of the particle expression is the transfer point of the material, and its initial value is randomly selected from the starting points of all materials; the second row is the transport vehicle before the material transfer, and the third row is the transport vehicle after the material transfer;

[0018] Step 2: For each particle obtained in Step 1, based on the particle, obtain the loading information and distribution information of each vehicle corresponding to the particle; then, assign an ant colony to each vehicle. Each vehicle sequentially uses the ant colony algorithm and a common taboo list to perform path planning to obtain the optimal path corresponding to the particle, and save the particle position and vehicle path corresponding to the historical optimal path of the particle.

[0019] Among them, the optimization objective function of the ant colony algorithm is:

[0020] Among them, c ij is the distance between node i and j,

[0021] The constraint conditions are:

[0022] (1) 0 < q ij ≤ Q k , where q ij represents the weight of material O ij , and Q k represents the load capacity of vehicle k;

[0023] (2) Among them, represents the total weight of the materials on the vehicle when vehicle k leaves node j, and Q k represents the load capacity of vehicle k;

[0024] (3) Among them, represents whether O ij is transported by vehicle k. If it is, take 1; if not, take 0;

[0025] The common taboo list is:

[0026]

[0027] Among them, when a certain material is not loaded on the vehicle, the transfer point and the end point corresponding to it cannot be visited, and the state is [1, 0, 0]; at this time, each ant in the ant colonies corresponding to all vehicles cannot search for the transfer point and the end point corresponding to this material when searching for the path;

[0028] When a certain material is loaded on the vehicle, the starting point of the material is visited, and the state is [0, 1, 0]; at this moment, each ant in the ant colonies corresponding to all vehicles cannot search for the end point corresponding to this ant when searching for the path;

[0029] When the transfer point of the material is visited, the state is [0, 0, 1]; at this moment, the taboo list information corresponding to this material no longer restricts whether the ant colonies of all vehicles can visit a certain node;

[0030] Step 3: Determine whether the particle swarm algorithm converges or reaches the maximum number of iterations. If not, calculate and round the particle velocity vector and position vector for each particle, and then go back to Step 2; if so, the particle corresponding to the historical optimal path in the particle swarm is the final material transfer and distribution plan.

[0031] Preferably, in Step 2, when the ant colony corresponding to each vehicle conducts the first path planning, an improved genetic algorithm is used for path planning. Specifically,

[0032] Chromosome coding is performed using a method encoded by the sequence of nodes to be delivered; initialize the population; use the path length as the fitness function, where the shorter the path, the better the individual; in the selection step, select which chromosomes enter the next generation according to the roulette wheel method; each chromosome selects whether to perform crossover and mutation according to the probability; finally, obtain the chromosome with the optimal fitness in the population, which is the initial path of the vehicle.

[0033] Initialize the pheromone concentration used by the ant colony as:

[0034]

[0035] where Q is a constant and L is the total length of the path planned by the improved genetic algorithm.

[0036] Preferably, when initializing the population, select the solutions that meet the constraint conditions from the randomly generated population, and then finally select the initial population using the roulette wheel selection method.

[0037] Preferably, the ant colony algorithm is used for path planning, specifically including:

[0038] Initialization: Each ant in the ant colony corresponding to the current vehicle is randomly distributed to each node that the vehicle needs to deliver, and initialize the pheromone τ ij value to τ ij (0);

[0039] Main loop: At time t, the ant colony corresponding to the current vehicle determines which nodes can be visited next through the common taboo table, and selects the next node with probability in the accessible nodes: where α and β are constants, τ ij (t) is the value of the pheromone on the path (i, j) at time t, d ij (t) is the distance from node i to node j, and j ∈ T k means that node j has not been visited, means that the node has been visited; then update the pheromone τ ij value on the path (i, j); τ ij (t + 1) = (1 - ρ)τ ij(t) + ρΔτ ij Among them, ρ is the pheromone residue factor, which is the sum of the pheromone update values contributed by all ants passing through the connection path between node i and node j.

[0040] If there are no accessible nodes in the current ant colony that meet the constraint conditions and the requirements of the taboo list, then switch to the ant colony corresponding to the next vehicle for path planning; when there are no accessible nodes in the ant colonies corresponding to all vehicles that meet the constraint conditions and the requirements of the taboo list, if all vehicles have completed the vehicle path planning, go to step 3, otherwise return to step 1 and use the particle swarm optimization algorithm to re-plan the distribution information and loading information of each vehicle.

[0041] Preferably, in step 3, if the velocity vector and the position vector exceed the range, then take values according to the boundary and go to step 2.

[0042] Beneficial effects:

[0043] (1) The present invention uses the particle swarm optimization algorithm to plan the transportation vehicles and transfer nodes of materials, realizing that the positions and quantities of material transfer points change according to the changes in material information; at the same time, it uses the improved ant colony algorithm with a common taboo list to perform the optimal path planning of vehicles. The present invention regards the situation before and after transportation as a whole, fully considering the situation that the two stages before and after transportation affect each other, ensuring the integrity of the solution space of this problem and being more conducive to finding the global optimal solution. The present invention shortens the total driving path of the vehicles participating in the distribution task and shortens the distribution time.

[0044] (2) When performing the optimal path planning of vehicles, before the execution of the ant colony algorithm, the present invention uses an improved genetic algorithm to initialize the pheromone concentration of the ant colony algorithm, solving the problem that the traditional ant colony algorithm uses the same default value for the initial pheromone concentration when solving the vehicle path problem, resulting in a slow convergence speed in the initial stage. This enables the improved ant colony algorithm to play a positive feedback role in the initial stage, accelerating the convergence speed, and at the same time reducing the possibility that the better solution obtained at the beginning is a sub-optimal solution, causing the algorithm to fall into a local optimum.

[0045] (3) The present invention further improves the genetic algorithm used for initializing the pheromone concentration of the improved ant colony algorithm: Traditionally, a random sequence function is used to generate the initial population. Since the vehicle scheduling mathematical model has multiple constraint conditions, many of the randomly generated solutions are difficult to meet these constraint conditions, so most of the obtained solutions are of poor quality. To improve the quality of the initialized population, solutions that meet the constraint conditions are selected from the randomly generated solutions, and the roulette wheel method is finally used to select the initialized population from the qualified solutions. The core of the algorithm is to make the generated initial solutions all meet the constraints, so as to establish a high-quality initial population. When the global convergence condition is met, the convergence of the algorithm has been proven to be independent of the quality of the initial solution. However, since the global convergence condition is difficult to achieve in practical applications and requires too much time. Therefore, to improve the efficiency of the algorithm, a method of constructing high-quality solutions as the initial solutions of the algorithm is adopted to reduce subsequent calculations and shorten the time of the algorithm. Detailed implementation manner

[0046] The present invention will be described in detail below in conjunction with embodiments.

[0047] The present invention provides a material transfer and distribution method based on particle swarm and improved ant colony algorithm, which is used to solve the problem of material transfer and distribution with relatively high timeliness requirements. Through the particle swarm and the improved ant colony algorithm, a reasonable path planning is carried out for each vehicle. The algorithm uses as few vehicles as possible and the shortest total distribution time to plan a reasonable distribution path to ensure the fast and reliable transportation of materials. The specific steps are as follows:

[0048] Step 1: Initialize all parameters. This mainly includes the initialization of particle swarm algorithm parameters and the initialization of improved ant colony algorithm parameters (including the initialization of improved genetic algorithm parameters when initializing its pheromone concentration). Specifically: Initialize the particle swarm algorithm parameters, including the number of particles, inertia constant, and acceleration constants; Initialize the improved ant colony algorithm parameters, mainly including the number of ants, the importance of pheromone, the importance of edge visibility (the reciprocal of distance), and the pheromone evaporation factor. Initialize the improved genetic algorithm parameters used for initializing the pheromone concentration of the improved ant colony algorithm, mainly including the population size, the longest stop generation, the crossover rate, and the mutation rate.

[0049] Step 2: Use the particle swarm algorithm to determine the material transfer points and allocate the materials to the corresponding vehicles, and set the position vector and velocity vector of each particle.

[0050] Among them, the particle expression is:

[0051]

[0052] A material O ij A column corresponding to the particle expression (material Oij contains the starting point and ending point information, where i is the starting point of material O ij and j is the ending point of material O ij (The first row (K1, K2...) of the particle expression is the transfer point of the material, and its initial value is randomly selected from the starting points of all materials; the second row (L1, L2...) is the transport vehicle of the material before transfer, and the third row (L′1, L′2...) is the transport vehicle of the material after transfer. When the values of the second row and the third row corresponding to material O ij are equal, the material does not undergo transfer.)

[0053] Step 3: Through the particle swarm algorithm for the particles calculated currently, obtain the loading information (the information of the materials to be loaded and unloaded by a vehicle) and the distribution information (the information of the nodes to be visited by a vehicle) of each vehicle. Based on this information, use the improved ant colony algorithm to solve the vehicle route of each vehicle. Among them, the method for obtaining the loading information and distribution information of each vehicle is as follows: Since each material corresponds to a column in the particle expression, for a certain material O ij the vehicle used before the transfer of this material can be known from the second row of the corresponding column, and for a certain material O ij the vehicle used after the transfer of this material can be known from the third row of the corresponding column. When the values of the second row and the third row corresponding to material O ij are equal, the material does not undergo transfer; otherwise, the transfer point is the value of the first row of the corresponding column of a certain material O ij and at the same time, material O ij itself contains the starting point information. Therefore, through the particle expression, it can be obtained what materials each vehicle needs to load and which nodes these materials will be delivered to, and whether transfer is required, that is, the loading information and distribution information of the materials are obtained. For example, vehicle l needs to load materials O ij 、O i+1j 、O i+1j+1 , and the nodes to be passed through when transporting these materials are i, i + 1, j, j + 1, k1 (the transfer point of O ij ).

[0054] The mathematical model and algorithm steps of the improved ant colony algorithm used in this step to solve the vehicle route of each vehicle are specifically as follows.

[0055] Mathematical model:

[0056] The optimized objective function is:

[0057] c ij is the distance between node i and j,

[0058] The constraint conditions are:

[0059] 0 < q ij≤Q k q ij represents the weight of material O ij , and Q k represents the load capacity of vehicle k.

[0060] represents the total weight of the materials on vehicle k when it leaves node j, and Q k represents the load capacity of vehicle k.

[0061] For the starting node and ending node of the materials, more than one vehicle can be used for distribution. represents whether O ij is transported by vehicle k. If it is, take 1; if not, take 0.

[0062] represents that the materials will definitely be transported and will be transshipped at most once.

[0063] Algorithm steps:

[0064] First, obtain the loading information and distribution information of each vehicle planned by the particle swarm optimization algorithm in step 2. Each vehicle corresponds to an ant colony, and the ants in each colony start path planning in sequence. During this process, all ant colonies share a common taboo list.

[0065] Then, when the ant colony corresponding to each vehicle executes for the first time, first use the improved genetic algorithm for path planning to obtain a better initial solution that meets the constraint conditions, and use this initial solution to initialize the pheromone initial value of the ant colony algorithm, so that the algorithm can play the role of positive feedback faster, thereby accelerating the convergence speed in the initial stage of the algorithm. Among them, the improved genetic algorithm mainly improves the process of initializing the population, reduces subsequent calculations, and shortens the time of the algorithm. The specific process is as follows: Encoding and initialization, use the method of directly encoding the chromosome with the node sequence of the distribution. When initializing the population, select the solutions that meet the constraint conditions from the randomly generated solutions, and finally select the initial population using the roulette wheel selection method among the solutions that meet the constraint conditions; Calculate the fitness value of each chromosome, use the path length as the fitness function, the shorter the path, the better the individual. For the chromosomes that do not meet the limit conditions, appropriate penalties need to be imposed to reduce the possibility of inferior solutions being inherited; Selection link, select which chromosomes enter the next generation according to the roulette wheel method; Each chromosome selects whether to perform crossover and mutation according to the probability; Judge whether any one of the stop conditions is met. If not, continue to iterate; if met, output the chromosome with the best fitness in the population, that is, the vehicle path of this vehicle calculated currently. Finally, use the obtained vehicle path to initialize the pheromone concentration used by the ant colony, specifically as follows: Among them, Q is a constant, and L is the total path length planned by the improved genetic algorithm.

[0066] Next, the ant colony corresponding to each vehicle starts further path planning using the common taboo list, and the steps are as follows:

[0067] Initialization: Each ant in the ant colony corresponding to the current vehicle is randomly distributed to each node that the vehicle needs to deliver to, and the pheromone τ ij value is initialized: τ ij (0) = Δτ ij * . Among them, Δτ ij * is the initial pheromone concentration obtained by the improved genetic algorithm;

[0068] Main loop: At time t, the ant colony corresponding to the current vehicle decides which nodes can be visited next through the common taboo list, and selects the next node with probability in the accessible nodes: where α and β are constants, τ ij (t) is the value of the pheromone on the path (i, j) at time t, and d ij (t) is the distance from node i to node j, and j ∈ T k means that node j has not been visited, means that the node has been visited. Then update the pheromone τ ij value on the path (i, j); τ ij (t + 1) = (1 - ρ)τ ij (t) + ρΔτ ij where ρ is the pheromone residue factor, which determines the retention degree of the old pheromone, and is the sum of the pheromone update values contributed by all ants passing through the path connecting node i and node j.

[0069] If the current ant colony has no accessible nodes that meet the constraint conditions and the requirements of the taboo list, then change to the ant colony corresponding to the next vehicle for path planning. When all the ant colonies corresponding to the vehicles have no accessible nodes that meet the constraint conditions and the requirements of the taboo list, if all vehicles have completed the vehicle path planning, then the algorithm ends, otherwise return to step two and use the particle swarm algorithm to re-plan the delivery information and loading information of each vehicle.

[0070] The improved taboo list is as follows:

[0071]

[0072] When a certain material is not loaded, its corresponding transfer point and end point cannot be visited, and the state is [1, 0, 0]. At this time, each ant in the ant colonies corresponding to all vehicles can avoid searching for the transfer point and end point corresponding to this material when searching for paths.

[0073] After a certain material is loaded onto a vehicle, the starting point of the material is visited, and the status is [0, 1, 0]. At this moment, when each ant in the ant colony corresponding to all vehicles searches for a path, it cannot search for the end point corresponding to this ant.

[0074] After the material transfer point is visited, the status is [0, 0, 1]. At this moment, the taboo list information corresponding to this material no longer restricts whether the ant colonies of all vehicles can access a certain node.

[0075] Step 4: Evaluate the result of solving the vehicle routing problem using the improved ant colony algorithm based on particle information with the objective function.

[0076] Step 5: Search for the optimal solution within the population. If it is better than the historical optimal solution, update the historical optimal position and the vehicle routing. If multiple individuals have the same optimal value, randomly select one of them as the optimal solution. If it is the first iteration, set the optimal solution within the population as the historical optimal position.

[0077] Step 6: If the termination condition that the set number of iterations is satisfied and the optimal solution within the particle population remains unchanged after n loops is met, the algorithm ends; if not, calculate the particle velocity vector for each particle, calculate the particle position vector and round it. When the velocity vector and the position vector exceed the range, take the value according to the boundary, and jump to Step 3.

[0078] The optimal solution within the particle population is the optimal material transfer and distribution plan.

[0079] The following is an illustration with a specific example.

[0080] Example 1

[0081] Step 1: Initialize all parameters.

[0082] Initialization of particle swarm algorithm parameters: Initialize the number of particles, inertia constant, and acceleration constants;

[0083] Taking the transfer and distribution of 5 materials as an example, a particle vector of 5 columns and 3 rows is constructed. Generally, the number of particles is 6 - 8 times the spatial dimension, that is, the value range of the number of particles is 30 - 40. Here, 35 particles are used. The inertia constant in the particle algorithm is ω = 0.729, the acceleration constants с1 = с2 = 2, and the number of iterations is 1000 times.

[0084] Initialization of improved ant colony algorithm parameters: The number of ants m = 30, the importance of pheromone α = 1, the importance of edge visibility (reciprocal of distance) β = 2, and the pheromone evaporation factor ρ = 0.9.

[0085] Initialization of improved genetic algorithm parameters used when initializing the pheromone concentration of the improved ant colony algorithm: The population size is set to 100, the maximum number of stopping generations is set to 500, and the crossover rate and mutation rate are set to 0.9 and 0.2.

[0086] Step 2: Use the particle swarm optimization algorithm to determine the material transfer points and allocate the materials to the corresponding vehicles, and set the position vector and velocity vector of each particle. During initialization, the first row takes a random value of the material starting point, and the second and third rows take random values of the vehicles that meet the constraint conditions for loading this material.

[0087] For example, the particle expression is:

[0088]

[0089] Step 3: Obtain the loading information (the material information that a vehicle needs to load and unload) and distribution information (the point information that a vehicle needs to distribute) of each vehicle through the particle expression, and use the improved ant colony algorithm to solve the vehicle route of each vehicle. Assume that the materials corresponding to each column in the particle expression in Step 2 are: O ij 、O i+1j+2 、O i+1j+1 、O i+2j 、O i+3j 。The loading information and distribution information of vehicle l1 planned by the particle swarm optimization algorithm (the materials that need to be loaded are O ij 、O i+1j+2 ,and the nodes that need to be passed through when transporting these materials are i, j, i + 1, i + 3 (the transfer points of material O i+1j+2 ). The loading information and distribution information of l2 (the materials that need to be loaded are O i+1j+2 、O i+1j+1 ,and the nodes that need to be passed through when transporting these materials are i + 3 (the transfer point of material O i+1j+2 ), j + 2, i + 1, i + 2 (the transfer points of material O i+1j+1 ). The loading information and distribution information of l3 (the materials that need to be loaded are O i+1j+1 、O i+2j 、O i+3j ,and the nodes that need to be passed through when transporting these materials are i + 2 (the transfer point of material O i+2j ), j + 1, j, i + 3. The algorithm uses the ant colony corresponding to vehicle l1 to plan the route of vehicle l1, uses the ant colony corresponding to vehicle l2 to plan the route of vehicle l2, and uses the ant colony corresponding to vehicle l3 to plan the route of vehicle l3. During this process, the corresponding ant colonies share a common taboo list when planning the routes of vehicle l1 and vehicle l2

[0090] Step 4: Use the objective function to evaluate the result of solving the vehicle route using the improved ant colony algorithm based on the particle information.

[0091] Step 5: Search for the optimal solution within the population. If it is better than the historical optimal solution, update the historical optimal position and the vehicle route. If multiple individuals have the same optimal value, randomly select one of them as the optimal solution. If this is the first iteration, set the optimal solution within the population as the historical optimal position.

[0092] Step 6: If the termination condition that the optimal solution within the particle swarm remains unchanged after 2000 iterations and 30 loops is met, the algorithm ends; if not, calculate the particle velocity vector for each particle, calculate the particle position vector and round it. When the velocity vector and the position vector exceed the range, take the value according to the boundary, and jump to Step 3.

[0093] In summary, the above is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A material transfer and distribution method based on particle swarm and improved ant colony algorithms, characterized in that, Including: Step 1: Use the particle swarm optimization algorithm to determine the material transfer points and allocate the materials to the corresponding vehicles, and set the position vector and velocity vector of each particle; Among them, the particle expression is: A material O ij A column corresponding to the particle expression; material O ij In it, i is the starting point of material O ij and j is the ending point of material O ij The first line of the particle expression is the transfer point of the material, and its initial value is randomly selected from the starting points of all materials; the second line is the transport vehicle before the material transfer, and the third line is the transport vehicle after the material transfer; Step 2: Based on the particles calculated in Step 1, obtain the loading information and distribution information of each vehicle corresponding to each particle; then, assign an ant colony to each vehicle. Each vehicle sequentially uses the ant colony algorithm and a common taboo list to perform path planning to obtain the optimal path corresponding to the particle, and save the particle position and vehicle path corresponding to the historical optimal path of the particle; Among them, the optimization objective function of the ant colony algorithm is as follows: where c ij is the distance between node i and j, The constraint conditions are: (1) 0 < q ij ≤ Q k , where q ij represents the weight of material O ij , and Q k represents the load capacity of vehicle k; (2) Among them, represents the total weight of the materials on vehicle k when it leaves node j, and Q k represents the load capacity of vehicle k; (3) Among them, represents O ij Whether it is transported by vehicle k, if yes, take 1, if no, take 0; The common taboo list is: Among them, when a certain material is not loaded on the vehicle, its corresponding transfer point and end point cannot be visited, and the state is [1, 0, 0]; at this time, each ant in the ant colonies corresponding to all vehicles can avoid searching for the transfer point and end point corresponding to this material when searching for a path; When a certain material is loaded on the vehicle, the starting point of the material is visited, and the state is [0, 1, 0]; at this moment, each ant in the ant colonies corresponding to all vehicles cannot search for the end point corresponding to this ant when searching for a path; When the material transfer point is visited, the state is [0, 0, 1]; at this moment, the taboo list information corresponding to this material no longer restricts whether the ant colonies of all vehicles can visit a certain node; Using the ant colony algorithm for path planning specifically includes: Initialization: Each ant in the ant colony corresponding to the current vehicle is randomly distributed to each node that the vehicle needs to deliver to, and the pheromone τ is initialized. ij The value of ij is τ(0). Main loop: At time t, the ant colony corresponding to the current vehicle decides which nodes can be visited next through the common taboo list, and selects the next node with probability Select the next node: where α and β are constants, and τ ij (t) is the value of the pheromone on the path (i, j) at time t, and d ij (t) is the distance from node i to node j, and j ∈ T k indicates that node j has not been visited, indicates that the node has been visited; then update the value of the pheromone τ ij on the path (i, j); τ ij (t + 1) = (1 - ρ)τ ij (t) + ρΔτ ij where ρ is the pheromone residue factor, which is the sum of the pheromone update values contributed by all ants passing through the path connecting node i and node j; If the current ant colony has no accessible nodes that meet the constraint conditions and the requirements of the taboo list, then switch to the ant colony corresponding to the next vehicle for path planning; when none of the ant colonies corresponding to all vehicles have accessible nodes that meet the constraint conditions and the requirements of the taboo list, if all vehicles have completed vehicle path planning, go to Step 3, otherwise return to Step 1 and use the particle swarm optimization algorithm to re-plan the distribution information and loading information of each vehicle; Step 3: Determine whether the particle swarm optimization algorithm converges or reaches the maximum number of iterations. If not, calculate the particle velocity vector and position vector for each particle and round them, and then go to Step 2; if so, the particle corresponding to the historical optimal path within the particle swarm is the final material transfer and distribution plan.

2. The method according to claim 1, characterized in that In Step 2, when the ant colony corresponding to each vehicle performs the first path planning, an improved genetic algorithm is used for path planning. Specifically, A method of encoding chromosomes using the sequence of nodes to be distributed is adopted for chromosome encoding; initialize the population; use the path length as the fitness function, and the shorter the path, the better the individual; in the selection step, select which chromosomes enter the next generation according to the roulette wheel method; each chromosome selects whether to perform crossover and mutation according to the probability; finally, obtain the chromosome with the optimal fitness in the population, which is the initial path of the vehicle; When initializing the ant colony, select solutions that meet the constraint conditions from the randomly generated population, and then finally select the initial population using the roulette wheel selection method; the pheromone concentration used for initializing the ant colony is: Among them, Q is a constant, and L is the total length of the path planned by the improved genetic algorithm.

3. The method according to claim 1, wherein In Step 3, if the velocity vector and position vector exceed the range, take the values according to the boundary and then go to Step 2.

Citation Information

Patent Citations

  • Distribution center order picking path planning method based on fusion of ant colony algorithm and genetic algorithm

    CN113935452A