A flexible job shop batch scheduling method considering carbon emissions

Through the improved NSGA-Ⅱ algorithm and random batching strategy, the problems of illegal solutions and narrowed search range in flexible job shop batch scheduling are solved, the optimization of carbon emissions and completion time is achieved, and the scheduling efficiency is improved.

CN115099612BActive Publication Date: 2025-09-12CHINA JILIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210712628.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-22
Publication Date
2025-09-12
Estimated Expiration
2042-06-22

AI Technical Summary

Technical Problem

Among the existing flexible job shop batch scheduling methods, the NSGA-Ⅱ algorithm is prone to produce illegal solutions during the crossover process and does not fully consider the genetic operations of batches, which leads to a narrowing of the algorithm search range and difficulty in finding the optimal solution.

Method used

The improved NSGA-Ⅱ algorithm is adopted to initialize the population through random batching strategy, and set the crossover probability and mutation probability. Real number coding and four-segment coding are used to solve the problem of illegal solutions in the crossover and mutation process. Fast non-dominated sorting and congestion calculation are combined to select individuals with high fitness and optimize the scheduling plan.

Benefits of technology

It effectively solves the problem of illegal solutions in the cross-mutation process, expands the search range of the algorithm, increases the probability of finding the optimal solution, optimizes the batch scheduling of flexible job shops, and reduces carbon emissions and completion time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115099612B_ABST
    Figure CN115099612B_ABST
Patent Text Reader

Abstract

The present invention discloses a flexible job shop batch scheduling method considering carbon emissions, and solves the flexible job shop batch scheduling problem with completion time and carbon emissions as targets by improving the NSGA-Ⅱ algorithm. First, a mathematical model for flexible job shop batch scheduling is established; the relevant parameters of the improved NSGA-Ⅱ algorithm are set, and the individuals of the population are encoded using a four-segment encoding method, thereby initializing the population. Then, crossover and mutation operators are designed to perform crossover and mutation operations on the four genes of batch division, sub-batch workpiece quantity division, process sorting, and machine selection, respectively. The concept of a dominant and recessive gene is proposed, and a method for distinguishing dominant and recessive genes is designed, by which individuals can be effectively decoded. Then, excellent individuals are selected and retained through non-dominated sorting and crowding. Finally, the Pareto optimal solution set is output when the number of iterations is reached.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of workshop scheduling, and in particular to a flexible job shop batch scheduling method considering carbon emissions. Background Art

[0002] Workshop scheduling is the core of enterprise production management. An effective scheduling solution can shorten the production cycle of enterprise products, improve production efficiency, and thus increase economic benefits. However, while accelerating the rapid development of enterprises, environmental pollution and energy depletion problems are becoming increasingly prominent. Workshop scheduling that takes environmental factors into consideration is a new research direction in workshop scheduling problems. In addition, current enterprise production methods are characterized by complexity, small batches, and multiple types. Most actual production and processing workshops are based on flexible workshops, and workpieces are usually produced in batches. Therefore, the present invention proposes a batch scheduling method for flexible workshops that takes carbon emissions into consideration.

[0003] The issue of batch scheduling in flexible job shops has become a hot topic in the scheduling field. The NSGA-II algorithm, which integrates a genetic algorithm with multi-objective optimization, is widely used in job shop scheduling due to its fast execution speed and good convergence. However, the NSGA-II algorithm's crossover method can generate a large number of illegal solutions when crossing chromosomes. Furthermore, initializing the population under batch scheduling results in different chromosome lengths, which makes these illegal solutions more pronounced during the crossover process, significantly narrowing the algorithm's search range. Furthermore, researchers have not yet thoroughly considered crossover mutations in batches. Genetic manipulation of batches can expand the algorithm's search range and better identify optimal solutions. Summary of the Invention

[0004] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide a flexible job shop batch scheduling method taking carbon emissions into consideration.

[0005] In order to achieve the above object, the present invention adopts the following scheme:

[0006] A flexible job shop batch scheduling method considering carbon emissions, the scheduling method comprising the following steps:

[0007] Step 1: Establish a mathematical model for batch scheduling of flexible job shops, where carbon emissions and completion time are set as the objective functions in the model and corresponding constraints are established.

[0008] Step 2: Design a random batching strategy to randomly divide the workpieces into multiple batches and obtain the number of workpieces in each sub-batch. This batching method is used to prepare the initial population of the algorithm.

[0009] Step 3: Set the algorithm parameters of the improved NSGA-Ⅱ algorithm: initialize the population size N, crossover probability P n , mutation probability P m and the maximum number of iterations t max .

[0010] Step 4: Use real number coding to initialize the population R0, select high-quality individuals according to non-dominated sorting, and perform crossover mutation on them to obtain the parent population P1.

[0011] Step 5: Perform selection, crossover, and mutation operations on the individuals in the parent population P1 to generate the offspring population Q1. Merge populations P1 and Q1 to obtain a new population R1.

