Production scheduling method and device, equipment and storage medium

The genetic algorithm is used to cross and mutate the process sequencing chromosomes in production scheduling to ensure that they meet the process constraint relationships, solve the problem of infeasible optimal solutions in the existing technology, and improve the feasibility and efficiency of production scheduling.

CN118798522APending Publication Date: 2024-10-18WUHAN MARINE MACHINERY PLANT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410689589.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing production scheduling methods may not be able to satisfy the sequential constraint relationships between multiple processes of the workpiece, causing the optimal solution to be an infeasible solution, thereby affecting production efficiency.

Method used

A genetic algorithm is used to perform multiple iterations on the initial generation of process-sorted chromosomes, and candidate chromosomes are generated through crossover and mutation to ensure that the chromosome arrangement sequence after each iteration satisfies the constraint relationship between processes, thereby selecting the optimal solution that satisfies the constraint relationship.

Benefits of technology

Ensure that the optimal solution is a feasible solution, avoid workpiece processing errors, and improve the efficiency and reliability of production scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118798522A_ABST
    Figure CN118798522A_ABST
Patent Text Reader

Abstract

The invention discloses a production scheduling method and device, equipment and a storage medium, and belongs to the technical field of production management. The method comprises the following steps: determining a plurality of processes for producing a target product, wherein a constraint relationship exists among the plurality of processes; based on the constraint relationship among the multiple processes, generating a primary process sorting chromosome; a genetic algorithm is adopted to carry out multiple iterations on the primary procedure sorting chromosomes, multiple candidate procedure sorting chromosomes are obtained, each iteration in the multiple iterations comprises crossover and variation, and the sequence of multiple procedures represented by the sorting sequence of multiple genes of the procedure sorting chromosomes obtained in each iteration meets the constraint relation; selecting an optimal process sorting chromosome from the plurality of candidate process sorting chromosomes; and generating production scheduling information according to the optimal process sorting chromosome. The method can ensure that the obtained optimal solution is a feasible solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of production management, and in particular to a production scheduling method, device, equipment and storage medium. Background Art

[0002] Production scheduling means assigning appropriate processing sequence and processing equipment to each process of each workpiece. Reasonable production scheduling can improve the efficiency of processing workpieces in the workshop.

[0003] In the related art, the production scheduling method includes: constructing a primary chromosome based on the processing time of the machine, the processing time of each workpiece and the downtime of the factory, and using a genetic algorithm to iterate the primary chromosome for multiple rounds to find the optimal solution.

[0004] However, the optimal solution obtained by the above method may not satisfy the sequential constraints between multiple processes of the workpiece, resulting in the optimal solution being an infeasible solution. Using this infeasible solution for production scheduling will lead to errors in workpiece processing. Summary of the invention

[0005] The present disclosure provides a production scheduling method, device, equipment and storage medium, which can ensure that the optimal solution obtained is a feasible solution. The technical solution at least includes the following solutions:

[0006] In a first aspect, a production scheduling method is provided, comprising: determining a plurality of processes for producing a target product, wherein a constraint relationship exists between the plurality of processes; generating a first-generation process sorting chromosome based on the constraint relationship between the plurality of processes, wherein each of the first-generation process sorting chromosomes comprises a plurality of genes, wherein each gene of the first-generation process sorting chromosome is used to represent a process among the plurality of processes, and an arrangement order of the plurality of genes of the first-generation process sorting chromosome is used to characterize a sequence among the plurality of processes and satisfy the constraint relationship; using a genetic algorithm to iterate the first-generation process sorting chromosome multiple times to obtain a plurality of candidate process sorting chromosomes, wherein each iteration of the multiple iterations comprises crossover and mutation, and the sequence among the plurality of processes represented by the arrangement order of the plurality of genes of the process sorting chromosome obtained in each iteration satisfies the constraint relationship; selecting an optimal process sorting chromosome from the plurality of candidate process sorting chromosomes; and generating production scheduling information according to the optimal process sorting chromosome.

[0007] Optionally, the genetic algorithm is used to iterate the process sorting chromosome of the initial generation for multiple times, including: for the crossover in any iteration, determining the first point set corresponding to the first gene of the first chromosome, the first point set including at least one transfer point in the second chromosome, each transfer point in the second chromosome is adjacent to at least one gene in the second chromosome and does not overlap with any gene, after the first gene is transferred to any transfer point in the first transfer point set, the sequence between the multiple processes represented by the arrangement order of the multiple genes in the second chromosome satisfies the constraint relationship; transferring the first gene to the first transfer point, the first transfer point is any transfer point in the first point set; wherein the first chromosome and the second chromosome are two different chromosomes generated in the previous iteration of any iteration.

[0008] Optionally, the use of a genetic algorithm to iterate the initial process sorting chromosome multiple times also includes: if the second gene of the first chromosome is transferred to any transfer point of the second chromosome, and the sequence of multiple processes represented by the arrangement order of multiple genes in the second chromosome after the transfer does not satisfy the constraint relationship, then any transfer point from all the transfer points of the second chromosome is selected as the second transfer point of the second gene; the third gene of the first chromosome is transferred to any transfer point before the second transfer point, and in the constraint relationship, the process indicated by the third gene is before the process indicated by the second gene; and the second gene is transferred to the second transfer point.

[0009] Optionally, the use of a genetic algorithm to iterate the initial generation of process sorting chromosomes for multiple times also includes: for a variation in any iteration, determining a second point set corresponding to a fourth gene of a third chromosome, the second point set including at least one transfer point in the third chromosome, each transfer point in the third chromosome being adjacent to at least one gene in the third chromosome and not overlapping with any gene, and after the fourth gene is transferred to any transfer point in the second transfer point set, the sequence of multiple processes represented by the arrangement order of the multiple genes in the third chromosome satisfies the constraint relationship; transferring the fourth gene to a third transfer point, the third transfer point being any transfer point in the second point set; wherein the third chromosome is a chromosome generated in the previous iteration of any iteration.

[0010] Optionally, the method also includes: based on a first fitness function, determining the fitness value of each process sorting chromosome generated in the previous iteration of the kth iteration under the production scheduling target, the first fitness function is a fitness function with scale transformation; based on the fitness value of each process sorting chromosome generated in the previous iteration of the kth iteration under the production scheduling target, selecting at least one process sorting chromosome from multiple process sorting chromosomes generated in the previous iteration of the kth iteration, and performing a k+1th iteration based on the selected process sorting chromosome; wherein k is an integer, k is greater than 0 and less than the maximum number of iterations.

[0011] Optionally, the method further includes: determining a first process sequence according to the constraint relationship, the first process sequence being used to indicate the sequence between the multiple processes; generating a first-generation machine load chromosome based on the first process sequence, each gene in the first-generation machine load chromosome being used to indicate the time required to use a machine to execute a process in the first process sequence, and each gene in the first-generation machine load chromosome corresponds to a different process; determining a total load of each machine load chromosome generated in the previous iteration of the qth iteration, the total load being used to indicate the sum of the time indicated by each gene in multiple genes of the machine load chromosome; on the premise that the total load of the fourth chromosome after mutation is reduced compared to the total load of the fourth chromosome before mutation, using a genetic algorithm to perform a q+1th iteration on multiple machine load chromosomes generated in the previous iteration of the qth iteration, the fourth chromosome being any machine load chromosome generated in the previous iteration of the qth iteration; wherein q is an integer, q is greater than 0 and less than the maximum number of iterations.

[0012] In a second aspect, a production scheduling device is also provided, including: a constraint relationship acquisition module, used to determine multiple processes for producing a target product, and there is a constraint relationship between the multiple processes; a first generation module, used to generate a first-generation process sorting chromosome based on the constraint relationship between the multiple processes, each of the first-generation process sorting chromosomes includes multiple genes, each gene of the first-generation process sorting chromosome is used to represent a process among the multiple processes, and the arrangement order of the multiple genes of the first-generation process sorting chromosome is used to characterize the sequence between the multiple processes and satisfy the constraint relationship; an iteration module, used to use a genetic algorithm to iterate the first-generation process sorting chromosome for multiple times to obtain multiple candidate process sorting chromosomes, each iteration of the multiple iterations includes crossover and mutation, and the sequence between the multiple processes represented by the arrangement order of the multiple genes of the process sorting chromosome obtained in each iteration satisfies the constraint relationship; a selection module, used to select the optimal process sorting chromosome from the multiple candidate process sorting chromosomes; a second generation module, used to generate production scheduling information according to the optimal process sorting chromosome.

