Multi-variety and small-batch workshop scheduling method based on differential evolution algorithm
By improving the differential evolution algorithm, combined with the continuous conversion of metaheuristic algorithm and chromosome model, the problem of the shortest completion time in the scheduling of multiple varieties of small batch workshops is solved, and efficient scheduling scheme generation is achieved, improving production efficiency and reliability .
Patent Information
- Application Number
- CN202210422817.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-21
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-04-21
AI Technical Summary
The existing multi-variety small batch workshop scheduling technology has the problems of low applicability and poor performance, especially when dealing with discrete characteristics of workshop scheduling problems, differential evolution algorithms are less used.
Using a multi-variety small-batch workshop scheduling method based on improved differential evolution algorithm, a metaheuristic algorithm is designed to generate initial populations and continuously transform the chromosomal model of individuals participating in evolution , and then use differential variation, crossover and other operations to generate offspring individuals. Select excellent individuals by comparing the objective function values, and update the parameters and external archives in the evolutionary algorithm. Finally, search for neighborhoods based on some excellent individuals, looping the above steps until The algorithm ends and gets the optimal processing plan.
The performance of differential evolution algorithm in solving discrete problems is improved, and the work workshop scheduling scheme is obtained that minimizes the maximum completion time, which improves the efficiency and reliability of workshop production and processing in multiple varieties of small batch production modes.
Smart Images