[0012] Step 6: Decode the individuals in population R1, and then select individuals with high fitness through fast non-dominated sorting and crowding calculation to save them to the next generation parent population P2.

[0013] Step 7: Determine whether the maximum number of iterations t is reached max If it is not reached, execute step 5; if it is reached, output all solutions in the Pareto optimal solution set;

[0014] The present invention is further improved in that:

[0015] The specific method of step 1 is:

[0016] For this model, the objective function f1 of minimum completion time is established:

[0017] f1=MinMax(C i )

[0018] The objective function f2 of minimum carbon emission is established for this model:

[0019] This paper studies CNC workshops, and the carbon emission calculation model is developed based on actual production in CNC cutting workshops. Carbon emissions from the CNC workshop production process can be divided into two parts: electricity consumption and material consumption, depending on the emission method. Electricity loss includes the energy consumed by the operation of processing machinery and the energy consumed by the workshop's lighting, temperature control, and other systems. Material consumption includes the carbon emissions caused by the workshop's consumption of raw materials and the carbon emissions caused by the consumption of auxiliary materials, the latter primarily due to tool wear.

[0020] Based on the above classification, the carbon emissions of a CNC cutting workshop can be subdivided into carbon emissions from machine electricity consumption, carbon emissions from raw material consumption, carbon emissions from tool wear, and carbon emissions from workshop lighting, exhaust and other systems. Mathematical models are then established for each of the four major factors that affect carbon emissions.

[0021] A mathematical model is established for the carbon emissions caused by the loss of electrical energy in the machine, specifically:

[0022] f2=Min(CE m +CE p +CE tw +CE l )

[0023] Power consumption under machine load:

[0024] Power consumption of the machine under no-load:

[0025] The carbon emissions caused by the machine's power loss are as follows:

[0026]

[0027] A mathematical model is established for the carbon emissions caused by the consumption of raw materials during the cutting process, specifically:

[0028]

[0029] in: SEC means that 1cm is removed during processing 3 The calculated value of the special energy consumption of the material. MRR represents the material removal rate. C0 and C1 are special coefficients about SEC, which are related to factors such as tool material and processing environment. It is the volume of raw material cut per unit time.

[0030] A mathematical model is established for the carbon emissions caused by tool wear, specifically:

[0031]

[0032] in:

[0033] A mathematical model is established for the carbon emissions caused by the electricity consumption of workshop lighting, exhaust and other systems. Specifically:

[0034] CE l =F e ·P a ·T

[0035] Where: T = Max (C k )

[0036] The specific constraints are as follows:

[0037]

[0038] P i ≤N i ∧N iz >0;

[0039]

[0040] S iz(j+1)k ≥E izjk ;

[0041] E izjk =S izjk +PT izjk +ST ijk ×N iz ;

[0042] S izjk =E ifjk ;

[0043] C i =max(E izjk ),z=1,2,...,P i ;

[0044] The specific mathematical symbols are defined as follows:

[0045] i: workpiece number;

[0046] n: the number of types of workpieces, workpiece set J = {J1, J2, ..., J n};

[0047] J i : the artifact set of artifact i;

[0048] j i : The total number of processes for workpiece i;

[0049] N i : The number of workpieces i processed;

[0050] P i : The number of sub-batches of workpiece i;

[0051] N iz : The batch size of the zth sub-batch of workpiece i;

[0052] m: the total number of machines;

[0053] k: the serial number of the machine, the machine set M = {M1, M2, ..., M m};

[0054] C i : Completion time of workpiece i;

[0055] S izjk: The start time of the jth operation of the zth sub-batch of workpiece i on machine k;

[0056] E izjk : Completion time of the jth operation of the zth sub-batch of workpiece i on machine k;

[0057] T izjk : The processing time of the jth operation of the zth sub-batch of workpiece i on machine k;

[0058] ST ijk : The processing time of the jth process of unit workpiece i on machine k;

[0059] Cutting time of the jth operation of the zth sub-batch of workpiece i on machine k;

[0060] Rated cutting power of machine k;

[0061] Rated no-load power of machine k;

[0062]

[0063] F e : Emission factor of electric energy;

[0064] CE m : Carbon emissions caused by machine power loss;

[0065] CE p : Carbon emissions caused by non-electrical energy loss during cutting;

[0066] CE tw : Carbon emissions caused by tool wear;

[0067] CE l : Carbon emissions caused by electricity consumption in workshop lighting, exhaust and other systems;

[0068] The specific batch method of step 2 includes the following steps:

[0069] Step 2.1, initialize parameters i=1, m=0, j=1, p max .

[0070] Step 2.2, select the current workpiece model J i Divide into batches, corresponding to the number of workpieces N of this model i .

[0071] Step 2.3, randomly generate the current workpiece model J i The number of batches p i , and satisfy 0<p i ≤pmax (p i ∈Z), if p i =1, then go to step 2.7 and directly output the current workpiece model J i The number of batches p i and the number of workpieces N i If p i ≠1, go to step 2.4.

