Production distribution optimization method based on improved genetic algorithm

The integration of adaptive large neighborhood search and precise route optimization within improved genetic algorithms addresses the limitations of traditional genetic algorithms, enhancing search efficiency and solution quality for production and distribution optimization.

CN119648081APending Publication Date: 2025-03-18HEFEI UNIV OF TECH
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411465591.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Traditional genetic algorithms for production and distribution optimization suffer from rapid convergence in early iterations, reduced search efficiency over time, weak local search capabilities, and dependence on initial population selection, leading to potential premature convergence to local optima rather than global optima.

Method used

Combining improved genetic algorithms with adaptive large neighborhood search algorithms, using a mixed three-layer vector encoding for chromosomes, and incorporating Dijkstra's algorithm for precise route optimization, along with break and repair operators to enhance solution quality and diversity.

Benefits of technology

This approach prevents premature convergence, improves solution quality and efficiency by leveraging adaptive large neighborhood search and precise route optimization, enabling faster identification of optimal solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648081A_ABST
    Figure CN119648081A_ABST
Patent Text Reader

Abstract

The invention relates to the field of logistics distribution methods, and discloses a production distribution optimization method based on an improved genetic algorithm, comprising a genetic algorithm unit and an adaptive large neighborhood search algorithm unit, the genetic algorithm unit comprises the following steps: using a mixed three-layer vector to represent chromosomes, a chromosome is represented by a 3 * n matrix, a first-layer vector represents an order production scheduling sequence, namely, an order production sequence, a second-layer vector represents a machine number for producing the order, and a traditional genetic algorithm and an adaptive large-field search algorithm are combined, so that the algorithm can be prevented from falling into local optimum, and the efficiency of the algorithm is improved. And meanwhile, the algorithm solving efficiency and quality can be improved, on the basis of the intelligent algorithm, an accurate solving algorithm is added, the distribution route of each vehicle is solved by using the accurate algorithm, the optimal driving route of each vehicle is obtained, and then chromosomes of individuals are updated, so that the algorithm can find the optimal solution more quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of logistics distribution methods, and in particular to a production distribution optimization method based on an improved genetic algorithm. Background Art

[0002] The traditional allocation optimization method based on genetic algorithm is a search algorithm that simulates the natural evolution process. It continuously optimizes individuals by simulating the operations of selection, crossover and mutation in the evolution process and finally finds the optimal solution.

[0003] However, since the genetic algorithm converges quickly in the early stages of evolution, the search efficiency will gradually decrease as the number of iterations increases, resulting in a slower convergence speed in the later stages of the algorithm. In addition, although the genetic algorithm has global search capabilities, its local search capabilities are relatively weak. In the later stages of iteration, the algorithm is prone to premature convergence, that is, the algorithm converges to a local optimal solution too early and cannot find the global optimal solution. At the same time, the performance of the genetic algorithm depends to a large extent on the selection of the initial population. If the initial population is not selected properly, the algorithm may not be able to find the optimal solution during iteration. The optimization of the genetic algorithm mainly relies on the survival of the fittest and natural selection in the population, and lacks an accurate solution process. Summary of the invention

[0004] The purpose of the present invention is to provide a production and distribution optimization method based on an improved genetic algorithm, which can effectively solve the problems in the background technology.

[0005] To achieve the above object, the technical solution adopted by the present invention is:

[0006] A production and distribution optimization method based on an improved genetic algorithm comprises a genetic algorithm unit and an adaptive large neighborhood search algorithm unit, wherein the genetic algorithm unit comprises the following steps:

[0007] S1. Start encoding. A mixed three-layer vector is used to represent the chromosome. A 3*n matrix is ​​used to represent a chromosome. The first-layer vector represents the order of order scheduling, that is, the production order of the order. The second-layer vector represents the machine number of the order, that is, which machine produces the order. The third-layer vector represents the vehicle number of the order, that is, which vehicle delivers the order.

[0008] S2. Generate an initial population, determine the number of individuals in the population, determine the genetic coding method of each individual, and then randomly generate the genes of each individual according to the determined genetic coding method.

[0009] S2.1. It is necessary to determine an objective function that can quantify the quality of individuals. This function will accept the genetic code of the individual as input and output a numerical value that reflects the individual's performance, namely the fitness value. For each individual, its gene is decoded into the actual solution in the solution space of the problem according to the encoding method. The decoded solution is substituted into the objective function for calculation to obtain the fitness value of the individual. The larger the value, the closer the individual is to the optimal solution of the problem. Then, the calculated fitness value is recorded and usually saved in an array of the same size as the population for subsequent selection, crossover and mutation operations.