[0013] Optionally, the iteration module is also used to determine a first point set corresponding to the first gene of the first chromosome for the crossover in any iteration, the first point set including at least one transfer point in the second chromosome, each transfer point in the second chromosome being adjacent to at least one gene in the second chromosome and not overlapping with any gene, and after the first gene is transferred to any transfer point in the first transfer point set, the sequence between multiple processes represented by the arrangement order of multiple genes in the second chromosome satisfies the constraint relationship; the first gene is transferred to the first transfer point, the first transfer point being any transfer point in the first point set; wherein the first chromosome and the second chromosome are two different chromosomes generated in the previous iteration of any iteration.

[0014] Optionally, the iteration module is also used to select any one transfer point from all the transfer points of the second chromosome as the second transfer point of the second gene if the second gene of the first chromosome is transferred to any transfer point of the second chromosome, and the sequence of multiple processes represented by the arrangement order of the multiple genes in the second chromosome after the transfer does not satisfy the constraint relationship; transfer the third gene of the first chromosome to any transfer point before the second transfer point, and in the constraint relationship, the process indicated by the third gene is before the process indicated by the second gene; and transfer the second gene to the second transfer point.

[0015] Optionally, the iteration module is also used to determine a second point set corresponding to the fourth gene of the third chromosome for a variation in any iteration, the second point set including at least one transfer point in the third chromosome, each transfer point in the third chromosome being adjacent to at least one gene in the third chromosome and not overlapping with any gene, and after the fourth gene is transferred to any transfer point in the second transfer point set, the sequence of multiple processes represented by the arrangement order of multiple genes in the third chromosome satisfies the constraint relationship; the fourth gene is transferred to a third transfer point, the third transfer point being any transfer point in the second point set; wherein the third chromosome is a chromosome generated in the previous iteration of any iteration.

[0016] Optionally, the production scheduling device further includes a fitness value acquisition module. The fitness value acquisition module is used to determine the fitness value of each process sorting chromosome generated in the previous iteration of the kth iteration under the production scheduling target based on the first fitness function, and the first fitness function is a fitness function with scale transformation; the iteration module is also used to select at least one process sorting chromosome from multiple process sorting chromosomes generated in the previous iteration of the kth iteration based on the fitness value of each process sorting chromosome generated in the previous iteration of the kth iteration under the production scheduling target, and perform the k+1th iteration based on the selected process sorting chromosome; wherein k is an integer, k is greater than 0 and less than the maximum number of iteration rounds.

[0017] Optionally, the constraint relationship acquisition module is also used to determine a first process sequence according to the constraint relationship, and the first process sequence is used to indicate the sequence of the multiple processes; the first generation module is also used to generate an initial generation of machine load chromosomes based on the first process sequence, and each gene in the initial generation of machine load chromosomes is used to indicate the time required to use a machine to execute a process in the first process sequence, and each gene in the initial generation of machine load chromosomes corresponds to a different process.

[0018] The generation scheduling device also includes: a machine load acquisition module, the machine load acquisition module is used to determine the total load of each machine load chromosome generated in the previous iteration of the qth iteration, and the total load is used to indicate the sum of the time indicated by each gene in the multiple genes of the machine load chromosome; the iteration module is also used to use a genetic algorithm to perform a q+1th iteration on the multiple machine load chromosomes generated in the previous iteration of the qth iteration, on the premise that the total load of the fourth chromosome after mutation is reduced compared with the total load of the fourth chromosome before mutation, and the fourth chromosome is any machine load chromosome generated in the previous iteration of the qth iteration; wherein q is an integer, q is greater than 0 and less than the maximum number of iteration rounds.

[0019] In a third aspect, a computer device is also provided, comprising: a memory and a processor, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor, thereby executing the production scheduling method described in the above embodiment.

[0020] In a fourth aspect, a computer-readable storage medium is also provided, wherein at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to execute the production scheduling method described in the above embodiment.

[0021] In a fifth aspect, a computer program product is provided, comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the method described in the first aspect is implemented.

[0022] The beneficial effects brought by the technical solution provided by the embodiments of the present disclosure include at least:

[0023] Since the order of multiple processes indicated by the initial process ordering chromosomes satisfies the constraint relationship, and the chromosomes after crossover and mutation also satisfy the constraint relationship, after multiple iterations of the genetic algorithm, the order of multiple processes indicated by the multiple process ordering chromosomes obtained also satisfies the constraint relationship. In this way, the optimal process ordering chromosome obtained from the multiple process ordering chromosomes must also satisfy the constraint relationship, thereby ensuring that the optimal solution obtained is a feasible solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1A flowchart of a production scheduling method provided by an exemplary embodiment of the present disclosure is shown;

[0026] Figure 2 The BOM structure diagram of the target product is shown;

[0027] Figure 3 A schematic diagram of constraint relationships of a target product stored in a directed acyclic graph is shown;

[0028] Figure 4 and Figure 5 A flowchart of a production scheduling method provided by another exemplary embodiment of the present disclosure is shown;

[0029] Figure 6 It is a schematic diagram of the crossover process;

[0030] Figure 7 It is a schematic diagram of the mutation process;

[0031] Figure 8 It is a schematic diagram of the Lorenz curve and the absolute equilibrium curve of distribution;

[0032] Fig. 9 is the function graph of the scale factor;

[0033] Fig.10 A schematic structural diagram of a production scheduling device provided by an exemplary embodiment of the present disclosure is shown;

[0034] Fig.11 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0035] Unless otherwise defined, the technical terms or scientific terms used herein shall have the usual meanings understood by persons with ordinary skills in the field to which the present disclosure belongs. The words "first", "second", "third" and similar words used in the patent application specification and claims of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "one" do not indicate a quantity limitation, but indicate the existence of at least one. Words such as "include" or "comprise" and similar words mean that the elements or objects appearing before "include" or "comprise" include the elements or objects listed after "include" or "comprise" and their equivalents, and do not exclude other elements or objects. Words such as "connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0036] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.

[0037] The following is a brief description of the basic principles of genetic algorithms:

[0038] Genetic algorithms simulate the phenomena of replication, crossover and mutation in natural selection and natural inheritance. When using genetic algorithms to solve a problem, each possible solution to the problem is encoded into a chromosome, and several chromosomes constitute a population.

[0039] At the beginning of the genetic algorithm, some possible solutions are randomly generated in the form of chromosomes, which constitute the initial population. Then, each chromosome is evaluated according to the set fitness function to obtain the fitness value of each chromosome; based on the fitness value of each chromosome, some chromosomes can be selected to generate the next generation of chromosomes to form the next generation of population. This process is called selection, which is equivalent to the replication process in natural inheritance. Here, the fitness function is determined based on the problem to be solved, so the chromosome selected based on the fitness value is actually a chromosome that better meets the requirements of the problem to be solved than other unselected chromosomes.

[0040] Then, for the next generation of chromosomes, new chromosomes are generated by combining crossover and mutation to improve the randomness of the next generation of chromosomes and reduce the possibility of the next generation of chromosomes falling into the local optimum. This process is equivalent to the crossover and mutation phenomenon in natural anomalies. For the next generation of chromosomes, selection, crossover and mutation are continued, so as to perform multiple iterations. Among them, the new generation of chromosomes obtained in each iteration is a chromosome that better meets the requirements of the problem to be solved, and therefore has better performance than the previous generation. Therefore, after multiple iterations, the population will gradually evolve towards the optimal solution, and eventually the optimal chromosome can be obtained.

[0041] Figure 1 A flowchart of a production scheduling method provided by an exemplary embodiment of the present disclosure is shown. The method can be executed by a computer device. Figure 1 , the method comprising:

[0042] In step 101, multiple processes for producing a target product are determined.

[0043] There are constraints between multiple processes. Here, the processing of the target product can be divided into multiple production stages, and there is a sequence between the multiple production stages. Each production stage includes at least one process. Satisfying the constraints between multiple processes can be understood as satisfying the sequence of multiple production stages.

[0044] Optionally, the constraint relationship between multiple processes can be stored in the form of a directed acyclic graph. A directed acyclic graph refers to a directed graph without loops. When determining the multiple processes used to produce a target product, it is first necessary to obtain the BOM (Bill Of Materials) structure diagram of the target product, which is a directed acyclic graph. Based on the BOM structure diagram of the target product, the constraint relationship between the multiple processes of the target product can be determined.