[0072] Step 2.4: Randomly generate the number of workpieces N in the first sub-batch j , and satisfy 0<N j ≤N i -m.

[0073] Step 2.5: Let m = m + N j , if m+p i -j>N i , then m=mN j , return to step 2.4; if m+p i -j≤N i , then proceed to step 2.6.

[0074] Step 2.6: Output the current workpiece model J i The number of sub-batch workpieces N j , if j = p i -1, then the number of workpieces in the last sub-batch of this model will be output And go to step 2.7; otherwise, set j=j+1 and return to step 2.4 to continue outputting the number of workpieces in the next sub-batch.

[0075] Step 2.7: If the batch number of all workpiece models and the number of workpieces in each sub-batch are not output, set i=i+1, initialize m=0, j=1 and return to step 2.2; otherwise, output the batch results and end.

[0076] The specific parameters of step 3 are:

[0077] N=100, P n =0.8, P m =0.02, t max =200.

[0078] The specific method of initializing the population using real number coding in step 4 is:

[0079] A four-segment encoding scheme is designed to represent individual information. The first segment represents the batch division gene, the second segment represents the sub-batch workpiece quantity gene, the third segment represents the process order gene, and the fourth segment represents the machine selection gene. The process order gene segment encodes each workpiece model using the maximum batch size, ensuring that the process code segments on each chromosome are of equal length. This encoding scheme effectively prevents the generation of illegal solutions during crossover mutation.

[0080] The specific implementation steps of the crossover mutation in step 5 are as follows:

[0081] Step 5.1: Create two empty sets, denoted as set S1 and set S2, randomly select two individuals from the parent population P1, and store them in set F1 and set F2 in coded form.

[0082] Step 5.2: Perform crossover operations on the four codes of the individuals in the parent population P1:

[0083] Step 5.2.1, batch crossover:

[0084] Randomly generate a real number a less than 1, if a is less than the crossover probability P n , then the nth gene of the parent individual F1 is exchanged with the nth gene of the parent individual F2, and the exchanged batch division genes are stored in the offspring individual set S1 and set S2 respectively.

[0085] Step 5.2.2, sub-batch workpiece quantity intersection:

[0086] There are strict constraints on the number of sub-batch artifacts crossed. Its actual significance is not to randomly change the number of sub-batch artifacts, but to adjust the number of sub-batches and artifacts of the chromosome individuals according to the change in batch number brought about by batch crossing. It is also necessary to ensure that the sum of the number of artifacts in each sub-batch is equal to the total number of artifacts of the model. Therefore, before crossing the number of sub-batch artifacts, it is necessary to first determine whether batch crossing will result in different batch numbers. If the batch number P after batch crossing is different from the original gene, a , then according to the specific batch method of step 2, P i Set to P a The number of randomly generated sub-batches; if the batches are crossed and the number of batches P is the same as the original gene a , then the genes of the number of sub-batch workpieces are exchanged according to the batch crossover method, and the exchanged genes of the number of sub-batch workpieces are also stored in the offspring individual set S1 and set S2 respectively.

[0087] Step 5.2.3, process crossover:

[0088] (1) Randomly generate a real number a less than 1. If a is less than the crossover probability P n, then the nth gene in the process sorting segment of the parent individual F1 is copied to S1 at the same position, and the initial value of n is 1.

[0089] (2)n=n+1.

[0090] (3) Repeat operations (2) and (3) until the number n is equal to the number of process ranking genes in the parent individual F1.

[0091] (4) Then select the parent individual F2, and add the genes in F2 that are different from those in the offspring S1 to the vacant gene positions of S1 according to the position priority order to form a complete gene individual.

[0092] (5) Operate S2 in the same way as above to generate new offspring individuals.

[0093] Step 5.2.4, machine crossover:

[0094] Machine selection crossover is done in the same way as batch crossover.

[0095] Step 5.3: Similar to the crossover operation, the mutation operation is also a four-part operation. The specific mutation operation is as follows:

[0096] Step 5.3.1, Batch Variation:

[0097] Randomly select a gene fragment at a position in the batch segment gene, and within the set maximum batch number p max A random integer a greater than 0 is generated to replace the current batch number.

[0098] Step 5.3.2: Sub-batch workpiece quantity variation:

[0099] The mutation of the sub-batch workpiece quantity segment gene is based on the result of the batch mutation. When the batch number changes from one number to another, the sub-batch workpiece quantity needs to be regenerated to the corresponding sub-batch workpiece quantity to ensure that the sub-batch workpiece quantity is equal to the total number of workpieces of this model.

[0100] Step 5.3.3, process variation:

[0101] The gene mutation in the process sorting segment adopts the inversion mutation method, randomly selecting any position of the individual chromosome and exchanging the genes in the selected gene position.