[0010] S3. After obtaining the fitness of individuals in the initial population, determine whether the specified number of iterations has been reached. If the specified number of iterations has been reached, the relevant results can be directly output. If the specified number of iterations has not been reached, enter the selection, crossover and mutation steps.

[0011] S4. Selection and Crossover Operations,Since the genetic algorithm adopts an elite strategy, after the population is generated,,we use the roulette method (also called fitness proportion) as the selection,mechanism, in which the probability of selecting an individual is proportional to its,fitness value.

[0012] S4.1, mutation, select a certain number of parent individuals from the current population, these individuals will be used as the input of the crossover operation, and some genes of the parent individuals will be exchanged at the selected crossover point or crossover area.

[0013] S4. Mutation generates a new population. For the diversity of the population, crossover mutation is performed on each subclass individual with a mutation probability of . Each iteration generates a random real number between 0 and 1, which is lower than the mutation probability, and then repeats step S2.1.

[0014] The self-adaptive large neighborhood search algorithm unit comprises the following steps:

[0015] S5. By obtaining a random number from step S4 and determining that the random number is ≥ 0.5, randomly select a solution from the population as the initial solution of ALNS. If the random number is < 0.5, the GA global optimal solution is used as the initial solution of ALNS. In this way, the ALNS initial solution individual with a set number of updates is generated through the above selection method.

[0016] S6. According to the goal of minimizing the total delivery cost in the model, data such as vehicle load, route length, time window, etc. are collected, and the optimal solution is obtained with the help of destruction operators and repair operators.

[0017] S6.1. The destruction operators include random destruction operators, greedy destruction operators, and correlation destruction operators. The random destruction operator randomly selects n nodes for destruction. The greedy destruction operator deletes and replaces all nodes in the line in sequence, records the nodes that cause the largest change in the objective function, and finds n nodes in sequence for destruction. The first node in the correlation destruction operator is a random node, and the subsequent destroyed nodes are the nodes with the strongest correlation with the previous node, and a total of n nodes are destroyed.

[0018] S6.2. The repair operators include random repair, greedy repair, and regret repair. The random repair randomly inserts the n previously damaged nodes into any line in sequence according to the generation method of the initial solution. The greedy repair loops the nodes to be inserted into all positions of all lines in sequence, and records the position that makes the objective function change the best. Finally, the nodes are greedily inserted into the "best" position in sequence. The regret repair loops and calculates the regret values ​​of the n nodes to be inserted, finds the node with the largest regret value among the current n nodes, inserts it into the line, and updates the objective function value. Loop again to calculate the regret values ​​of the n-1 nodes to be inserted, finds the node with the largest regret value among the n-1 nodes to be inserted and inserts it, and repeats the above steps until all damaged nodes are repaired.

[0019] S7, the destruction operator and the repair operator in step S6 are selected according to the roulette mechanism, and the operators in step S6 are scored. The better the performance of the operator, the higher the score of the operator;

[0020] Based on this, the score of each operator is initially set to 5. If the solution of the operator is better than the global optimal solution, the operator will add 12 points. If the solution found by the operator is better than the current solution, the operator will add 7 points. If the solution found by the operator is worse than the current solution, the operator will add 2 points.

[0021] The formula for updating the operator score is: new score = old score * reduction ratio + (1-reduction ratio) * get new score.

[0022] S8. After the customer order is produced, it is delivered to the customer by the delivery vehicle. Since the starting point and end point of the delivery vehicle are determined in this process, the delivery vehicle needs to return to the distribution center after the delivery is completed, and the customer order delivered by the same vehicle is accurately solved. In the process of accurate solution, we use the Di jkstra algorithm to solve the order quantity delivered by the same vehicle, and obtain the optimal delivery route for each vehicle. Then, according to the solution of the accurate algorithm, the sorting of individual chromosomes is updated so that the algorithm can find a better solution, and the optimal solution is replaced by the chromosome individual randomly selected in the GA, and it is determined again whether the specified number of iterations is reached. If the specified number of iterations is reached, the relevant structure is output and the end is ended. If the relevant specified number of iterations is not reached, the step S4 is cycled again.