[0045] Figure 2 The BOM structure diagram of the target product is shown, and an example is given in which the target product includes 10 production stages. Figure 2 In the formula, Jn represents the nth production stage, and the number in brackets below Jn represents the number of processes included in the nth production stage. For example, Figure 2 In the figure, J10 represents the 10th production stage, and (2) below J10 represents that the 10th production stage includes 2 processes.

[0046] In this constraint relationship, the process in J09 can only be executed after the process in J10 is completed, the process in J07 can only be executed after the processes in J08 and J09 are completed, and the process in J06 can only be executed after the process in J07 is completed. The process in J03 can only be executed after the process in J04 is completed, and the process in J01 can only be executed after the processes in J02 and J03 are completed. The target product can only be assembled after the processes in J01, J05, and J06 are all completed.

[0047] If the constraint relationship is not satisfied, for example, executing the process in J09 first and then executing the process in J10, the process in J09 will fail to execute correctly.

[0048] Figure 3 A schematic diagram of constraint relationships of a target product stored in a directed acyclic graph is shown. Figure 3 The directed acyclic graph in Figure 2 To establish the BOM structure diagram in Figure 3 , Figure 3 A circle in the figure represents a process, and the character in the circle indicates the production stage in which the process is located and the number of the process in the production stage. m0 represents the mth process in the nth production stage. 10 O 10 It means the first process of the 10th production stage, J 10 O 20 It means the second process of the 10th production stage. Figure 2 It can be seen that the 10th production stage requires a total of two processes, so Figure 3 J in 10 There are only two related processes.

[0049] In step 102, based on the constraint relationships among multiple processes, an initial generation of process sorting chromosomes is generated.

[0050] Each initial process sorting chromosome includes multiple genes. Each gene of the initial process sorting chromosome is used to represent one process among multiple processes. The arrangement order of the multiple genes of the initial process sorting chromosome is used to represent the sequence between multiple processes and satisfy the constraint relationship.

[0051] Here, each gene of the first-generation process-sorting chromosome is used to represent one of the multiple processes, so the number of the multiple genes on each chromosome is the same as the number of the multiple processes.

[0052] Optionally, each gene on the process sorting chromosome can represent the process corresponding to different production stages in the form of numbers, and the same number represents the process in the same production stage. For example, the 10th production stage requires two processes to complete the production, so there are two numbers 10 on the process sorting chromosome, which are used to represent the two processes of the 10th production stage.

[0053] In this way, a process sorting chromosome is essentially a group of numbers arranged in a set order. In the disclosed embodiment, the order of the processes corresponding to each number in the first-generation process sorting chromosome is used as the order of the processes from left to right, so that the order of the processes can be determined based on the order of the arrangement of multiple genes in the first-generation process sorting chromosome.

[0054] Among them, for the same production stage, when the production stage includes at least two processes, the at least two processes actually have a sequence relationship. For example, in the two processes of the 10th production stage, the first process needs to be completed before the second process.

[0055] In the process of sorting the processes of the first generation from left to right, the order of the processes corresponding to each number in the chromosome is used as the order of the processes. Taking the 10th production stage as an example, although the two 10s in the chromosome are the same number, there must be a sequence from left to right. Therefore, the two 10s can be used to determine the first and second processes of the 10th production stage in order from left to right.

[0056] In step 103, a genetic algorithm is used to iterate the initial process sorting chromosome multiple times to obtain multiple candidate process sorting chromosomes.

[0057] Each of the multiple iterations includes crossover and mutation, and the sequence between multiple processes represented by the arrangement sequence of multiple genes of the process sorting chromosome obtained in each iteration satisfies the constraint relationship.

[0058] In step 104, an optimal process ranking chromosome is selected from a plurality of candidate process ranking chromosomes.

[0059] In step 105, production scheduling information is generated according to the optimal process sorting chromosome.

[0060] In the disclosed embodiment, since the sequence of multiple processes indicated by the initial process ordering chromosomes satisfies the constraint relationship, and the chromosomes after crossover and mutation also satisfy the constraint relationship, after multiple iterations using the genetic algorithm, the sequence of multiple processes indicated by the multiple process ordering chromosomes obtained also satisfies the constraint relationship. In this way, the optimal process ordering chromosome obtained from the multiple process ordering chromosomes must also satisfy the constraint relationship, thereby ensuring that the optimal solution obtained is a feasible solution.

[0061] Figure 4 A flowchart of a production scheduling method provided by another exemplary embodiment of the present disclosure is shown. The method can be executed by a computer device. Figure 4 , the method comprising:

[0062] In step 401, multiple processes for producing a target product are determined.

[0063] The relevant contents of the multiple processes refer to the aforementioned step 101, and the detailed description is omitted here.

[0064] Optionally, the target product is determined in the following manner: the target product is determined based on the target order. Here, the target order is used to indicate the production of the target product, and the target product can be determined based on the target order.

[0065] Optionally, the target order can be obtained in any of the following ways: based on inventory data, filter out pending orders from all orders, and use any of the pending orders as the target order. The inventory data includes information on raw materials and tools stored in the warehouse that can be used to produce products.

[0066] Among all orders, each order is used to instruct the production of a product. For a certain order, the workshop can only produce the product indicated by the order if the raw materials and tools required for the product indicated by the order are already stored in the warehouse. Filtering out pending orders from all orders means filtering out unexecutable orders from all orders. For example, if the raw materials and tools stored in the warehouse cannot produce the product indicated by a certain order, the order is an unexecutable order.

[0067] Optionally, the method further includes: obtaining hyperparameters of the genetic algorithm. The hyperparameters of the genetic algorithm are parameters set before executing the genetic algorithm. In the disclosed embodiment, the hyperparameters of the genetic algorithm include: population size, crossover probability, mutation probability, maximum number of iterations, and number of times to find the optimal solution, etc.

[0068] Among them, the population size is used to indicate the number of process sorting chromosomes input in each round of iteration; the crossover probability is used to indicate the possibility of crossover between two process sorting chromosomes in a certain iteration; the mutation probability is used to indicate the possibility of mutated process sorting chromosomes in a certain iteration; the maximum number of iterations is used to indicate the upper limit of the number of iterations, and the iteration is stopped when the maximum number of iterations is reached.

[0069] The number of optimal solutions is used to indicate the number of times the optimal solution is found. For example, when the maximum number of iterations is reached, the iteration is stopped, and an optimal solution can be found from the current population, which is equivalent to an optimal solution. It is necessary to find the optimal solution multiple times until the number of optimal solutions is reached, so as to obtain multiple optimal solutions, and then select a relatively better optimal solution from the multiple optimal solutions, so as to ensure the reliability of the optimal solution.

[0070] In step 402, a genetic algorithm is used to iterate the initial process sorting chromosome multiple times to obtain multiple candidate process sorting chromosomes.

[0071] For any one of the multiple iterations, it is necessary to perform crossover and mutation on the multiple process sorting chromosomes generated by the previous iteration of the iteration.

[0072] In the genetic algorithm, the number of chromosomes that need to be crossed is determined based on the crossover probability. Taking the crossover probability of 0.1 and the population size of 100 (there are 100 process sorting chromosomes) as an example, in this case, it is necessary to crossover the 10 process sorting chromosomes in pairs. These 10 process sorting chromosomes can be randomly selected from the population.

[0073] Figure 5 is a flowchart of step 402, see Figure 5 , optionally, the crossover in any iteration of the process sorting chromosome comprises the following steps ab:

[0074] Step a: extracting a first gene set from the first chromosome and extracting a second gene set from the second chromosome.

[0075] The first chromosome and the second chromosome are two different chromosomes generated in the previous iteration of this iteration.

[0076] Optionally, the first step is implemented in the following manner: multiple production stages of the target product are randomly divided into two parts; genes corresponding to the processes included in the production stage of one of the parts are extracted from the first chromosome and the second chromosome to obtain the first gene set and the second gene set.

[0077] For example, the target product includes 10 production stages {J01, J02, ..., J10}, and the 10 production stages are randomly divided into two parts: Jobset1 = {J01, J02, J05, J06, J07, J08, J09} and Jobset2 = {J03, J04, J10}. Then the genes corresponding to Jobset1 include: 1, 2, 5, 6, 7, 8, 9; the genes corresponding to Jobset2 include 3, 4, 10.

[0078] Assuming that the genes corresponding to Jobset2 are taken as the genes in the first gene set and the second gene set, the genes in the first gene set include genes 3, 4, and 10 on the first chromosome; the genes in the second gene set include genes 3, 4, and 10 on the second chromosome.