[0102] Step 5.3.4, machine mutation:

[0103] Machine selection segment gene mutation uses a machine-assigned mutation method to mutate the machine selection segment. A gene at a random position in the machine selection segment is selected, and the processing step corresponding to the machine selection for that gene is determined. A new machine that can handle the processing task is selected from available equipment and replaced with the machine selection gene that performs the mutation operation.

[0104] Step 5.4: Perform crossover mutation on multiple pairs of chromosomes to generate new offspring individuals, and fuse their parent individuals with the offspring individuals to generate a new population R1.

[0105] Step 6: Select individuals with high fitness from the population R1 through fast non-dominated sorting and crowding calculation and save them to the next generation parent population P2.

[0106] The specific implementation steps of step 6 are as follows:

[0107] Step 6.1, Decoding: Before performing fast non-dominated sorting and crowding calculations on individuals in population R1, each individual in the population needs to be decoded. Because the process sorting gene segment in step 4 encodes each workpiece model based on the maximum batch size, the process sorting and machine selection segments of each chromosome contain some ineffective genes that interfere with the expression of individual information. Therefore, the effective genes can be set as dominant genes and the ineffective genes as recessive genes based on the batch segment genes. The specific formula for determining dominant and recessive genes is as follows:

[0108]

[0109] Among them, cList[i] is the batch division segment gene, and pList[j] is the process sorting segment gene.

[0110] During the decoding process, the scheduling solution can be obtained by reading the dominant genes in the order of arrangement.

[0111] Step 6.2, fast non-dominated sorting: Obtain the corresponding value of each individual according to the objective function, and map it to a two-dimensional coordinate. The horizontal and vertical coordinates are the two objective functions f1 and f2. Different non-dominated levels are obtained according to Pareto dominance. The fitness of individuals at different levels can be judged through each level.

[0112] Step 6.3, crowding calculation: The crowding is calculated by the distance between the two nearest individuals in the two-dimensional coordinates of each individual. The specific crowding distance formula is:

[0113] BRIEF DESCRIPTION OF THE DRAWINGS

[0114] Figure 1This is a flow chart of a flexible job shop batch scheduling method considering carbon emissions.

[0115] Figure 2 This is the carbon emission distribution map of the flexible operation workshop.

[0116] Figure 3 This is a schematic diagram of the four-segment encoding method.

[0117] Figure 4 Schematic diagram of the sub-batch workpiece quantity crossing method based on batch crossing.

[0118] Figure 5 Schematic diagram of the process crossing method based on batch crossing.

[0119] Figure 6 Schematic diagram of the sub-batch workpiece quantity variation method based on batch variation.

[0120] Figure 7 Schematic diagram of the decoding method based on dominant and recessive genes. DETAILED DESCRIPTION

[0121] The present invention will be further described below with reference to the accompanying drawings and specific embodiments:

[0122] like Figure 1 As shown, the flexible job shop batch scheduling method considering carbon emissions of the present invention specifically includes the following steps:

[0123] First, let's take a specific processing schedule as an example as shown in the following table.

[0124]

[0125] Step 1: Establish a mathematical model for batch scheduling of flexible job shops, where carbon emissions and completion time are set as the objective functions in the model and corresponding constraints are established. The specific model construction is as follows:

[0126] For this model, the objective function f1 of minimum completion time is established:

[0127] f1=MinMax(C i )

[0128] The objective function f2 of minimum carbon emission is established for this model:

[0129] This paper studies CNC workshops, and the carbon emission calculation model is developed based on the actual production of CNC cutting workshops. The carbon emissions of a CNC workshop's production process can be divided into two parts: electricity consumption and material consumption, depending on the carbon emission method. Electricity loss includes the energy consumed by the operation of processing machines and the energy consumed by the workshop's lighting, temperature control, and other systems. Material consumption includes the carbon emissions caused by the workshop's raw materials and the consumption of auxiliary materials, with the latter primarily resulting from tool wear.

[0130] Based on the above classification, the carbon emissions of the CNC cutting workshop can be subdivided into carbon emissions from machine power consumption, carbon emissions from raw material consumption, carbon emissions from tool wear, and carbon emissions from workshop lighting, exhaust and other systems. The carbon emissions distribution diagram of the entire flexible operation workshop is as follows: Figure 2 As shown, mathematical models are then established for the four major factors that affect carbon emissions.

[0131] A mathematical model is established for the carbon emissions caused by the loss of electrical energy in the machine, specifically:

[0132] f2=Min(CE m +CE p +CE tw +CE l )

[0133] Power consumption under machine load:

[0134] Power consumption of the machine under no-load:

[0135] The carbon emissions caused by the machine's power loss are as follows:

[0136]

[0137] A mathematical model is established for the carbon emissions caused by the consumption of raw materials during the cutting process, specifically:

[0138]