[0023] As a further preferred embodiment of the present invention, the selection crossover operation can set PARENT1 (P1) and PARENT2 (P2), and randomly select two points from PARENT1 (P1) and PARENT2 (P2) as crossover points, such as F1 and F2, between which all genes (P2) are copied to the same position in the offspring, and the remaining vacancies are filled in sequence by the genes of P1 in the order of their appearance in P1.

[0024] As a further preferred embodiment of the present invention, the mutation can be in two randomly selected positions, namely, paired genes of F1 and F2, which are exchanged with each other to form new offspring.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] In the present invention, the traditional genetic algorithm is combined with the adaptive large-domain search algorithm, which can not only prevent the algorithm from falling into the local optimum, but also improve the efficiency and quality of the algorithm solution.

[0027] In the present invention, on the basis of the intelligent algorithm, an accurate solution algorithm is added. The delivery route of each vehicle is solved using the accurate algorithm to obtain the optimal driving route of each vehicle, and then the individual chromosomes are updated so that the algorithm can find the optimal solution faster. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a flow chart of the method of the present invention;

[0029] Figure 2 is a schematic diagram of the crossover mechanism of the present invention;

[0030] Figure 3 Schematic diagram of chromosome variation of the present invention. DETAILED DESCRIPTION

[0031] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below in conjunction with specific implementation methods.

[0032] like Figure 1 -As shown, the present invention provides a production and distribution optimization method based on an improved genetic algorithm, including a genetic algorithm unit and an adaptive large neighborhood search algorithm unit, wherein the genetic algorithm unit includes the following steps:

[0033] To start coding, a mixed three-layer vector is used to represent the chromosome. A 3*n matrix is ​​used to represent a chromosome. The first-layer vector represents the order of order scheduling, that is, the production order of the order. The second-layer vector represents the machine number that produces the order, that is, which machine produces the order. The third-layer vector represents the vehicle number of the order, that is, which vehicle delivers the order.

[0034] Generate the initial population, determine the number of individuals in the population, determine the genetic encoding method of each individual, and then randomly generate the genes of each individual according to the determined genetic encoding method. It is necessary to determine an objective function that can quantify the quality of the individual. This function will accept the genetic encoding of the individual as input and output a numerical value that reflects the performance of the individual, that is, the fitness value. For each individual, its gene is decoded into the actual solution in the solution space of the problem according to the encoding method, and the decoded solution is substituted into the objective function for calculation to obtain the fitness value of the individual. The larger this value is, the closer the individual is to the optimal solution of the problem. Then, the calculated fitness value is recorded, usually saved in an array of the same size as the population, so as to be used in subsequent selection, crossover and mutation operations.

[0035] After obtaining the fitness of individuals in the initial population, it is determined whether the specified number of iterations has been reached. If the specified number of iterations has been reached, the relevant results can be directly output. If the specified number of iterations has not been reached, the selection, crossover and mutation steps are entered.

[0036] Selection and crossover operations, since the genetic algorithm adopts an elite strategy, after the population is generated, we use the roulette method (also known as fitness ratio) as the selection mechanism, in which the probability of selecting an individual is proportional to its fitness value. Mutation, a certain number of parent individuals are selected from the current population. These individuals will be used as the input of the crossover operation, and some genes of the parent individuals will be exchanged at the selected crossover point or crossover area. Mutation generates a new population. In order to increase the diversity of the population, each subclass individual is cross-mutated, and the mutation probability is, each iteration will generate a random real number between 0 and 1, which is lower than the mutation probability, and then determine an objective function that can quantify the quality of the individual.

[0037] The adaptive large neighborhood search algorithm unit includes the following steps:

[0038] A random number is obtained, and when it is determined that the random number is ≥ 0.5, a solution is randomly selected from the population as the initial solution of ALNS. If the random number is < 0.5, the GA global optimal solution is used as the initial solution of ALNS. In this way, the ALNS initial solution individual with a set number of updates is generated through the above selection method.

