Flexible job shop scheduling method and system based on improved genetic algorithm
By improving the dual-layer encoding and multi-objective optimization of the genetic algorithm, the efficiency and optimization accuracy problems of the traditional genetic algorithm in flexible job shop scheduling are solved, and more efficient resource utilization and cost optimization are achieved.
Patent Information
- Application Number
- CN202511093850.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-14
AI Technical Summary
Traditional genetic algorithms suffer from low initial population quality and slow convergence speed in flexible job shop scheduling, making it difficult to meet the requirements of scheduling efficiency and optimization accuracy. Furthermore, they lack load balancing and multi-objective collaborative optimization.
An improved genetic algorithm is adopted, which uses a two-layer coding structure and a hybrid selection strategy to generate the initial population. The fitness function of the multi-objective optimization objective is combined with tournament selection, sequential crossover and mutation operations to optimize the process and machine allocation, thereby achieving machine load balancing and cost optimization.
It improves global search capabilities and convergence speed, shortens maximum completion time, enhances resource utilization, reduces total production costs, and possesses flexibility and scalability.
Smart Images

Figure CN120952441A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flexible manufacturing system scheduling technology, specifically to a flexible job shop scheduling method and system based on an improved genetic algorithm. Background Technology
[0002] The flexible job shop scheduling problem is a complex NP-hard problem that adds machine flexibility to the traditional job shop scheduling problem. Its core is to determine the processing sequence of processes and the selection of machines in order to achieve optimization goals such as minimizing the maximum completion time and the lowest cost.
[0003] In existing technologies, methods for solving FJSP mainly include traditional heuristic algorithms and intelligent optimization algorithms. Among them, the Genetic Algorithm (GA) is widely used due to its strong global search capability and good parallelism. However, traditional GA suffers from problems such as low initial population quality, slow convergence speed, and susceptibility to getting trapped in local optima, making it difficult to meet the scheduling efficiency and optimization accuracy requirements of flexible manufacturing systems.
[0004] Traditional GA often uses random methods in the initial population generation stage, resulting in a low proportion of high-quality solutions. In the collaborative optimization of machine selection and process sequencing, it lacks consideration for load balancing and multi-objective collaboration, resulting in insufficient scheduling results in terms of resource utilization and overall benefits.
[0005] Therefore, we propose a flexible job shop scheduling method and system based on an improved genetic algorithm. Summary of the Invention
[0006] The purpose of this invention is to provide a flexible job shop scheduling method and system based on an improved genetic algorithm, which solves the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a flexible job shop scheduling method based on an improved genetic algorithm, comprising the following method steps:
[0008] Step 1: Problem modeling. Define the parameters and constraints of the flexible job shop scheduling problem. The parameters include machine set, job set, process information, processing time, and decision variables. The constraints include process sequence constraints, machine conflict constraints, and non-negativity constraints.
[0009] Step 2: Improve the genetic algorithm design, including:
[0010] Encoding method: A two-layer encoding structure is adopted, which includes a process sequencing vector and a machine allocation vector;
[0011] Initial population generation: A hybrid selection strategy of random selection of process sorting vectors and machine-assigned vectors is adopted. The process sorting vectors are randomly generated to ensure diversity, and the hybrid selection strategy of machine-assigned vectors combines global selection based on process, tournament selection and random selection.
[0012] Fitness function: Constructed based on multi-objective optimization objectives, including minimizing maximum completion time, minimizing maximum machine load, minimizing total machine load, and minimizing total processing cost. The fitness function is a weighted sum of the objectives.
[0013] Genetic operations include selection, crossover, and mutation. The selection operation uses tournament selection. The crossover operation uses sequential crossover on the process sorting vector and single-point crossover on the machine assignment vector. The mutation operation randomly swaps the process positions on the process sorting vector and randomly replaces the machine selection on the machine assignment vector.
[0014] Termination condition: When the number of iterations reaches the preset maximum number of iterations, output the optimal scheduling scheme;
[0015] Step 3: Execution of the scheduling plan. Based on the optimal scheduling plan, the processing task sequence and time arrangement of each machine are generated, and the workshop equipment is controlled to execute the processing flow.
[0016] As a preferred embodiment of the present invention, the specific method of the machine allocation vector hybrid selection strategy in step two is as follows: when selecting machines, priority is given to machines with short processing times, while random selection increases population diversity and takes into account machine load balance.
[0017] In a preferred embodiment of the present invention, the parameters in step one are specifically defined as follows: the machine set is M = {1, 2, m}, and the workpiece set is N = {1, 2, n}; ij t represents the j-th process of the i-th workpiece. ijk Indicates process O ij Processing time on machine k; x ijk x is the decision variable. ijk =1 indicates process O ij Select machine k, otherwise select 0.
[0018] In a preferred embodiment of the present invention, the constraint conditions in step one are specifically as follows:
[0019] Process sequence constraint: C ij ≤S i(j+1) C ij For process O ij The completion time, S i(j+1) Let be the start time of the (j+1)th process for the i-th workpiece;
[0020] Machine conflict constraints: Cij +t ijk ≤S kl +L(1-a ihk ), where L is a sufficiently large positive number, a ihk Variables for determining machine conflict;
[0021] Nonnegativity constraint: S ij ≥0, C ij ≥0.
[0022] As a preferred embodiment of the present invention, the specific method of the machine allocation vector hybrid selection strategy in step two is as follows: when selecting machines, priority is given to machines with short processing times, while random selection increases population diversity and takes into account machine load balance.
[0023] In a preferred embodiment of the present invention, the parameters of the genetic operation in step two are set as follows: crossover probability is 0.9, mutation probability is 0.1, and the selection operation uses a tournament to select individuals with high fitness.
[0024] This invention also relates to a flexible job shop scheduling system based on an improved genetic algorithm, comprising:
[0025] Data input module: used to receive workpiece information, machine information and production constraint parameters. The workpiece information includes the number of processes and the processing sequence. The machine information includes the selectable machine, processing time and cost.
[0026] Algorithm processing module: Implements the improved genetic algorithm of claim 1, including an encoding module, an initial population generation module, a fitness calculation module, a genetic operation module, and a termination judgment module;
[0027] The scheduling and execution module converts the optimal scheduling scheme into equipment control commands to control machine tools, AGVs, loading stations and other equipment to work together.
[0028] Monitoring module: Collects production data in real time, including process completion time and machine load, and feeds it back to the algorithm processing module to dynamically adjust the scheduling scheme;
[0029] Hardware layout: Includes multiple dual-station machine tools, deburring and cleaning equipment, loading station, AGV and inspection station, forming a flexible manufacturing unit.
[0030] In a preferred embodiment of the present invention, the workpiece information received by the data input module also includes the processing sequence constraints of each process, and the machine information includes the machine's load limit and processing cost per unit time.
[0031] In a preferred embodiment of the present invention, the initial population generation module in the algorithm processing module adopts a mixed selection strategy of random selection of process sorting vector and machine allocation vector. The fitness calculation module calculates the fitness value based on the multi-objective optimization objective and preset weights, wherein the preset weights are ω1=0.6, ω2=0.2, ω3=0.1, and ω4=0.1.
[0032] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0033] This invention improves the initial population generation strategy and multi-objective fitness function of the genetic algorithm, which helps to improve the global search capability and convergence speed, and shorten the maximum completion time.
[0034] Combining machine load balancing and cost optimization objectives helps improve resource utilization, which in turn helps reduce total production costs.
[0035] The system is flexible and scalable, adaptable to flexible workshops of different sizes, and enables real-time adjustment of scheduling plans through dynamic monitoring. Attached Figure Description
[0036] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0037] Figure 1 This is a flowchart of a flexible job shop scheduling method based on an improved genetic algorithm according to the present invention.
[0038] Figure 2 This is a diagram of a flexible job shop scheduling system based on an improved genetic algorithm according to the present invention. Detailed Implementation
[0039] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.
[0040] This invention provides a flexible job shop scheduling method and system based on an improved genetic algorithm, aiming to maximize production efficiency and minimize production costs by optimizing the scheduling scheme. The specific implementation is as follows:
[0041] Problem modeling:
[0042] Define the parameters and constraints of the flexible job shop scheduling problem. The parameters include a machine set M = {1, 2, m} and a job set N = {1, 2, n}; O ij t represents the j-th process of the i-th workpiece. ijk Indicates process O ij Processing time on machine k; x ijkx is the decision variable. ijk =1 indicates process O ij Select machine k, otherwise select 0.
[0043] Constraints include process sequence constraints C ij ≤S i(j+1) C ij For process O ij The completion time, S i(j+1) Let be the start time of the (j+1)th process for the i-th workpiece;
[0044] Machine conflict constraints: C ij +t ijk ≤S kl +L(1-a ihk ), where L is a sufficiently large positive number, a ihk Variables for determining machine conflict;
[0045] Nonnegativity constraint: S ij ≥0, C ij ≥0.
[0046] Improved Genetic Algorithm Design:
[0047] Encoding method: A two-layer encoding structure is adopted, which includes process sorting vector and machine allocation vector.
[0048] Initial population generation: The process sorting vector is randomly generated to ensure diversity. The machine allocation vector adopts a hybrid selection strategy, combining process-based global selection, tournament selection, and random selection. Priority is given to machines with shorter processing times, while random selection increases population diversity and balances machine load.
[0049] Fitness function: Based on multi-objective optimization objectives, including minimizing maximum completion time, minimizing maximum machine load, minimizing total machine load, and minimizing total processing cost. The fitness function is a weighted sum of the objectives, with preset weights of ω1 = 0.6, ω2 = 0.2, ω3 = 0.1, and ω4 = 0.1.
[0050] Genetic operations: The selection operation uses tournament selection; the crossover operation uses sequential crossover on the process sorting vector and single-point crossover on the machine assignment vector; the mutation operation randomly swaps the process positions on the process sorting vector and randomly replaces the machine selection on the machine assignment vector. The crossover probability is 0.9, and the mutation probability is 0.1.
[0051] Termination condition: When the number of iterations reaches the preset maximum number of iterations, output the optimal scheduling scheme.
[0052] Scheduling plan execution:
[0053] The optimal scheduling scheme is used to generate the processing task sequence and time arrangement for each machine, and to control the workshop equipment to execute the processing flow.
[0054] System Implementation:
[0055] Data input module: Receives workpiece information (including number of processes, processing sequence and constraints), machine information (including selectable machines, processing time, cost, load limit and processing cost per unit time) and production constraint parameters.
[0056] Algorithm processing module: Implements the improved genetic algorithm, including encoding, initial population generation, fitness calculation, genetic operations, and termination judgment.
[0057] Scheduling and execution module: Transforms the optimal scheduling scheme into equipment control commands to control machine tools, AGVs, loading stations and other equipment to work together.
[0058] Monitoring module: Collects production data in real time, including process completion time and machine load, and feeds it back to the algorithm processing module to dynamically adjust the scheduling scheme.
[0059] Example
[0060] The flexible workshop has 5 machines (M = {1, 2, 3, 4, 5}) and needs to process 10 workpieces (N = {1, 2, 10}). Each workpiece contains a different number of processes, and each process can be processed on multiple machines, with different processing times and costs.
[0061] Workpiece information:
[0062] Workpiece 1: Operation 1 (processing time is 2 on machine 1 and 3 on machine 2), Operation 2 (processing time is 4 on machine 3 and 2 on machine 4);
[0063] Workpiece 2: Operation 1 (processing time is 1 on machine 1 and 2 on machine 3), Operation 2 (processing time is 3 on machine 2 and 1 on machine 4);
[0064] The information for other workpieces is similar.
[0065] Machine Information
[0066] Machine 1: Processing cost per unit time is 10, and the maximum load is 100.
[0067] Machine 2: Processing cost per unit time is 12, and the maximum load is 120.
[0068] The information for other machines is similar.
[0069] Implementation steps:
[0070] Problem modeling: Based on the above workpiece and machine information, define parameters and constraints.
[0071] Initial population generation: Randomly generate process order vectors, such as [1,2,3,4,5] representing the process order of workpieces 1 to 5; Use a mixed selection strategy to generate machine allocation vectors, such as selecting machine 1 (shortest processing time) for process 1, and randomly selecting machine 3 or 4 for process 2.
[0072] Fitness calculation: The fitness value of each individual is calculated based on the multi-objective optimization objectives (minimum maximum completion time, minimum maximum machine load, minimum total machine load, and minimum total processing cost).
[0073] Genetic manipulation:
[0074] Selection operation: Use tournament selection to retain individuals with high fitness.
[0075] Crossover operation: Sequential crossover is used for process sorting vectors. For example, if parent 1 is [1,2,3,4,5] and parent 2 is [5,4,3,2,1], child 1 may be generated as [1,4,3,2,5] after crossover; single-point crossover is used for machine allocation vectors.
[0076] Mutation operation: Randomly swap the positions of processes in the process sorting vector, such as mutating [1,2,3,4,5] to [1,3,2,4,5]; Randomly replace the machine selection in the machine allocation vector, such as replacing machine 1 in process 1 with machine 2.
[0077] Termination condition: When the number of iterations reaches the preset maximum number of iterations (e.g., 100 times), stop the iteration and output the optimal scheduling scheme.
[0078] Scheduling scheme execution: Based on the optimal scheduling scheme, generate the processing task sequence and time arrangement for each machine, such as machine 1 processing workpiece 1's process 1 first, and then processing workpiece 2's process 1; at the same time, control the AGV to transport the workpiece from the loading station to the corresponding machine.
[0079] Monitoring and Adjustment: Real-time collection of production data, such as process completion time and machine load. If a large deviation is found between the actual progress and the plan, the data is fed back to the algorithm processing module to dynamically adjust the scheduling scheme.
[0080] In summary, this invention improves the initial population generation strategy and multi-objective fitness function of the genetic algorithm, which is beneficial to improving global search capability and convergence speed, shortening the maximum completion time, and improving resource utilization by combining machine load balancing and cost optimization objectives, thereby reducing total production costs. The system is flexible and scalable, and can adapt to flexible workshops of different sizes. Real-time adjustment of the scheduling scheme can be achieved through dynamic monitoring.
[0081] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or basic characteristics. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of equivalents of the claims be included within the present invention.
[0082] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A flexible job shop scheduling method based on an improved genetic algorithm, characterized in that: The methods and steps include the following: Step 1: Problem modeling. Define the parameters and constraints of the flexible job shop scheduling problem. The parameters include machine set, job set, process information, processing time, and decision variables. The constraints include process sequence constraints, machine conflict constraints, and non-negativity constraints. Step 2: Improve the genetic algorithm design, including: Encoding method: A two-layer encoding structure is adopted, which includes a process sequencing vector and a machine allocation vector; Initial population generation: A hybrid selection strategy of random selection of process sorting vectors and machine-assigned vectors is adopted. The process sorting vectors are randomly generated to ensure diversity, and the hybrid selection strategy of machine-assigned vectors combines global selection based on process, tournament selection and random selection. Fitness function: Constructed based on multi-objective optimization objectives, including minimizing maximum completion time, minimizing maximum machine load, minimizing total machine load, and minimizing total processing cost. The fitness function is a weighted sum of the objectives. Genetic operations include selection, crossover, and mutation. The selection operation uses tournament selection. The crossover operation uses sequential crossover on the process sorting vector and single-point crossover on the machine assignment vector. The mutation operation randomly swaps the process positions on the process sorting vector and randomly replaces the machine selection on the machine assignment vector. Termination condition: When the number of iterations reaches the preset maximum number of iterations, output the optimal scheduling scheme; Step 3: Execution of the scheduling plan. Based on the optimal scheduling plan, the processing task sequence and time arrangement of each machine are generated, and the workshop equipment is controlled to execute the processing flow.
2. The flexible job shop scheduling method based on an improved genetic algorithm according to claim 1, characterized in that: The specific method of the machine allocation vector hybrid selection strategy in step two is as follows: when selecting machines, priority is given to machines with shorter processing times, while random selection is used to increase population diversity and balance machine load.
3. The flexible job shop scheduling method based on an improved genetic algorithm according to claim 1, characterized in that: The parameters in step one are defined as follows: the machine set is M = {1, 2, m}, and the workpiece set is N = {1, 2, n}; O ij t represents the j-th process of the i-th workpiece. ijk Indicates process O ij Processing time on machine k; x ijk x is the decision variable. ijk =1 indicates process O ij Select machine k, otherwise select 0.
4. The flexible job shop scheduling method based on an improved genetic algorithm according to claim 1, characterized in that: The specific constraints in step one are as follows: Process sequence constraint: C ij ≤S i(j+1) C ij For process O ij The completion time, S i(j+1) Let be the start time of the (j+1)th process for the i-th workpiece; Machine conflict constraints: C ij +t ijk ≤S kl +L(1-a ihk ), where L is a sufficiently large positive number, a ihk Variables for determining machine conflict; Nonnegativity constraint: S ij ≥0, C ij ≥0.
5. A flexible job shop scheduling method based on an improved genetic algorithm according to claim 1, characterized in that: The specific method of the machine allocation vector hybrid selection strategy in step two is as follows: when selecting machines, priority is given to machines with shorter processing times, while random selection is used to increase population diversity and balance machine load.
6. The flexible job shop scheduling method based on an improved genetic algorithm according to claim 1, characterized in that: In step two, the parameters for the genetic operation are set as follows: crossover probability is 0.9, mutation probability is 0.1, and the selection operation uses a tournament to select individuals with high fitness.
7. A flexible job shop scheduling system based on an improved genetic algorithm, adapted to the flexible job shop scheduling method based on an improved genetic algorithm as described in any one of claims 1-6, characterized in that: include: Data input module: used to receive workpiece information, machine information and production constraint parameters. The workpiece information includes the number of processes and the processing sequence. The machine information includes the selectable machine, processing time and cost. Algorithm processing module: Implements the improved genetic algorithm of claim 1, including an encoding module, an initial population generation module, a fitness calculation module, a genetic operation module, and a termination judgment module; The scheduling and execution module converts the optimal scheduling scheme into equipment control commands to control machine tools, AGVs, loading stations and other equipment to work together. Monitoring module: Collects production data in real time, including process completion time and machine load, and feeds it back to the algorithm processing module to dynamically adjust the scheduling scheme; Hardware layout: Includes multiple dual-station machine tools, deburring and cleaning equipment, loading station, AGV and inspection station, forming a flexible manufacturing unit.
8. A flexible job shop scheduling system based on an improved genetic algorithm according to claim 7, characterized in that: The workpiece information received by the data input module also includes the processing sequence constraints of each process, and the machine information includes the machine's load limit and processing cost per unit time.
9. A flexible job shop scheduling system based on an improved genetic algorithm according to claim 7, characterized in that: The initial population generation module in the algorithm processing module adopts a mixed selection strategy of random selection of process sorting vector and machine allocation vector. The fitness calculation module calculates the fitness value based on the multi-objective optimization objective and preset weights, wherein the preset weights are ω1=0.6, ω2=0.2, ω3=0.1, and ω4=0.1.
Citation Information
Cited By
Lower bound construction method for AGV integrated flexible job shop scheduling
CN122110946A