[0139] in: SEC means that 1cm is removed during processing 3 The calculated value of the special energy consumption of the material. MRR represents the material removal rate. C0 and C1 are special coefficients about SEC, which are related to factors such as tool material and processing environment. It is the volume of raw material cut per unit time.

[0140] A mathematical model is established for the carbon emissions caused by tool wear, specifically:

[0141]

[0142] in:

[0143] A mathematical model is established for the carbon emissions caused by the electricity consumption of workshop lighting, exhaust and other systems. Specifically:

[0144] CE l =F e ·P a ·T

[0145] Where: T = Max (C k )

[0146] The specific constraints are as follows:

[0147]

[0148] P i ≤N i ∧N iz >0;

[0149]

[0150] S iz(j+1)k ≥E izjk ;

[0151] E izjk =S izjk +PT izjk +ST ijk ×N iz ;

[0152] S izjk =E ifjk ;

[0153] C i =max(E izjk ),z=1,2,...,P i ;

[0154] The specific mathematical symbols are defined as follows:

[0155] i: workpiece number;

[0156] n: the number of types of workpieces, workpiece set J = {J1, J2, ..., J n};

[0157] J i : the artifact set of artifact i;

[0158] j i : The total number of processes for workpiece i;

[0159] N i : The number of workpieces i processed;

[0160] P i : The number of sub-batches of workpiece i;

[0161] N iz : The batch size of the zth sub-batch of workpiece i;

[0162] m: the total number of machines;

[0163] k: the serial number of the machine, the machine set M = {M1, M2, ..., M m};

[0164] C i : Completion time of workpiece i;

[0165] S izjk : The start time of the jth operation of the zth sub-batch of workpiece i on machine k;

[0166] E izjk : Completion time of the jth operation of the zth sub-batch of workpiece i on machine k;

[0167] T izjk : The processing time of the jth operation of the zth sub-batch of workpiece i on machine k;

[0168] ST ijk : The processing time of the jth process of unit workpiece i on machine k;

[0169] Cutting time of the jth operation of the zth sub-batch of workpiece i on machine k;

[0170] Rated cutting power of machine k;

[0171] Rated no-load power of machine k;

[0172]

[0173] F e : Emission factor of electric energy;

[0174] CE m : Carbon emissions caused by machine power loss;

[0175] CE p : Carbon emissions caused by non-electrical energy loss during cutting;

[0176] CE tw : Carbon emissions caused by tool wear;

[0177] CE l : Carbon emissions caused by electricity consumption in workshop lighting, exhaust and other systems;

[0178] Step 2: Design a random batching strategy that can randomly divide the workpieces into multiple batches and obtain the number of workpieces in each sub-batch. This batching method prepares the initial population for the algorithm. The specific steps are as follows:

[0179] Step 2.1, initialize parameters i=1, m=0, j=1, p max =3;

[0180] Step 2.2, select the current workpiece model J i Divide into batches, corresponding to the number of workpieces N of this model i .

[0181] Step 2.3, randomly generate the current workpiece model J i The number of batches p i , and satisfy 0<p i ≤p max (p i ∈Z), if p i =1, if p i =1, then go to step 2.7 and directly output the current workpiece model J i The number of batches p i and the number of workpieces N i If p i ≠1, go to step 2.4.

[0182] Step 2.4: Randomly generate the number of workpieces N in the first sub-batch iz , and satisfy 0<N j ≤N i -m.

[0183] Step 2.5: Let m = m + N j , if m+p i -j>N i , then m=mN j , return to step 2.4; if m+p i -j≤N i , then proceed to step 2.6.

[0184] Step 2.6: Output the current workpiece model J i The number of sub-batch workpieces N j , if j = p i -1, then the number of workpieces in the last sub-batch of this model will be output And go to step 2.7; otherwise, set j=j+1 and return to step 2.4 to continue outputting the number of workpieces in the next sub-batch.

[0185] Step 2.7: If the batch number and sub-batch number of workpieces of all models are not output, set i=i+1, initialize m=0, j=1 and return to step 2.2; otherwise, output the batch results and end.

[0186] Step 3: Set the algorithm parameters of the improved NSGA-Ⅱ algorithm: initialize the population size N, crossover probability P n , mutation probability P m , selection probability and maximum number of iterations t max The specific parameter settings are as follows:

[0187] N=100, P n =0.8, P m =0.02, t max =200.

[0188] Step 4: Use real number coding to initialize the population R0, select high-quality individuals based on non-dominated sorting, and perform crossover mutation on them to obtain the parent population P1. The specific method for initializing the population is as follows:

[0189] A four-segment encoding method is designed to express individual information. The first segment represents the batch division gene, the second segment represents the sub-batch workpiece quantity gene, the third segment represents the process sorting gene, and the fourth segment represents the machine selection gene. A maximum batch size (in p) is set in the process sorting gene segment. max =3 as an example), encode each model of workpiece to ensure that the process coding segment length of each chromosome is equal. This encoding method can effectively solve the generation of illegal solutions during the crossover mutation process. The encoding method is as follows Figure 3 shown.