[0079] When the genes corresponding to Jobset1 are used as the genes in the first gene set and the second gene set, the genes in the first gene set include genes 1, 2, 5, 6, 7, 8, and 9 on the first chromosome; the genes in the second gene set include genes 1, 2, 5, 6, 7, 8, and 9 on the second chromosome.

[0080] In the disclosed embodiment, the order of multiple genes in the first gene set is the same as that in the first chromosome; the order of multiple genes in the second gene set is the same as that in the second chromosome.

[0081] Since the multiple processes of the target product cannot be increased or decreased during production scheduling, the number of genes with the same number in the first chromosome and the second chromosome cannot change. Therefore, the multiple genes in the first gene set and the multiple genes in the second gene set during crossover need to be the same (the order may be different).

[0082] Step b: transferring genes in the first gene set one by one to the second chromosome from which the second gene set is extracted, and transferring genes in the second gene set one by one to the first chromosome from which the first gene set is extracted.

[0083] Figure 6 is a schematic diagram of the crossover process. Figure 6As shown, the first gene set of the first chromosome 501 is C1_set2, and the second gene set of the second chromosome 502 is C2_set2. It can be seen that the order of the genes in C1_set2 is the same as the order of the genes in the first chromosome 501; the order of the genes in C2_set2 is also the same as the order of the genes in the second chromosome 502.

[0084] The second chromosome from which the second gene set is extracted is C2_set1; the first chromosome from which the first gene set is extracted is C1_set1. Therefore, the genes in the first gene set are transferred one by one to the second chromosome from which the second gene set is extracted, that is, the genes in C1_set2 are transferred one by one to C2_set1; the genes in the second gene set are transferred one by one to the first chromosome from which the first gene set is extracted, that is, the genes in C2_set2 are transferred one by one to C1_set1.

[0085] In the disclosed embodiment, after C1_set2 is transferred to C2_set1 and C2_set2 is transferred to C1_set1, the crossover between the first chromosome and the second chromosome is completed.

[0086] In step b, the first gene in the first gene set is transferred using the following two steps:

[0087] The first step is to determine the first point set corresponding to the first gene of the first chromosome.

[0088] The first point set includes at least one transfer point in the second chromosome, each transfer point in the second chromosome is adjacent to at least one gene in the second chromosome and does not overlap with any gene, and after the first gene is transferred to any transfer point in the first transfer point set, the sequence between multiple processes represented by the arrangement order of multiple genes in the second chromosome satisfies the constraint relationship.

[0089] Here, the transfer point is essentially a position in the second chromosome where the first gene can be inserted. The first gene can be inserted before or after any gene in the second chromosome. Therefore, there is a transfer point between any two adjacent genes in the second chromosome, and in order from left to right, the left side of the first gene in the second chromosome is a transfer point, and the right side of the last gene in the second chromosome is also a transfer point.

[0090] In the disclosed embodiment, multiple genes in C1_set2 are transferred in sequence from left to right (for example, multiple genes in C1_set2 are taken as the first gene in sequence from left to right), so that all genes in the first gene set can be transferred to the second chromosome.

[0091] like Figure 6 As shown, C2_set1 includes 16 genes, and there are 17 transfer points in C2_set1. These 17 transfer points need to be judged one by one to determine whether the second chromosome satisfies the constraint relationship after the first gene is transferred to a certain transfer point, and all transfer points that satisfy the constraint relationship are used as transfer points in the first point set.

[0092] Exemplarily, step a is implemented in the following manner: establish a set of constraint process numbers corresponding to the first gene for C2_set1, the set of constraint process numbers includes multiple constraint process numbers, and the position to the right of the gene corresponding to the constraint process number of 0 is used as the transfer point in the first point set. Each gene in C2_set1 corresponds to a constraint process number, and the constraint process number is the number of processes that need to be completed to satisfy the constraint relationship when the first gene is transferred to the first transfer point on the right of the gene corresponding to the constraint process number in C2_set1.

[0093] The first gene is Figure 6 Take the first gene 3 in C1_set2 in C2_set1 as an example. When determining the number of constrained processes corresponding to the first gene 2 from left to right in C2_set1, it can be assumed that the first gene 3 is transferred to the transfer point on the right side of the first gene 2 from left to right in C2_set1. At this time, if the constraint relationship is to be satisfied, there should be a number 4 on the left side of the first gene 3, but there is no number 4 on the left side of number 3. Therefore, when the first gene 3 is transferred to the transfer point on the right side of the first gene 2 from left to right in C2_set1, one process (that is, the process corresponding to number 4) needs to be completed to satisfy the constraint relationship. Then, the number of constrained processes corresponding to the first gene 2 from left to right in C2_set1 is 1. The number of constrained processes corresponding to other genes in C2_set1 can be determined in the above manner.

[0094] If the number of constraint processes of a gene is 0, it means that when the first gene is transferred to the first transfer point on the right side of the gene in C2_set1, 0 ​​processes need to be completed to satisfy the constraint relationship, that is, when the first gene is transferred to the first transfer point on the right side of the gene, the constraint relationship is satisfied. In this way, the first transfer point on the right side of the gene with a constraint process number of 0 can be used as the transfer point in the first point set.

[0095] In the second step, the first gene is transferred to the first transfer site.

[0096] The first transfer point is any transfer point in the first point set.

[0097] Optionally, the first transfer point is randomly selected from the first point set.

[0098] Since the first site set includes at least one transfer site in the second chromosome, and the first transfer site is randomly selected, transferring the first gene to the first transfer site can improve the randomness of the crossover process.

[0099] In the process of transferring genes in the first gene set one by one to the second chromosome from which the second gene set is extracted, it may happen that when the second gene of the first chromosome is transferred to any transfer point of the second chromosome, the sequence of multiple processes represented by the arrangement sequence of multiple genes in the second chromosome after the transfer does not satisfy the constraint relationship. In this case, optionally, step 402 also includes the following three steps:

[0100] In the first step, one transfer site is selected from all transfer sites on the second chromosome as the second transfer site of the second gene.

[0101] Here, the second gene may be the first gene for which the first point set cannot be determined. The inability to determine the first point set means that any transfer point of the first gene to the second chromosome causes the sequence of multiple processes represented by the arrangement sequence of multiple genes in the second chromosome after the transfer to fail to satisfy the constraint relationship.

[0102] In the second step, the third gene of the first chromosome is transferred to any transfer point before the second transfer point.

[0103] In the constraint relationship, the process indicated by the third gene is before the process indicated by the second gene.

[0104] In the disclosed embodiment, there may be multiple third genes on the first chromosome, and the second step is performed once for each third gene.

[0105] In some embodiments, the second gene is 9, and C1_set2 includes 9, 9, 10, 10, and 2 in sequence. Since multiple genes in C1_set2 are transferred in sequence from left to right, when the first 9 in C1_set2 is transferred, there are still four genes, 9, 10, 10, and 2, which have not been transferred to C2_set1, and since the first gene set is the same as the second gene set, these four genes will not exist in C2_set1 from which the second gene set is extracted.

[0106] However, in the constraint relationship, J09 can only be produced after J10 is produced, that is, there must be two 10s before 9. If there are no two 10s in C2_set1, transferring 9 to any transfer point of C2_set1 will make the sequence of multiple processes represented by the arrangement order of multiple genes in C2_set1 after the transfer not satisfy the constraint relationship. Therefore, it can be considered that C2_set1 and C1_set2 are interlocked. In order to release this interlock, the two 10s need to be used as the third gene to execute the second step in turn.

[0107] In other embodiments, the third gene is not only in the first chromosome, but also in the second chromosome. In this case, based on the same principle, the second step is also performed on the third gene in the second chromosome to release the interlock.

[0108] Take the second gene as 9, and C1_set2 includes 9, 9, 10, 8, and 2 in sequence. Since multiple genes in C1_set2 are transferred in order from left to right, when the first 9 in C1_set2 is transferred, there are still four genes, 9, 10, 8, and 2, that have not been transferred to C2_set1. Since in the constraint relationship, there must be two 10s before 9, and there is only one 10 in C2_set1, interlocking also occurs in this case. Therefore, 10 in C1_set2 and 10 in C2_set1 are used as the third gene in sequence, and the second step is performed on the third gene to release the interlocking.

[0109] The third step is to transfer the second gene to the second transfer site.

[0110] In the embodiment of the present disclosure, the implementation method of transferring the genes in the second gene set one by one to the first chromosome from which the first gene set is extracted is similar to the implementation method of transferring the genes in the first gene set one by one to the second chromosome from which the second gene set is extracted, and detailed description is omitted here.