[0039] According to the goal of minimizing the total delivery cost in the model, data such as vehicle load, route length, time window, etc. are collected, and the optimal solution is obtained with the help of destruction operators and repair operators. The destruction operators include random destruction operators, greedy destruction operators, and correlation destruction operators. The random destruction operator randomly selects n nodes for destruction. The greedy destruction operator deletes and replaces all nodes in the line in turn, and records the nodes that cause the largest change in the objective function, and finds n nodes in turn for destruction. The first node in the correlation destruction operator is a random node, and the subsequent destroyed nodes are the nodes with the strongest correlation with the previous node, destroying a total of n nodes. The repair operators include random repair, greedy repair, and regret repair. Random repair randomly inserts the previously destroyed n nodes into any route in turn according to the generation method of the initial solution. Greedy repair loops the nodes to be inserted into all positions of all routes in turn, and records the positions that cause the best change in the objective function. Finally, the nodes are greedily inserted in turn to calculate the "best" position. Regret repair loops and calculates the regret values ​​of the n nodes to be inserted in turn, finds the node with the largest regret value among the current n nodes, inserts it into the route, updates the objective function value, and loops again to obtain the result. n-1 regret values ​​of nodes that need to be inserted, find the node with the largest regret value among the n-1 nodes that need to be inserted and insert it, repeat the above steps until all damaged nodes are repaired, the damage operator and the repair operator are selected according to the roulette mechanism, and the operators are scored. The better the performance of the operator, the higher the score of the operator. Initially, the score of each operator is set to 5. If the solution of the operator is better than the global optimal solution, the operator will add 12 points. If the solution found by the operator is better than the current solution, the operator will add 7 points; if the solution found by the operator is worse than the current solution, the operator will add 2 points;

[0040] The formula for updating the operator score is: new score = old score * reduction ratio + (1-reduction ratio) * get new score.

[0041] After the customer order is produced, it is delivered to the customer by the delivery vehicle. Since the starting point and end point of the delivery vehicle are determined in this process, the delivery vehicle needs to return to the distribution center after the delivery is completed, and the customer orders delivered by the same vehicle are accurately solved. In the process of accurate solution, we use the Dijkstra algorithm to solve the order quantity delivered by the same vehicle and obtain the optimal delivery route for each vehicle. Then, according to the solution of the accurate algorithm, the sorting of individual chromosomes is updated so that the algorithm can find a better solution, and the optimal solution is replaced by the randomly selected chromosome individual in the GA, and it is determined again whether the specified number of iterations is reached. If the specified number of iterations is reached, the relevant structure is output and the end is ended. If the relevant specified number of iterations is not reached, the step S4 is looped again.

[0042] The crossover operation can be selected to set PARENT1 (P1) and PARENT2 (P2), and two points are randomly selected from PARENT1 (P1) and PARENT2 (P2) as crossover points, such as F1 and F2. In between, all genes (P2) are copied to the same position in the offspring, and the remaining vacancies are filled in sequence by the genes of P1 in the order of their appearance in P1. Mutations can be formed by pairing genes of F1 and F2 at two randomly selected positions and exchanging them with each other to form new offspring.

[0043] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A production and distribution optimization method based on an improved genetic algorithm, characterized in that: It includes a genetic algorithm unit and an adaptive large neighborhood search algorithm unit, and the genetic algorithm unit includes the following steps: S1. Start encoding. A mixed three-layer vector is used to represent the chromosome. A 3*n matrix is ​​used to represent a chromosome. The first-layer vector represents the order of order scheduling, that is, the production order of the order. The second-layer vector represents the machine number of the order, that is, which machine produces the order. The third-layer vector represents the vehicle number of the order, that is, which vehicle delivers the order. S2. Generate an initial population, determine the number of individuals in the population, determine the genetic coding method of each individual, and then randomly generate the genes of each individual according to the determined genetic coding method. S2.

1. It is necessary to determine an objective function that can quantify the quality of individuals. This function will accept the genetic code of the individual as input and output a numerical value that reflects the individual's performance, namely the fitness value. For each individual, its gene is decoded into the actual solution in the solution space of the problem according to the encoding method. The decoded solution is substituted into the objective function for calculation to obtain the fitness value of the individual. The larger the value, the closer the individual is to the optimal solution of the problem. Then, the calculated fitness value is recorded and usually saved in an array of the same size as the population for subsequent selection, crossover and mutation operations. S3. After obtaining the fitness of individuals in the initial population, determine whether the specified number of iterations has been reached. If the specified number of iterations has been reached, the relevant results can be directly output. If the specified number of iterations has not been reached, enter the selection, crossover and mutation steps. S4. Selection and Crossover Operations,Since the genetic algorithm adopts an elite strategy, after the population is generated,,we use the roulette method (also called fitness proportion) as the selection,mechanism, in which the probability of selecting an individual is proportional to its,fitness value. S4.1, mutation, select a certain number of parent individuals from the current population, these individuals will be used as the input of the crossover operation, and some genes of the parent individuals will be exchanged at the selected crossover point or crossover area. S4. Mutation generates a new population. For the diversity of the population, crossover mutation is performed on each subclass individual with a mutation probability of . Each iteration generates a random real number between 0 and 1, which is lower than the mutation probability, and then repeats step S2.