[0190] Step 5: Perform selection, crossover, and mutation operations on the individuals in the parent population P1 to generate the child population Q1. Then, merge populations P1 and Q1 to obtain a new population R1. The specific steps are as follows:

[0191] Step 5.1: Create two empty sets, denoted as set S1 and set S2, randomly select two individuals from the parent population P1, and store them in set F1 and set F2 in coded form.

[0192] Step 5.2: Perform crossover operations on the four codes of the individuals in the parent population P1:

[0193] Step 5.2.1, batch crossover:

[0194] Randomly generate a real number a less than 1, if a is less than the crossover probability P n, then the nth gene of the parent individual F1 is exchanged with the nth gene of the parent individual F2, and the exchanged batch division genes are stored in the offspring individual set S1 and set S2 respectively.

[0195] Step 5.2.2, sub-batch workpiece quantity crossover (sub-batch workpiece quantity crossover method based on batch crossover is as follows Figure 4 shown):

[0196] There are strict constraints on the number of sub-batch workpieces crossing. Its actual significance is not to randomly change the number of sub-batch workpieces, but to adjust the number of sub-batches and workpieces of the chromosome individuals according to the change in the batch number brought about by batch crossing. It is also necessary to ensure that the sum of the number of workpieces in each sub-batch is equal to the total number of workpieces of the model. Therefore, before crossing the number of sub-batch workpieces, it is necessary to first determine whether batch crossing will result in different batch numbers. If the batch number Pa is different from the original gene after batch crossing, then P is changed according to the specific batching method in step 2. i Set to P a The number of randomly generated sub-batches; if the batches are crossed and the number of batches P is the same as the original gene a , then the genes of the number of sub-batch workpieces are exchanged according to the batch crossover method, and the exchanged genes of the number of sub-batch workpieces are also stored in the offspring individual set S1 and set S2 respectively.

[0197] Step 5.2.3, process crossover (process crossover method based on batch crossover such as Figure 5 shown):

[0198] (1) Randomly generate a real number a less than 1. If a is less than the crossover probability P n , then the nth gene in the process sorting segment of the parent individual F1 is copied to S1 at the same position, and the initial value of n is 1.

[0199] (2)n=n+1.

[0200] (3) Repeat operations (2) and (3) until the number n is equal to the number of process ranking genes in the parent individual F1.

[0201] (4) Then select the parent individual F2, and add the genes in F2 that are different from those in the offspring S1 to the vacant gene positions of S1 according to the position priority order to form a complete gene individual.

[0202] (5) Operate S2 in the same way as above to generate new offspring individuals.

[0203] Step 5.2.4, machine crossover:

[0204] Machine selection crossover is done in the same way as batch crossover.

[0205] Step 5.3: Similar to the crossover operation, the mutation operation is also a four-part operation. The specific mutation operation is as follows:

[0206] Step 5.3.1, Batch Variation:

[0207] Randomly select a gene fragment at a position in the batch segment gene, and within the set maximum batch number p max =3 and randomly generate an integer a greater than 0 to replace the current batch number.

[0208] Step 5.3.2, sub-batch workpiece quantity variation (sub-batch workpiece quantity variation method based on batch variation is as follows Figure 6 shown):

[0209] The mutation of the sub-batch workpiece quantity segment gene is based on the result of the batch mutation. When the batch number changes from one number to another, the sub-batch workpiece quantity needs to be regenerated to the corresponding sub-batch workpiece quantity to ensure that the sub-batch workpiece quantity is equal to the total number of workpieces of this model.

[0210] Step 5.3.3, process variation:

[0211] The gene mutation in the process sorting segment adopts the inversion mutation method, randomly selecting any position of the individual chromosome and exchanging the genes in the selected gene position.

[0212] Step 5.3.4, machine mutation:

[0213] Machine selection segment gene mutation uses a machine-assigned mutation method to mutate the machine selection segment. A gene at a random position in the machine selection segment is selected, and the processing step corresponding to the machine selection for that gene is determined. A new machine that can handle the processing task is selected from available equipment and replaced with the machine selection gene that performs the mutation operation.

[0214] Step 5.4: Perform crossover mutation on multiple pairs of chromosomes to generate new offspring individuals, and fuse their parent individuals with the offspring individuals to generate a new population R1.

[0215] Step 6: Select individuals with high fitness from population R1 through fast non-dominated sorting and crowding calculation and save them to the next generation parent population P2. The specific steps are as follows:

[0216] Step 6.1, Decoding: Before performing fast non-dominated sorting and crowding calculations on individuals in population R1, each individual in the population needs to be decoded. Because the process sorting gene segment in step 4 encodes each workpiece model based on the maximum batch size, the process sorting and machine selection segments of each chromosome contain some ineffective genes that interfere with the expression of individual information. Therefore, the effective genes can be set as dominant genes and the ineffective genes as recessive genes based on the batch segment genes. The specific formula for determining dominant and recessive genes is as follows:

