A multi-objective scheduling method for flexible job shop of shaft parts based on improved genetic algorithm
Patent Information
- Application Number
- CN202611043162.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-10-09
AI Technical Summary
现有技术中,遗传算法因全局搜索能力强、并行性好、鲁棒性高等优点,成为求解柔性作业车间调度问题的主流方法之一,但传统遗传算法在求解轴类零件柔性作业车间调度时仍存在以下不足:初始种群质量偏低,随机初始化导致大量不可行或低质量个体;固定交叉率和变异率导致算法在搜索后期收敛缓慢或陷入局部最优;单一种群进化机制缺乏多样性保持能力,容易出现早熟收敛;多目标处理方式简单,缺乏对不同目标之间权衡关系的有效刻画
本发明通过同时考虑最大完工时间、总生产成本和总交货延迟惩罚,采用加权求和与归一化处理使三个目标在同一量纲下综合权衡,权重系数可根据实际生产需求灵活调整,有效解决了现有技术中多目标处理方式简单、缺乏对不同目标之间权衡关系有效刻画的问题,能够在保证交货期的前提下兼顾生产效率和生产成本。
Smart Images

Figure CN122887050A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent manufacturing technology and relates to a multi-objective scheduling method for flexible workshops of shaft parts based on an improved genetic algorithm. Background Technology
[0002] The machining of shaft parts typically involves multiple processes such as turning, milling, grinding, drilling, and heat treatment. Each process can be completed on multiple machine tools of different types, exhibiting typical characteristics of multi-process, multi-machine tool, multi-variety, and small-batch production.
[0003] In the actual production of shaft parts, different types of shaft parts vary significantly in size, material properties, precision requirements, and process flow, leading to the following prominent difficulties in production scheduling: high flexibility of process paths, with multiple optional processing equipment for each process, and differences in processing time, processing cost, and processing precision between different equipment; frequent workpiece switching in the multi-variety, small-batch mode, with equipment adjustment and preparation time that cannot be ignored; and strict constraints on order delivery dates, requiring a balance between production efficiency and production cost while ensuring delivery time.
[0004] The flexible job shop scheduling problem, as an extension of the classic job shop scheduling problem, allows each process to choose one of multiple available machines for processing, making it more suitable for the actual production of shaft parts. In existing technologies, genetic algorithms have become one of the mainstream methods for solving the flexible job shop scheduling problem due to their strong global search capability, good parallelism, and high robustness. However, traditional genetic algorithms still have the following shortcomings when solving the flexible job shop scheduling problem for shaft parts: the initial population quality is low, and random initialization leads to a large number of infeasible or low-quality individuals; fixed crossover and mutation rates cause the algorithm to converge slowly or get trapped in local optima in the later stages of the search; the single population evolution mechanism lacks the ability to maintain diversity and is prone to premature convergence; and the multi-objective processing method is simple and lacks an effective characterization of the trade-offs between different objectives.
[0005] Therefore, there is an urgent need for a multi-objective scheduling method and system that can take into account the processing characteristics of shaft parts and balance production efficiency, production cost and delivery time requirements. Summary of the Invention
[0006] In order to overcome the shortcomings of the prior art, this invention provides a multi-objective scheduling method for flexible workshops of shaft parts based on an improved genetic algorithm.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: A multi-objective scheduling method for flexible workshops of shaft-type parts based on an improved genetic algorithm includes the following steps: Step S1: Construct a multi-objective scheduling model for the flexible workshop of shaft parts, and establish a multi-objective optimization function and constraints with the objectives of minimizing the maximum completion time, minimizing the total production cost, and minimizing the total delivery delay penalty; Step S2: Solve the multi-objective scheduling model using an improved genetic algorithm and output the optimal scheduling scheme. The improved genetic algorithm includes: initializing the population and encoding chromosomes based on a hybrid structure of machine selection strings and process sorting strings; dividing the population into multiple subpopulations for parallel evolution; in each generation of evolution, using tournament selection to select parent individuals from the current population to participate in crossover; after each generation of genetic operations, performing variable neighborhood search on elite individuals with high fitness values; decoding chromosomes, outputting the best individual in the current population and decoding it as the optimal scheduling scheme. Step S3: Output the optimal scheduling scheme and convert it into the processing task sequence and time arrangement of each machine to guide the workshop equipment to execute the processing process.
[0008] Furthermore, in step S1, the maximum completion time is the maximum value of the completion time of the last process of all workpieces, the total production cost is the sum of the products of the processing time of each process on its selected machine and the processing cost per unit time, and the total delivery delay penalty is the weighted sum of the portion of the actual completion time of each workpiece that exceeds its delivery date according to the delay weight. The maximum completion time, total production cost, and total delivery delay penalty are transformed into a single-objective fitness function after normalization by using the weighted summation method.
[0009] Furthermore, in step S2, during the parallel evolution of the subpopulations, inter-population cooperative migration is performed once every preset generation. Each subpopulation replicates a certain proportion of elite individuals with high fitness values and migrates them to adjacent subpopulations along a unidirectional circular topology, while replacing an equal number of individuals with low fitness values in that subpopulation.
[0010] Furthermore, in step S2, the crossover and mutation methods include: uniform crossover for the offspring of the machine selection string, priority process crossover for the offspring of the process order string; interchange mutation for the process order string, and single-point replacement mutation for the machine selection string.
[0011] Furthermore, in step S2, the variable neighborhood search is based on three neighborhood structures, including: randomly adjusting a certain process to another position in the process sorting string, randomly changing the processing machine for processes on the critical path, and randomly swapping the positions of processes of two different workpieces in the sorting string.
[0012] Furthermore, in step S2, the decoding of chromosomes includes: reading each process sequentially from left to right according to the process sorting string, determining the processing machine for each process based on the gene value at the corresponding position of the machine selection string, and arranging processing on the machine with the earliest available start time, thereby obtaining a complete scheduling scheme and the start and completion times of each process.
[0013] Furthermore, in step S2, after each generation of evolution, a certain proportion of elite individuals ranked by fitness value are directly introduced into the next generation of the population.
[0014] Furthermore, step S2 also includes setting the iteration termination condition as reaching a preset maximum number of iterations, or the rate of change of the optimal fitness value of the population for a preset number of consecutive generations being less than a preset threshold. When either condition is met, the iteration stops, the best individual in the current population is output, and the optimal scheduling scheme is decoded.
[0015] In summary, the advantages of this invention are: This invention, by simultaneously considering the maximum completion time, total production cost, and total delivery delay penalty, employs weighted summation and normalization to comprehensively weigh the three objectives under the same dimension. The weighting coefficients can be flexibly adjusted according to actual production needs, effectively solving the problems of simple multi-objective processing methods and lack of effective characterization of the trade-off relationship between different objectives in existing technologies. It can balance production efficiency and production cost while ensuring delivery time.
[0016] By using a combination of three strategies—global optimal selection, local optimal selection, and random selection—to generate the machine selection string, and by using a combination of three strategies—shortest processing time priority rule, earliest delivery date priority rule, and random permutation—to generate the process order string, the initial population maintains sufficient random diversity while containing high-quality heuristic solutions. This overcomes the defect of low initial population quality caused by random initialization in traditional genetic algorithms, and is beneficial to improving the convergence speed of subsequent genetic search and the quality of the final solution.
[0017] By dividing the population into three subpopulations that evolve independently in parallel, each subpopulation adopts a different genetic parameter configuration, focusing on extensive exploration of the solution space, refined development of high-quality regions, and a balance between the two. Combined with a periodic cooperative migration mechanism to achieve cross-population dissemination of superior genes, the population diversity is effectively maintained, overcoming the problem that a single population evolution mechanism is prone to getting trapped in local optima and premature convergence.
[0018] By performing variable neighborhood search on elite individuals after each generation of genetic operations, and successively adopting three complementary neighborhood structures—process movement, machine replacement, and process exchange—and employing a cascaded search strategy, the algorithm returns to the first neighborhood to start again once a better solution is found. This fully explores the improvement space within the neighborhood of high-quality solutions, enhances the algorithm's fine-grained optimization capability on critical paths, and is conducive to further improving the quality of scheduling schemes.
[0019] By employing a two-layer coding system based on machine selection and process sequencing, along with explicit earliest start time decoding rules, it is ensured that any chromosome can be decoded into a feasible scheduling scheme that satisfies all constraints. The output includes the processing task sequence, process start and completion times for each machine, which can be directly converted into executable processing instructions, making it highly practical. Attached Figure Description
[0020] Figure 1 This is a flowchart of the multi-objective scheduling method for flexible work workshops of shaft parts according to the present invention. Detailed Implementation
[0021] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0022] This invention provides a multi-objective scheduling method for flexible workshops of shaft-type parts based on an improved genetic algorithm, comprising the following steps: Step S1: Construct a multi-objective scheduling model for the flexible work workshop of shaft parts.
[0023] There are n independent shaft-type parts to be processed and m processing machines. Each workpiece includes multiple operations with a fixed processing sequence. The j-th operation of the i-th workpiece... Available in its candidate machine set Processing is performed on any machine k in the dataset, and the corresponding processing time is... The processing cost per unit time is .
[0024] Define binary decision variables If the process If the processing is selected on machine k, the value is 1; otherwise, it is 0.
[0025] remember and Each is a process Start time and completion time, and respectively workpiece Delivery time and delay weighting.
[0026] A multi-objective optimization function is established with the objectives of minimizing the maximum completion time, minimizing the total production cost, and minimizing the total delivery delay penalty. The maximum completion time is the maximum completion time of the final process for all workpieces; the total production cost is the sum of the products of the processing time of each process on its selected machine and the processing cost per unit time; and the total delivery delay penalty is the weighted sum of the portion of each workpiece's actual completion time exceeding its delivery date, weighted according to delay weights. The three objectives are normalized using a weighted summation method and transformed into a single-objective fitness function, with the sum of the weight coefficients of each objective being 1, and adjustable according to actual production needs.
[0027] Establish constraints, including: each operation can only be processed by one machine in its candidate machine set; the next operation can only begin after the previous operation on the same workpiece is completed; the same machine can only process one operation at a time; once an operation starts, it cannot be interrupted; the start time and completion time of all operations are non-negative numbers.
[0028] Step S2: Solve the multi-objective scheduling model using an improved genetic algorithm.
[0029] After initializing the population, each generation sequentially performs fitness calculation, parent selection, adaptive crossover and mutation to generate offspring, elite retention to form the next generation population, and variable neighborhood search to enhance local search capabilities for elite individuals. This process iterates until the termination condition is met, outputting the optimal scheduling scheme. Specifically, the improved genetic algorithm includes: S2.1. A two-layer hybrid coding structure based on machine selection and process sorting is adopted. The chromosome consists of two substrings: the machine selection string and the process sorting string.
[0030] Each gene locus in the machine-selected string corresponds to a specific process in sequence according to the process number. The gene value is the value of this process in its candidate machine set. The index number of the selected machine; the process sorting string adopts an encoding method based on the workpiece number, where the j-th occurrence of workpiece number i corresponds to the j-th process of that workpiece. The order of arrangement represents the processing priority of all processes.
[0031] The machine selection string adopts a combination of global and local optimal selection. Global optimal selection prioritizes the machine with the shortest cumulative processing time for each process while ensuring machine load balancing. Local optimal selection selects the available machine with the shortest processing time for each process on a workpiece-by-workpiece basis, and generates individuals through random selection. The process sequence is generated by using three methods: shortest processing time priority rule, earliest delivery date priority rule, and random arrangement, to ensure that the initial population has both quality and diversity.
[0032] S2.2 Divide the population into three subpopulations for parallel and independent evolution: a high crossover and high mutation rate exploration population focusing on global search, a low crossover and low mutation rate development population focusing on local fine search, and a balanced population with crossover and mutation rates between the two.
[0033] During the evolutionary process, inter-population cooperative migration is performed once every preset generation. Each subpopulation replicates a certain proportion of elite individuals with high fitness values and migrates them to adjacent subpopulations along a unidirectional circular topology. At the same time, it replaces an equal number of individuals with low fitness values in the adjacent subpopulation, thereby achieving the cross-population dissemination of superior genes.
[0034] S2.3 In each generation of evolution, tournament selection is used to select parent individuals from the current population to participate in crossover and mutation.
[0035] In this process, the offspring of the machine selection string are subjected to uniform crossover, that is, a binary mask of the same length as the machine selection string is randomly generated, and when the mask bit is 1, the genes at corresponding positions of the two parents are swapped. For the offspring of the process sequence, priority process crossing is adopted, that is, the workpiece is randomly divided into two non-empty subsets, and the offspring inherit the process sequence of the corresponding subset in different parent generations and fill them in complementaryly.
[0036] Regarding mutation operations, the process sorting string is subjected to exchange mutation, which randomly swaps the gene values at two different gene positions; the machine selection string is subjected to single-point replacement mutation, which randomly replaces the machine selection at a certain gene position.
[0037] Crossover and mutation probabilities are adaptively adjusted according to the evolutionary progress. An adjustment factor is introduced to reflect the degree of individual differences in the population. The adjustment factor is the ratio of the difference in fitness between two randomly selected individuals to the current optimal fitness of the population. In the early stages of evolution, the parameters are dynamically increased based on the regulatory factors to enhance population diversity; in the middle stages of evolution, the parameters are fine-tuned according to the sign direction of the regulatory factors; in the later stages of evolution, the parameters gradually decrease with each generation to achieve stable convergence.
[0038] S2.4 After each generation of genetic operations, perform a variable neighborhood search on the elite individuals with the highest fitness values, using three different neighborhood structures in sequence: The first neighborhood is process movement, which randomly adjusts a process in the process sorting string to another position; the second neighborhood is machine replacement, which randomly changes the processing machine for processes on the critical path; the third neighborhood is process exchange, which randomly swaps the positions of processes for two different workpieces in the sorting string.
[0039] If a better solution is found in the current neighborhood, update the current solution and return to the first neighborhood to search again; If no better solution is found in any of the three neighborhood structures, the variable neighborhood search terminates.
[0040] S2.5 The chromosome decoding process is as follows: each process is read sequentially from left to right according to the process sorting string. The processing machine for each process is determined according to the gene value at the corresponding position of the machine selection string. Processing is scheduled on the machine with the earliest start time, thereby obtaining a complete scheduling scheme and the start and completion times of each process.
[0041] After each generation of evolution, a certain percentage of elite individuals are retained based on their fitness values and directly enter the next generation of the population to ensure that superior genes are not lost.
[0042] The iteration termination condition is set to reach the preset maximum number of iterations, or the rate of change of the optimal fitness value of the population for a preset number of consecutive generations is less than a preset threshold. When either condition is met, the iteration stops, the best individual in the current population is output and decoded into the optimal scheduling scheme.
[0043] Step S3: Output and execute the scheduling scheme.
[0044] The optimal scheduling scheme is transformed into a sequence of processing tasks and time arrangements for each machine, and displayed in the form of a Gantt chart to guide the workshop equipment in executing the processing flow.
[0045] This invention also provides a multi-objective scheduling system for flexible workshops of shaft-type parts based on an improved genetic algorithm, comprising: The data input module is used to receive and store the basic data required for scheduling, including workpiece information of shaft parts (type, number of processes, process sequence constraints, delivery date and delay weight), machine information of available machines in the workshop (type and number, machinability, processing time and processing cost), and production constraint parameters including algorithm parameters and target weights.
[0046] The algorithm processing module is used to execute the improved genetic algorithm described in step S2. It includes functional sub-modules for implementing double-layer encoding, mixed population initialization, fitness calculation and elite retention, adaptive genetic operation, multi-population co-evolution, variable neighborhood search and iteration termination judgment. Each sub-module works together to complete the complete solution process from initial population generation to output of the optimal scheduling scheme.
[0047] The scheduling and execution module is used to transform the optimal scheduling scheme into a task sequence and timing arrangement for each processing machine, and generate executable processing instructions to control the workshop equipment to execute processing tasks according to the scheduling scheme.
[0048] The monitoring and feedback module collects real-time production data from the workshop (actual start / end time of each process, machine operating status and load). When dynamic disturbances such as equipment failure, emergency order insertion or material delay are detected, the data is fed back to the algorithm processing module to trigger rescheduling, forming a closed-loop scheduling control.
[0049] Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort should fall within the scope of protection of the present invention.
Claims
1. A multi-objective scheduling method for flexible workshops of shaft-type parts based on an improved genetic algorithm, characterized in that, Includes the following steps: Step S1: Construct a multi-objective scheduling model for the flexible workshop of shaft parts, and establish a multi-objective optimization function and constraints with the objectives of minimizing the maximum completion time, minimizing the total production cost, and minimizing the total delivery delay penalty; Step S2: Solve the multi-objective scheduling model using an improved genetic algorithm and output the optimal scheduling scheme; The improved genetic algorithm includes: initializing the population and encoding chromosomes based on a hybrid structure of machine selection string and process sorting string; The population is divided into multiple subpopulations for parallel evolution; in each generation, a tournament selection is used to select parent individuals from the current population to participate in crossover; after each generation of genetic operations, a variable neighborhood search is performed on the elite individuals with the highest fitness values; the chromosome is decoded, the best individual in the current population is output and decoded into the optimal scheduling scheme; Step S3: Output the optimal scheduling scheme and convert it into the processing task sequence and time arrangement of each machine to guide the workshop equipment to execute the processing process.
2. The multi-objective scheduling method for flexible workshops of shaft-type parts based on an improved genetic algorithm according to claim 1, characterized in that, In step S1, the maximum completion time is the maximum value of the completion time of the last process of all workpieces, the total production cost is the sum of the products of the processing time of each process on its selected machine and the processing cost per unit time, and the total delivery delay penalty is the weighted sum of the portion of the actual completion time of each workpiece that exceeds its delivery date according to the delay weight. The maximum completion time, total production cost, and total delivery delay penalty are transformed into a single-objective fitness function after normalization by using the weighted summation method.
3. The multi-objective scheduling method for flexible workshops of shaft-type parts based on an improved genetic algorithm according to claim 1, characterized in that, In step S2, during the parallel evolution of the subpopulations, inter-population cooperative migration is performed once every preset generation. Each subpopulation replicates a certain proportion of elite individuals with high fitness values and migrates them to adjacent subpopulations along a unidirectional circular topology, while replacing an equal number of individuals with low fitness values in that subpopulation.
4. The multi-objective scheduling method for flexible workshops of shaft-type parts based on an improved genetic algorithm according to claim 1, characterized in that, In step S2, the crossover and mutation methods include: uniform crossover for the offspring of the machine selection string, priority process crossover for the offspring of the process order string; interchange mutation for the process order string, and single-point replacement mutation for the machine selection string.
5. A multi-objective scheduling method for flexible workshops of shaft-type parts based on an improved genetic algorithm according to claim 1, characterized in that, In step S2, the variable neighborhood search is based on three neighborhood structures, including: randomly adjusting a certain process to another position in the process sorting string, randomly changing the processing machine of the process on the critical path, and randomly swapping the positions of the processes of two different workpieces in the sorting string.
6. A multi-objective scheduling method for flexible workshops of shaft-type parts based on an improved genetic algorithm according to claim 1, characterized in that, In step S2, chromosome decoding includes: reading each process sequentially from left to right according to the process sorting string, determining the processing machine for each process based on the gene value at the corresponding position of the machine selection string, and arranging processing on the machine with the earliest available start time, thereby obtaining a complete scheduling scheme and the start and completion times of each process.
7. A multi-objective scheduling method for flexible workshops of shaft-type parts based on an improved genetic algorithm according to claim 1, characterized in that, In step S2, after each generation of evolution, a certain proportion of elite individuals are retained based on their fitness values and directly enter the next generation of the population.
8. A multi-objective scheduling method for flexible workshops of shaft-type parts based on an improved genetic algorithm according to claim 1, characterized in that, Step S2 also includes setting the iteration termination condition as reaching the preset maximum number of iterations, or the rate of change of the optimal fitness value of the population for a preset number of consecutive generations being less than a preset threshold. When either condition is met, the iteration stops, the best individual in the current population is output and decoded into the optimal scheduling scheme.