Production line resource scheduling optimization method and system based on genetic algorithm
Through the production line resource scheduling optimization method based on genetic algorithms, the fast non-dominant sorting algorithm and screening algorithm are used to select the parent population, which solves the problem of unreasonable resource scheduling in the existing technology, and achieves reasonable resource scheduling and improvement of production efficiency.
Patent Information
- Application Number
- CN202510087896.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-27
AI Technical Summary
The existing resource optimization methods have defects in resource scheduling, and they cannot reasonably schedule various types of resources, which affects production efficiency.
The production line resource scheduling optimization method based on genetic algorithm is adopted, and the parent population is selected through the fast non-dominant sorting algorithm and the screening algorithm, and cross-mutation is performed to generate the next generation population until the preset number of iterations is reached, and the individuals of the last generation population are output as the scheduling decision.
Reasonable scheduling of various resources is achieved, production efficiency is improved, and better solutions can be found quickly, avoiding the decline in solution quality caused by random selection.
Smart Images

Figure CN120046906A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field related to resource scheduling, and more specifically, relates to an optimization method and system for production line resource scheduling based on a genetic algorithm. Background Art
[0002] The manufacturing industry is experiencing rapid development. The manufacturing processes related to various products have become increasingly complex, and more and more challenges are faced, including material transportation, labor distribution, space planning, equipment management, and process planning. To effectively manage diverse production orders, the optimization problem of the entire production line is usually broken down into key subtasks, such as process planning, shop floor scheduling, and worker allocation, etc.
[0003] However, in the construction of actual scenarios, the complex coupling relationship between diverse resource scheduling is often ignored, and this kind of neglect may lead to resource waste. In addition, in terms of solution algorithms, the search scope of heuristic algorithms is small and they cannot guarantee finding the global optimal solution, while learning algorithms lack sufficient data to ensure the stability of the results; the flexibility of meta-heuristic algorithms is poor and they cannot generate high-quality solutions for complex real-world problems. Therefore, the current resource optimization methods all have defects in resource scheduling and cannot reasonably schedule various resources, thus affecting production efficiency. Summary of the Invention
[0004] In view of the above defects or improvement requirements of the prior art, the present invention provides an optimization method and system for production line resource scheduling based on a genetic algorithm, aiming to reasonably schedule various resources and improve production efficiency.
[0005] To achieve the above object, the present invention provides an optimization method for production line resource scheduling based on a genetic algorithm, which includes:
[0006] Step S1, obtaining production information, including product information to be produced and resources to be scheduled;
[0007] Step S2, constructing multiple initial resource scheduling decisions as the initial population, and each scheduling decision is an individual in the population;
[0008] Step S3, executing a fast non-dominated sorting algorithm, sorting the individuals in the current population based on a set fitness function, and generating the Pareto levels of the individuals;
[0009] Step S4, selecting the top G individuals with the highest levels as the parental population according to the Pareto levels and performing crossover and mutation to generate the next generation population, where G is a preset value; if the total number of individuals in the first i - 1 levels < G < the total number of individuals in the first i levels, then execute a screening algorithm to select the parental population;
[0010] Step S5: Loop through steps S3 to S4 until a preset number of iterations is reached, and output the individuals of the last generation of the population. Use the output individuals as the scheduling decisions.
[0011] Among them, the execution of the screening algorithm includes:
[0012] Step S41: Initialize set C as the union of set Q1 and set Q2. Set Q1 contains all individuals of the first i - 1 levels, and set Q2 contains all individuals of level i.
[0013] Step S42: Find two individuals C h ∈C and C l ∈Q2 that are the closest in distance in the current set C and set Q2. If C h ∈Q1, then remove individual C l from set C. If C h ∈Q2, then select the one that is the closest in distance to other individuals in set C from C h and C l and remove it from set C.
[0014] Step S43: Repeat step S42 until the number of individuals in set C is reduced to G, and then use the current set C as the parental population.
[0015] Optionally, in step S4, the mutation rate λ for crossover and mutation is updated with the number of iterations n. If the crowding degree of the current population increases, update the mutation rate to (1 + α) times the current mutation rate; otherwise, update the mutation rate to (1 - α) times the current mutation rate. Here, α is a search parameter updated with the number of iterations n, and the relationship between α and n is:
[0016]
[0017] In the formula, a and b are hyperparameters adjusted in advance, and e is the base of the natural logarithm.
[0018] Optionally, in step S42, the distance between two individuals is obtained by comprehensively considering the distance of fitness and the distance of chromosomes between the two individuals.
[0019] The fitness is the value of the fitness function.
[0020] The scheduling scheme of each resource in an individual forms a corresponding chromosome through one - hot encoding.
[0021] Optionally, the fitness function includes a total delay evaluation function and a resource usage imbalance evaluation function.
[0022] Optionally, the fitness function further includes an operation error evaluation function, and the operation error evaluation function f 4 is:
[0023]
[0024] Wherein:
[0025]
[0026] In the formula, j is the index of the product, k is the index of the production operation, and c j,k represents the end time of operation k of product j, and t j,k+1 represents the standard time required for operation k + 1 of product j.
[0027] Optionally, in step S5, the individual with the smallest value of the operation error evaluation function selected from the forefront level of the Pareto level of the last generation population is used as the final scheduling decision.
[0028] Optionally, the resources to be scheduled include workers and workspaces, the scheduling decision includes a worker scheduling plan and a workspace scheduling plan, the worker scheduling plan is encoded as a worker scheduling chromosome, and the workspace scheduling plan is encoded as a workspace scheduling chromosome;
[0029] In the worker scheduling chromosome, a gene represents a worker, different genes correspond to different workers, and the gene value represents the workspace to which the worker is assigned;
[0030] In the workspace scheduling chromosome, a gene represents a workspace, one workspace corresponds to one or more genes, and the gene value represents the operations to be performed in the workspace.
[0031] The present invention also provides a production line resource scheduling optimization system based on a genetic algorithm, which includes:
[0032] An information acquisition unit for acquiring production information, including product information to be produced and resources to be scheduled;
[0033] An initialization unit for constructing a plurality of initial resource scheduling decisions as an initial population, with each scheduling decision being an individual in the population;
[0034] A sorting unit for performing a fast non-dominated sorting algorithm to sort the individuals in the current population based on a set fitness function and generate the Pareto levels of the individuals;
[0035] An evolution unit for selecting the top G individuals as the parent population according to the Pareto levels and performing crossover and mutation to generate the next generation population and inputting it into the initialization unit for iteration, where G is a preset value; if the total number of individuals in the first i - 1 levels < G < the total number of individuals in the first i levels, then the screening unit is activated to select the parent population;
[0036] A result output unit, configured to output individuals of the last generation population when a preset number of iterations is reached, and use the output individuals as scheduling decisions;
[0037] Among them, the screening unit includes:
[0038] A set partitioning subunit, configured to initialize set C as the union of set Q1 and set Q2, where set Q1 contains all individuals of the first i - 1 levels, and set Q2 contains all individuals of level i;
[0039] An update subunit, configured to continuously update set C. The update operation includes finding two individuals C h ∈C, C l ∈Q2 that are the closest in distance between the current set C and set Q2. If C h ∈Q1, then remove individual C from set C l . If C h ∈Q2, then select one of C h and C l that is the closest in distance to other individuals in set C and remove it from set C;
[0040] A parental population output subunit, configured to output the current set C as the parental population when the number of individuals in set C is reduced to G.
[0041] The present invention also provides a computer-readable storage medium, on which a computer program is stored. Among them, when the computer program is executed by a processor, the steps of the method described in any one of the above are implemented.
[0042] The present invention also provides a computer program product, including a computer program or instruction. When the computer program or instruction is executed by a processor, the steps of the method described in any one of the above are implemented.
[0043] Generally speaking, compared with the prior art through the above technical solutions conceived by the present invention, the present invention mainly has the following beneficial effects:
[0044] 1. The present invention uses a genetic algorithm to optimize the production line resource scheduling. When selecting the parent population, it combines the fast non-dominated sorting algorithm and the screening algorithm. The pareto levels of individuals are generated through the fast non-dominated sorting algorithm. The individuals located at the front of the pareto levels are usually better individuals. Therefore, a preset number of individuals located at the front of the pareto levels can be selected as the parent population, and crossover and mutation are performed to generate the next generation population. Considering that the probability that the total number of individuals in the first i pareto levels is exactly equal to the preset number G is extremely small, it is very likely that the total number of individuals in the first i - 1 levels < G < the total number of individuals in the first i levels. That is, it is necessary to select some individuals from the i-th level and combine them with the individuals in the first i - 1 levels to make up G individuals to form the parent population. Different individuals in the same pareto level are in a non-dominated relationship, and it is difficult to distinguish the quality of individuals. The quality of the selected individuals in this process significantly affects the convergence speed of the algorithm and the dispersion of the pareto front. Therefore, the present invention further designs a screening algorithm. Taking the pareto level i as the boundary layer, the individuals in the boundary layer are assigned to the set Q2, and all individuals in higher levels are assigned to the set Q1. According to the distance comparison, the individuals with a farther distance from Q1 are selected from the set Q2 and merged with the set Q1 to obtain the required number of parent populations for screening the parent population. The better parent population can be quickly screened out, avoiding the degradation of the solution quality caused by random selection, and a better solution can be quickly found to realize the reasonable scheduling of various resources, thereby improving production efficiency.
[0045] 2. Optionally, an adaptive mutation rate decay scheme based on the number of iterations is proposed. The mutation rate λ for crossover and mutation is updated with the number of iterations n. Since the mutation rate decays with the number of iterations, the algorithm can set a higher mutation rate, enabling the genetic algorithm to set a wide search range in the initial stage. As the iteration progresses, the mutation rate decreases, thereby reducing the random influence on each target and enabling the genetic algorithm to converge to a stable state more quickly. This method reduces the number of iterations from two aspects and helps save computing resources.
[0046] 3. Optionally, a new distance calculation scheme is proposed. When calculating the distance between individuals in the screening algorithm, not only the Euclidean distance of individuals in the fitness value space is considered, but also the Euclidean distance of individuals in the chromosome space is considered. The weighted sum of the two distance metrics is used as the new distance metric standard, so that two individuals can be distinguished in different spaces, enabling the clustering algorithm to more clearly capture the essential differences between the two individuals and improving the clustering effect.
[0047] 4. Optionally, the fitness function takes into account operation errors, which can avoid the loss of high-quality gene sequences and minimize incorrect operations.
[0048] 5. Optionally, select the individual with the smallest value of the operation error evaluation function selected from the Pareto hierarchical frontier level of the last generation population as the final scheduling decision set. In this way, workers can select the generation first configuration scheme with different target weights according to the actual production line operation requirements, providing a flexible design scheme for production line resource scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a flowchart of the steps of the production line resource scheduling optimization method in an embodiment of the present invention;
[0050] Figure 2 is a scatter plot of the Pareto front of the obtained last generation population in an embodiment of the present invention;
[0051] Figure 3 is a Gantt chart of the obtained scheduling decision in an embodiment of the present invention;
[0052] Figure 4 is a comparison convergence curve of the IGD performance index of five multi-objective optimization algorithms in the whole iteration process in an embodiment of the present invention;
[0053] Figure 5 is a box plot of the comparison of the IGD index of the results of independent repeated experiments in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0054] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0055] Embodiment 1
[0056] The present invention provides a production line resource scheduling optimization method based on a genetic algorithm, as Figure 1 shown is a flowchart of the steps of the production line resource scheduling optimization method in an embodiment of the present invention, which includes multiple steps, and the following will introduce each step in detail.
[0057] Step S1, obtain production information, including product information to be produced and resources to be scheduled.
[0058] Specifically, by obtaining the product information, it is possible to determine which operations need to be performed to produce the product, obtaining an operation set. The purpose of scheduling optimization is how to reasonably utilize the existing resources to quickly complete these operations and efficiently obtain the target product.
[0059] Resources can generally be divided into two categories, workers and workstations. Each workstation contains multiple jigs, each jig contains multiple workspaces, each workspace is equipped with a fixed machine, and each workspace can only perform one operation at a time. Different workspaces can perform operations simultaneously. At this time, the resource scheduling decision is how to allocate workers to each workspace and how to allocate operations to each workspace.
[0060] It should be noted that before executing the algorithm, it is necessary to design an encoding and decoding scheme based on the actual production line configuration and the target product order number data.
[0061] For ease of understanding, the following definitions are made first:
[0062]
[0063] Step S2: Construct multiple initial scheduling decisions as the initial population, and each scheduling decision serves as an individual in the population.
[0064] Specifically, first construct multiple scheduling decisions. At this time, the scheduling decisions can complete the production tasks, but they are very likely not the optimal resource scheduling solutions and need to be further optimized. It should be noted that on the premise of sufficient computing resources, the quality of the final solution set can be improved by increasing the scale of the initial population.
[0065] Taking the two resources of workers and workspaces as an example, the scheduling decision includes a worker scheduling plan and a workspace scheduling plan. The worker scheduling plan determines how to allocate workers to each workspace, and the workspace scheduling plan determines how to allocate operations to each workspace.
[0066] In specific operations, the worker scheduling plan is encoded as a worker scheduling chromosome, and the workspace scheduling plan is encoded as a workspace scheduling chromosome. In the genetic algorithm of the present invention, a scheduling decision is an individual, multiple individuals form a population, each individual contains multiple chromosomes, and each chromosome corresponds to the scheduling of a certain resource.
[0067] In the worker scheduling chromosome, the gene represents a worker, different genes correspond to different workers, and the gene value represents the workspace to which the worker is assigned. Specifically, the worker scheduling chromosome is represented as a one-dimensional integer sequence h m,s,w, the gene value range is the available workspace number range, and the gene length is the number of workers to be assigned. The gene at each position represents the number of a worker, and the gene value represents the workspace number assigned to this worker. For example, there are 5 workers in total, and the chromosome encoding of the worker scheduling is 1, 2, 4, 2, 9, indicating that the 1st to 5th workers are assigned to workspaces 1, 2, 4, 2, 9 in sequence. At this time, the assignment of 5 workers must be completed. In the assignment plan, the 2nd and 4th workers are assigned to the same workspace 2.
[0068] In the workspace scheduling chromosome, the gene represents the workspace. One workspace corresponds to one or more genes, and the gene value represents the operations that the workspace needs to execute. Specifically, the workspace scheduling chromosome is represented as a one-dimensional integer sequence o k,m,s , the gene value range is the number range of all operations, the gene length is the number of operations to be assigned to complete one product, each gene value represents an operation number, and the absolute position of the gene in the chromosome represents the workspace to which the operation is assigned. It should be noted that one workspace may execute different operations multiple times. Therefore, in the workspace scheduling chromosome, there may be multiple genes at different positions that all represent the same workspace. The relative positions of multiple genes representing the same workspace in the chromosome represent the order of different operations executed by this workspace. For example, there are 5 workspaces and 8 operations in total, and the chromosome encoding of the workspace scheduling is 1, 3, 4, 5, 6, 2, 8, 7. At this time, the assignment of 8 operations must be completed. In the assignment plan, it can be agreed in advance that when the workspace is insufficient, the operations will be assigned in the order of the workspace numbers in a loop. In this assignment plan, the 1st workspace will execute operations 1 and 2 in sequence, the 2nd workspace will execute operations 3 and 8 in sequence, the 3rd workspace will execute operations 4 and 7 in sequence, the 4th workspace will execute operation 5, and the 5th workspace will execute operation 6. It should be noted that when multiple products need to be completed, multiple products will be produced in a pipeline form.
[0069] Step S3: Execute the fast non-dominated sorting algorithm, sort the individuals in the current population based on the set fitness function, and generate the Pareto levels of the individuals.
[0070] The conventional fast non-dominated sorting algorithm can be used to divide the levels of individuals in the population and generate the Pareto levels of the individuals. The same Pareto level has one or more individuals. The higher the level, the better the fitness of its individuals, that is, the better the individuals. And there is no domination relationship between individuals in the same level (no individual is better than other individuals).
[0071] The fast non-dominated sorting algorithm is described below.
[0072] Step 31: Traverse all individuals and initialize two attributes for them: n p : The number of individuals that dominate p; S p : The set composed of individuals dominated by p
[0073] Step 32: Then set i = 1, and classify the individuals with n p = 0 into F i (that is, rank_i),
[0074] Step 33: Traverse each individual in F i , and subtract one from the n of each individual in the S p of each individual p ,
[0075] Step 34: Then increment i by 1, and classify all solutions with n p = 0 into F i
[0076] Step 35: Repeat steps 33 - 34 until all individuals are classified into one of the F i .
[0077] In one embodiment, production line resource scheduling usually considers whether product delivery is delayed and whether resource usage is balanced. Therefore, the fitness function includes a total delay evaluation function and a resource usage imbalance evaluation function.
[0078] Among them, the total delay evaluation function represents the maximum difference between the actual completion time and the target completion time of all products. One of the key objectives of scheduling optimization includes minimizing the total delay time of workpieces and improving the delivery efficiency of workpieces.
[0079] The total delay evaluation function f 1 can be expressed as:
[0080]
[0081] In the formula, c j,k represents the end time of operation k of product j, K represents the number of operations, and DT j represents the expected delivery time of product j.
[0082] The resource usage imbalance evaluation function can specifically include an inter - station imbalance evaluation function and an intra - station imbalance evaluation function. One of the key objectives of scheduling optimization includes minimizing the resource usage imbalance.
[0083] The inter - station imbalance represents the sum of the squared deviations between the actual working time and the average working time of all workstations, aiming to make the workload of workstations as evenly distributed as possible and avoid the situation where some workstations are overloaded while others are idle.
[0084] Unbalance evaluation function f between workstations 2 can be expressed as:
[0085]
[0086] In the formula, F represents the total number of stations, and D f represents the actual working time of each station f.
[0087] The unbalance within a workstation represents the sum of the squared deviations between the actual working time and the average working time of all frames in each workstation, aiming to make the working time of frames within each workstation as evenly distributed as possible and avoid the situation where some frames are overloaded while others are idle.
[0088] Unbalance evaluation function f within a workstation 3 can be expressed as:
[0089]
[0090] In the formula, M f represents the total number of medium-sized frames in station f, and D m,f represents the actual working time of medium-sized frame m.
[0091] Due to the randomness of the selection of the operating point and the evolutionary operations in the generation of the initial population, the possibility of violating the task priority constraints cannot be avoided. Common methods include using heuristic algorithms to improve the crossover strategy to locally determine a reasonable operation sequence, or setting the fitness value of incorrect individuals to the maximum value for elimination during the selection process. However, these rules often lead to the loss of high-quality gene sequences in incorrect individuals during the next-generation selection process and reduce the overall population diversity, significantly affecting the distribution quality of the final Pareto front.
[0092] Furthermore, to avoid the loss of high-quality gene sequences, in one embodiment, an operation error evaluation function can also be introduced, which represents the number of incorrect operations, aiming to minimize the incorrect operations.
[0093] Operation error evaluation function f 4 can be expressed as:
[0094]
[0095] Where:
[0096]
[0097] In the formula, t j,k+1 represents the standard time required for the operation k + 1 of product j.
[0098] When executing the fast non-dominated sorting algorithm, the above fitness of each individual can be calculated, the individuals in the current population can be sorted, and the Pareto hierarchy of the individuals can be generated.
[0099] Step S4, according to the Pareto hierarchy, select the G individuals with the highest level as the parent population and perform crossover mutation to generate the next generation population, where G is a preset value; if the total number of individuals in the first i-1 levels < G < the total number of individuals in the first i levels, then execute the screening algorithm to select the parent population.
[0100] Specifically, individuals at the frontier of the Pareto hierarchy are usually better individuals. Therefore, a preset number of individuals at the frontier of the Pareto hierarchy can be selected as the parent population to perform crossover mutation to generate the next generation population.
[0101] In actual operation, the probability that the total number of individuals in the first integer Pareto layers is exactly equal to the preset number G is extremely small. There is a high probability that the total number of individuals in the first i-1 layers will be less than G and less than the total number of individuals in the first i layers. That is, it is necessary to select some individuals from the i-th layer and combine them with the individuals in the first i-1 layers to make up G individuals to form the parent population.
[0102] Since different individuals in the same Pareto layer are in a non-dominated relationship, it is difficult to distinguish the quality of individuals. The quality of the selected individuals in this process significantly affects the convergence speed of the algorithm and the dispersion of the Pareto front. Therefore, it becomes challenging to design a universally applicable selection scheme to cope with real-world applications.
[0103] The present invention proposes a screening mechanism method to select better individuals from the same Pareto layer as parents. In this mechanism, the entire population of individuals is divided into three sets. Set Q2 is the set of all individuals in Pareto level i, with Pareto level i as the boundary layer, set Q1 is the set of all individuals in the first i-1 Pareto levels, and Q3 is the set of all individuals in all levels after Pareto level i. The screening algorithm selects individuals from set Q2 according to the distance and merges it with set Q1 to obtain the required number of parent populations.
[0104] The screening algorithm includes steps S41 to S43.
[0105] Step S41, initialize set C as the union of set Q1 and set Q2, set Q1 includes all individuals in the first i-1 levels, and set Q2 includes all individuals in level i.
[0106] Specifically, all individuals can be divided into three sets Q1, Q2 and Q3:
[0107] The set Q2 is the set of all individuals in the pareto level i. With the pareto level i as the boundary layer, Q1 is the set of all individuals in the first i - 1 pareto levels, and Q3 is the set of all individuals in all levels after the pareto level i.
[0108] Using the union of the sets Q1 and Q2 as the initialized set C, this screening algorithm gradually reduces the number of individuals in the set C until G individuals remain by means of removal.
[0109] Step S42: Find the two individuals C h ∈C, C l ∈Q2 that are the closest in distance in the current set C. If C h ∈Q1, then remove the individual C l from the set C. If C h ∈Q2, then select the one that is the closest in distance to the other individuals in C from C h and C l and remove it from the set C.
[0110] Specifically, first calculate the distance between each individual in the set C and each different individual in the set Q2, and record it in the distance matrix. Through the distance matrix, find the two individuals with the closest distance, denoted as C h and C l respectively, and remove one of them. The removal principle is: if C h ∈Q1, then remove the individual C l from the set C. If C h ∈Q2, then select the one that is the closest in distance to the other individuals in C from C h and C l and remove it from the set C. After removal, update the distance matrix, and re - find the closest individual pair for the removal operation until the number of individuals in C is equal to the required population size.
[0111] In the specific operation, a distance matrix can be constructed. Each element of this distance matrix reflects the distance between each individual in the set C and each individual in the set Q2. Based on this distance matrix, the closest C h and C l can be quickly found. When updating the set C, simultaneously remove the distance elements related to the removed individual from the distance matrix to update the distance matrix.
[0112] In a specific embodiment, the distance between two individuals is obtained by comprehensively considering the distance of fitness and the distance of chromosomes between the two individuals. The fitness is the value obtained after substituting the individual into the fitness function. Let d 1 represent the distance between two individuals in the chromosome space, and d 2It represents the distance between them in the fitness space, integrating d 1 and d 2 , to obtain the comprehensive distance d(C h ,C l ), and the specific calculation formula is as follows:
[0113]
[0114] In the formula, γ is the set weight coefficient, the superscript (h) represents the corresponding individual C h , and the superscript (l) represents the corresponding individual C l . Among them, when calculating the chromosome distance, one-hot encoding is used for the calculation of the chromosome distance.
[0115] In the above embodiments, when calculating the distance, not only the fitness distance of the individual is considered, but also the chromosome distance of the individual is considered. In this way, the weighted sum of the two distance metrics is used as the new distance metric standard, so that two individuals can be distinguished in different spaces, so that the clustering algorithm can more clearly capture the essential differences between the two individuals and improve the clustering effect.
[0116] Step S43: Repeat step S42 until the number of individuals in set C is reduced to G, and then use the current set C as the parental population.
[0117] Through the above method, the parental population can be selected from the population of the current g-th generation, the crossover and mutation operators are executed, and the parental population is evolved to generate the (g + 1)-th generation population P g+1 .
[0118] It can be understood that the constraint conditions can be set according to the actual situation of the production line, and crossover and mutation are performed under the set constraint conditions. Specifically, for two chromosomes in the same individual, different crossover and mutation operations are adopted. For the chromosome of the workspace scheduling, since there are strong priority constraints between operations, the probability of violating these constraints also needs to be minimized in the evolutionary operation. Therefore, matching crossover and shuffle mutation are selected as the crossover and mutation operations. For the chromosome of the worker scheduling, the crossover and mutation operations can select two-point crossover and integer uniform mutation.
[0119] Step S5: Loop and execute steps S3 to S4 until the preset number of iterations is reached, output the individuals of the last generation population, and use the output individuals as the scheduling decisions.
[0120] In a typical multi-objective genetic algorithm, mutation and crossover are necessary means to expand the search space. However, during the execution of the algorithm, the probabilities of crossover and mutation remain unchanged. This may lead to low search efficiency in the early stage and insufficient convergence to the optimal value in the later stage.
[0121] To solve the above problems, in one embodiment, an adaptive mutation rate decay scheme based on the number of iterations is proposed. The mutation rate λ for crossover and mutation is updated with the number of iterations n. If the current population crowding degree increases, the mutation rate is updated to (1 + α) times the current mutation rate; otherwise, the mutation rate is updated to (1 - α) times the current mutation rate. Here, α is a search parameter updated with the number of iterations n, and the relationship between α and n is:
[0122]
[0123] In the formula, a and b are hyperparameters adjusted in the early stage, and e is the base of the natural logarithm.
[0124] The update formula for the mutation rate λ is as follows:
[0125]
[0126] In this embodiment, by adopting the above adaptive mutation rate decay scheme, since the mutation rate decays with the number of iterations, the algorithm can set a relatively high mutation rate, enabling the genetic algorithm to set a wide search range in the initial stage. As the iteration progresses, the mutation rate decreases, thereby reducing the random influence on each target and enabling the genetic algorithm to converge to a stable state more quickly. This method reduces the number of iterations from two aspects and helps save computing resources.
[0127] After reaching the iteration condition, an individual can be selected from the last generation of the population as the final scheduling decision.
[0128] In specific operations, an individual with the smallest value of the operation error evaluation function selected from the forefront level of the Pareto hierarchy of the last generation of the population can be used as the final scheduling decision. In this way, when applied to actual production, workers can select the generation prior configuration scheme with different target weights according to the actual production line operation requirements, providing a flexible design scheme for production line resource scheduling.
[0129] Embodiment 2
[0130] The present invention also relates to an optimization system for production line resource scheduling based on a genetic algorithm, including:
[0131] An information acquisition unit for acquiring production information, including product information to be produced and resources to be scheduled;
[0132] An initialization unit for constructing multiple initial resource scheduling decisions as the initial population, with each scheduling decision being an individual in the population;
[0133] A sorting unit for performing a fast non-dominated sorting algorithm to sort the individuals in the current population based on the set fitness function and generate the Pareto hierarchy of the individuals;
[0134] An evolution unit, which is used to select the top G individuals with the highest levels as the parental population according to the Pareto levels, perform crossover and mutation to generate the next generation population, and input it into the initialization unit for iteration, where G is a preset value; if the total number of individuals in the previous i-1 levels < G < the total number of individuals in the previous i levels, the screening unit is activated to select the parental population;
[0135] A result output unit, which is used to output the individuals of the last generation population when the preset number of iterations is reached, and use the output individuals as the scheduling decision;
[0136] Among them, the screening unit includes:
[0137] A set partitioning sub-unit, which is used to initialize the set C as the union of the set Q1 and the set Q2. The set Q1 contains all the individuals in the previous i-1 levels, and the set Q2 contains all the individuals in the level i;
[0138] An update sub-unit, which is used to continuously update the set C. The update operation includes finding the two individuals C h ∈C, C l ∈Q2 that are the closest in distance between the current set C and the set Q2. If C h ∈Q1, the individual C l is removed from the set C. If C h ∈Q2, the one that is the closest in distance to other individuals in the set C is selected from C h and C l and removed from the set C;
[0139] A parental population output sub-unit, which is used to output the current set C as the parental population when the number of individuals in the set C is reduced to G.
[0140] It can be understood that the above production line resource scheduling optimization system can be used to implement the production line resource scheduling optimization method in Embodiment 1. For specific details, reference can be made to the introduction of Embodiment 1, which will not be elaborated here.
[0141] Embodiment 3
[0142] The present invention also relates to a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0143] Specifically, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0144] Example 4
[0145] An embodiment of the present invention provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the method in the above embodiment of the present invention.
[0146] The effectiveness of the present solution is verified by the following specific examples.
[0147] All the production line data in this example comes from a real workpiece assembly line. It includes 5 different workstations, 22 assembly jigs numbered from 0 to 21, and a total of 322 workers will be assigned to the assembly line. Table I shows the jig numbers of each workstation, and Table II provides the number of workspaces of each jig.
[0148] Table I: Jig numbers of each workstation
[0149]
[0150] Table II: Number of spaces of each jig
[0151]
[0152] In this example, the manufacturing information of the assembly order is obtained through a real case. All time data in the experiment is in hours. The product to be produced is an airplane. From part inspection to the final airplane test, after reasonable decomposition, there are a total of 483 operations. The arrival time (AT) of the airplane parts and the expected delivery time (DT) of the completed airplane are shown in Table III. Different columns correspond to different airplanes, and a total of 8 airplanes need to be assembled.
[0153] Table III: Airplane order information
[0154]
[0155] Execute the optimization method proposed by the present invention to generate resource scheduling decisions.
[0156] As Figure 2 shown is the Pareto front scatter plot of the last generation population generated in this example. It can be observed that all solutions are evenly distributed in the solution space, indicating that the resource scheduling optimization method of the present invention can provide a comprehensive solution for this example.
[0157] As Figure 3The Gantt chart of the scheduling decision obtained in this embodiment is shown. Among them, the abscissa is the processing time, and the ordinate is the number of each aircraft. The squares of the same color represent the tasks within the same station, and the number of the square represents the jig number assigned to the corresponding station. It can be seen from this that the balance of the assembly line is relatively good.
[0158] To verify the effectiveness of the proposed algorithm (INSGA-II), three other multi-objective optimization algorithms were also selected for performance comparison, including the multi-objective evolutionary framework based on adaptive geometric estimation (AGE-II), the multi-objective evolutionary algorithm based on decomposition (MOEA / D), and UNSGA-III. AGE-II is an evolutionary algorithm that uses the Newton-Raphson method for non-dominated front modeling. MOEA / D introduces a new replacement strategy and neighborhood adjustment mechanism in the multi-objective algorithm. UNSGA-III is an extension of NSGA-III, which proposes a uniform pool retention strategy. All algorithms were implemented in Python 3.9 on the PyCharm platform and run on an Intel Core i5-5800 processor with 16GB of memory. The same parameters were set for all multi-objective algorithms.
[0159] To obtain a Pareto front as realistic as possible, the number of iterations and population size of all algorithms were set to 500. Each algorithm was run 20 times to obtain 100 non-dominated points. Then these points were used as reference solutions to evaluate the results of each algorithm. To ensure the comprehensiveness of the comparison, the hypervolume ratio (HV) and the inverted generational distance (IGD) were used to evaluate the diversity and proximity of the solutions.
[0160] Figure 4 The IGD performance metrics of the five multi-objective optimization algorithms during the entire iteration process are shown. To ensure the general applicability of the experimental results, all algorithms were executed 10 times, and all algorithms achieved rapid convergence within approximately 60 generations. In the initial iteration stage of all algorithms, the feasible solutions did not converge to the boundary of the strict solution space, and the convergence speeds were similar. However, at about 20 generations, AGE-II and UNSGA-III fell into local optima, and the convergence speed decreased significantly. The INSGA-II proposed in the present invention can expand the search space by adaptive parameters and relaxing strict constraints when the iteration results are poor, so that the actual convergence rate remains excellent.
[0161] The Wilcoxon signed-rank test conducted at a significance level of 0.05 was used to evaluate the performance of INSGA-II relative to other multi-objective evolutionary algorithms (MOEAs). The results are summarized in Table IV, showing that INSGA-II is significantly superior to other algorithms in terms of the IGD metric. In addition, INSGA-II also outperforms the results of AGE-II, MOEA / D, and UNSGA-III in terms of the HV metric. The results further indicate that even without prior knowledge of the characteristics of the actual Pareto front, the hierarchical clustering algorithm integrated into the INSGA-II framework effectively guides the algorithm towards the true Pareto front.
[0162] Table IV: Wilcoxon signed-rank test
[0163]
[0164] To further verify the effectiveness of the present model, a variety of algorithm models have been developed within the framework of the NSGA algorithm. Through boxplot tests, it is used to evaluate the superiority of the proposed algorithm relative to NSGA-II and NSGA-III. As Figure 5 shown, it achieves the lowest median in terms of the IGD metric, and both the upper and lower bounds are reduced. This indicates that the range of results generated by INSGA-II is narrower and the variability is smaller. In addition, this also indicates that the proposed algorithm has enhanced convergence towards the actual Pareto solutions and exhibits a wider distribution of the solution space in multiple experiments.. This also shows that the improvements in this study enable INSGA-II to obtain better Pareto front solutions.
[0165] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity in description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification. It should be noted that the "in one embodiment", "for example", "for another example", etc. of the present invention are intended to illustrate the present invention and are not used to limit the present invention.
[0166] The above-described embodiments only represent several implementation manners of the present invention. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the patent application. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention.
Claims
1. A production line resource scheduling optimization method based on genetic algorithm, characterized in that: include: Step S1, obtaining production information, including information on products to be produced and resources to be scheduled; Step S2: construct multiple initial resource scheduling decisions as an initial population, with each scheduling decision being an individual in the population; Step S3, executing a fast non-dominated sorting algorithm, sorting the individuals in the current population based on the set fitness function, and generating a Pareto hierarchy of the individuals; Step S4, according to the Pareto hierarchy, select the G individuals with the highest level as the parent population and perform crossover mutation to generate the next generation population, where G is a preset value; if the total number of individuals in the first i-1 levels < G < the total number of individuals in the first i levels, then perform a screening algorithm to select the parent population; Step S5, looping through steps S3 to S4 until a preset number of iterations is reached, outputting individuals of the last generation of the population, and using the output individuals as scheduling decisions; Wherein, the executing screening algorithm comprises: Step S41, initialize set C as the union of set Q1 and set Q2, set Q1 includes all individuals in the first i-1 levels, and set Q2 includes all individuals in level i; Step S42: Find the two individuals C in the current set C and the set Q2 that are closest to each other. h ∈C, C l ∈Q2, if C h ∈Q1, then remove individual C from set C l , if C h ∈Q2, then from C h and C l Select the one that is closest to the other individuals in set C and remove it from set C; Step S43, repeat step S42 until the number of individuals in set C is reduced to G, and then use the current set C as the parent population.
2. The production line resource scheduling optimization method based on genetic algorithm according to claim 1, characterized in that: In step S4, the mutation rate λ of the crossover mutation is updated with the number of iterations n. If the current population crowding increases, the mutation rate is updated to (1+α) times the current mutation rate. Otherwise, the mutation rate is updated to (1-α) times the current mutation rate. Wherein, α is a search parameter updated with the number of iterations n, and the relationship between α and n is: In the formula, a and b are the hyperparameters adjusted in the early stage, and e is the base of the natural logarithm.
3. The production line resource scheduling optimization method based on genetic algorithm according to claim 1, characterized in that: In step S42, the distance between the two individuals is obtained by combining the fitness distance between the two individuals and the chromosome distance; The fitness is the value of the fitness function; The scheduling scheme of each resource in an individual is encoded into a corresponding chromosome through one-hot encoding.
4. The production line resource scheduling optimization method based on genetic algorithm according to claim 1, characterized in that: The fitness function includes a total delay evaluation function and a resource usage imbalance evaluation function.
5. The method for optimizing production line resource scheduling based on genetic algorithm according to claim 4, characterized in that: The fitness function also includes an operation error evaluation function, and the operation error evaluation function f4 is: in: Where j is the index of the product, k is the index of the production operation, and c j,k represents the end time of operation k of product j, t j,k+1 It represents the standard time required for operation k+1 of product j.
6. The method for optimizing production line resource scheduling based on genetic algorithm according to claim 5, characterized in that: In step S5, the individual with the smallest value of the operation error evaluation function is selected from the frontier level of the Pareto hierarchy of the last generation population as the final scheduling decision.
7. The production line resource scheduling optimization method based on genetic algorithm according to any one of claims 1 to 6, characterized in that: The resources to be scheduled include workers and workspaces, and the scheduling decision includes a worker scheduling plan and a workspace scheduling plan, the worker scheduling plan is encoded as a worker scheduling chromosome, and the workspace scheduling plan is encoded as a workspace scheduling chromosome; In the worker scheduling chromosome, genes represent workers, different genes correspond to different workers, and gene values represent the workspaces to which the workers are assigned; In the workspace scheduling chromosome, a gene represents a workspace, one workspace corresponds to one or more genes, and a gene value represents an operation that needs to be executed in the workspace.
8. A production line resource scheduling optimization system based on genetic algorithm, characterized in that: include: An information acquisition unit, used to acquire production information, including information on products to be produced and resources to be scheduled; An initialization unit, used to construct multiple initial resource scheduling decisions as an initial population, with each scheduling decision being an individual in the population; A sorting unit is used to execute a fast non-dominated sorting algorithm, sort the individuals in the current population based on a set fitness function, and generate a Pareto hierarchy of the individuals; An evolution unit, used for selecting G individuals with the highest level as the parent population according to the Pareto hierarchy and performing crossover mutation to generate the next generation population and inputting the initialization unit for iteration, where G is a preset value; if the total number of individuals in the first i-1 levels is less than G and less than the total number of individuals in the first i levels, the screening unit is started to select the parent population; A result output unit is used to output individuals of the last generation of the population when a preset number of iterations is reached, and the output individuals are used as scheduling decisions; Wherein, the screening unit comprises: The set partitioning subunit is used to initialize the set C as the union of the set Q1 and the set Q2, where the set Q1 contains all the individuals in the first i-1 levels, and the set Q2 contains all the individuals in level i; The update subunit is used to continuously update the set C. The update operation includes finding the two individuals C in the current set C that are closest to the set Q2. h ∈C, C l ∈Q2, if C h ∈Q1, then remove individual C from set C l , if C h ∈Q2, then from C h and C l Select the one that is closest to the other individuals in set C and remove it from set C; The parent population output subunit is used to output the current set C as the parent population when the number of individuals in the set C is reduced to G.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.