[0217]

[0218] Among them, cList[i] is the batch division segment gene, and pList[j] is the process sorting segment gene.

[0219] During the decoding process, the scheduling solution can be obtained by reading the dominant genes in the order of arrangement. The specific decoding process is as follows: Figure 7 shown.

[0220] Step 6.2, fast non-dominated sorting: Obtain the corresponding value of each individual according to the objective function, and map it to a two-dimensional coordinate. The horizontal and vertical coordinates are the two objective functions f1 and f2. Different non-dominated levels are obtained according to Pareto dominance. The fitness of individuals at different levels can be judged through each level.

[0221] Step 6.3, crowding calculation: The crowding is calculated by the distance between the two nearest individuals in the two-dimensional coordinates of each individual. The specific crowding distance formula is:

[0222]

[0223] Step 7: Determine whether the maximum number of iterations t is reached max If it is not reached, execute step 5; if it is reached, output all solutions in the Pareto optimal solution set.

Claims

1. A flexible job shop batch scheduling method considering carbon emissions, characterized in that: The scheduling method comprises the following steps: Step 1: Establish a mathematical model for batch scheduling of flexible job shops, where carbon emissions and completion time are set as the objective functions in the model and corresponding constraints are established; Step 2: Design a random batching strategy to randomly divide the workpieces into multiple batches and obtain the number of workpieces in each sub-batch. This batching method is used to prepare the initial population of the algorithm. Step 3. Set the algorithm parameters of the improved NSGA-II algorithm: initialize the population size N, crossover probability P n , mutation probability P m and the maximum number of iterations t max ; Step 4: Use real number coding to initialize the population R0, select high-quality individuals according to non-dominated sorting, and perform crossover mutation on them to obtain the parent population P1; Step 5: Perform selection, crossover, and mutation operations on the individuals in the parent population P1 to generate the offspring population Q1. Then, merge populations P1 and Q1 to obtain a new population R1. Step 6: Decode the individuals in population R1, and then select individuals with high fitness through fast non-dominated sorting and crowding calculation to save them to the next generation parent population P2; Step 7: Determine whether the maximum number of iterations t is reached max If it is not reached, execute step 5; if it is reached, output all solutions in the optimal Pareto solution set; The real number coding initialization population method is as follows: a four-segment coding method is designed to express individual information, including the first segment representing the batch division gene, the second segment representing the sub-batch workpiece quantity gene, the third segment representing the process sorting gene, and the fourth segment representing the machine selection gene; and in the process sorting gene segment, each model of workpiece is encoded with the maximum batch, and according to the batch division segment gene, the effective gene is set as the dominant gene, and the ineffective gene is set as the recessive gene; The specific process of decoding individuals in population R1 includes: before performing fast non-dominated sorting and crowding calculation on individuals in population R1, each individual in the population needs to be decoded; during the decoding process, the scheduling solution can be obtained by reading the dominant genes in the order of arrangement.

2. The flexible job shop batch scheduling method considering carbon emissions according to claim 1 is characterized in that: The mathematical model for flexible job shop batch scheduling with carbon emissions as the target includes: Carbon emissions from the production process of a CNC machine tool workshop are divided into two parts according to their nature: electricity consumption and material consumption. Electricity consumption includes the energy consumed by the operation of the processing machines and the energy consumed by the lighting and temperature control systems in the workshop. Material consumption includes the carbon emissions caused by the consumption of raw materials in the workshop and the carbon emissions caused by the consumption of auxiliary materials. The consumption of auxiliary materials includes the wear of cutting tools. Based on the above classification, the carbon emissions of a CNC cutting workshop are further subdivided into carbon emissions from machine electricity consumption, carbon emissions from raw material consumption, carbon emissions from tool wear, and carbon emissions from the workshop lighting and exhaust systems. Mathematical models are then established for each of these four factors that influence carbon emissions. A mathematical model is established for the carbon emissions caused by the loss of electrical energy in the machine, specifically: f=Min(CE m +CE p +CE tw +CE l ) Power consumption under machine load: Power consumption of the machine under no-load: The carbon emissions caused by the machine's power loss are as follows: A mathematical model is established for the carbon emissions caused by the consumption of raw materials during the cutting process, specifically: in: SEC means that 1cm is removed during processing 3 The calculated value of the special energy consumption of the material, MRR represents the material removal rate, C0 and C1 are special coefficients about SEC, which are related to the tool material and processing environment factors. is the volume of raw material cut per unit time; A mathematical model is established for the carbon emissions caused by tool wear, specifically: in: A mathematical model is established for the carbon emissions caused by the electricity consumption of the workshop lighting and exhaust systems, specifically: WHAT l =F e ·P a ·T Where: T = Max (C k ) The specific mathematical symbols are defined as follows: i: workpiece number; n: the number of types of workpieces, workpiece set J = {J1, J2, ..., J n }; J i : the artifact set of artifact i; J i : The total number of processes for workpiece i; N i : The number of workpieces i processed; P i : The number of sub-batches of workpiece i; N iz : The batch size of the zth sub-batch of workpiece i; m: the total number of machines; k: the serial number of the machine, the machine set M = {M1, M2, ..., M m }; C i : Completion time of workpiece i; S izjk : The start time of the jth operation of the zth sub-batch of workpiece i on machine k; E izjk : Completion time of the jth operation of the zth sub-batch of workpiece i on machine k; T izjk : The processing time of the jth operation of the zth sub-batch of workpiece i on machine k; ST ijk : The processing time of the jth process of unit workpiece i on machine k; Cutting time of the jth operation of the zth sub-batch of workpiece i on machine k; Rated cutting power of machine k; Rated no-load power of machine k; F e : Emission factor of electric energy; CE m : Carbon emissions caused by machine power loss; CE p : Carbon emissions caused by non-electrical energy loss during cutting; CE tw : Carbon emissions caused by tool wear; CE l : Carbon emissions caused by electricity consumption by workshop lighting and exhaust systems.