[0111] In the genetic algorithm, the number of chromosomes that need to be mutated is determined based on the mutation probability. Taking the mutation probability as 0.01 and the population size as 100 as an example, in this case, one chromosome needs to be mutated, and one chromosome can be randomly selected from 100 chromosomes.

[0112] Figure 5 is a flowchart of step 402, see Figure 5 , optionally, sorting the variation in any iteration of the process chromosome, comprising the following steps cd:

[0113] Step c, determining the second point set corresponding to the fourth gene of the third chromosome.

[0114] The third chromosome is any chromosome generated in the previous iteration of any iteration.

[0115] The second point set includes at least one transfer point in the third chromosome, each transfer point in the third chromosome is adjacent to at least one gene in the third chromosome and does not overlap with any gene, and after the fourth gene is transferred to any transfer point in the second transfer point set, the sequence between multiple processes represented by the arrangement order of multiple genes in the third chromosome satisfies the constraint relationship.

[0116] In the embodiment of the present disclosure, the method for determining the second point set is similar to the method for determining the first point set, and detailed description is omitted here.

[0117] In implementation, similar to the method of determining the first transfer point, a set of constrained process numbers corresponding to the fourth gene may be established, and the second point set may be determined based on the set of constrained process numbers corresponding to the fourth gene.

[0118] Step d, transferring the fourth gene to the third transfer site.

[0119] The third transfer point is any transfer point in the second point set.

[0120] Figure 7 is a schematic diagram of the mutation process. Figure 7 As shown, on the third chromosome 601, the genes that need to be mutated are gene 2 at position 0, gene 10 at position 1, gene 8 at position 8, and gene 6 at position 20. Then, 2, 10, 8, and 6 are taken as fourth genes from left to right, and after performing the above step cd on one of the fourth genes, the above step cd is performed on the next fourth gene.

[0121] In step 403, the first process sequence is determined according to the constraint relationship.

[0122] The first process sequence is used to indicate the order of multiple processes. Here, the first process sequence only needs to satisfy the constraint relationship, and the embodiment of the present disclosure does not limit the first process sequence.

[0123] Exemplarily, multiple processes may be randomly sorted. After repeated random sorting for several times, multiple different process sequences may be obtained. Among these process sequences, any one that satisfies the constraint relationship is taken as the first process sequence.

[0124] Exemplarily, the sequence of multiple processes in the constraint relationship is taken as the first process sequence.

[0125] In step 404, a first generation of machine load chromosomes is generated based on the first process sequence.

[0126] Each gene in the first-generation machine load chromosome is used to indicate the time required to use a machine to execute a process in the first process sequence, and each gene in the first-generation machine load chromosome corresponds to a different process.

[0127] Since each gene is used to indicate the time required to use a machine to perform a process in the first process sequence, and each gene corresponds to a different process, the number of genes in each machine load chromosome is also equal to the number of processes used to produce the target product.

[0128] For example, each gene in the machine load chromosome can be a feature code of a machine, and each feature code uniquely indicates a machine. Then, a corresponding relationship between each gene in the machine load chromosome and each process in the first process sequence is established. When the time required for each machine to perform a process is known, a gene in the machine load chromosome can indicate the time taken by the machine indicated by the gene to perform the corresponding process.

[0129] In step 405, a genetic algorithm is used to iterate the initial generation of machine load chromosomes for multiple times to obtain multiple candidate machine load chromosomes.

[0130] For any iteration among the multiple iterations, it is necessary to perform crossover and mutation on multiple machine load chromosomes generated in the previous iteration of the iteration.

[0131] For any iteration, the principle of selecting the machine load chromosomes that need to be crossover and mutation is the same as the method of selecting the process sorting chromosomes that need to be crossover and mutation, and the detailed description is omitted here.

[0132] Optionally, the crossover in any iteration of the machine load chromosome is implemented by uniform crossover. There are many implementation methods of uniform crossover in the related art, and detailed description is omitted here. When crossover is implemented by uniform crossover, it is relatively simple and has high crossover efficiency.

[0133] Optionally, the mutation of the machine load chromosome in any iteration includes the following two steps:

[0134] In the first step, the total load of each machine load chromosome generated by the previous iteration of the qth iteration is determined.

[0135] Total load is the sum of the times indicated for each of the multiple genes of a chromosome indicating machine load.

[0136] In the second step, on the premise that the total load of the fourth chromosome after mutation is reduced compared with the total load of the fourth chromosome before mutation, a genetic algorithm is used to perform the q+1th iteration on the multiple machine load chromosomes generated in the previous iteration of the qth iteration.

[0137] The fourth chromosome is any machine load chromosome generated in the previous iteration of the qth iteration.

[0138] Wherein, q is an integer, which is greater than 0 and less than the maximum number of iterations.

[0139] Here, mutating the fourth chromosome includes: mutating the fifth gene in the fourth chromosome, and modifying the machine used by the fifth gene during the mutation. For example, the machine with the smallest load among all optional machines for the process corresponding to the fifth gene is used as the machine used by the modified fifth gene.