Figure CN114707887B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a multi-variety small batch workshop optimization scheduling method, and in particular to a scheduling optimization solution method based on an improved differential evolution algorithm, and belongs to the technical field of scheduling and production scheduling of manufacturing production workshops. Background Art
[0002] Job-Shop Scheduling Problem (JSP) is an important area in the planning and management of manufacturing industry. The number of scheduling schemes is huge and the solution is complex, which belongs to NP-Hard optimization problem. The multi-variety and small batch production mode arranges the production process according to customer orders, which can meet the customized needs of customers, provide fast services, and has a broad sales market. However, the multi-variety and small batch production mode has a large number of products to be processed within the specified production period, and the production quantity of each product is small, which has a higher computational complexity. Therefore, considering how to formulate a production scheduling plan to make the maximum completion time shorter and more anti-interference, so as to achieve high-efficiency, high-quality and low-cost workshop operations under the multi-variety and small batch production mode, has become a very realistic and urgent problem for manufacturing enterprises, and it has also been a hot topic of academic research for many years.
[0003] At present, the methods commonly used to solve the scheduling of multi-variety and small-batch production include genetic algorithms, particle swarm optimization technology, imperial competition algorithm, cuckoo algorithm and migratory bird flock optimization. As a kind of evolutionary algorithm, differential evolution algorithm (DE) performs mutations according to the differences between different individuals to achieve efficient parallel evolution of the population. It has the characteristics of simple structure, easy implementation, fast convergence and strong robustness. So far, it has been applied to big data processing, artificial intelligence and other fields. However, in solving problems with discrete characteristics such as workshop scheduling, differential evolution algorithm is less used due to its continuous characteristics, that is, the existing technologies for solving multi-variety and small-batch workshop scheduling generally have the problems of low applicability and poor performance. Summary of the invention
[0004] In view of the problems that existing technologies for solving multi-variety and small-batch workshop scheduling generally have low applicability and poor performance, the present invention provides a multi-variety and small-batch workshop scheduling method based on a differential evolution algorithm.
[0005] The multi-variety small batch workshop scheduling method based on differential evolution algorithm of the present invention comprises the following steps:
[0006] Step S1: divide the production order into processing batches and initialize the parameters;
[0007] Step S2: Establish a mathematical model with the goal of minimizing the maximum completion time, and use a meta-heuristic algorithm to generate an initial population;
[0008] Step S3: Continuously transform the chromosome models of the individuals participating in the evolution. The steps of model transformation are as follows:
[0009] The steps for continuous conversion of the process coding part in the chromosome model;
[0010] The steps in the natural sequence of genes in the chromosome model;
[0011] The steps for serial transformation of the machine-encoded part in the chromosome model;
[0012] Step S4: Use a differential evolution algorithm based on multiple evolution strategies and parameter adaptive update strategies to solve the model converted in step S3. The steps of using the algorithm to solve the model are as follows:
[0013] The steps of differential mutation, crossover, and selection;
[0014] Steps for external archive updates;
[0015] Steps for adaptive parameter update;
[0016] The steps of some individuals performing neighborhood search;
[0017] Steps for population renewal;
[0018] Step S5: Determine whether the running time of the algorithm meets the termination condition given by the initialization parameters in step S1. If yes, execute step S6; if not, return to execute step S4;
[0019] Step S6: Decode the optimal scheduling solution obtained by the algorithm and convert it into an intuitive Gantt chart.
[0020] Preferably, the process of dividing the processing batches described in step S1 is:
[0021] Step S1-1, calculating the average demand of all workpieces;
[0022] Step S1-2, dividing the production orders into two groups according to the average value, wherein the production orders with workpiece demand less than or equal to the average value are divided into the first group, and the production orders with workpiece demand greater than the average value are divided into the second group;
[0023] Step S1-3, each production order in the first group is regarded as a processing batch;
[0024] The processing batches of each production order in the second group are re-split, and the average value of all workpiece requirements in the first group of production orders is used as the splitting standard. Each production order in the second group is split into two batches, one of which has a workpiece demand greater than the splitting standard, and the other has a workpiece demand less than or equal to the splitting standard.
[0025] Preferably, the initialization parameters in step S1 include: population size Pop_Size, external archive size Arc_Size, maximum running time max_time, proportion of neighborhood search individuals in the population P_Select, proportion of elite individuals in the population p_best, mathematical expectation of variation factor Mu_F and mathematical expectation of crossover factor Mu_CR.
[0026] Preferably, in step S2, a mathematical model is established with the goal of minimizing the maximum completion time, and the calculation formula is:
[0027] C=min{max(End i )},1≤i≤total_op_num, where End i It represents the completion time of the ith process, and total_op_num is the sum of the number of processes included in all processing batches;
[0028] The process of generating the initial population using the metaheuristic algorithm is:
[0029] Step S2-1, for each gene in the process coding part of the chromosome, randomly select one from the workpiece with the largest number of remaining processes;
[0030] Step S2-2: for the machine code part in the chromosome, select the machine with the shortest processing time for each process in turn according to the process sequence in the process code;
[0031] Step S2-3: Determine the actual processing time of each process according to the process code part and the machine code part in the chromosome, and write it into the time code part.
[0032] Preferably, the process of continuous conversion of the chromosome model in step S3 is:
[0033] Step S3-1: For the process code part in the chromosome, record the order of each process in the chromosome as index i ;
[0034] Step S3-2: Calculate total_op_num-index for each gene in the process code i +1, and use this value to replace the content in the original gene;
[0035] Step S3-3, arranging the process codes, machine codes and time codes in the chromosome according to the natural process sequence;
[0036] Step S3-4: For each process, a machine selection probability matrix is established, and the selection probability of each machine is initialized to 1.
[0037] Preferably, the step of solving the model using the optimization algorithm in step S4 is as follows: randomly selecting an individual from the elite group, the current population, the union of the external archive and the current population, performing differential mutation, crossover and selection steps in sequence for each individual in the current population, then updating the parameters in the external archive and the optimization algorithm, selecting some individuals for neighborhood search, and finally updating the current population, wherein the specific implementation process of selecting individuals for differential mutation, crossover and selection is as follows:
[0038] Step S4A-1, randomly select an individual from the elite group and record it as pbest, randomly select an individual from the current population and record it as r1, and randomly select an individual from the union of the current population and the external archive and record it as r2;
[0039] Step S4A-2, using Mu_F and 0.1 as the mathematical expectation and standard deviation of the normal distribution, respectively, to generate the variation factor F, and using Mu_CR and 0.1 as the mathematical expectation and standard deviation of the Cauchy distribution, respectively, to generate the crossover factor CR;
[0040] Step S4A-3: The differential variation formula of the process coding part is:
[0041] v_x=r0_x+F·(pbest_x-r0_x)+F·(r1_x-r2_x), where v_x is the continuous process code of the variant individual, pbest_x is the process code of the pbest individual after continuous transformation, r1_x is the process code of the r1 individual after continuous transformation, r2_x is the process code of the r2 individual after continuous transformation, and r0_x is the process code of the current individual r0 after continuous transformation;
[0042] Step S4A-4, for each process, the machine selected by individual pbest is denoted as pbest_m, the machine selected by individual r1 is denoted as r1_m, and the machine selected by individual r2 is denoted as r2_m, and the probabilities of the corresponding machines pbest_m, r1_m, and r2_m in the machine selection probability matrix are increased by 2F, increased by F, and decreased by F, respectively;
[0043] Step S4A-5, normalize the machine selection probability matrix of each process, and then use the roulette method to select a processing machine for each process to obtain the machine code v_m of the variant individual;
[0044] Step S4A-6, the crossover formula of the process coding part is:
[0045] u_x=CR·v_x+(1-CR)·r0_x, where u_x is the continuous process code of the offspring individual u;
[0046] Step S4A-7, for each gene in the machine code, randomly generate a random number between 0 and 1, the machine code genes with random numbers less than or equal to CR are provided by v_m, and the genes of the remaining machine codes are provided by r0_m, and the machine code u_m of the offspring individual u is obtained;
[0047] Step S4A-8, calculate the objective function value of the offspring individual u, and compare it with the objective function value of the current individual r0. If the offspring individual u is better than r0, replace the current individual r0 with the offspring individual u, otherwise, do not process it;
[0048] Complete the differential mutation, crossover, selection and other operations of all individuals in the current population in the above manner.
[0049] Preferably, the external archive in step S4 is updated according to the selection between individuals in the population and offspring individuals, and the specific implementation process is as follows:
[0050] Step S4B-1, storing the individuals in the population that are replaced by the offspring individuals in an external archive;
[0051] Step S4B-2, if the number of individuals in the current external archive is greater than Arc_Size, then execute step S4B-3, otherwise end the external archive update;
[0052] Step S4B-3: Randomly select some individuals in the external archive and delete them so that the number of individuals in the external archive is equal to Arc_Size.
[0053] Preferably, the parameters used by the optimization algorithm in step S4 are adaptively updated according to the selection conditions between individuals in the population and offspring individuals. The specific implementation process is as follows:
[0054] Step S4C-1: The offspring individual is considered to be a successful evolution if it is better than the original individual, and the mutation factor and crossover factor used in the successful evolution in this iteration are stored;
[0055] Step S4C-2: Calculate the mathematical expectation Mu_F of the variation factor according to the following formula:
[0056] Where S F is the set of mutation factors used by the successfully evolved individuals, and c is the weight when updating Mu_F;
[0057] Step S4C-3, calculate the mathematical expectation Mu_CR of the variation factor according to the following formula:
[0058] Where S CR The collection of mutation factors used to successfully evolve an individual.
[0059] Preferably, the step S4 selects some individuals and performs neighborhood search around them, and the specific implementation process is as follows:
[0060] Step S4D-1, according to the objective function value of the individual, use the roulette method to select P_Select×100% individuals from the current population, and execute step S4D-2 for the above individuals;
[0061] Step S4D-2: For each individual participating in the neighborhood search, three processes from different workpieces are randomly selected, fully arranged, and inserted into the original position of the chromosome to obtain 6 neighborhood individuals;
[0062] Step S4D-3, respectively calculate the objective function values of the six neighborhood individuals, select the best individual and store it in the neighborhood individual set;
[0063] Step S4D-4: For each individual in the neighborhood individual set, randomly select a process and randomly replace its processing machine with another processable machine;
[0064] Step S4D-5: Calculate the objective function values of all individuals in the neighborhood individual set.
[0065] Preferably, after completing operations such as population evolution, external archive update, parameter adaptive update, and neighborhood search in step S4, the current population is updated, and the specific implementation process is as follows:
[0066] Step S4E-1, combining the current population with the neighborhood individual set, and arranging the above individuals in ascending order according to the objective function value;
[0067] Step S4E-2: Select the top Pop_Size individuals as the final population of this iteration.
[0068] Beneficial effects of the present invention: The present invention can start from the principle of differential evolution algorithm and flexible job shop scheduling, and at the same time consider the order restriction of process processing, the quantity restriction of order workpiece demand and the feasibility restriction of processing machine. The method first establishes a mathematical model with the shortest maximum completion time as the goal, designs a meta-heuristic algorithm to generate an initial population, and then continuously transforms the chromosome model of the individuals participating in the evolution, and then generates offspring individuals through differential mutation, crossover and other operations, selects excellent individuals by comparing the objective function value, and updates the parameters and external archives in the evolutionary algorithm, and finally performs neighborhood search based on some excellent individuals, and repeats the above steps until the algorithm ends to obtain the optimal processing plan. This method is an improved differential evolution algorithm for discrete problems. Through the continuous transformation of mathematical models and the improvement of differential mutation strategies, the performance of differential evolution algorithms in solving discrete problems can be improved, thereby obtaining a job shop scheduling plan that minimizes the maximum completion time, and improving the efficiency and reliability of workshop production and processing under the multi-variety small batch production mode. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 It is the algorithm flow chart of the present invention;
[0070] Figure 2 A mathematical model of chromosomes of an individual of the present invention;
[0071] Figure 3 A schematic diagram of continuous conversion of process codes of the evolutionary individuals of the present invention;
[0072] Figure 4 It is a schematic diagram of the continuous conversion of machine codes of the evolutionary individuals of the present invention;
[0073] Figure 5 This is a schematic diagram of differential variation of process coding between evolutionary individuals of the present invention;
[0074] Figure 6 A schematic diagram of the cross-process coding between evolutionary individuals of the present invention;
[0075] Figure 7 A schematic diagram of machine-coded differential mutation and crossover between evolutionary individuals of the present invention;
[0076] Figure 8 A flowchart of the neighborhood search of the present invention;
[0077] Fig. 9 Solve the Gantt chart of the 5×6 example for the present invention;
[0078] Fig.10 Solve the Gantt chart of the 10×6 example for the present invention;
[0079] Fig.11 The Gantt chart of the 11×8 example is solved for the present invention. DETAILED DESCRIPTION
[0080] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0081] The present invention provides a multi-variety small batch workshop scheduling method based on differential evolution algorithm, which belongs to the technical field of scheduling and production scheduling of manufacturing production workshops. For the multi-variety small batch workshop scheduling problem with the minimum maximum completion time as the optimization target, the method first establishes a mathematical model with the shortest maximum completion time as the target, designs a meta-heuristic algorithm to generate an initial population, then performs a continuous conversion on the chromosome model of the individuals participating in the evolution, and then generates offspring individuals through differential mutation, crossover and other operations, selects excellent individuals by comparing the objective function value, and updates the parameters and external archives in the evolutionary algorithm, and finally performs a neighborhood search based on some excellent individuals, repeats the above steps until the algorithm ends, and obtains the optimal processing plan. The method can improve the performance of the differential evolution algorithm in solving discrete problems, obtain an efficient and stable scheduling plan, and thus improve the efficiency and reliability of workshop production and processing under the multi-variety small batch production mode.
[0082] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0083] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.
[0084] Specific implementation method 1: The following is combined Figures 1 to 11 This embodiment describes a multi-variety small batch workshop scheduling method based on a differential evolution algorithm, which includes the following steps:
[0085] Step S1: divide the production order into processing batches and initialize the parameters;
[0086] The multi-variety small batch workshop scheduling problem can be described as: k orders K1, K2, ..., K k To have m machines M1,M2,...,M mFor processing, each order contains a random number of workpieces with the same production process, and each workpiece contains a random number of processes. To solve the multi-variety small batch workshop scheduling problem, it is necessary to first split the orders containing different numbers of workpieces, and then use the groups as processing units to select processing machines for each process of each group, and at the same time determine the optimal processing sequence and starting processing time of the processes on each machine, so that the total completion time of all workpieces in the order is the shortest.
[0087] The process of dividing the processing batches described in step S1 is as follows:
[0088] Step S1-1, calculating the average demand of all workpieces;
[0089] Step S1-2, dividing the production orders into two groups according to the average value, wherein the production orders with workpiece demand less than or equal to the average value are divided into the first group, and the production orders with workpiece demand greater than the average value are divided into the second group;
[0090] Step S1-3, each production order in the first group is regarded as a processing batch;
[0091] The processing batches of each production order in the second group are re-split, and the average value of all workpiece requirements in the first group of production orders is used as the splitting standard. Each production order in the second group is split into two batches, one of which has a workpiece demand greater than the splitting standard, and the other has a workpiece demand less than or equal to the splitting standard.
[0092] Take a data set containing 3 types of workpiece orders and 5 machines as an example. Its processing information is shown in Table 1. The data set contains three orders K1, K2, and K3. Order K1 includes 3 workpieces, and this type of workpiece contains 3 processes O. 1,1 , O 1,2 , O 1,3 , Order K2 includes 2 workpieces, and this type of workpiece contains 3 processes O 2,1 , O 2,2 , O 2,3 , Order K3 includes 5 workpieces, and this type of workpiece contains 3 processes O 3,1 , O 3,2 , O 3,3 .
[0093] Table 1
[0094]
[0095] The average number of workpieces required for all orders is 10 / 3. The production orders of the first group include K1 and K2, and the production orders of the second group include K3. Therefore, the processing batch of order K3 needs to be split based on the average number of workpieces required for orders K1 and K2, which is 5 / 2. That is, order K3 is split into two processing batches containing 3 and 2 workpieces respectively. Therefore, the order is split into 4 processing batches in total. The processing information after grouping is shown in Table 2. Order K1 is converted to processing batch G1, order K2 is converted to processing batch G2, and order K3 is split into two processing batches G3 and G4. The workpieces of each processing batch contain 3 processes. Among them, processing batch G3 includes process O 3,1,1 , O 3,1,2 , O 3,1,3 , representing the first process, the second process and the third process of the first batch of order K3. Similarly, workpiece group G4 includes process O 3,2,1 , O 3,2,2 , O 3,2,3 , respectively representing the three processes of the second batch of order K3. Let n be the number of split order batches. Then this multi-variety small-batch shop scheduling problem with 3 orders and 5 machines can be transformed into a flexible job shop scheduling problem with 4 processing batches and 5 machines, that is, the number of processing batches n = 4 and the number of machines m = 5.
[0096] Table 2
[0097]
[0098] The initialization parameters include: population size Pop_Size, external archive size Arc_Size, maximum running time max_time, the proportion of neighborhood search individuals in the population P_Select, the proportion of elite individuals in the population p_best, the mathematical expectation of the mutation factor Mu_F, and the mathematical expectation of the crossover factor Mu_CR.
[0099] Among them, the value of the population size Pop_Size is calculated by ceil(2×log(n×m))×10, the external archive size Arc_Size is set to the same value as the population size Pop_Size, the maximum running time max_time is calculated by 0.05×k×m, and the initial values of the mathematical expectation of the variation factor Mu_F and the mathematical expectation of the crossover factor Mu_CR are both set to 0.5.
[0100] Step S2: Establish a mathematical model with the goal of minimizing the maximum completion time, and use a meta-heuristic algorithm to generate an initial population; the calculation formula is C = min{max(End i )},1≤i≤total_op_num, where End irepresents the completion time of the i-th process, and total_op_num is the sum of the number of processes included in all processing batches. In the data set shown in Table 2, the value of total_op_num is 12.
[0101] All objective function values involved in the future will be processed in this way.
[0102] The process of generating the initial population using the metaheuristic algorithm is:
[0103] Step S2-1, for each gene in the process coding part of the chromosome, randomly select one from the workpiece with the largest number of remaining processes;
[0104] Step S2-2: for the machine code part in the chromosome, select the machine with the shortest processing time for each process in turn according to the process sequence in the process code;
[0105] Step S2-3: Determine the actual processing time of each process according to the process code part and the machine code part in the chromosome, and write it into the time code part.
[0106] like Figure 2 As shown in Table 2, the chromosome mathematical model of an individual corresponding to the data set is shown in Table 2. It can be seen that the first process O of batch G1 1,1 Processing on machine M1, time is 351 minutes, second operation O of batch G3 3,1,2 The processing time is 210 minutes on machine M4.
[0107] Step S3: Continuously transform the chromosome models of the individuals participating in the evolution. The steps of model transformation are as follows:
[0108] The steps for continuous conversion of the process coding part in the chromosome model;
[0109] The steps in the natural sequence of genes in the chromosome model;
[0110] The steps for serial transformation of the machine-encoded part in the chromosome model;
[0111] The process of continuous conversion of the chromosome model in step S3 is:
[0112] Step S3-1: For the process code part in the chromosome, record the order of each process in the chromosome as index i ;
[0113] Step S3-2: Calculate total_op_num-index for each gene in the process code i +1, and use this value to replace the content in the original gene;
[0114] Step S3-3, arranging the process codes, machine codes and time codes in the chromosome according to the natural process sequence;
[0115] Step S3-4: For each process, a machine selection probability matrix is established, and the selection probability of each machine is initialized to 1.
[0116] by Figure 2 Taking the chromosome mathematical model of individuals in the human body as an example, the process of continuous transformation of this model is as follows Figure 3 As shown in the figure, the process code in the original chromosome model is 1 2 4 3 2 4 1 3 4 1 2 3, which is the first process O of processing batch one. 1,1 The first one is processed, followed by the first process O of batch 2 2,1 , and so on. According to the order of each process in the original chromosome model, we can get index i is 1 7 10 2 5 11 4 8 12 3 6 9, and the value of total_op_num is 12, then the continuous conversion result of the process coding part in the chromosome model of this individual is 12 6 3 11 8 2 9 5 110 7 4.
[0117] According to the feasibility limitations of the processing machine, and Figure 2 The mathematical model of individual chromosomes can be used to establish the machine selection probability matrix of each process, such as Figure 4 As shown, for each process, the probability of its processable machine is initialized to 1, and the processing probability of an infeasible machine is represented by the symbol “-”.
[0118] Step S4: Use a differential evolution algorithm based on multiple evolution strategies and parameter adaptive update strategies to solve the model converted in step S3. The steps of using the algorithm to solve the model are as follows:
[0119] The steps of differential mutation, crossover, and selection;
[0120] Steps for external archive updates;
[0121] Steps for adaptive parameter update;
[0122] The steps of some individuals performing neighborhood search;
[0123] Steps for population renewal;
[0124] The steps of solving the model using the optimization algorithm described in step S4 are: randomly selecting an individual from the elite group, the current population, the union of the external archive and the current population, performing differential mutation, crossover and selection steps for each individual in the current population, then updating the parameters in the external archive and the optimization algorithm, selecting some individuals for neighborhood search, and finally updating the current population. The specific implementation process of selecting individuals for differential mutation, crossover and selection is as follows:
[0125] Step S4A-1, randomly select an individual from the elite group and record it as pbest, randomly select an individual from the current population and record it as r1, and randomly select an individual from the union of the current population and the external archive and record it as r2;
[0126] Step S4A-2, using Mu_F and 0.1 as the mathematical expectation and standard deviation of the normal distribution, respectively, to generate the variation factor F, and using Mu_CR and 0.1 as the mathematical expectation and standard deviation of the Cauchy distribution, respectively, to generate the crossover factor CR;
[0127] Step S4A-3: The differential variation formula of the process coding part is:
[0128] v_x=r0_x+F×(pbest_x-r0_x)+F×(r1_x-r2_x), where v_x is the continuous process code of the variant individual, pbest_x is the process code of the pbest individual after continuous transformation, r1_x is the process code of the r1 individual after continuous transformation, r2_x is the process code of the r2 individual after continuous transformation, and r0_x is the process code of the current individual r0 after continuous transformation;
[0129] Step S4A-4, for each process, the machine selected by individual pbest is denoted as pbest_m, the machine selected by individual r1 is denoted as r1_m, and the machine selected by individual r2 is denoted as r2_m, and the probabilities of the corresponding machines pbest_m, r1_m, and r2_m in the machine selection probability matrix are increased by 2F, increased by F, and decreased by F, respectively;
[0130] Step S4A-5, normalize the machine selection probability matrix of each process, and then use the roulette method to select a processing machine for each process to obtain the machine code v_m of the variant individual;
[0131] Step S4A-6, the crossover formula of the process coding part is:
[0132] u_x=CR×v_x+(1-CR)×r0_x, where u_x is the continuous process code of the offspring individual u;
[0133] Step S4A-7, for each gene in the machine code, randomly generate a random number between 0 and 1, the machine code genes with random numbers less than or equal to CR are provided by v_m, and the genes of the remaining machine codes are provided by r0_m, and the machine code u_m of the offspring individual u is obtained;
[0134] Step S4A-8, calculate the objective function value of the offspring individual u, and compare it with the objective function value of the individual r0. If the offspring individual u is better than r0, replace the individual r0 with the offspring individual u, otherwise, do not process it;
[0135] Complete the differential mutation, crossover, selection and other operations of all individuals in the current population in the above manner.
[0136] For example, Figure 5 As shown in the figure, the process coding part of the pbest individual chromosome model is 1 2 4 3 2 4 1 3 4 12 3. After continuous conversion, we get index pbest is 12 6 3 11 8 2 9 5 1 10 7 4; the process coding part of the r0 individual chromosome model is 2 1 4 4 1 3 2 1 3 2 4 3. After continuous conversion, we get index r0 is 11 8 5 12 6 3 7 4 1 10 9 2; the process coding part of the r1 individual chromosome model is 4 3 1 2 3 1 4 43 2 1 2. After continuous conversion, we get index r1 is 10 7 2 9 3 1 11 8 4 12 6 5; the process coding part of the r2 individual chromosome model is 3 1 2 3 4 2 3 1 4 2 4 1. After continuous conversion, we get index r2 is 11 5 1 10 7 3 12 9 6 8 4 2; if F i The value of is 0.5, then according to the differential mutation formula in step S4A-3, the continuous process code v_x of the mutant individual can be calculated to be 11 8 4.5 11 5 1.5 9 5.5 4 1 11.56, thereby completing the differential mutation of the process code between the evolved individuals.
[0137] like Figure 6 As shown, if CR i If the value of is 0.5, then the crossover formula of step S4A-6 can be used to obtain the continuous process code u_x of the offspring individual as 11 8 4.5 11 5 1.5 7.5 4 0.5 12 9 4.5. After conversion, the process code of the offspring individual is 4 1 2 4 1 3 2 1 4 3 2 3.
[0138] For each process, the machine selection probability corresponding to the machine selected by the pbest individual for the process is increased by 2F based on the initial probability value, the machine selection probability corresponding to the machine selected by the r1 individual for the process is increased by F based on the initial probability value, and the machine selection probability corresponding to the machine selected by the r2 individual for the process is reduced by F based on the initial probability value, and the result is as follows Figure 7 The machine selection probability matrix is shown, and then the matrix is normalized. Finally, the roulette method is used to obtain the machine code u_m that corresponds one to one with the process code of the offspring individual. In this example, u_m is 2 2 3 4 2 13 4 4 5 3 5.
[0139] The external archive in step S4 is updated according to the selection between individuals in the population and the offspring individuals. The specific implementation process is as follows:
[0140] Step S4B-1, storing the individuals in the population that are replaced by the offspring individuals in an external archive;
[0141] Step S4B-2, if the number of individuals in the current external archive is greater than Arc_Size, then execute step S4B-3, otherwise end the external archive update;
[0142] Step S4B-3: Randomly select some individuals in the external archive and delete them so that the number of individuals in the external archive is equal to Arc_Size.
[0143] The parameters used by the optimization algorithm in step S4 are adaptively updated according to the selection between individuals in the population and the offspring individuals. The specific implementation process is as follows:
[0144] Step S4C-1: The offspring individual is considered to be a successful evolution if it is better than the original individual, and the mutation factor and crossover factor used in the successful evolution in this iteration are stored;
[0145] Step S4C-2: Calculate the mathematical expectation Mu_F of the variation factor according to the following formula:
[0146] Where S F is the set of mutation factors used by the successfully evolved individuals, and c is the weight when updating Mu_F;
[0147] Step S4C-3, calculate the mathematical expectation Mu_CR of the variation factor according to the following formula:
[0148] Where S CR The collection of mutation factors used to successfully evolve an individual.
[0149] The specific implementation process of selecting some individuals and performing neighborhood search around them in step S4 is as follows:
[0150] Step S4D-1, according to the objective function value of the individual, use the roulette method to select P_Select×100% individuals from the current population, and execute step S4D-2 for the above individuals;
[0151] Step S4D-2: For each individual participating in the neighborhood search, three processes from different workpieces are randomly selected, fully arranged, and inserted into the original position of the chromosome to obtain 6 neighborhood individuals;
[0152] Step S4D-3, respectively calculate the objective function values of the six neighborhood individuals, select the best individual and store it in the neighborhood individual set;
[0153] Step S4D-4: For each individual in the neighborhood individual set, randomly select a process and randomly replace its processing machine with another processable machine;
[0154] Step S4D-5: Calculate the objective function values of all individuals in the neighborhood individual set.
[0155] After completing population evolution, external archive update, parameter adaptive update, and neighborhood search operations described in step S4, the current population is updated. The specific implementation process is as follows:
[0156] Step S4E-1, combining the current population with the neighborhood individual set, and arranging the above individuals in ascending order according to the objective function value;
[0157] Step S4E-2: Select the top Pop_Size individuals as the final population of this iteration.
[0158] Step S5: Determine whether the running time of the algorithm meets the termination condition given by the initialization parameters in step S1. If yes, execute step S6; if not, return to execute step S4;
[0159] Step S6: Decode the optimal scheduling solution obtained by the algorithm and convert it into an intuitive Gantt chart.
[0160] In order to verify the feasibility of the multi-variety small-batch workshop scheduling method based on differential evolution algorithm, experiments were carried out on examples with production scales k×m of 5×6, 10×6, and 11×8, and the experimental results were compared and analyzed with genetic algorithm (GA) and particle swarm optimization (PSO).
[0161] The relevant parameters of C-JADE are set as follows: the proportion of elite individuals in the population p_best = 0.1, the population size Pop_Size = ceil(2×log(n×m))×10, the proportion of neighborhood search individuals in the population P_Select = 0.85, the maximum running time max_time = 0.05×k×m, and the external archive size Arc_Size = Pop_Size. The maximum completion time of each instance solved by the three algorithms is shown in Table 3. The corresponding workshop scheduling solution obtained by C-JADE is Figure 9-11 Gantt chart representation.
[0162] Table 3
[0163]
[0164] It can be seen from Table 3 that compared with GA and PSO, the scheduling results of the C-JADE algorithm proposed in the present invention are more outstanding in terms of target values, and as the order scale increases, its comprehensive performance is more excellent, the optimization effect is better, and the stability is higher. In summary, the multi-variety small batch workshop scheduling method based on differential evolution algorithm disclosed in the present invention can effectively shorten the construction period and ensure production efficiency in the multi-variety small batch production mode.
[0165] Although the present invention is described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. It should therefore be understood that many modifications may be made to the exemplary embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that the various dependent claims and features described herein may be combined in a manner different from that described in the original claims. It should also be understood that the features described in conjunction with a single embodiment may be used in other described embodiments.
Claims
1. A multi-variety small batch workshop scheduling method based on differential evolution algorithm, characterized in that: The method comprises the following steps: Step S1: divide the production order into processing batches and initialize the parameters; Step S2: Establish a mathematical model with the goal of minimizing the maximum completion time, and use a meta-heuristic algorithm to generate an initial population; Step S3: Continuously transform the chromosome models of the individuals participating in the evolution. The steps of model transformation are as follows: The steps for continuous conversion of the process coding part in the chromosome model; The steps in the natural sequence of genes in the chromosome model; The steps for serial transformation of the machine-encoded part in the chromosome model; Step S4: Use a differential evolution algorithm based on multiple evolution strategies and parameter adaptive update strategies to solve the model converted in step S3. The steps of using the algorithm to solve the model are as follows: The steps of differential mutation, crossover, and selection; Steps for external archive updates; Steps for adaptive parameter update; The steps of some individuals performing neighborhood search; Steps for population renewal; An individual is randomly selected from the elite group, the current population, the union of the external archive and the current population. For each individual in the current population, differential mutation, crossover and selection steps are performed in turn. Then the parameters in the external archive and optimization algorithm are updated, and some individuals are selected for neighborhood search. Finally, the current population is updated. The specific implementation process of selecting individuals for differential mutation, crossover and selection is as follows: Step S4A-1, randomly select an individual from the elite group and record it as pbest, randomly select an individual from the current population and record it as r1, and randomly select an individual from the union of the current population and the external archive and record it as r2; Step S4A-2, using Mu_F and 0.1 as the mathematical expectation and standard deviation of the normal distribution, respectively, to generate the variation factor F, and using Mu_CR and 0.1 as the mathematical expectation and standard deviation of the Cauchy distribution, respectively, to generate the crossover factor CR; Step S4A-3: The differential variation formula of the process coding part is: v_x=r0_x+F·(pbest_x-r0_x)+F·(r1_x-r2_x), where v_x is the continuous process code of the variant individual, pbest_x is the process code of the pbest individual after continuous transformation, r1_x is the process code of the r1 individual after continuous transformation, r2_x is the process code of the r2 individual after continuous transformation, and r0_x is the process code of the current individual r0 after continuous transformation; Step S4A-4, for each process, the machine selected by individual pbest is denoted as pbest_m, the machine selected by individual r1 is denoted as r1_m, and the machine selected by individual r2 is denoted as r2_m, and the probabilities of the corresponding machines pbest_m, r1_m, and r2_m in the machine selection probability matrix are increased by 2F, increased by F, and decreased by F, respectively; Step S4A-5, normalize the machine selection probability matrix of each process, and then use the roulette method to select a processing machine for each process to obtain the machine code v_m of the variant individual; Step S4A-6, the crossover formula of the process coding part is: u_x=CR·v_x+(1-CR)·r0_x, where u_x is the continuous process code of the offspring individual u; Step S4A-7, for each gene in the machine code, randomly generate a random number between 0 and 1, the machine code genes with random numbers less than or equal to CR are provided by v_m, and the genes of the remaining machine codes are provided by r0_m, and the machine code u_m of the offspring individual u is obtained; Step S4A-8, calculate the objective function value of the offspring individual u, and compare it with the objective function value of the current individual r0. If the offspring individual u is better than r0, replace the current individual r0 with the offspring individual u, otherwise, do not process it; Complete the differential mutation, crossover, and selection operations of all individuals in the current population in the above manner; Step S5: Determine whether the running time of the algorithm meets the termination condition given by the initialization parameters in step S1. If yes, execute step S6; if not, return to execute step S4; Step S6: Decode the optimal scheduling solution obtained by the algorithm and convert it into an intuitive Gantt chart.
2. The multi-variety small batch workshop scheduling method based on differential evolution algorithm according to claim 1 is characterized in that: The process of dividing the processing batches described in step S1 is as follows: Step S1-1, calculating the average demand of all workpieces; Step S1-2, dividing the production orders into two groups according to the average value, wherein the production orders with workpiece demand less than or equal to the average value are divided into the first group, and the production orders with workpiece demand greater than the average value are divided into the second group; Step S1-3, each production order in the first group is regarded as a processing batch; The processing batches of each production order in the second group are re-split, and the average value of all workpiece requirements in the first group of production orders is used as the splitting standard. Each production order in the second group is split into two batches, one of which has a workpiece demand greater than the splitting standard, and the other has a workpiece demand less than or equal to the splitting standard.
3. The multi-variety small batch workshop scheduling method based on differential evolution algorithm according to claim 2 is characterized in that: The initialization parameters in step S1 include: population size Pop_Size, external archive size Arc_Size, maximum running time max_time, proportion of neighborhood search individuals in the population P_Select, proportion of elite individuals in the population p_best, mathematical expectation of mutation factor Mu_F and mathematical expectation of crossover factor Mu_CR.
4. The multi-variety small batch workshop scheduling method based on differential evolution algorithm according to claim 3 is characterized in that: In step S2, a mathematical model is established with the goal of minimizing the maximum completion time. The calculation formula is: C = min{max(Endi)}, 1≤i≤total_op_num, where Endi represents the completion time of the i-th process, and total_op_num is the total number of processes included in all processing batches; The process of generating the initial population using the metaheuristic algorithm is: Step S2-1, for each gene in the process coding part of the chromosome, randomly select one from the workpiece with the largest number of remaining processes; Step S2-2: for the machine code part in the chromosome, select the machine with the shortest processing time for each process in turn according to the process sequence in the process code; Step S2-3: Determine the actual processing time of each process according to the process code part and the machine code part in the chromosome, and write it into the time code part.
5. The multi-variety small batch workshop scheduling method based on differential evolution algorithm according to claim 4 is characterized in that: The process of continuous conversion of the chromosome model in step S3 is: Step S3-1, for the process coding part in the chromosome, record the order of each process in the chromosome as indexi; Step S3-2, calculate total_op_num-indexi+1 for each gene in the process code, and use this value to replace the content in the original gene; Step S3-3, arranging the process codes, machine codes and time codes in the chromosome according to the natural process sequence; Step S3-4: For each process, a machine selection probability matrix is established, and the selection probability of each machine is initialized to 1.
6. The multi-variety small batch workshop scheduling method based on differential evolution algorithm according to claim 1 is characterized in that: The external archive in step S4 is updated according to the selection between individuals in the population and offspring individuals. The specific implementation process is as follows: Step S4B-1, storing the individuals in the population that are replaced by the offspring individuals in an external archive; Step S4B-2, if the number of individuals in the current external archive is greater than Arc_Size, execute step S4B-3, otherwise end the external archive update; Step S4B-3: Randomly select some individuals in the external archive and delete them so that the number of individuals in the external archive is equal to Arc_Size.
7. The multi-variety small batch workshop scheduling method based on differential evolution algorithm according to claim 6 is characterized in that: The parameters used by the optimization algorithm in step S4 are adaptively updated according to the selection between individuals in the population and the offspring individuals. The specific implementation process is as follows: Step S4C-1: The offspring individual is considered to be a successful evolution if it is better than the original individual, and the mutation factor and crossover factor used in the successful evolution in this iteration are stored; Step S4C-2: Calculate the mathematical expectation Mu_F of the variation factor according to the following formula: Where S F is the set of mutation factors used by the successfully evolved individuals, and c is the weight when updating Mu_F; Step S4C-3, calculate the mathematical expectation Mu_CR of the variation factor according to the following formula: Where S CR The collection of mutation factors used to successfully evolve an individual.
8. The multi-variety small batch workshop scheduling method based on differential evolution algorithm according to claim 7 is characterized in that: The specific implementation process of selecting some individuals and performing neighborhood search around them in step S4 is as follows: Step S4D-1, according to the objective function value of the individual, use the roulette method to select P_Select×100% individuals from the current population, and execute step S4D-2 for the above individuals; Step S4D-2: For each individual participating in the neighborhood search, three processes from different workpieces are randomly selected, fully arranged, and inserted into the original position of the chromosome to obtain 6 neighborhood individuals; Step S4D-3, respectively calculate the objective function values of the six neighborhood individuals, select the best individual and store it in the neighborhood individual set; Step S4D-4: For each individual in the neighborhood individual set, randomly select a process and randomly replace its processing machine with another processable machine; Step S4D-5: Calculate the objective function values of all individuals in the neighborhood individual set.
9. The multi-variety small batch workshop scheduling method based on differential evolution algorithm according to claim 8 is characterized in that: After completing population evolution, external archive update, parameter adaptive update, and neighborhood search operations as described in step S4, the current population is updated. The specific implementation process is as follows: Step S4E-1, combining the current population with the neighborhood individual set, and arranging the above individuals in ascending order according to the objective function value; Step S4E-2: Select the top Pop_Size individuals as the final population of this iteration.
Citation Information
Patent Citations
Improved culture gene algorithm for solving multi-objective flexible job shop scheduling problem
CN106611379A
Discrete manufacturing workshop static scheduling optimization method based on differential evolution algorithm
CN111208794A