An optimization method and device for the reentrant hybrid flow shop scheduling problem
Through the improved iterative greedy algorithm and NEH heuristic algorithm, the reentrant hybrid flow workshop scheduling problem is solved, and the production scheduling complexity is improved, and the production efficiency and resource utilization are improved.
Patent Information
- Application Number
- CN202210741308.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-06-28
AI Technical Summary
The scheduling problem of reenterable hybrid flow workshops is highly complex, and it is difficult for the existing technology to effectively optimize production scheduling, resulting in waste of resources and low production efficiency.
The improved learning iterative greed algorithm with elite adjustment is adopted based on iterative greed algorithm, and population initialization and chromosome adjustment are combined with NEH heuristic algorithm to establish a mathematical optimization model, and the workshop scheduling scheme is optimized.
Improve production management efficiency, reduce resource waste, reduce completion time, and avoid the irrationality and inefficiency of manual scheduling.
Smart Images

Figure CN115222107B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of workshop scheduling, and particularly to an optimization method and device for the reentrant hybrid flow shop scheduling problem. Background Art
[0002] Manufacturing has always been the pillar of the national economy, and manufacturing technology is a reflection of a country's comprehensive national strength and scientific and technological level. The development of manufacturing is inseparable from the optimization of production scheduling. Production scheduling aims to complete production tasks reasonably at the cost of minimum loss through more reasonable arrangements of materials, machines, and manpower. Optimizing production scheduling is conducive to reducing resource waste and increasing economic benefits. With the development of manufacturing, production scheduling has been increasingly emphasized in all walks of life.
[0003] Kumar first proposed the reentrant production system in 1993 and regarded it as the third type of production system different from job shops and flow shops. Compared with traditional flow shops and job shops, the reentrant production system, as the third type of production system, has the characteristics of large production scale, many equipment units, multiple reentrant processing processes, complex processing processes, and greater uncertainty. Driven by the development of large-scale integrated circuit manufacturing technology, more and more products show the need to re-enter the processing route and be reprocessed in some or all stages during the production process. Thus, the reentrant concept was proposed and introduced into the flow shop scheduling problem.
[0004] The reentrant hybrid flow shop adds reentrant characteristics on the basis of the hybrid flow shop. The reentrant hybrid flow shop scheduling problem widely exists in fields such as semiconductor crystal manufacturing, vehicles, ships, and steel manufacturing. The production scheduling optimization problem is a non-deterministic polynomial hard problem. Due to its reentrant characteristics in the production scheduling of the reentrant production system, workpieces with different processing times may wait for processing in front of the same equipment. The existence of the reentrant phenomenon increases the competition degree of workpieces on the equipment and increases the complexity of production scheduling and the difficulty of formulating production plans.
[0005] In summary, the research and application of the production scheduling of the reentrant hybrid flow shop have a wide range. Its scheduling problem is more complex than traditional flow shops and job shops and has high research value. Summary of the Invention
[0006] The present invention is proposed for the problem of how to reasonably formulate a scheduling plan for mixed-line production under mass customization to improve the production efficiency of enterprises and customer satisfaction and make full use of existing resources.
[0007] To solve the above technical problems, the present invention provides the following technical solutions:
[0008] On the one hand, the present invention provides an optimization method for the reentrant hybrid flow shop scheduling problem, which is implemented by an electronic device. The method includes:
[0009] S1. Obtain the processing information of the workshop to be scheduled; wherein, the processing information includes the number of workpieces to be processed, processing time, number of parallel machines, number of processing stages, and number of processing times; wherein, the processing time is the sum of the processing times of the workpieces in each stage, and the processing time of the workpieces in each stage is the same; the number of parallel machines is the same number of parallel machines in each stage; the number of processing times is the number of times the workpiece completes all stage processing.
[0010] S2. Input the processing information of the workshop to be scheduled into the constructed workshop scheduling optimization model.
[0011] S3. Solve the workshop scheduling optimization model according to the improved learning iterative greedy algorithm with elite adjustment based on the iterative greedy algorithm LIG-EA to obtain a workshop scheduling plan.
[0012] Optionally, the construction process of the workshop scheduling optimization model in S2 includes:
[0013] S21. Set the parameters of the workshop scheduling optimization model; wherein, the parameters include the population size S p , the number of iterations I, the upper limit percentage α of the number of disruptions, the lower limit percentage β of the number of disruptions, the crossover probability P c and the acceptance probability parameter T.
[0014] S22. Set the objective function and constraints.
[0015] S23. Obtain the workshop scheduling optimization model according to the parameters, objective function, and constraints.
[0016] Wherein, the objective function is to minimize the makespan; wherein, the makespan refers to the time when the workpiece completes all processing times.
[0017] The constraints include: the completion time of any operation is equal to the sum of the start processing time and the processing time required on the machine; each workpiece can only select one same parallel machine for processing in each stage; each workpiece can only enter the next stage after the previous stage is processed; after the workpiece with a higher processing order is processed, the subsequent workpieces can start processing; each workpiece must complete all stage processing before it can re-enter and start the next processing; the decision variable takes values of 0 or 1; the constraint variable takes non-negative values.
[0018] Optionally, the solution of the workshop scheduling optimization model in S3 according to the improved learning iterative greedy algorithm with elite adjustment based on the iterative greedy algorithm LIG-EA to obtain a workshop scheduling plan includes:
[0019] S301. Input the parameters of the workshop scheduling optimization model and initialize the population to generate the initial population.
[0020] S302. Decode the initial population to obtain the objective function values of the chromosomes in the initial population, and select the chromosome with the optimal objective function value in the chromosome as the optimal solution π.
[0021] S303. Select the top 10% of the chromosomes with the optimal objective function values in the chromosomes as the elite chromosomes.
[0022] S304. Perform elite adjustment on each elite chromosome in the elite chromosomes; among them, the elite adjustment includes elite chromosome destruction and reconstruction and chromosome adjustment based on key workpieces.
[0023] S305. Obtain the new ordinary chromosomes according to the ordinary chromosomes and the elite chromosomes after elite adjustment; among them, the ordinary chromosomes are the chromosomes of the current population.
[0024] S306. Perform destruction and reconstruction on the new ordinary chromosomes.
[0025] S307. Generate a new population according to the new chromosomes after destruction and reconstruction, the initial population, and the probability jump acceptance criterion.
[0026] S308. Traverse the new population. If there is a chromosome in the new population whose objective function value is better than the objective function value of the elite chromosomes after elite adjustment, then replace and update the elite chromosomes after elite adjustment to obtain the updated elite chromosomes.
[0027] S309. Find the optimal chromosome π′ in the new population and the updated elite chromosomes. If the objective function value of π′ is better than the objective function value of π, then replace π with π′.
[0028] S310. Determine whether the preset number of iterations I is satisfied; if so, output the external archive, that is, the optimal chromosome π and the objective function value of π obtained after iteration; otherwise, go to execute S304.
[0029] Optionally, the initialization population generation in S301 to generate the initial population includes: generating the initial population using the improved heuristic algorithm NEH.
[0030] Generating the initial population using the improved heuristic algorithm NEH includes:
[0031] S3011. Calculate the total processing time of each workpiece in each stage among all workpieces, and arrange all workpieces in descending order according to the total processing time.
[0032] S3012. Obtain the two workpieces with the largest total processing time among all workpieces according to the arrangement of all workpieces, and obtain the arrangement with the optimal objective function value for the two workpieces, and use the optimal arrangement as the current chromosome.
[0033] S3013. Randomly select any one of the workpieces that have not undergone the insertion operation, traverse each insertable position in the current chromosome, and obtain the insertion result of the selected workpiece according to the method for judging the validity of the insertable position; among them, the workpieces that have not undergone the insertion operation are the remaining workpieces after removing the two workpieces with the largest total processing time from all workpieces.
[0034] S3014. Select the insertable position corresponding to the insertion result with the smallest objective function value in the insertion results, and insert the selected workpiece into the position.
[0035] S3015. Judge whether all workpieces have been inserted; if so, output the initial population; if not, go to execute S3013.
[0036] Optionally, randomly select any one of the workpieces that have not undergone the insertion operation in S3013, traverse each insertable position in the current chromosome, and obtain the insertion result of the selected workpiece according to the method for judging the validity of the insertable position, including:
[0037] S30131. Randomly select any one of the workpieces that have not undergone the insertion operation.
[0038] S30131. Obtain each insertable position in the current chromosome, sequentially select one position in the insertable positions as the current insertable position, insert the selected workpiece into the current insertable position, and generate a chromosome.
[0039] S30132. Perform chromosome extraction on the chromosome to generate a partial chromosome.
[0040] S30133. If the partial chromosome is the same as the partial chromosome generated by inserting the selected workpiece into other insertable positions except the current insertable position, the validity judgment of the current insertable position is invalid.
[0041] If the partial chromosome is different from the partial chromosome generated by inserting the selected workpiece into other insertable positions except the current insertable position, the validity judgment of the current insertable position is valid, insert the selected workpiece into the current insertable position, and obtain the insertion result of the selected workpiece.
[0042] Optionally, decoding the initial population in S302 to obtain the objective function values of the chromosomes in the initial population includes:
[0043] S3021. Traverse each gene of the chromosomes in the initial population, and extract l partial chromosomes from each gene; where a partial chromosome is a set of complete partial chromosomes containing n non-repeating workpieces, and each gene can only be extracted once; where l is the number of processing times and n is the number of workpieces.
[0044] S3022. Decode the l partial chromosomes in sequence to obtain the objective function values of the chromosomes in the initial population.
[0045] Optionally, the elite chromosome destruction and reconstruction in S304 includes: destroying the elite chromosome and reconstructing the destroyed elite chromosome.
[0046] S3041.1. The destruction of the elite chromosome includes:
[0047] Let the gene length of the elite chromosome be len; randomly and non-repeatedly select d genes from the len genes and denote them as π D ; denote the remaining len - d genes as π R .
[0048] S3041.2. The reconstruction of the destroyed elite chromosome includes:
[0049] Select the genes in π D in sequence, insert the selected genes into all positions of the current chromosome π R , calculate the objective function values of the chromosomes obtained by inserting into each position of all positions, and select the chromosome corresponding to the optimal objective function value among the objective function values as the current chromosome π R , and judge whether all the genes in π D have been selected; if so, output the reconstructed elite chromosome; if not, continue to execute step S3041.2.
[0050] Optionally, the chromosome adjustment based on key workpieces in S304 includes:
[0051] S3042.1. Obtain the key processing workpieces of the chromosome in stage s of the elite chromosome.
[0052] S3042.2. Judge whether the key processing workpieces can be adjusted; if so, insert the key processing workpieces into the current position of the key processing workpieces and all positions before the current position in the chromosome in stage s respectively to obtain multiple changed chromosomes in stage s, and execute S3042.3; if not, obtain the next key processing workpiece of the chromosome in stage s and go to execute S3042.2.
[0053] S3042.3. Generate chromosomes for other stages except the first stage and the s-th stage in the elite chromosome according to the first-come, first-served decoding rule. Based on the generated chromosomes and the chromosomes of the s-th stage after multiple changes, obtain multiple elite chromosomes after changes. Decode each of the multiple elite chromosomes after changes to obtain the objective function values corresponding to the multiple elite chromosomes after changes.
[0054] S3042.4. Record the optimal objective function value among the objective function values corresponding to the multiple elite chromosomes after changes and the chromosome corresponding to the optimal objective function value.
[0055] S3042.5. Determine whether all the key processing workpieces of the chromosome in the s-th stage have been obtained; if so, execute S3042.6; if not, obtain the next key processing workpiece of the chromosome in the s-th stage and go to execute S3042.2.
[0056] S3042.6. Determine whether all stages except the first stage have been traversed; if so, compare the optimal objective function value recorded in S3042.4 with the objective function value of the elite chromosome before adjustment to obtain the optimal objective function value, and output the optimal objective function value and the chromosome corresponding to the optimal objective function value; if not, let s = s + 1 and go to execute S3042.1.
[0057] Optionally, obtaining the new ordinary chromosome according to the ordinary chromosome and the elite chromosome after elite adjustment in S305 includes:
[0058] Generate a random number random within the range of (0, 1) for each ordinary chromosome; determine whether the random number random is less than the crossover probability P c ; if so, perform a crossover operation on the ordinary chromosome to obtain a new ordinary chromosome; if not, return the ordinary chromosome as the new ordinary chromosome.
[0059] On the other hand, the present invention provides an optimization device for the reentrant hybrid flow shop scheduling problem. The device is applied to implement the optimization method for the reentrant hybrid flow shop scheduling problem. The device includes:
[0060] An acquisition module, configured to acquire the processing information of the workshop to be scheduled; wherein, the processing information includes the number of workpieces to be processed, the processing time, the number of parallel machines, the number of processing stages, and the number of processing times; wherein, the processing time is the sum of the processing times of the workpiece in each stage, and the processing time of the workpiece in each stage is the same; the number of parallel machines is the same number of parallel machines in each stage; the number of processing times is the number of times the workpiece completes all stage processing.
[0061] An input module, configured to input the processing information of the workshop to be scheduled into the constructed workshop scheduling optimization model.
[0062] An output module, which is used to solve the workshop scheduling optimization model according to the improved learning-based iterative greedy algorithm with elite adjustment (LIG-EA) based on the iterative greedy algorithm, so as to obtain a workshop scheduling plan.
[0063] Optionally, the input module is further used for:
[0064] S21. Set the parameters of the workshop scheduling optimization model; where the parameters include the population size S p , the number of iterations I, the upper limit percentage α of the number of disruptions, the lower limit percentage β of the number of disruptions, the crossover probability P c and the acceptance probability parameter T.
[0065] S22. Set the objective function and constraint conditions.
[0066] S23. Obtain the workshop scheduling optimization model according to the parameters, the objective function and the constraint conditions.
[0067] Among them, the objective function is to minimize the makespan; where the makespan refers to the moment when a workpiece completes all processing times.
[0068] The constraint conditions include: the completion time of any process is equal to the sum of the start processing time and the processing time required on the machine; each workpiece can only select one same parallel machine for processing in each stage; each workpiece can only enter the next stage after the previous stage is processed; after the workpiece with a higher processing order is processed, the subsequent workpieces can start processing; each workpiece must complete all stage processing completely before it can re-enter and start the next processing; the decision variable takes values of 0 or 1; the constraint variable takes non-negative values.
[0069] Optionally, the output module is further used for:
[0070] S301. Input the parameters of the workshop scheduling optimization model and initialize the population to generate an initial population.
[0071] S302. Decode the initial population to obtain the objective function values of the chromosomes in the initial population, and select the chromosome with the best objective function value in the chromosomes as the optimal solution π.
[0072] S303. Select the top 10% of the chromosomes with the best objective function values in the chromosomes as elite chromosomes.
[0073] S304. Perform elite adjustment on each elite chromosome in the elite chromosomes; where the elite adjustment includes elite chromosome disruption and reconstruction and chromosome adjustment based on key workpieces.
[0074] S305. Obtain a new normal chromosome based on the normal chromosome and the elite chromosome adjusted by the elite; wherein, the normal chromosome is the chromosome of the current population.
[0075] S306. Perform destruction and reconstruction on the new normal chromosome.
[0076] S307. Generate a new population according to the new chromosome after destruction and reconstruction, the initial population, and the probability jump acceptance criterion.
[0077] S308. Traverse the new population. If there is a chromosome in the new population whose objective function value is better than that of the elite chromosome adjusted by the elite, then replace and update the elite chromosome adjusted by the elite to obtain an updated elite chromosome.
[0078] S309. Find the optimal chromosome π′ in the new population and the updated elite chromosome. If the objective function value of π′ is better than that of π, then replace π with π′.
[0079] S310. Determine whether the preset number of iterations I is satisfied; if so, output the external archive, that is, the optimal chromosome π and the objective function value of π obtained after iteration; otherwise, go to execute S304.
[0080] Optionally, the output module is further configured to:
[0081] Generate an initial population by using the improved heuristic algorithm NEH.
[0082] The output module is further configured to:
[0083] S3011. Calculate the total processing time of each workpiece in all workpieces at each stage, and arrange all workpieces in descending order according to the total processing time.
[0084] S3012. Obtain the two workpieces with the largest total processing time among all workpieces according to the arrangement of all workpieces, and obtain the arrangement with the optimal objective function value of the two workpieces, and use the optimal arrangement as the current chromosome.
[0085] S3013. Randomly select any workpiece among the workpieces that have not undergone the insertion operation, traverse each insertable position in the current chromosome, and obtain the insertion result of the selected workpiece according to the insertion position validity judgment method; wherein, the workpieces that have not undergone the insertion operation are the remaining workpieces after removing the two workpieces with the largest total processing time among all workpieces.
[0086] S3014. Select the insertable position corresponding to the insertion result with the smallest objective function value in the insertion results, and insert the selected workpiece at the insertable position.
[0087] S3015. Determine whether all workpieces are inserted; if so, output the initial population; if not, go to execute S3013.
[0088] Optionally, the output module is further configured to:
[0089] S30131. Randomly select any one of the workpieces that have not been inserted.
[0090] S30131. Obtain each insertable position in the current chromosome, sequentially select one position from the insertable positions as the current insertable position, insert the selected workpiece into the current insertable position, and generate a chromosome.
[0091] S30132. Perform chromosome extraction on the chromosome to generate a partial chromosome.
[0092] S30133. If the partial chromosome is the same as the partial chromosome generated by inserting the selected workpiece into other insertable positions except the current insertable position, the validity of the current insertable position is determined to be invalid.
[0093] If the partial chromosome is different from the partial chromosome generated by inserting the selected workpiece into other insertable positions except the current insertable position, the validity of the current insertable position is determined to be valid, and the selected workpiece is inserted into the current insertable position to obtain the insertion result of the selected workpiece.
[0094] Optionally, the output module is further configured to:
[0095] S3021. Traverse each gene of the chromosomes in the initial population, and perform extraction on each gene to obtain l partial chromosomes; wherein, the partial chromosome is a set of complete partial chromosomes containing n non-repeating workpieces, and each gene can only be extracted once; wherein, l is the number of processing times, and n is the number of workpieces.
[0096] S3022. Decode the l partial chromosomes in sequence to obtain the objective function values of the chromosomes in the initial population.
[0097] Optionally, the output module is further configured to:
[0098] Destroy the elite chromosome and reconstruct the destroyed elite chromosome.
[0099] The output module is further configured to:
[0100] Let the gene length of the elite chromosome be len; randomly and non-repeatedly select d genes from the len genes and denote them as π D ; denote the remaining len - d genes as π R .
[0101] The output module is further configured to:
[0102] Select genes from π in sequence D and insert the selected genes into all positions in the current chromosome π R Calculate the objective function value of the chromosome obtained by inserting into each position among all positions, and select the chromosome corresponding to the optimal objective function value among the objective function values as the current chromosome π R and determine whether all genes in π D have been selected; if so, output the reconstructed elite chromosome; if not, continue to execute step S3041.2.
[0103] Optionally, the output module is further configured to:
[0104] S3042.1. Obtain the key processing workpieces of the chromosome in stage s of the elite chromosome.
[0105] S3042.2. Determine whether the key processing workpieces are adjustable; if so, insert the key processing workpieces into the current position of the key processing workpieces in the chromosome of stage s and all positions before the current position respectively, to obtain multiple changed chromosomes of stage s, and execute S3042.3; if not, obtain the next key processing workpiece of the chromosome of stage s, and go to execute S3042.2.
[0106] S3042.3. Generate chromosomes for other stages except the first stage and stage s in the elite chromosome according to the first-come-first-served decoding rule, and obtain multiple changed elite chromosomes based on the generated chromosomes and the multiple changed chromosomes of stage s, and decode each of the multiple changed elite chromosomes to obtain the objective function values corresponding to the multiple changed elite chromosomes.
[0107] S3042.4. Record the optimal objective function value among the objective function values corresponding to the multiple changed elite chromosomes and the chromosome corresponding to the optimal objective function value.
[0108] S3042.5. Determine whether all key processing workpieces of the chromosome of stage s have been obtained; if so, execute S3042.6; if not, obtain the next key processing workpiece of the chromosome of stage s, and go to execute S3042.2.
[0109] S3042.6. Determine whether all stages except the first stage have been traversed; if so, compare the optimal objective function value recorded in S3042.4 with the objective function value of the elite chromosome before adjustment to obtain the optimal objective function value, and output the optimal objective function value and the chromosome corresponding to the optimal objective function value; if not, let s = s + 1, and go to execute S3042.1.
[0110] Optionally, the output module is further configured to:
[0111] Generate a random number random within the range of (0, 1) for each ordinary chromosome; determine whether the random number random is less than the crossover probability P c ; if so, perform a crossover operation on the ordinary chromosome to obtain a new ordinary chromosome; if not, return the ordinary chromosome as the new ordinary chromosome.
[0112] On the one hand, an electronic device is provided, which includes a processor and a memory. At least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the above-mentioned optimization method for the reentrant hybrid flow shop scheduling problem.
[0113] On the one hand, a computer-readable storage medium is provided. At least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned optimization method for the reentrant hybrid flow shop scheduling problem.
[0114] The beneficial effects brought by the technical solution provided by the embodiments of the present invention at least include:
[0115] In the above solution, for the reentrant hybrid flow shop scheduling problem, a mathematical optimization model is established with the goal of minimizing the makespan, and a learning-based iterative greedy algorithm with elite adjustment is proposed. The improved NEH heuristic algorithm is used for population initialization to improve the quality of the initial population. An elite population is established on the basis of the iterative greedy algorithm with only intra-individual interaction, and a learning mechanism for ordinary individuals to learn from elite individuals is established through crossover to increase inter-individual interaction and accelerate algorithm convergence. The elite individuals are disrupted and reconstructed, and the chromosome adjustment based on key jobs is performed to expand the solution space on the basis of the original decoding method based on the first-come-first-served rule, increasing the possibility of finding a better solution. In view of the reentrant characteristics of the reentrant hybrid flow shop, the insertion validity judgment is added in the NEH insertion and reconstruction insertion links, greatly improving the algorithm running speed.
[0116] The present invention uses an intelligent algorithm to solve the reentrant hybrid flow shop scheduling problem, optimizes the algorithm and improves the algorithm speed while maintaining the excellent solving performance of the iterative greedy algorithm, avoids the irrationality and inefficiency of manual scheduling decisions, and helps to improve the production management efficiency of enterprises. Description of the Drawings
[0117] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0118] Figure 1 It is a schematic flowchart of an optimization method for the reentrant hybrid flow shop scheduling problem provided by an embodiment of the present invention;
[0119] Figure 2 It is a block diagram of an optimization device for the reentrant hybrid flow shop scheduling problem provided by an embodiment of the present invention;
[0120] Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0121] To make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.
[0122] As Figure 1 shown, an embodiment of the present invention provides an optimization method for the reentrant hybrid flow shop scheduling problem, and this method can be implemented by an electronic device. As Figure 1 shown in the schematic flowchart of the optimization method for the reentrant hybrid flow shop scheduling problem, the processing flow of this method can include the following steps:
[0123] S1. Obtain the processing information of the workshop to be scheduled.
[0124] Among them, the processing information includes but is not limited to the number of workpieces to be processed, processing time, number of parallel machines, number of processing stages, and number of processing times.
[0125] Among them, the processing time is the sum of the processing times of the workpiece in each stage, and the processing time of the workpiece in each stage is the same.
[0126] The number of parallel machines is the same number of parallel machines in each stage.
[0127] The number of processing times is the number of times the workpiece completes all stage processing.
[0128] S2. Input the processing information of the workshop to be scheduled into the constructed workshop scheduling optimization model.
[0129] Optionally, the construction process of the workshop scheduling optimization model in S2 includes:
[0130] S21. Set the parameters of the workshop scheduling optimization model.
[0131] Among them, the parameters include but are not limited to the population size S p , the number of iterations I, the upper limit percentage α of the number of disruptions, the lower limit percentage β of the number of disruptions, the crossover probability P c , and the acceptance probability parameter T.
[0132] S22. Set the objective function and constraints.
[0133] Among them, the objective function is to minimize the makespan.
[0134] Among them, the makespan refers to the time when a workpiece completes all machining operations.
[0135] In a feasible implementation, when calculating the objective value, a model is combined to implement machining sequence constraints, machining times constraints, machine selection constraints, etc.
[0136] The objective function can be expressed by the following formula (1):
[0137] f = min(C max ) (1)
[0138] Among them, C max is the makespan, and C max is expressed by the following formulas (2) and (3):
[0139] C max = max(F isr ) (2)
[0140] F isr = S isr + P is (3)
[0141] Among them, i is the workpiece index, i = 1, 2,..., n; s is the stage index, s = 1, 2,..., k; r is the number of machining operations, r = 1, 2,..., l; F isr represents the end machining time of workpiece i in stage s for the r-th machining; S isr represents the start machining time of workpiece i in stage s for the r-th machining; P is represents the machining time of workpiece i in stage s.
[0142] The constraints include: the makespan of any operation is equal to the sum of the start machining time and the machining time required on the machine; each workpiece can only select one same parallel machine for machining in each stage; each workpiece can only enter the next stage after the previous stage machining is completed; after the workpiece with a higher machining order is completed, the subsequent workpieces can start machining; each workpiece must complete all stage machining completely before it can re-enter and start the next machining; the decision variable takes values of 0 or 1; the constraint variable takes non-negative values.
[0143] In a feasible implementation, the constraint conditions may include the following 1)-6):
[0144] 1), Each workpiece can only select one machine for processing in each stage, which is represented by the following formula (4):
[0145]
[0146] Where, X ijsr is a decision variable. For the r-th processing, workpiece i is processed on machine j in stage s, X ijsr = 1; otherwise, X ijsr = 0; m s is the number of identical parallel machines in stage s; j is the machine index, j = 1, 2,... m s .
[0147] 2), Each workpiece can only enter the next stage for processing after the previous stage is completed, which is represented by the following formula (5):
[0148] F isr ≤ S i(s+1)r (5)
[0149] Where, S i(s+1)r represents the start processing time of workpiece i in stage s + 1 for the r-th processing.
[0150] 3), The subsequent workpiece can only start processing after the workpiece with a higher processing order is completed, which is represented by the following formula (6):
[0151] S isr ≥ F i′sr + NY ii′sr (6)
[0152] Where, N is a sufficiently large real number; Y ii′sr is a decision variable. For the r-th processing, in stage s, workpiece i is processed before workpiece i′, Y ii′sr = 1; otherwise Y ii′sr = 0.
[0153] 4), Each workpiece must complete all stage processing before it can re-enter, which is represented by the following formula (7):
[0154] S i1(r+1) ≥ F ikr (7)
[0155] Where, F ikr is the end time of the last stage of the r-th processing of workpiece i, and S i1(r+1) is the start time of the first stage of the (r + 1)-th processing of workpiece i.
[0156] 5), the decision variable takes values of 0 or 1, which are represented by the following formulas (8) and (9):
[0157]
[0158]
[0159] 6), the constraint variable takes non - negative values, which are represented by the following formulas (10) and (11):
[0160]
[0161]
[0162] S23. According to the parameters, objective function and constraint conditions, a workshop scheduling optimization model is obtained.
[0163] S3. According to the improved LIG - EA (The Learning Iterated Greedy Algorithm with Elite Adjustment, a learning - type iterative greedy algorithm with elite adjustment based on the iterative greedy algorithm), the workshop scheduling optimization model is solved to obtain a workshop scheduling plan.
[0164] Among them, the population corresponds to a set of solutions, and the population initialization generates initial solutions corresponding to the population size. A decoding method based on first - come - first - served is used for decoding, that is, the processing order of the next stage is the order in which the workpieces in the previous stage are completed. Before decoding, the chromosome needs to be extracted into l chromosome segments containing n non - repeating workpieces for the number of processing times, and then the chromosome segments are decoded in turn.
[0165] Optionally, solving the workshop scheduling optimization model according to the improved learning - type iterative greedy algorithm with elite adjustment based on the iterative greedy algorithm LIG - EA in S3 to obtain a workshop scheduling plan includes:
[0166] S301. Input the parameters of the workshop scheduling optimization model and initialize the population to generate an initial population.
[0167] Optionally, initializing the population to generate an initial population in S301 includes: generating an initial population using the improved NEH (Nawaz - Enscore - Ham, NEH heuristic algorithm).
[0168] Generating an initial population using the improved heuristic algorithm NEH includes:
[0169] S3011. Calculate the total processing time of each workpiece in each stage among all workpieces, and arrange all workpieces in descending order according to the total processing time.
[0170] S3012. Obtain the two workpieces with the largest total processing time among all workpieces according to the arrangement of all workpieces, and obtain the arrangement with the optimal objective function values of the two workpieces. Take the optimal arrangement as the current chromosome.
[0171] S3013. Randomly select any one of the workpieces that have not undergone the insertion operation, traverse each insertable position in the current chromosome, and obtain the insertion result of the selected workpiece according to the insertable position validity judgment method.
[0172] Among them, the workpieces that have not undergone the insertion operation are the remaining workpieces after removing the two workpieces with the largest total processing time from all workpieces.
[0173] Optionally, randomly select any one of the workpieces that have not undergone the insertion operation in S3013, traverse each insertable position in the current chromosome, and obtain the insertion result of the selected workpiece according to the insertable position validity judgment method, including:
[0174] S30131. Randomly select any one of the workpieces that have not undergone the insertion operation.
[0175] S30131. Obtain each insertable position in the current chromosome, sequentially select one position in the insertable positions as the current insertable position, insert the selected workpiece into the current insertable position, and generate a chromosome.
[0176] S30132. Perform chromosome extraction on the chromosome to generate a partial chromosome.
[0177] S30133. If the partial chromosome is the same as the partial chromosome generated by inserting the selected workpiece into other insertable positions except the current insertable position, the validity judgment of the current insertable position is invalid.
[0178] If the partial chromosome is different from the partial chromosome generated by inserting the selected workpiece into other insertable positions except the current insertable position, the validity judgment of the current insertable position is valid, insert the selected workpiece into the current insertable position, and obtain the insertion result of the selected workpiece.
[0179] In a feasible implementation manner, if the partial chromosome generated after chromosome extraction of the chromosome generated by inserting the current position is the same as the partial chromosome generated by inserting into other positions, it is an invalid insertion, otherwise it is called a valid insertion.
[0180] For example, assume the current chromosome is π with a chromosome length of len. Currently, workpiece i needs to be inserted, where i ∈ (1, n); the number of processing times is l. If workpiece i exists in π, let the number of times it has appeared be r, where r < l. Denote the set of positions of the existing workpiece i in π as I, with the set length being r. The insertable position interval is [0, len]. Inserting at the first position 0 is definitely valid; between the position interval (0, I1), it is only valid to insert after the workpiece that appears for the first time; inserting at position I1 is definitely invalid. And so on, between the position interval (I j , I j+1 ), it is only valid to insert after the workpiece that appears for the jth time; inserting at position I j+1 is definitely invalid, where j = 1, 2,..., r. If workpiece i does not exist in π, then it is only valid to insert after the workpiece that appears for the first time. This method for judging insertion validity applies to all parts in the algorithm that require insertion operations, such as the NEH initialization and reconstruction parts.
[0181] S3014. Select the insertion position corresponding to the insertion result with the minimum objective function value in the insertion results, and insert the selected workpiece at the position.
[0182] S3015. Judge whether all workpieces have been inserted; if so, output the initial population; if not, go back to execute S3013.
[0183] S302. Decode the initial population to obtain the objective function values of the chromosomes in the initial population, and select the chromosome with the optimal objective function value in the chromosomes and denote it as the optimal solution π.
[0184] Optionally, the decoding of the initial population in S302 to obtain the objective function values of the chromosomes in the initial population includes:
[0185] S3021. Traverse each gene of the chromosomes in the initial population, and extract l partial chromosomes from each gene.
[0186] Among them, the partial chromosome is a set of complete partial chromosomes containing n non-repeating workpieces, and each gene can only be extracted once; where l is the number of processing times and n is the number of workpieces.
[0187] S3022. Decode the l partial chromosomes in sequence to obtain the objective function values of the chromosomes in the initial population.
[0188] For example, suppose there are n workpieces and l processes, where l - 1 processes are reentrant. The chromosome uses workpiece encoding, the chromosome length len = n × l, and the number of occurrences of each workpiece in the chromosome is set to i, where i = 1, 2, …, l. The i-th occurrence represents the i-th process. Based on the adopted encoding method, during the decoding process, the first-come-first-served rule is followed, and the processing order of the next stage is the completed processing order of the previous stage. Based on the adopted first-come-first-served decoding rule, each gene in the chromosome needs to be traversed until a complete partial chromosome containing n non-repeating workpieces is extracted. Each gene can only be extracted once. After the chromosome is completely extracted, it will become l partial chromosomes, and decoding is performed in sequence.
[0189] S303. Select the top 10% of the chromosomes with the optimal objective function value in the chromosome as elite chromosomes.
[0190] S304. Perform elite adjustment on each elite chromosome in the elite chromosomes.
[0191] Among them, the elite adjustment includes elite chromosome destruction and reconstruction and chromosome adjustment based on key workpieces.
[0192] Optionally, the elite chromosome destruction and reconstruction in S304 includes: destroying the elite chromosome and reconstructing the destroyed elite chromosome.
[0193] S3041.1. Destroying the elite chromosome includes:
[0194] Suppose the gene length of the elite chromosome is len; randomly and non-repeatedly select d genes from the len genes and denote them as π D ; the remaining len - d genes are denoted as π R .
[0195] Among them, the selection process of the destruction number d includes:
[0196] Based on the fixed destruction number of the iterative greedy algorithm, the number of destroyed genes in the destruction link is adaptively adjusted according to the instance scale and the number of iterations.
[0197] Furthermore, suppose the chromosome length is len, α is the upper limit ratio of the number of destroyed genes to the chromosome length, β is the lower limit ratio of the number of destroyed genes to the chromosome length, I is the total number of iterations, and I′ is the current number of iterations. The calculation formula for the destruction number d changing with I is as shown in Equation (12). If d is not an integer, it is rounded up.
[0198]
[0199] If d is less than the minimum destruction number β × len, then d takes β × len (rounded up if not an integer).
[0200] In LIG-EA, this method of adaptively determining the number of disruptions is used for both the disruption processes of elite solutions and ordinary individuals.
[0201] S3041.2. Reconstructing the disrupted elite chromosome includes:
[0202] Successively select the genes in π D , and insert the selected genes into all positions in the current chromosome π R . Calculate the objective function value of the chromosome obtained by inserting into each position among all positions, and select the chromosome corresponding to the optimal objective function value among the objective function values as the current chromosome π R , and determine whether all the genes in π D have been selected; if so, output the reconstructed elite chromosome; if not, continue to execute step S3041.2.
[0203] In a feasible implementation, insert the genes in π D into π R successively. Assume that there are i genes in the current π R . Take the first gene in π D , and insert it into all positions in π R , that is, position 1, position 2,..., position i + 1. Calculate the objective function value C max of the chromosome generated by the i + 1 insertions. Take the chromosome with the minimum C max as the current chromosome π R . Continue to take the second gene in π D , and repeat the above operation until all the genes in π D have been taken.
[0204] Optionally, the chromosome adjustment based on key workpieces in S304 includes:
[0205] S3042.1. Obtain the key processing workpieces of the chromosome in stage r of the elite chromosome.
[0206] Among them, the process of obtaining the key processing workpieces of the chromosome in stage s of the elite chromosome in S3042.1 includes:
[0207] Decode the elite chromosome that needs to be adjusted, consider the processing sequence constraint and machine selection constraint of each stage workpiece processed according to the current stage chromosome, and record the earliest start processing time ES is , the latest start processing time LS is of the workpiece i (i = 1, 2,..., n) in stage s (s = 2,..., k), and the time F i(s-1) when the workpiece completes the processing of the previous stage. If ES is - LS isIf it is equal to 0, then workpiece i is the key workpiece in stage s.
[0208] S3042.2. Determine whether the key processing workpiece can be adjusted; if so, insert the key processing workpieces into the current position of the key processing workpiece in the chromosome of stage s and all positions before the current position respectively, to obtain multiple chromosomes of stage s after change, and execute S3042.3; if not, obtain the next key processing workpiece in the chromosome of stage s, and go to execute S3042.2.
[0209] In a feasible implementation manner, the process of changing the position of the key processing workpiece in the chromosome in S3042.2 to obtain the chromosome of stage s after change includes:
[0210] If it is determined that workpiece i is the key workpiece in stage s, then obtain the key processing workpiece i, and judge whether F of the key processing workpiece i i(s-1) <ES is holds; if it holds, record the position I of the key processing workpiece i in the chromosome of stage s at this time i , remove the key processing workpiece i from the chromosome, and set the chromosome composed of other workpieces except the key processing workpiece i as π p , and insert the key processing workpiece i into π p successively at the [0, I i ) position to obtain I i chromosomes of stage s after change. If it does not hold, obtain the next key processing workpiece.
[0211] S3042.3. Generate chromosomes for other stages except the first stage and the s-th stage in the elite chromosome according to the first-come-first-served decoding rule. According to the generated chromosomes and multiple chromosomes of stage s after change, obtain multiple elite chromosomes after change, and decode each of the multiple elite chromosomes after change to obtain the objective function values corresponding to the multiple elite chromosomes after change.
[0212] S3042.4. Record the optimal objective function value among the objective function values corresponding to the multiple elite chromosomes after change and the chromosome corresponding to the optimal objective function value.
[0213] S3042.5. Determine whether all the key processing workpieces in the chromosome of stage s have been obtained; if so, execute S3042.6; if not, obtain the next key processing workpiece in the chromosome of stage s, and go to execute S3042.2.
[0214] S3042.6. Determine whether all stages except the first stage have been traversed; if so, compare the optimal objective function value recorded in S3042.4 with the objective function value of the elite chromosome before adjustment to obtain the optimal objective function value, and output the optimal objective function value and the chromosome corresponding to the optimal objective function value; if not, let s = s + 1 and go to execute S3042.1.
[0215] In a feasible implementation, the chromosome adjustment of the key workpiece is to change the position of a certain key workpiece in a certain stage s in the chromosome, change the chromosomes (there are multiple) of this stage s, and then decode these multiple chromosomes (each decoding keeps the first stage unchanged, and the other stages generate chromosomes following the first-come-first-served rule, and the stages for adjustment correspond to the adjusted chromosomes in turn). After decoding, multiple objective function values are obtained. Select the optimal objective function value and compare it with the objective function value before adjustment. If the optimal one is better than the objective function value before adjustment, record it.
[0216] For example, finally, the objective function values after adjusting multiple workpieces may be recorded. For example, for the workpiece No. 3 in stage 2, the optimal objective function value after adjustment is 110, and for the workpiece No. 1 in stage 3, the optimal objective function value after adjustment is 109. The objective function value before adjustment is 111. Finally, take 109, that is, adjust the workpiece No. 1 in stage 3.
[0217] S305. Obtain a new ordinary chromosome according to the ordinary chromosome and the elite chromosome after elite adjustment.
[0218] Among them, the explanation of the ordinary chromosome can be:
[0219] For example, for a population with a population size of 100 and an elite chromosome proportion of 10%, for the first-generation population (i.e., the initial population), the ordinary chromosome is the 100 chromosomes in the initial population; among them, the ordinary chromosome also includes the top 10% of the chromosomes with the best objective function values in the initial population (i.e., 10 elite chromosomes).
[0220] After the first-generation population completes evolution, the elite chromosomes are updated. That is, among the 100 chromosomes in the current population, check whether there are chromosomes better than the 10 elite chromosomes in the first generation. If so, replace them to obtain the second-generation elite chromosomes. The obtained second-generation elite chromosomes are the best 10 chromosomes evolved so far, rather than the best 10 chromosomes in each generation separately. In the second-generation population, the ordinary chromosome is the current 100 chromosomes with the same quantity.
[0221] For the Nth-generation population, the ordinary chromosome is the 100 chromosomes in the current Nth-generation population.
[0222] Optionally, obtaining a new normal chromosome according to the normal chromosome and the elite chromosome adjusted by the elite includes:
[0223] Generate a random number random within the range of (0, 1) for each normal chromosome; determine whether the random number random is less than the crossover probability P c ; if so, perform a crossover operation on the normal chromosome to obtain a new normal chromosome; if not, return the normal chromosome as the new normal chromosome.
[0224] In a feasible implementation, the normal chromosome and the elite chromosome are crossed by a PMX (Partial-Mapped Crossover) crossover operator, which is called the learning of the normal individual (normal chromosome) from the elite individual (elite chromosome), and randomly select one of the two offspring x1 and x2 generated by the crossover to return.
[0225] Among them, if a crossover operation is to be performed on the normal chromosome, randomly select one from the elite solution set for crossover. The elite solution set is a set composed of elite chromosomes.
[0226] Assume that the chromosome length at this time is len(π), randomly cut off a section of the chromosome for exchange within the position interval of [1, len(π)], and establish a mapping relationship between the two cut-off chromosomes.
[0227] Furthermore, fill in the genes of the original chromosome at the remaining positions. If an infeasible solution is generated, that is, the number of occurrences of the gene at the original position in the current chromosome is equal to the processing times, then perform replacement according to the mapping relationship. If there are two mapping genes that can be replaced at the same time, preferentially select the one with fewer occurrences in the current chromosome for replacement. Randomly select one of the two offspring to return.
[0228] S306. Perform disruption and reconstruction on the new normal chromosome.
[0229] S307. Generate a new population according to the new chromosome after disruption and reconstruction and the probability jump acceptance criterion.
[0230] In a feasible implementation, population selection according to the probability jump acceptance criterion includes:
[0231] S3071. Assume that the population size is S p , and the population before algorithm improvement (i.e., the initial population) is P o , and the improved population is P n . Calculate the objective function values F oi , F ni , i = 1, 2,..., Sp 。
[0232] S3072. Traverse the individuals in the population. If F ni < F oi , then replace P ni with P oi 。
[0233] S3073. Otherwise, generate a random number random uniformly distributed between (0, 1). If random satisfies Equation (13), then perform the replacement operation. tem is calculated according to Equation (14).
[0234] random ≤ exp{-(C(x new ) - C(x old )) / tem} (13)
[0235]
[0236] In Equation (14), T is an algorithm parameter, representing the total processing time of all workpieces in all stages, n represents the number of workpieces, and s represents the number of stages.
[0237] S308. Traverse the new population. If there is a chromosome in the new population whose objective function value is better than that of the elite chromosome after elite adjustment, then replace and update the elite chromosome after elite adjustment to obtain the updated elite chromosome. Among them, the number of elite chromosomes remains unchanged.
[0238] S309. Find the optimal chromosome π′ in the new population and the updated elite chromosome. If the objective function value of π′ is better than that of π, then replace π with π′.
[0239] S310. Determine whether the preset number of iterations I is satisfied; if so, output the external archive, that is, the optimal chromosome π and the objective function value of π obtained after iteration; otherwise, go to execute S304.
[0240] In the embodiment of the present invention, for the reentrant hybrid flowshop scheduling problem, a mathematical optimization model is established with the goal of minimizing the makespan, and a learning-based iterative greedy algorithm with elite adjustment is proposed. The improved NEH heuristic algorithm is used for population initialization to improve the quality of the initial population. An elite population is established on the basis of the iterative greedy algorithm with only intra-individual interaction, and a learning mechanism for ordinary individuals to learn from elite individuals is established through crossover to increase inter-individual interaction and accelerate algorithm convergence. The elite individuals are disrupted and reconstructed, and the chromosome is adjusted based on the critical workpiece, expanding the solution space on the basis of the original decoding method based on the first-come-first-served rule and increasing the possibility of finding a better solution. Aiming at the reentrant characteristics of the reentrant hybrid flowshop, the insertion validity judgment is added in the NEH insertion and reconstruction insertion links, greatly improving the algorithm operation speed.
[0241] The present invention uses an intelligent algorithm to solve the reentrant hybrid flowshop scheduling problem, optimizes the algorithm while maintaining the excellent solution performance of the iterative greedy algorithm, improves the algorithm speed, avoids the irrationality and inefficiency of manual scheduling decisions, and helps to improve the production management efficiency of enterprises.
[0242] As Figure 2 shown, the embodiment of the present invention provides an optimization device 200 for the reentrant hybrid flowshop scheduling problem. The device 200 is applied to implement the optimization method for the reentrant hybrid flowshop scheduling problem. The device 200 includes:
[0243] An acquisition module 210, configured to acquire the processing information of the workshop to be scheduled; wherein, the processing information includes the number of workpieces to be processed, the processing time, the number of parallel machines, the number of processing stages, and the number of processing times; wherein, the processing time is the sum of the processing times of the workpieces in each stage, and the processing times of the workpieces in each stage are the same; the number of parallel machines is the same number of parallel machines in each stage; the number of processing times is the number of times the workpiece completes all stage processing.
[0244] An input module 220, configured to input the processing information of the workshop to be scheduled into the constructed workshop scheduling optimization model.
[0245] An output module 230, configured to solve the workshop scheduling optimization model according to the learning-based iterative greedy algorithm with elite adjustment LIG-EA based on the iterative greedy algorithm, and obtain a workshop scheduling plan.
[0246] Optionally, the input module 220 is further configured to:
[0247] S21. Set the parameters of the workshop scheduling optimization model; wherein, the parameters include the population size S p 、the number of iterations I, the upper limit percentage α of the number of disruptions, the lower limit percentage β of the number of disruptions, the crossover probability P cand the acceptance probability parameter T.
[0248] S22. Set the objective function and constraints.
[0249] S23. Obtain the workshop scheduling optimization model according to the parameters, objective function and constraints.
[0250] Among them, the objective function is to minimize the makespan; among them, the makespan refers to the moment when the workpiece completes all processing times.
[0251] The constraints include: the completion time of any process is equal to the sum of the start processing time and the processing time required on the machine; each workpiece can only select one same parallel machine for processing in each stage; each workpiece can only enter the next stage after the previous stage is processed; after the workpiece with a previous processing order is processed, the subsequent workpiece can start processing; each workpiece must complete all stage processing completely before it can re-enter and start the next processing; the decision variable takes values of 0 or 1; the constraint variable takes non-negative values.
[0252] Optionally, the output module 230 is further used for:
[0253] S301. Input the parameters of the workshop scheduling optimization model and initialize the population to generate an initial population.
[0254] S302. Decode the initial population to obtain the objective function values of the chromosomes in the initial population, and select the chromosome with the optimal objective function value in the chromosomes as the optimal solution π.
[0255] S303. Select the top 10% of the chromosomes with the optimal objective function values in the chromosomes as elite chromosomes.
[0256] S304. Perform elite adjustment on each elite chromosome in the elite chromosomes; among them, the elite adjustment includes elite chromosome destruction and reconstruction and chromosome adjustment based on key workpieces.
[0257] S305. Obtain new ordinary chromosomes according to the ordinary chromosomes and the elite chromosomes after elite adjustment; among them, the ordinary chromosomes are the chromosomes of the current population.
[0258] S306. Perform destruction and reconstruction on the new ordinary chromosomes.
[0259] S307. Generate a new population according to the new chromosomes after destruction and reconstruction, the initial population and the probability jump acceptance criterion.
[0260] S308. Traverse the new population. If there is a chromosome in the new population whose objective function value is better than that of the elite chromosome after elite adjustment, then replace and update the elite chromosome after elite adjustment to obtain the updated elite chromosome.
[0261] S309. Search for a new population and the optimal chromosome π' in the updated elite chromosomes. If the objective function value of π' is better than that of π, then replace π with π'.
[0262] S310. Determine whether the preset number of iterations I is satisfied; if so, output the external archive, that is, the optimal chromosome π and the objective function value of π obtained after iteration; otherwise, go to execute S304.
[0263] Optionally, the output module 230 is further used for:
[0264] Generate an initial population using the improved heuristic algorithm NEH.
[0265] The output module 230 is further used for:
[0266] S3011. Calculate the total processing time of each workpiece at each stage among all workpieces, and arrange all workpieces in descending order according to the total processing time.
[0267] S3012. Obtain the two workpieces with the largest total processing time among all workpieces according to the arrangement of all workpieces, and get the arrangement with the optimal objective function value for the two workpieces. Take the optimal arrangement as the current chromosome.
[0268] S3013. Randomly select any one of the workpieces that have not undergone the insertion operation, traverse each insertable position in the current chromosome, and obtain the insertion result of the selected workpiece according to the insert position validity judgment method; among them, the workpieces that have not undergone the insertion operation are the remaining workpieces after removing the two workpieces with the largest total processing time from all workpieces.
[0269] S3014. Select the insert position corresponding to the insert result with the smallest objective function value in the insert results, and insert the selected workpiece into the insert position.
[0270] S3015. Determine whether all workpieces have been inserted; if so, output the initial population; if not, go to execute S3013.
[0271] Optionally, the output module 230 is further used for:
[0272] S30131. Randomly select any one of the workpieces that have not undergone the insertion operation.
[0273] S30131. Obtain each insertable position in the current chromosome, sequentially select one position from the insertable positions as the current insert position, and insert the selected workpiece into the current insert position to generate a chromosome.
[0274] S30132. Perform chromosome extraction on the chromosome to generate a partial chromosome.
[0275] S30133. If a partial chromosome is the same as the partial chromosome generated by inserting the selected workpiece into an insertion position other than the current insertion position, the validity of the current insertion position is determined to be invalid.
[0276] If the partial chromosome is different from the partial chromosome generated by inserting the selected workpiece into an insertion position other than the current insertion position, the validity of the current insertion position is determined to be valid, and the selected workpiece is inserted into the current insertion position to obtain the insertion result of the selected workpiece.
[0277] Optionally, the output module 230 is further configured to:
[0278] S3021. Traverse each gene of the chromosomes in the initial population, and extract l partial chromosomes from each gene; wherein, the partial chromosome is a set of complete partial chromosomes containing n non-repeating workpieces, and each gene can only be extracted once; wherein, l is the number of processing times, and n is the number of workpieces.
[0279] S3022. Decode the l partial chromosomes in sequence to obtain the objective function values of the chromosomes in the initial population.
[0280] Optionally, the output module 230 is further configured to:
[0281] Destroy the elite chromosome and reconstruct the destroyed elite chromosome.
[0282] The output module 230 is further configured to:
[0283] Let the gene length of the elite chromosome be len; randomly and non-repeatedly select d genes from the len genes and denote them as π D ; the remaining len - d genes are denoted as π R .
[0284] The output module 230 is further configured to:
[0285] Sequentially select the genes in π D , insert the selected genes into all positions of the current chromosome π R , calculate the objective function values of the chromosomes obtained by inserting into each of all positions, and select the chromosome corresponding to the optimal objective function value among the objective function values as the current chromosome π R , and determine whether all the genes in π D have been selected; if so, output the reconstructed elite chromosome; if not, continue to execute step S3041.2.
[0286] Optionally, the output module 230 is further configured to:
[0287] S3042.1. Obtain the key processing workpieces of the chromosome in stage s in the elite chromosome.
[0288] S3042.2. Determine whether the key processing workpieces are adjustable; if so, insert the key processing workpieces into the current position of the key processing workpieces in the chromosome of stage s and all positions before the current position respectively, to obtain multiple changed chromosomes of stage s, and execute S3042.3; if not, obtain the next key processing workpiece of the chromosome of stage s, and go to execute S3042.2.
[0289] S3042.3. Generate chromosomes for other stages except the first stage and the s-th stage in the elite chromosome according to the first-come-first-served decoding rule, and obtain multiple changed elite chromosomes based on the generated chromosomes and the multiple changed chromosomes of stage s. Decode the multiple changed elite chromosomes respectively to obtain the objective function values corresponding to the multiple changed elite chromosomes.
[0290] S3042.4. Record the optimal objective function value among the objective function values corresponding to the multiple changed elite chromosomes and the chromosome corresponding to the optimal objective function value.
[0291] S3042.5. Determine whether all the key processing workpieces of the chromosome of stage s have been obtained; if so, execute S3042.6; if not, obtain the next key processing workpiece of the chromosome of stage s, and go to execute S3042.2.
[0292] S3042.6. Determine whether all stages except the first stage have been traversed; if so, compare the optimal objective function value recorded in S3042.4 with the objective function value of the elite chromosome before adjustment to obtain the optimal objective function value, and output the optimal objective function value and the chromosome corresponding to the optimal objective function value; if not, let s = s + 1, and go to execute S3042.1.
[0293] Optionally, the output module 230 is further configured to:
[0294] Generate a random number random within the range of (0, 1) for each ordinary chromosome; determine whether the random number random is less than the crossover probability P c ; if so, perform a crossover operation on the ordinary chromosome to obtain a new ordinary chromosome; if not, return the ordinary chromosome as the new ordinary chromosome.
[0295] In the embodiments of the present invention, for the reentrant hybrid flow shop scheduling problem, a mathematical optimization model is established with the goal of minimizing the makespan, and a learning-based iterative greedy algorithm with elite adjustment is proposed. The improved NEH heuristic algorithm is used for population initialization to improve the quality of the initial population. An elite population is established on the basis of the iterative greedy algorithm with only individual internal interaction, and a learning mechanism for ordinary individuals to learn from elite individuals is established through crossover to increase individual interaction and accelerate algorithm convergence. The elite individuals are disrupted and reconstructed, and the chromosome is adjusted based on critical jobs, expanding the solution space on the basis of the original decoding method based on the first-come, first-served rule and increasing the possibility of finding a better solution. In view of the reentrant characteristics of the reentrant hybrid flow shop, the insertion effectiveness judgment is added in the NEH insertion and reconstruction insertion links, greatly improving the algorithm operation speed.
[0296] The present invention uses an intelligent algorithm to solve the reentrant hybrid flow shop scheduling problem, optimizes the algorithm while maintaining the excellent solution performance of the iterative greedy algorithm, improves the algorithm speed, avoids the irrationality and inefficiency of manual scheduling decisions, and helps to improve the production management efficiency of enterprises.
[0297] Figure 3 FIG. 7 is a schematic structural diagram of an electronic device 300 provided by an embodiment of the present invention. The electronic device 300 may vary greatly due to configuration or performance differences, and may include one or more processors (central processing units, CPUs) 301 and one or more memories 302. Among them, at least one instruction is stored in the memory 302, and at least one instruction is loaded and executed by the processor 301 to implement the following optimization method for the reentrant hybrid flow shop scheduling problem:
[0298] S1. Obtain the processing information of the workshop to be scheduled; wherein, the processing information includes the number of workpieces to be processed, the processing time, the number of parallel machines, the number of processing stages, and the number of processing times; wherein, the processing time is the sum of the processing times of the workpiece in each stage, and the processing time of the workpiece in each stage is the same; the number of parallel machines is the same number of parallel machines in each stage; the number of processing times is the number of times the workpiece completes all stage processing.
[0299] S2. Input the processing information of the workshop to be scheduled into the constructed workshop scheduling optimization model.
[0300] S3. Solve the workshop scheduling optimization model according to the learning-based iterative greedy algorithm with elite adjustment LIG-EA based on the improved iterative greedy algorithm to obtain a workshop scheduling plan.
[0301] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to complete the optimization method for the reentrant hybrid flow shop scheduling problem. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0302] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk, or an optical disc, etc.
[0303] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An optimization method for the reentrant hybrid flow shop scheduling problem, characterized in that The method includes: S1. Obtain the processing information of the workshop to be scheduled; wherein, the processing information includes the number of workpieces to be processed, the processing time, the number of parallel machines, the number of processing stages, and the number of processing times; wherein, the processing time is the sum of the processing times of the workpieces in each stage, and the processing time of the workpieces in each stage is the same; the number of parallel machines is the same number of parallel machines in each stage; the number of processing times is the number of times the workpieces complete all stage processing; S2. Input the processing information of the workshop to be scheduled into the constructed workshop scheduling optimization model; S3. Solve the workshop scheduling optimization model according to the improved learning iterative greedy algorithm with elite adjustment (LIG-EA) based on the iterative greedy algorithm to obtain a workshop scheduling plan; The step of solving the workshop scheduling optimization model according to the improved learning iterative greedy algorithm with elite adjustment (LIG-EA) based on the iterative greedy algorithm in S3 to obtain a workshop scheduling plan includes: S301. Input the parameters of the workshop scheduling optimization model and initialize the population to generate an initial population; S302. Decode the initial population to obtain the objective function values of the chromosomes in the initial population, and select the chromosome with the optimal objective function value in the chromosomes and record it as the optimal solution ; S303. Select the top 10% of the chromosomes with the best objective function values in the chromosomes as elite chromosomes; S304. Perform elite adjustment on each of the elite chromosomes among the elite chromosomes; wherein, the elite adjustment includes elite chromosome destruction and reconstruction and chromosome adjustment based on key workpieces; S305. Obtain new ordinary chromosomes according to the ordinary chromosomes and the elite chromosomes after elite adjustment; wherein, the ordinary chromosomes are the chromosomes of the current population; S306. Perform destruction and reconstruction on the new ordinary chromosomes; S307. Generate a new population according to the new chromosomes after destruction and reconstruction, the initial population, and the probability jump acceptance criterion; S308. Traverse the new population. If there are chromosomes in the new population whose objective function values are better than those of the elite chromosomes after elite adjustment, then replace and update the elite chromosomes after elite adjustment to obtain updated elite chromosomes; S309. Search for the optimal chromosome among the new population and the updated elite chromosomes , if the objective function value of the is better than that of the , then replace the with the ; S310. Determine whether the preset number of iterations is satisfied ; if so, output the external archive, that is, the optimal chromosome obtained after iteration and the objective function value; otherwise, go to execute S304; The elite chromosome destruction and reconstruction in S304 includes: destroying the elite chromosomes and reconstructing the destroyed elite chromosomes; S3041.
1. The destruction of the elite chromosomes includes: Let the gene length of the elite chromosome be ; randomly and without repetition select genes from genes and denote them as ; denote the remaining genes as ; S3041.
2. The reconstruction of the destroyed elite chromosomes includes: Select the genes in the in sequence, insert the selected genes into all positions in the current chromosome , calculate the objective function value of the chromosome obtained by inserting each position in all positions, and select the chromosome corresponding to the optimal objective function value among the objective function values as the current chromosome , and judge whether all the genes in are selected; if so, output the reconstructed elite chromosome; if not, continue to execute step S3041.
2.
2. The method according to claim 1, wherein The construction process of the workshop scheduling optimization model in S2 includes: S21. Set the parameters of the workshop scheduling optimization model; wherein, the parameters include the population size , the number of iterations , the upper limit percentage of the number of disruptions , the lower limit percentage of the number of disruptions , the crossover probability and the acceptance probability parameter ; S22. Set the objective function and constraint conditions; S23. Obtain the workshop scheduling optimization model according to the parameters, the objective function, and the constraint conditions; Wherein, the objective function is to minimize the makespan; wherein, the makespan refers to the time when the workpieces complete all processing times; The constraints include: the completion time of any process is equal to the sum of the start processing time and the processing time required on the machine; each workpiece can only select one same parallel machine for processing at each stage; each workpiece can only enter the next stage after the previous stage is completed; after the workpiece with a higher processing order is completed, the subsequent workpieces can start processing; each workpiece must complete all stages of processing before it can re-enter and start the next processing; the decision variable takes a value of 0 or 1; the constraint variable takes a non-negative value.
3. The method according to claim 1, wherein The initial population generation in the S301 includes: generating an initial population using the improved heuristic algorithm NEH; The generating an initial population using the improved heuristic algorithm NEH includes: S3011. Calculate the total processing time of each workpiece in all workpieces at each stage, and arrange all the workpieces in descending order according to the total processing time; S3012. Obtain the two workpieces with the largest total processing time among all the workpieces according to the arrangement of all the workpieces, and get the arrangement with the optimal objective function value of the two workpieces, and take the optimal arrangement as the current chromosome; S3013. Randomly select any workpiece among the workpieces that have not been inserted, traverse each insertable position in the current chromosome, and obtain the insertion result of the selected workpiece according to the insertable position validity judgment method; wherein, the workpieces that have not been inserted are the remaining workpieces among all the workpieces except the two workpieces with the largest total processing time; S3014. Select the insertable position corresponding to the insertion result with the smallest objective function value in the insertion results, and insert the selected workpiece into the position; S3015. Judge whether all workpieces have been inserted; if so, output the initial population; if not, go to execute S3013.
4. The method according to claim 3, wherein The randomly selecting any workpiece among the workpieces that have not been inserted in S3013, traversing each insertable position in the current chromosome, and obtaining the insertion result of the selected workpiece according to the insertable position validity judgment method includes: S30131. Randomly select any workpiece among the workpieces that have not been inserted; S30131. Obtain each insertable position in the current chromosome, sequentially select one position in the insertable positions as the current insertable position, and insert the selected workpiece into the current insertable position to generate a chromosome; S30132. Perform chromosome extraction on the chromosome to generate a partial chromosome; S30133. If the partial chromosome is the same as the partial chromosome generated by inserting the selected workpiece into other insertable positions except the current insertable position, the validity judgment of the current insertable position is invalid; If the partial chromosome is different from the partial chromosome generated by inserting the selected workpiece into other insertable positions except the current insertable position, the validity judgment of the current insertable position is valid, and insert the selected workpiece into the current insertable position to obtain the insertion result of the selected workpiece.
5. The method according to claim 1, wherein The decoding of the initial population in the S302 to obtain the objective function value of the chromosome in the initial population includes: S3021. Traverse each gene of the chromosomes in the initial population, and extract each of the genes to obtain partial chromosomes; wherein, the partial chromosomes are a group of complete partial chromosomes containing non-repeating workpieces, and each gene can only be extracted once; wherein, is the number of processing times, is the number of workpieces. S3022. Decode the partial chromosomes in sequence to obtain the objective function values of the chromosomes in the initial population.
6. The method according to claim 1, wherein The chromosome adjustment based on key workpieces in the S304 includes: S3042.
1. Obtain the key processing workpieces of the chromosomes in the elite chromosomes at the stage of the chromosomes; S3042.
2. Determine whether the key workpiece to be processed is adjustable; if so, insert the key workpiece to be processed into the current position of the key workpiece in the chromosome of stage and all positions before the current position, to obtain multiple chromosomes of the changed stage , and execute S3042.3; if not, obtain the next key workpiece of the chromosome of stage , and go to execute S3042.2; S3042.
3. Generate chromosomes for other stages in the elite chromosome except the first stage and the stage according to the first-come, first-served decoding rule. Based on the generated chromosomes and the chromosomes of the multiple changed stages, obtain multiple changed elite chromosomes, and decode the multiple changed elite chromosomes respectively to obtain the objective function values corresponding to the multiple changed elite chromosomes; S3042.
4. Record the optimal objective function value among the objective function values corresponding to the multiple changed elite chromosomes and the chromosome corresponding to the optimal objective function value; S3042.
5. Judgment Phase Whether all the key processing workpieces of the chromosome have been obtained; if so, execute S3042.6; if not, go to the acquisition phase Get the next key processing workpiece of the chromosome and go to execute S3042.2; S3042.
6. Determine whether all stages except the first stage have been traversed; if so, compare the optimal objective function value recorded in S3042.4 with the objective function value of the elite chromosome before adjustment to obtain the optimal objective function value, and output the optimal objective function value and the chromosome corresponding to the optimal objective function value; if not, then let , go to execute S3042.
1.
7. The method according to claim 1, characterized in that The obtaining the new ordinary chromosomes according to the ordinary chromosomes and the elite chromosomes after elite adjustment in S305 includes: Generate a random number random within the range of (0, 1) for each normal chromosome; determine whether the random number random is less than the crossover probability ; if so, perform a crossover operation on the normal chromosome to obtain a new normal chromosome; if not, return the normal chromosome as the new normal chromosome.
8. An optimization device for the reentrant hybrid flow shop scheduling problem, characterized in that, The device includes: An obtaining module, configured to obtain the processing information of the workshop to be scheduled; wherein, the processing information includes the number of workpieces to be processed, the processing time, the number of parallel machines, the number of processing stages, and the number of processing times; wherein, the processing time is the sum of the processing times of the workpieces in each stage, and the processing times of the workpieces in each stage are the same; the number of parallel machines is the same number of parallel machines in each stage; the number of processing times is the number of times the workpieces complete the processing of all stages; An input module, configured to input the processing information of the workshop to be scheduled into the constructed workshop scheduling optimization model; An output module, configured to solve the workshop scheduling optimization model according to the improved learning-based iterative greedy algorithm with elite adjustment LIG-EA based on the iterative greedy algorithm, and obtain a workshop scheduling plan; The solving the workshop scheduling optimization model according to the improved learning-based iterative greedy algorithm with elite adjustment LIG-EA based on the iterative greedy algorithm, and obtaining a workshop scheduling plan includes: S301. Input the parameters of the workshop scheduling optimization model and initialize the population to generate an initial population; S302. Decode the initial population to obtain the objective function values of the chromosomes in the initial population, and select the chromosome with the optimal objective function value in the chromosomes as the optimal solution ; S303. Select the top 10% of the chromosomes with the optimal objective function values in the chromosomes as elite chromosomes; S304. Perform elite adjustment on each of the elite chromosomes among the elite chromosomes; wherein, the elite adjustment includes elite chromosome destruction and reconstruction and chromosome adjustment based on key workpieces; S305. Obtain new ordinary chromosomes according to the ordinary chromosomes and the elite chromosomes after elite adjustment; wherein, the ordinary chromosomes are the chromosomes of the current population; S306. Perform destruction and reconstruction on the new ordinary chromosomes; S307. Generate a new population according to the new chromosomes after destruction and reconstruction, the initial population, and the probability jump acceptance criterion; S308. Traverse the new population. If there are chromosomes in the new population whose objective function values are better than the objective function values of the elite chromosomes after elite adjustment, then replace and update the elite chromosomes after elite adjustment to obtain updated elite chromosomes; S309. Search for the optimal chromosome among the new population and the updated elite chromosomes , if the objective function value of the is better than that of the , then use the to replace the ; S310. Determine whether the preset number of iterations is satisfied ; if so, output the external archive, that is, the optimal chromosome obtained after iteration and the objective function value; otherwise, go to execute S304; The elite chromosome destruction and reconstruction in S304 includes: destroying the elite chromosomes and reconstructing the destroyed elite chromosomes; S3041.
1. The destroying the elite chromosomes includes: Let the gene length of the elite chromosome be ; randomly and without repetition select genes from genes and denote them as ; denote the remaining genes as ; S3041.
2. The reconstructing the destroyed elite chromosomes includes: Select the genes in the in sequence, insert the selected genes into all positions in the current chromosome , calculate the objective function values of the chromosomes obtained by inserting each position among all positions, and select the chromosome corresponding to the optimal objective function value among the said objective function values as the current chromosome , and determine whether all the genes in have been selected; if so, output the reconstructed elite chromosome; if not, continue to execute step S3041.2.
Citation Information
Patent Citations
Smelting workshop production and transportation collaborative optimization method and system based on hybrid algorithm
CN113657642A
Optimization method and device for distributed reentrant workshop scheduling problem
CN114118699A