[0140] For example, the fifth gene is used to indicate the time required to use machine A to perform the first process in the 10th production stage, and the first process in the 10th production stage can be performed by machines A, B, C, and D. Then, mutating the fifth gene means modifying the fifth gene to use the machine with the smallest load (for example, the time required to use machine D among A, B, C, and D to perform the first process in the 10th production stage. Since the load of machine D is smaller than that of machine A, the total load of the fourth chromosome after the fifth gene is mutated is reduced compared to the total load of the fourth chromosome when it is not mutated.

[0141] In the disclosed embodiment, steps 401-402 and steps 403-405 are executed in parallel.

[0142] In other embodiments, steps 401-402 may be performed first, and then steps 403-404, or steps 403-405 may be performed first, and then steps 401 to 402.

[0143] In step 406, based on the first fitness function, the fitness value of each process sorting chromosome generated in the previous iteration of the kth iteration under the production scheduling target is determined.

[0144] Optionally, the first fitness function is a fitness function with scale transformation. k is an integer, k is greater than 0 and less than the number of iterations.

[0145] Exemplarily, the first fitness function is formula (1).

[0146]

[0147] In formula (1), f i is the initial fitness value of the chromosome sorted in the i-th process in the k-th iteration process, 1≤i≤n, and n is the number of chromosomes sorted in multiple processes in the k-th iteration process. It is used to indicate the minimum value among the initial fitness values ​​of all process-sorted chromosomes in the k-th iteration. It is used to indicate the maximum value of the initial fitness values ​​of all process-sorted chromosomes in the kth iteration. gen is the number of iterations, that is, k.

[0148] Among them, under different production scheduling goals, the initial fitness value is different, and the initial fitness value is determined based on the production scheduling goal.

[0149] In the disclosed embodiment, the first fitness function is also used for the machine load chromosome to determine the fitness value of each machine load chromosome under the production scheduling target during the k-th iteration process.

[0150] Optionally, before executing step 406, it is necessary to first determine the production scheduling target so as to determine the initial fitness value of each process sorting chromosome (machine load chromosome) in the k-th iteration process under the production scheduling target, and then substitute each initial fitness value into formula (1) to obtain the fitness value of each process sorting chromosome (machine load chromosome) in the k-th iteration process under the production scheduling target.

[0151] For the process sequencing chromosome, the production scheduling objectives include: minimizing the number of delayed orders, minimizing the maximum completion time, and multi-objective evaluation.

[0152] When the production scheduling goal is to minimize the number of delayed orders (Delay Count Fitness), the initial fitness value of each process sorting chromosome is the number of delayed orders, and the optimal solution is min(DelayCount), which means that the number of delayed orders is the minimum.

[0153] Before determining the number of delayed orders, it is also necessary to determine the estimated completion time for each stage of the target product.

[0154] Optionally, the estimated completion time of each stage is determined as follows: based on the deadline of the target order, the BOM structure diagram of the target product indicated by the target order and the estimated processing time of each process of the target product, the estimated completion time of each production stage of the target product is determined.

[0155] Here, determining the estimated completion time of each production stage of the target product refers to the delivery time of each production stage calculated by executing multiple processes in the order indicated by the BOM structure diagram of the target product and not exceeding the deadline of the target order.

[0156] For example, the BOM structure diagram of the target product indicates that the 10th production stage requires two processes, and the 9th production stage requires two processes and needs to be executed after the 10th production stage is completed. Then the estimated completion time of the 10th production stage is equal to the sum of the estimated processing time of the two processes of the 10th production stage, and the estimated completion time of the 9th production stage is equal to the estimated completion time of the 10th production stage plus the sum of the estimated processing time of the two processes of the 9th production stage.

[0157] Optionally, when determining the estimated completion time, the production scheduling man-hour coefficient may be added to correct the estimated completion time, that is, the production scheduling man-hour coefficient is multiplied by the estimated completion time to obtain a corrected estimated completion time.

[0158] The value range of the production scheduling time coefficient may be 1.1 to 1.5, for example, 1.1, 1.2, 1.3 or 1.5.

[0159] Here, when calculating the estimated completion time of each production stage, unexpected events may occur during the actual production process, resulting in an extension of the estimated completion time. Therefore, the estimated completion time is corrected by using the production scheduling time coefficient. Since the production scheduling time coefficient is greater than 1, the production scheduling time coefficient multiplied by the estimated completion time can increase the estimated completion time, thereby improving the accuracy of the estimated completion time.

[0160] Optionally, delayed orders are determined in the following manner: when production is performed in the order of multiple processes indicated by the process sorting chromosome, the first completion time of each production stage indicated by the process sorting chromosome is determined. The first completion time of each production stage is compared with the expected completion time, and the production stage whose first completion time is greater than the expected completion time is taken as a delayed order to determine the number of delayed orders. The first completion time of a production stage refers to the time when the last process in the production stage is completed when production is performed in the order of multiple processes indicated by the process sorting chromosome.

[0161] Here, the production stage whose first completion time is greater than the expected completion time is the delayed production stage. Different production stages are actually similar to different sub-orders. Therefore, the number of delayed orders refers to the number of delayed sub-orders, that is, the number of delayed production stages.

[0162] The delivery time of each production stage indicated by the process sequencing chromosome is determined according to the time required for each process and the sequence of multiple processes indicated by the process sequencing chromosome. The time required for each process is determined based on experience, and detailed description is omitted here.

[0163] When the production scheduling goal is to minimize the maximum completion time (Cj Fitness), the initial fitness value of each process sorting chromosome is the maximum completion time, and the optimal solution is That is, the maximum completion time is the smallest.

[0164] Among them, max(C j ) is the maximum completion time of the jth process sorting chromosome. The maximum completion time is also the delivery time of the production stage when the last completed production stage in the process sorting chromosome is completed.

[0165] For machine load chromosomes, production scheduling objectives include: maximizing the minimum machine utilization, minimizing the maximum machine load coefficient, and multi-objective evaluation.

[0166] When the production scheduling goal is to maximize the minimum utilization rate of the machine (Utilization Rate Fitness), the initial fitness value of each machine load chromosome is the minimum utilization rate, and the optimal solution is That is, the minimum utilization of the machine is the maximum. Here, since the roulette algorithm used later can only solve the minimization problem, it is necessary to transform the maximum minimum utilization problem of the machine into a minimization problem, that is, to subtract the maximum minimum utilization of the machine from 1.

[0167] Among them, min(Ur h ) is the minimum monthly average utilization rate of the h-th machine load chromosome, m is the number of machine load chromosomes in the k-th iteration process, and m is equal to n.

[0168] Ur h Calculated using formula (2):

[0169]

[0170] In formula (2), for a single machine in the h-th machine load chromosome, the monthly machine load is the monthly load of the machine indicated by the h-th machine load chromosome, that is, the working time of the machine in a month; the machine capacity is the maximum daily working time of the machine, which is a fixed value, such as 8h, 12h or 24h.

[0171] Optionally, each machine has an attendance mode, which is used to indicate the machine capacity of the machine. The attendance mode includes a limited capacity mode and an unlimited capacity mode. When the attendance mode of a machine is a limited capacity mode, the machine capacity of the machine is 8h or 12h; when the attendance mode of a machine is an unlimited capacity mode, the machine capacity of the machine is 24h.

[0172] When the production scheduling goal is to minimize the maximum load balancing coefficient of the machine (Burden Uniformity Fitness), the initial fitness value of each machine load chromosome is the maximum load balancing coefficient. The optimal solution is

[0173] Among them, max(Gini h ) is the maximum load balancing coefficient of the h-th machine load chromosome, which is calculated as follows:

[0174] The first step is to construct a Lorenz curve according to the monthly machine load of each machine in the hth machine load chromosome.

[0175] There are many methods for constructing Lorentz curve coordinates in the related art, so detailed description is omitted here.

[0176] In the second step, according to the Lorenz curve, the load Gini coefficient value of each machine in the h-th machine load chromosome is determined, and the maximum load Gini coefficient value is used as the maximum load balancing coefficient of the h-th machine load chromosome.

[0177] The load Gini coefficient value of each machine in the hth machine load chromosome is calculated using formula (3).

[0178]

[0179] In formula (3), S A is the area between the Lorenz curve and the absolute equilibrium curve of the distribution, S B is the area to the right of the Lorenz curve. Figure 8 is a schematic diagram of the Lorenz curve and the absolute equilibrium curve of the distribution, such as Figure 8 As shown, the area where the letter A is located between the Lorenz curve 701 and the absolute equilibrium distribution curve 702 is S A , the area where the letter B is located at the lower right of the Lorenz curve 701 is S B . ,

[0180] When the production scheduling goal is multi-objective evaluation (Multi Objective Fitness), the production scheduling goal can be used to determine the initial fitness value of the process sorting chromosome and the initial fitness value of the machine load chromosome. In this case, the initial fitness value of the process sorting chromosome (or the initial fitness value of the machine load chromosome) is calculated using the following formula:

[0181] w1*O j Fitness+w2*Utilization Rate Fitness+w3*Burden Uniformity Fitness

[0182] In the above formula, w1, w2 and w3 are weights of each coefficient, which can be set according to experience, and the embodiments of the present disclosure do not limit this.

[0183] In the embodiment of the present disclosure, when performing fitness calculation, normalization processing is required to eliminate the influence of different dimensions on the calculated fitness value.

[0184] Optionally, the first fitness function is a fitness function without scale transformation, for example, formula (4).

[0185]

[0186] The parameters in formula (4) have the same meanings as those in formula (1), and their detailed description is omitted here.

[0187] The fitness function without scale transformation is also the fitness function without scale transformation factor. When the first fitness function is the fitness function without scale transformation, the fitness value of each process sorting chromosome can also be accurately calculated by using the first fitness function.

[0188] The scaling factor is Its function graph is as follows Fig. 9 As shown in Figure 2, under the influence of the scale transformation factor, the fitness value in the early stage is significantly greater than the fitness value in the later stage.

[0189] The scale transformation factor is used to reduce the difference between the fitness values ​​of the chromosomes of each process sorting when the number of iteration rounds is less than the first iteration threshold, and to increase the difference between the fitness values ​​of the chromosomes of each process sorting when the number of iteration rounds is greater than or equal to the first iteration threshold. The first iteration threshold is determined based on experience, and the embodiment of the present disclosure does not limit this. The number of iteration rounds less than the first iteration threshold indicates that it is in the early iteration process, and the number of iteration rounds greater than or equal to the first iteration threshold indicates that it is in the late iteration.

[0190] In the early stage, when the number of iterations is small, the scale transformation factor can amplify the value of fitness to reduce the difference between the fitness values ​​of each chromosome. When the value of fitness is large enough, the difference between the fitness of each chromosome in one round of iteration is smaller than the fitness itself. For example, the fitness in the early stage may be 1001, 1005, 998, etc., then the difference between these fitnesses is relatively small compared to themselves, for example, the difference between 1001 and 1005 is only 0.003 compared to 1001, so the difference in fitness between individuals is small. Then, when selecting good and bad individuals in the population, since the difference between fitness is small, the difference between good and bad individuals is small, and there are more individuals to choose from.

[0191] In the later stage, when there are more iteration rounds, the scale transformation factor can reduce the value of fitness to increase each. When the value of fitness is small enough, the difference between the fitness of each chromosome in one round of iteration is larger than the fitness itself. For example, the fitness in the later stage may be 10, 5, 1, etc., then the difference between these fitness is relatively large compared to themselves, for example, the difference between 10 and 5 is 0.5 compared to 10, so the fitness difference between individuals is large. Then, when selecting good and bad individuals in the population, due to the large difference between fitness, the difference between good and bad individuals is large, and there are fewer individuals to choose from.

[0192] In this way, by adopting a fitness function with scale transformation, the fitness difference between individuals can be reduced in the early stage, the search range can be expanded, and some individuals with the potential for optimal solutions can be retained. Increasing the fitness difference between individuals in the later stage can speed up the process of finding the optimal solution.

[0193] In step 407, based on the fitness value of each process sorting chromosome generated in the previous iteration of the kth iteration under the production scheduling target, at least one process sorting chromosome is selected from the multiple process sorting chromosomes generated in the previous iteration of the kth iteration, and the k+1th iteration is performed based on the selected process sorting chromosome.

[0194] Similarly, in the case where a machine load chromosome exists, step 407 also needs to be executed for the machine load chromosome, that is: based on the fitness value of each machine load chromosome generated in the previous iteration of the kth iteration under the production scheduling target, at least one machine load chromosome is selected from the multiple machine load chromosomes generated in the previous iteration of the kth iteration, and the k+1th iteration is performed based on the selected machine load chromosome.

[0195] In the disclosed embodiment, a roulette strategy and an elite strategy are combined to select at least one process sorting chromosome from multiple process sorting chromosomes generated in the previous iteration of the kth iteration. There are many implementation methods of the roulette strategy and the elite strategy in the related art, and detailed description is omitted here.

[0196] Generating multiple process ordering chromosomes generated in the previous iteration of the k+1th iteration based on the selected process ordering chromosome is essentially to perform crossover, mutation and other operations on the selected process ordering chromosome. The crossover, mutation and other operations here are the same as those in the aforementioned step 402, and detailed description is omitted here.

[0197] Optionally, the method further includes: determining whether a termination condition is met.

[0198] If the termination condition is not met, the iteration continues, and steps 402 to 407 are executed for each generation.

[0199] If the termination condition is met, execute step 408.

[0200] The termination conditions include that the number of iterations reaches the maximum number of iterations, and the fitness change rate is less than or equal to the fitness threshold. When any of the termination conditions is met, no more iterations are performed, and the last generation of population is used as the population after the termination condition is met.

[0201] Here, the number of iterations reaches the number of iterations, that is, k+1 is equal to the number of iterations.

[0202] The fitness change rate is used to indicate the difference between the fitness of the optimal process-sorted chromosome of the previous generation and the fitness of the optimal process-sorted chromosome of the next generation.

[0203] In step 408, an optimal process sorting chromosome is selected from the plurality of process sorting chromosomes.

[0204] Optionally, after executing step 408, the method further includes: determining whether the number of times for finding the optimal solution has been reached.

[0205] Each time steps 401-408 are executed, both the process sorting chromosome and the machine load chromosome can obtain an optimal solution, and the number of optimal solution seeking times is increased by 1. If the number of optimal solution seeking times after the increase of 1 does not reach the number of optimal solution seeking times, steps 401-408 are continued to be executed until the number of optimal solution seeking times reaches the number of optimal solution seeking times.

[0206] After the optimal solution seeking times are reached, there are multiple optimal solutions, and step 409 may be performed on the multiple optimal solutions.

[0207] In step 409, production scheduling information is generated according to the optimal process sorting chromosome.

[0208] In the case where step 409 is executed after steps 401-408 are executed only once, generating production scheduling information according to the optimal process sorting chromosome includes: determining the sequence of multiple processes according to the optimal process sorting chromosome, and generating production scheduling information according to the sequence of multiple processes.

[0209] In the case where there are times to find the optimal solution, steps 401-408 need to be executed multiple times until the number of times to find the optimal solution is met before step 409 can be executed. At this time, there are multiple optimal process sorting chromosomes. In this case, generating production scheduling information according to the optimal process sorting chromosome includes: based on the production scheduling target, selecting a process sorting chromosome that best meets the production scheduling target from multiple optimal process sorting chromosomes, determining the sequence between multiple processes based on the process sorting chromosome that best meets the production scheduling target, and generating production scheduling information according to the sequence between multiple processes.

[0210] In this way, by finding multiple optimal solutions and then selecting a better solution from the multiple optimal solutions, it is possible to effectively avoid the situation where the optimal solution found is a local optimal solution.

[0211] Here, the production scheduling information may be a file similar to an activity schedule or a production plan. Generating the production scheduling information according to the sequence of multiple processes is to generate a file indicating the sequence of multiple processes.

[0212] Optionally, the method further includes: visually displaying the sequence of multiple processes indicated by the optimal process sorting chromosome. The visual display includes: order progress Gantt chart, machine load Gantt chart, working time statistical data reports for different production stages, professional dimensions, etc.

[0213] Among them, the order progress Gantt chart displays the number of delayed orders in each production stage indicated by the optimal process sorting chromosome in the form of a Gantt chart; the machine load Gantt chart displays the load of each machine indicated by the optimal machine load chromosome in the form of a Gantt chart.

[0214] The working time statistics data report for different production stages, professions and other dimensions includes statistics on the time required for each production stage (such as the first completion time of each production stage), obtaining working time statistics data, and presenting the working time statistics data in the form of a report.

[0215] There are many ways to implement Gantt charts and reports in related technologies, so detailed description is omitted here.

[0216] The following are device embodiments of the present application. For details not described in detail in the device embodiments, reference may be made to the above method embodiments.

[0217] Fig.10 A schematic diagram of a production scheduling device provided by an exemplary embodiment is shown. Fig.10 The production scheduling device 900 includes: a constraint relationship acquisition module 901, a first generation module 902, an iteration module 903, a selection module 904 and a second generation module 905.

[0218] The constraint relationship acquisition module 901 is used to determine multiple processes for producing a target product, and there are constraint relationships between the multiple processes.

[0219] The first generation module 902 is used to generate an initial generation of process sorting chromosomes based on the constraint relationship between multiple processes. Each initial generation of process sorting chromosomes includes multiple genes. Each gene of the initial generation of process sorting chromosomes is used to represent one process among multiple processes. The arrangement order of the multiple genes of the initial generation of process sorting chromosomes is used to characterize the sequence between multiple processes and satisfy the constraint relationship.

[0220] The iteration module 903 is used to use a genetic algorithm to iterate the initial process sorting chromosome multiple times to obtain multiple candidate process sorting chromosomes. Each iteration of the multiple iterations includes crossover and mutation. The sequence of multiple processes represented by the arrangement order of multiple genes of the process sorting chromosome obtained in each iteration satisfies the constraint relationship.

[0221] The selection module 904 is used to select the optimal process ranking chromosome from multiple candidate process ranking chromosomes.

[0222] The second generating module 905 is used to generate production scheduling information according to the optimal process sorting chromosome.

[0223] Optionally, the iteration module 903 is also used to determine the first point set corresponding to the first gene of the first chromosome for the crossover in any iteration, the first point set includes at least one transfer point in the second chromosome, each transfer point in the second chromosome is adjacent to at least one gene in the second chromosome and does not overlap with any gene, after the first gene is transferred to any transfer point in the first transfer point set, the sequence between multiple processes represented by the arrangement order of multiple genes in the second chromosome satisfies the constraint relationship; the first gene is transferred to the first transfer point, the first transfer point is any transfer point in the first point set; wherein the first chromosome and the second chromosome are two different chromosomes generated in the previous iteration of any iteration.

[0224] Optionally, the iteration module 903 is also used to select any one transfer point from all the transfer points of the second chromosome as the second transfer point of the second gene if the second gene of the first chromosome is transferred to any transfer point of the second chromosome, and the sequence of multiple processes represented by the arrangement order of multiple genes in the second chromosome after the transfer does not satisfy the constraint relationship; transfer the third gene of the first chromosome to any transfer point before the second transfer point, and in the constraint relationship, the process indicated by the third gene is before the process indicated by the second gene; and transfer the second gene to the second transfer point.

[0225] Optionally, the iteration module 903 is also used to determine the second point set corresponding to the fourth gene of the third chromosome for the variation in any iteration, the second point set includes at least one transfer point in the third chromosome, each transfer point in the third chromosome is adjacent to at least one gene in the third chromosome and does not overlap with any gene, after the fourth gene is transferred to any transfer point in the second transfer point set, the sequence between multiple processes represented by the arrangement order of multiple genes in the third chromosome satisfies the constraint relationship; the fourth gene is transferred to the third transfer point, the third transfer point is any transfer point in the second point set; wherein the third chromosome is a chromosome generated in the previous iteration of any iteration.

[0226] Optionally, the production scheduling device further includes a fitness value acquisition module 906. The fitness value acquisition module 906 is used to determine the fitness value of each process sorting chromosome generated in the previous iteration of the kth iteration under the production scheduling target based on the first fitness function, and the first fitness function is a fitness function with scale transformation; the iteration module 903 is also used to select at least one process sorting chromosome from multiple process sorting chromosomes generated in the previous iteration of the kth iteration based on the fitness value of each process sorting chromosome generated in the previous iteration of the kth iteration under the production scheduling target, and perform the k+1th iteration based on the selected process sorting chromosome; wherein k is an integer, k is greater than 0 and less than the maximum number of iteration rounds.

[0227] Optionally, the constraint relationship acquisition module 901 is also used to determine the first process sequence according to the constraint relationship, and the first process sequence is used to indicate the sequence between multiple processes; the first generation module 902 is also used to generate an initial generation of machine load chromosomes based on the first process sequence, and each gene in the initial generation of machine load chromosomes is used to indicate the time required to use a machine to execute a process in the first process sequence, and each gene in the initial generation of machine load chromosomes corresponds to a different process.

[0228] The generation scheduling device also includes: a machine load acquisition module 907, which is used to determine the total load of each machine load chromosome generated in the previous iteration of the qth iteration, and the total load is used to indicate the sum of the time indicated by each gene in the multiple genes of the machine load chromosome; the iteration module 903 is also used to use a genetic algorithm to perform a q+1th iteration on the multiple machine load chromosomes generated in the previous iteration of the qth iteration, on the premise that the total load of the fourth chromosome after mutation is reduced compared with the total load of the fourth chromosome before mutation, and the fourth chromosome is any machine load chromosome generated in the previous iteration of the qth iteration; wherein q is an integer, q is greater than 0 and less than the maximum number of iteration rounds.

[0229] It should be noted that: when the production scheduling device provided in the above embodiment performs production scheduling, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the production scheduling device provided in the above embodiment and the production scheduling method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0230] The division of modules in the embodiments of the present disclosure is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present disclosure may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0231] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a terminal device (which can be a personal computer, a mobile phone, or a communication device, etc.) or a processor (processor) to perform all or part of the steps of the method of each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0232] Fig.11 Schematic diagram of the structure of the computer device provided by the embodiment of the present disclosure. Fig.11 As shown, the computer device 1000 includes: a processor 1001 and a memory 1002 .