3. The flexible job shop batch scheduling method considering carbon emissions according to claim 1 is characterized in that: The specific steps of step 5 include: Step 5.1: Create two empty sets, denoted as set S1 and set S2, randomly select two individuals from the parent population P1, and store them in set F1 and set F2 in coded form. Step 5.2: Perform crossover operations on the four codes of the individuals in the parent population P1: Step 5.2.1, batch crossover: Randomly generate a real number a less than 1, if a is less than the crossover probability P n , then the nth gene of the parent individual F1 is exchanged with the nth gene of the parent individual F2, and the exchanged batch division genes are stored in the offspring individual set S1 and set S2 respectively; Step 5.2.2, sub-batch workpiece quantity intersection: The crossover of the number of sub-batch artifacts has strict constraints. Its actual significance is not to randomly change the number of sub-batch artifacts, but to adjust the number of sub-batches and artifacts of its chromosome individuals according to the change in the batch number brought about by batch crossover. The specific method is to exchange the genes of the number of sub-batch artifacts according to the batch crossover method, and also store the exchanged sub-batch artifact number genes in the offspring individual sets S1 and S2 respectively. Step 5.2.3, process crossover: (1) Randomly generate a real number a less than 1. If a is less than the crossover probability P n , then copy the nth gene of the process sorting segment in the parent individual F1 to S1 at the same position, and the initial value of n is 1; (2) n = n + 1; (3) Repeat operations (2) and (3) until the number n is equal to the number of process ranking genes in the parent individual F1; (4) Select the parent individual F2 and add the genes in F2 that are different from those in the offspring S1 to the vacant gene positions in S1 according to the position priority order to form a complete gene individual; (5) Operate S2 in the same way as above to generate new offspring individuals; Step 5.2.4, machine crossover: Machine selection crossover is done in the same way as batch crossover; Step 5.3: Similar to the crossover operation, the mutation operation is also a four-part operation; the specific mutation operation is as follows: Step 5.3.1, Batch Variation: Randomly select a gene fragment at a position in the batch segment gene, and within the set maximum batch number p max Randomly generate an integer a greater than 0 to replace the current batch number; Step 5.3.2: Sub-batch workpiece quantity variation: The mutation of the sub-batch workpiece quantity segment gene is based on the result of the batch mutation. When the batch number changes from one number to another, the sub-batch workpiece quantity needs to be regenerated to ensure that the sub-batch workpiece quantity is equal to the total number of workpieces of this model. Step 5.3.3, process variation: The gene mutation in the process sorting section adopts the inversion mutation method, randomly selecting any position on the individual chromosome and exchanging the genes in the selected gene position; Step 5.3.4, machine mutation: The machine selection segment gene mutation uses the machine allocation mutation method to perform a mutation operation on the machine selection segment gene. A gene at a random position in the machine selection segment gene is selected, and the processing step corresponding to the machine selection of the single gene is determined. A new machine that can meet the processing task of the step is reselected from the available equipment and this gene is replaced with the machine selection gene that performs the mutation operation. Step 5.4: Perform crossover mutation on multiple pairs of chromosomes to generate new offspring individuals, and fuse their parent individuals with the offspring individuals to generate a new population R1.

4. The flexible job shop batch scheduling method considering carbon emissions according to claim 1 is characterized in that: The method for determining dominant and recessive genes is as follows: Among them, cList[i] is the batch division segment gene, and pList[j] is the process sorting segment gene.

Citation Information

Patent Citations

  • Green scheduling optimization method of intelligent manufacturing workshop for complex man-machine coupling

    CN110956371A

  • Internet of Things workshop scheduling method based on NSGA-II algorithm

    CN113689066A