1. The self-adaptive large neighborhood search algorithm unit comprises the following steps: S5. By obtaining a random number from step S4 and determining that the random number is ≥ 0.5, randomly select a solution from the population as the initial solution of ALNS. If the random number is < 0.5, the GA global optimal solution is used as the initial solution of ALNS. In this way, the ALNS initial solution individual with a set number of updates is generated through the above selection method. S6. According to the goal of minimizing the total delivery cost in the model, data such as vehicle load, route length, time window, etc. are collected, and the optimal solution is obtained with the help of destruction operators and repair operators. S6.

1. The destruction operators include random destruction operators, greedy destruction operators, and correlation destruction operators. The random destruction operator randomly selects n nodes for destruction. The greedy destruction operator deletes and replaces all nodes in the line in sequence, records the nodes that cause the largest change in the objective function, and finds n nodes in sequence for destruction. The first node in the correlation destruction operator is a random node, and the subsequent destroyed nodes are the nodes with the strongest correlation with the previous node, and a total of n nodes are destroyed. S6.

2. The repair operators include random repair, greedy repair, and regret repair. The random repair randomly inserts the n previously damaged nodes into any line in sequence according to the generation method of the initial solution. The greedy repair sequentially loops the nodes to be inserted into all positions of all lines, and records the position that makes the objective function change the best. Finally, the nodes are greedily inserted into the "best" position in sequence. The regret repair loops and calculates the regret values ​​of the n nodes to be inserted, finds the node with the largest regret value among the current n nodes, inserts it into the line, and updates the objective function value. Loop again to calculate the regret values ​​of the n-1 nodes to be inserted, finds the node with the largest regret value among the n-1 nodes to be inserted and inserts it, and repeats the above steps until all damaged nodes are repaired. S7. The destruction operator and the repair operator in step S6 are selected according to the roulette mechanism, and the operators in step S6 are scored. The better the performance of the operator, the higher the score of the operator. S8. After the customer order is produced, it is delivered to the customer by the delivery vehicle. Since the starting point and end point of the delivery vehicle are determined in this process, the delivery vehicle needs to return to the distribution center after the delivery is completed, and the customer order delivered by the same vehicle is accurately solved. In the process of accurate solution, we use the Dijkstra algorithm to solve the order quantity delivered by the same vehicle, and obtain the optimal delivery route for each vehicle. Then, according to the solution of the accurate algorithm, the sorting of individual chromosomes is updated so that the algorithm can find a better solution, and the optimal solution is replaced by the chromosome individual randomly selected in the GA, and it is determined again whether the specified number of iterations is reached. If the specified number of iterations is reached, the relevant structure is output and the end is ended. If the relevant specified number of iterations is not reached, the step S4 is cycled again.

2. The production and distribution optimization method based on improved genetic algorithm according to claim 1 is characterized by: The selection crossover operation can set PARENT1 (P1) and PARENT2 (P2), and randomly select two points from PARENT1 (P1) and PARENT2 (P2) as crossover points, such as F1 and F2, between which all genes (P2) are copied to the same position in the offspring, and the remaining vacancies are filled in sequence by the genes of P1 according to the order of appearance in P1.

3. The production and distribution optimization method based on improved genetic algorithm according to claim 1 is characterized by: The mutation can be achieved by pairing genes of F1 and F2 at two randomly selected positions and exchanging them with each other to form new offspring.

Citation Information

Cited By

  • Production and distribution combined scheduling method in hybrid flow shop

    CN120181524A

  • Vehicle path optimization method based on fusion of reinforcement learning and genetic algorithm

    CN120471251A

  • Aviation composite material hot press molding workpiece loading method based on hybrid optimization algorithm

    CN121118419A

  • An aviation composite material hot press forming workpiece loading method based on a hybrid optimization algorithm

    CN121118419B