[0233] The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1001 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0234] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one instruction, which is used to be executed by the processor 1001 to implement the production scheduling method provided in the embodiments of the present disclosure.

[0235] Those skilled in the art will understand that Fig.11 The structure shown in the figure does not constitute a limitation on the computer device 1000, and the computer device 1000 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0236] The embodiment of the present disclosure also provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a computer device, the computer device is enabled to execute the production scheduling method provided in the embodiment of the present disclosure.

[0237] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which implements the production scheduling method provided in the embodiments of the present disclosure when executed by a processor.

[0238] The above description is only an optional embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A production scheduling method, characterized in that: The method comprises: Determine a plurality of processes for producing a target product, wherein there are constraint relationships between the plurality of processes; Based on the constraint relationship between the multiple processes, a first-generation process sorting chromosome is generated, each of the first-generation process sorting chromosomes includes multiple genes, each gene of the first-generation process sorting chromosome is used to represent one process among the multiple processes, and the arrangement order of the multiple genes of the first-generation process sorting chromosome is used to represent the sequence between the multiple processes and satisfy the constraint relationship; A genetic algorithm is used to iterate the initial process ordering chromosome for multiple times to obtain multiple candidate process ordering chromosomes, wherein each iteration of the multiple iterations includes crossover and mutation, and the sequence of the multiple processes represented by the arrangement sequence of multiple genes of the process ordering chromosome obtained in each iteration satisfies the constraint relationship; Selecting an optimal process ranking chromosome from the plurality of candidate process ranking chromosomes; Production scheduling information is generated according to the optimal process sorting chromosome.

2. The method according to claim 1, characterized in that The genetic algorithm is used to iterate the process sorting chromosome of the first generation for multiple times, including: For a crossover in any iteration, a first point set corresponding to a first gene of a first chromosome is determined, wherein the first point set includes at least one transfer point in the second chromosome, each transfer point in the second chromosome is adjacent to at least one gene in the second chromosome and does not overlap with any gene, and after the first gene is transferred to any transfer point in the first transfer point set, the sequence of multiple processes represented by the arrangement sequence of multiple genes in the second chromosome satisfies the constraint relationship; Transferring the first gene to a first transfer site, wherein the first transfer site is any transfer site in the first site set; The first chromosome and the second chromosome are two different chromosomes generated in the previous iteration of any iteration.

3. The method according to claim 2, characterized in that The step of using a genetic algorithm to iterate the process sorting chromosomes of the first generation for multiple times also includes: If the second gene of the first chromosome is transferred to any transfer point of the second chromosome, so that the sequence of multiple processes represented by the arrangement sequence of multiple genes in the second chromosome after the transfer does not satisfy the constraint relationship, then any transfer point from all the transfer points of the second chromosome is selected as the second transfer point of the second gene; Transferring the third gene of the first chromosome to any transfer point before the second transfer point, wherein in the constraint relationship, the process indicated by the third gene is before the process indicated by the second gene; The second gene is transferred to the second transfer site.

4. The method according to any one of claims 1 to 3, characterized in that: The step of using a genetic algorithm to iterate the process sorting chromosomes of the first generation for multiple times also includes: For a variation in any iteration, a second point set corresponding to the fourth gene of the third chromosome is determined, the second point set includes at least one transfer point in the third chromosome, each transfer point in the third chromosome is adjacent to at least one gene in the third chromosome and does not overlap with any gene, and after the fourth gene is transferred to any transfer point in the second transfer point set, the sequence of multiple processes represented by the arrangement sequence of multiple genes in the third chromosome satisfies the constraint relationship; Transferring the fourth gene to a third transfer site, wherein the third transfer site is any transfer site in the second site set; The third chromosome is a chromosome generated in the previous iteration of any iteration.

5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Based on a first fitness function, determining the fitness value of each process sorting chromosome generated in the previous iteration of the kth iteration under the production scheduling target, wherein the first fitness function is a fitness function with scale transformation; Based on the fitness value of each process sorting chromosome generated in the previous iteration of the k-th iteration under the production scheduling target, at least one process sorting chromosome is selected from the multiple process sorting chromosomes generated in the previous iteration of the k-th iteration, and the k+1-th iteration is performed based on the selected process sorting chromosome; Wherein, k is an integer, which is greater than 0 and less than the maximum number of iterations.

6. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Determine a first process sequence according to the constraint relationship, where the first process sequence is used to indicate a sequence between the multiple processes; Based on the first process sequence, generating a first-generation machine load chromosome, each gene in the first-generation machine load chromosome is used to indicate the time required to use a machine to execute a process in the first process sequence, and each gene in the first-generation machine load chromosome corresponds to a different process; Determine a total load of each machine load chromosome generated by a previous iteration of the qth iteration, wherein the total load is used to indicate the sum of the times indicated by each gene in a plurality of genes of the machine load chromosome; On the premise that the total load of the fourth chromosome after mutation is reduced compared with the total load of the fourth chromosome before mutation, a genetic algorithm is used to perform a q+1th iteration on the plurality of machine load chromosomes generated in the previous iteration of the qth iteration, wherein the fourth chromosome is a machine load chromosome generated in the previous iteration of the qth iteration; Wherein, q is an integer, which is greater than 0 and less than the maximum number of iterations.

7. A production scheduling device, characterized in that: The device comprises: A constraint relationship acquisition module, used to determine multiple processes for producing a target product, wherein there are constraint relationships between the multiple processes; A first generation module is used to generate a first-generation process ordering chromosome based on the constraint relationship between the multiple processes, each of the first-generation process ordering chromosomes includes multiple genes, each gene of the first-generation process ordering chromosome is used to represent one process among the multiple processes, and the arrangement order of the multiple genes of the first-generation process ordering chromosome is used to represent the sequence between the multiple processes and satisfy the constraint relationship; An iteration module, used for iterating the initial process ordering chromosome multiple times by using a genetic algorithm to obtain multiple candidate process ordering chromosomes, wherein each iteration of the multiple iterations includes crossover and mutation, and the sequence of the multiple processes represented by the arrangement sequence of multiple genes of the process ordering chromosome obtained in each iteration satisfies the constraint relationship; A selection module, used for selecting an optimal process ranking chromosome from the plurality of candidate process ranking chromosomes; The second generating module is used to generate production scheduling information according to the optimal process sorting chromosome.

8. A computer device, characterized in that: The computer device comprises: a memory and a processor, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.