Flexible job shop scheduling method based on improved hho of co-evolution

The Harris Hawk Optimizer (HHO) algorithm improved through collaborative evolution solves the local optimality and premature convergence problems in the flexible job shop scheduling problem, achieves efficient and stable production scheduling, and improves resource utilization and production efficiency.

CN119937493BActive Publication Date: 2025-10-10NANJING TECH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510113782.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-10-10
Estimated Expiration
2045-01-24

AI Technical Summary

Technical Problem

Existing algorithms are prone to falling into local optimality, premature convergence and slow late convergence when dealing with flexible job shop scheduling problems, making it difficult to effectively optimize production scheduling.

Method used

The improved Harris Hawk Optimization (HHO) algorithm based on co-evolution is adopted. DI coding and OS coding are used to deal with machine selection and process sequence sub-problems respectively. POX crossover operator and exchange mutation operator are combined for iterative evolution. Taboo table is used to avoid local optimality, thereby improving global search capability and convergence speed.

Benefits of technology

It improves the efficiency and resource utilization of flexible job shop scheduling, ensures the efficient operation of the production process, and adapts to complex production environments and dynamic market demands.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119937493B_ABST
    Figure CN119937493B_ABST
Patent Text Reader

Abstract

A flexible job shop scheduling method based on improved HHO of co-evolution, steps include S1 data collection; S2 abstract FJSP as a mathematical model; S3 divide FJSP into machine selection sub-problem and process processing sequence sub-problem; S4 machine selection sub-problem processing: adopt DI coding method coding, map discrete machine selection sequence to continuous solution space of HHO algorithm; Each process selects the decision of the process in the machine set as a variable; After iteration solution by HHO algorithm, DI coding is mapped back to discrete machine selection sequence by decoding; S5 process processing sequence sub-problem processing: adopt OS coding method coding, and adopt genetic operator to co-evolution; S6 select one individual from DI population and OS population respectively, combine into DIOS code; Calculate the maximum completion time of DIOS code; S7 DI population and OS population co-evolution; Decode the optimal solution and output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer applications, and in particular to a flexible job shop scheduling method based on a collaborative evolution improved HHO. Background Art

[0002] The importance of intelligent manufacturing and production scheduling

[0003] Against the backdrop of global economic integration and the rapid development of information technology, intelligent manufacturing has become a new trend in the manufacturing industry. By deeply integrating informatization and industrialization, intelligent manufacturing is driving the intelligent and automated production process, thereby improving production efficiency and product quality. In this process, production scheduling, as a core component of intelligent manufacturing systems, plays a crucial role. It directly impacts production line smoothness, equipment utilization, and order delivery time, and is key to improving overall production efficiency.

[0004] Current Application Status of Planning and Scheduling Systems

[0005] To achieve efficient production scheduling, advanced planning and scheduling systems (APS) and real-time planning and scheduling systems (RTS) play an indispensable role in intelligent manufacturing systems. These systems, through their core scheduling engines, optimize the allocation of production resources to ensure efficient production operations. In intelligent manufacturing, the current application of planning and scheduling systems is reflected in their ability to adapt to complex production environments and rapidly respond to dynamic market demands.

[0006] For planning and scheduling systems, the algorithm used by the engine is a key factor in determining the system's scheduling performance and effectiveness. Selecting the right algorithm can significantly improve system efficiency and result quality, ensuring optimized resource allocation and process scheduling in complex production environments.

[0007] Existing FJSP solution algorithms and their limitations

[0008] Currently, there are multiple algorithms for solving the flexible job shop scheduling problem (FJSP), including traditional optimization methods, heuristic methods, and metaheuristic methods. Traditional optimization methods, such as mathematical programming and branch-and-bound, can theoretically find optimal solutions, but their computational complexity is high when faced with large-scale problems, limiting their practicality. Heuristic methods explore multiple options to find approximate optimal solutions, which are suitable for large-scale problems but may not guarantee the optimality of the solution. Metaheuristic methods, such as the particle swarm optimization (PSO) and the Harris Hawk Optimizer (HHO), perform well in terms of solution accuracy and stability, but suffer from problems such as premature convergence, susceptibility to falling into local optimality, and slow convergence in the later stages.

[0009] When evaluating production scheduling plans, commonly used evaluation indicators include completion time and equipment utilization. Since order completion time is a key concern for most companies, studying how to minimize Makespan (maximum completion time) is an important direction in production scheduling research. Summary of the Invention

[0010] To address the challenges faced by existing algorithms in planning and scheduling systems, this paper proposes a flexible job shop scheduling method based on the co-evolutionary improved Harris Hawk Optimization (HHO) algorithm, encoded as a scheduling solution model. This method primarily addresses the following issues:

[0011] 1. Global search capability: Existing algorithms are prone to falling into local optimality when dealing with large-scale and complex scheduling problems. This invention improves the global search capability of the model through a co-evolutionary strategy.

[0012] 2. Premature convergence problem: Existing algorithms may encounter premature convergence problems during the solution process. This invention introduces a taboo search mechanism and sets a taboo table to prevent the model solution from converging prematurely.

[0013] 3. Convergence speed in the late stage: The existing algorithm has a problem of slow convergence speed in the late stage. The present invention improves the solution speed and efficiency through the improved HHO algorithm.

[0014] The flexible job shop scheduling method based on the collaborative evolution improved HHO of the present invention is divided into two sub-problems of machine selection and process sequence for the flexible job shop scheduling problem FJSP. Combining the characteristics of each sub-problem and the actual situation:

[0015] For the machine selection sub-problem, a decision index (decision coefficient) DI encoding method is proposed to map the discrete search space of the machine selection problem into a continuous search space, and an improved HHO is used for iterative optimization.

[0016] To solve the process sequence problem, an operation sequence OS encoding method is proposed, and the POX crossover operator and exchange mutation operator are used for iterative evolution.

[0017] After the DI and OS populations co-evolve, elimination, supplementation, and combination strategies are adopted to form a DIOS group, corresponding to a solution of FJSP. After evaluating the fitness, the inferior DIOS solution is used to update the taboo table (in the embodiment of the present invention, the taboo table size is set to the population size parameter POP_SIZE). The superior DIOS solution is used in the supplementation strategy of the DI and OS populations to supplement the DI and OS populations to the size of POP_SIZE. After elimination and supplementation, the DI and OS populations co-evolve again. The whole process is repeated until the termination condition is reached.

[0018] After the termination condition is reached, the recorded search process is optimally decoded and a scheduling Gantt chart is generated.

[0019] At this point, the solution to FJSP and the output of the scheduling solution results are completed.

[0020] Specifically, the flexible job shop scheduling method based on collaborative evolution improved HHO of the present invention comprises the following steps:

[0021] S1. Data collection: Collecting the workshop environment data of the flexible workshop;

[0022] S2. Abstract the flexible job shop scheduling problem (FJSP) into a mathematical model. The mathematical model of FJSP is as follows: In a flexible job shop environment, there are n jobs, denoted as J1, J2, ..., Jn, and m machines, denoted as M1, M2, ..., Mm. Each job Ji consists of several processes, and each process selects 1 to m machines from the m machines for processing. The j-th process of job Ji is denoted as Oij.

[0023] S3. Divide FJSP into two sub-problems: the machine selection sub-problem used to determine the processing machine for each workpiece, and the process processing sequence sub-problem used to determine the processing sequence on each machine;

[0024] S4. Processing of machine selection sub-problem:

[0025] In the data collected in step S1, the data used to solve the machine selection subproblem is encoded using the decision indicator DI encoding method, mapping the discrete machine selection sequence to the continuous solution space of the HHO algorithm; the selection decision of each process in the set of optional machines for that process is represented as a variable; after iterative solution through the HHO algorithm, the DI encoding is remapped back to the discrete machine selection sequence through decoding;

[0026] S5. Processing sequence sub-problem:

[0027] Among the data collected in step S1, the data used to solve the process processing sequence sub-problem is encoded using the operation sequence OS encoding method and co-evolved using genetic operators;

[0028] S6, DI, and OS are individually combined and decoded into a scheduling plan:

[0029] Adopting the idea of ​​swarm intelligence optimization, for the DIOS code corresponding to the FJSP solution: the DI code corresponding to the solution of the machine selection subproblem is called a DI individual, and the collection of DI individuals constitutes a DI population; the OS code corresponding to the solution of the process sequence subproblem is called an OS individual; the collection of OS individuals constitutes an OS population; one individual is selected from each of the DI population and the OS population to form a DIOS code;

[0030] Calculate the maximum completion time Makespan of the DIOS code and decode it to obtain a complete scheduling plan;

[0031] After DI and OS co-evolve, they are combined into DIOS code, which corresponds to a solution of FJSP (i.e., a scheduling scheme)

[0032] Note: In swarm intelligence optimization algorithms (such as particle swarm optimization PSO and HHO used in this invention),

[0033] Individual: represents a candidate solution, usually a multidimensional vector or position coordinates.

[0034] Population: A collection of individuals that searches for the optimal solution through group collaboration.

[0035] S7. Coevolution and screening:

[0036] The DI population and OS population evolve together; after each iteration, the high-quality DIOS solutions are selected based on the fitness of the DIOS chromosome, and the inferior DIOS solutions are stored in the taboo table;

[0037] S8. Result output and application:

[0038] Output the optimal decoded code.

[0039] In step S4:

[0040] The DI encoding method is to achieve the conversion from continuous search space to discrete decision variables by representing the selection decision of each process in its optional machine set as an indicator (reflected as the position of the decision in the decision interval. The decision interval is normalized to the interval [0,1] to achieve the same search space limit for each encoding bit);

[0041] The HHO algorithm is an improved HHO algorithm, and the improvement method is as follows: the HHO algorithm improves the control parameters of the exploration phase through Sine chaotic mapping to enhance the global search capability and convergence speed of the HHO algorithm.

[0042] In step S5:

[0043] The following describes the OS encoding method.

[0044] In the flexible job shop scheduling problem (FJSP), Machine Sequence and Operation Sequence Encoding (MSOS) is a commonly used solution representation method for encoding scheduling solutions into chromosomes for genetic or other evolutionary algorithms. Operation Sequence Encoding (OS) is a key component of MSOS encoding, specifically used to represent the processing sequence of each operation.

[0045] The OS code is a sequence with a length equal to the total number of processes. The number of times each workpiece number appears in the sequence is equal to the number of processes.

[0046] Semantic interpretation of OS encoding

[0047] Sequence order: The traversal order of the coding sequence directly corresponds to the processing order of the process.

[0048] Process instantiation:

[0049] The k-th occurrence of workpiece number i represents the k-th operation (Operation Oi,k) of workpiece Ji.

[0050] For example, if the OS code is [1,2,3,1,3,2], the corresponding process sequence is:

[0051] O1,1→O2,1→O3,1→O1,2→O3,2→O2,2

[0052] Example Analysis

[0053] Assume there are 3 workpieces, and the number of steps for each workpiece is 2:

[0054] Workpiece J1: Process O1,1, O2,1

[0055] Workpiece J2: Process O2,1, O2,2

[0056] Workpiece J3: Process O3,1, O3,2

[0057] Then the legal OS code can be [1,2,3,1,3,2], and the decoding process sequence is:

[0058] 1.O1,1 (the first process of workpiece 1)

[0059] 2.O2,1 (the first process of workpiece 2)

[0060] 3.O3,1 (the first process of workpiece 3)

[0061] 4.O1,2 (the second process of workpiece 1)

[0062] 5.O3,2 (the second process of workpiece 3)

[0063] 6.O2,2 (the second process of workpiece 2)

[0064] In other words, for three workpieces (two processes each), the OS code might be [1,2,3,1,3,2], meaning:

[0065] The first process of workpiece 1 → the first process of workpiece 2 → the first process of workpiece 3 →

[0066] The second process of workpiece 1 → the second process of workpiece 3 → the second process of workpiece 2.

[0067] Furthermore, in step S4, for the DI encoding method:

[0068] Define the set of all processes as {O11, O12, O21, O22, …, Oij, …}, where Oij represents the j-th process of the i-th job Ji;

[0069] Define the set of optional machines corresponding to all processes as Machine Collection = {MC11, MC12, MC21, MC22, …, MCij, …}, where MCij represents the set of machines that can be selected for the j-th process of the i-th job Ji, and MCij = {x|x = the number of the machine that can be selected for the j-th process of the i-th job Ji};

[0070] Define the maximum number of selectable machines array O_M_NUM = {N11, N12, N21, N22, ..., Nij, ...}, where Nij represents the total number of machines that can be selected for the j-th process of the i-th job Ji;

[0071] The solution set of the machine selection subproblem is defined as {S11, S12, S21, S22, …, Sij, …}, where Sij represents the j-th process of the i-th job, which selects the machine numbered Sij, that is, selects the machine numbered MCij[Sij], and the machine number starts from 0;

[0072] The length of the DI code is equal to the total number of processes; define DI[i] as the value of the DI code at the i-th position, corresponding to each corresponding process Oij in order;

[0073] The DI coding rules are:

[0074]

[0075] The DI decoding rules are:

[0076]

[0077] For example, given a solution to the machine selection subproblem of FJSP as [1,0,0,1,0,1,1,1,1,1,0,1,1,2,1] and O_M_NUM as [3,2,2,2,2,2,2,2,3,2,1,2,3,3,2], the DI encoding can be [0.5,0.0,0.0,1.0,0.0,1.0,1.0,1.0,0.5,1.0,0,1.0,0.5,1.0,1.0].

[0078] The solution to the machine selection subproblem is defined as a sequence, such as MS = [1,0,0,1,0,1,1,1,1,1,0,1,1,2,1], where the sequence length is equal to the total number of processes in the FJSP problem, for example, it is 15 here. These 15 processes may belong to different jobs, for example, they belong to 5 jobs respectively, and they are arranged in the order of job 1 process 1, job 1 process 2, job 1 process 3...job 5 process 3. The three processes of the job are processed strictly in sequence, and process 1 must be completed before processes 2 and 3 can be carried out.

[0079] MSi in the MS segment means that the process at position i has selected the MSi-th machine from the set of machines it can choose.

[0080] For example, MS1=1 is the first value of the sequence, which means that process 1 of job 1 selects the first machine among the machines it can choose for processing (such as M1, M2, M3), that is, process 1 of job 1 selects M1 for processing, and so on.

[0081] DI coding removes the number of machines that can be selected for processing in each process;

[0082] O_M_NUM is [3,2,2,2,2,2,2,2,3,2,1,2,3,3,2]. For example, the first value is 3, which means that there are a total of 3 machines that can be selected for job 1 process 1; the second value is 2, which means that there are a total of 2 machines that can be selected for job 1 process 2.

[0083] The reason why DI is encoded like this is to normalize it and facilitate the iterative search of the HHO algorithm, [0.5, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.5, 1.0, 0, 1.0, 0.5, 1.0, 1.0]. For example, the first value 0.5 is MS1(1) divided by N1(3)-1=2, 1 / 2=0.5.

[0084] The formula representing the DI encoding rule: DI encoding maps the integer value of MS encoding to the interval [0, 1] through normalization. The reason for normalization is that, because the array O_M_NUM is [3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 2, 3, 3, 2], his upper bound is inconsistent, that is, the number of machines that can be selected by each process is inconsistent.

[0085] Further, in step S4, the improvement of the HHO algorithm is described as follows.

[0086] The input of HHO is an FJSP environment (which can be regarded as the problem setting condition), such as the problem design several jobs, each job has several processes, each process of each job can be processed on which machine, and the processing time of each process on the selectable machine is how much.

[0087] After inputting these data, HHO first initializes a population (that is, an initial candidate solution, which can be regarded as a candidate scheduling scheme), and the initialization strategy can adopt random initialization according to random values, or can combine random and GS global selection, LS local selection, etc. In the implementation of the present application, it is a combination strategy of random + GS + LS.

[0088] The parameters of HHO include the population size POP_SIZE, that is, the number of candidate solutions in each iteration of the algorithm, which will affect the performance of the algorithm. If it is too small, the quality of the solution obtained in a limited number of iterations may be poor, and if it is too large, the calculation amount will be large and the performance will be affected, so it will be adjusted according to the actual situation of the FJSP problem.

[0089] The parameter T of HHO is the number of iterations, which can be used as a termination condition, such as stopping the algorithm after 50 iterations and outputting the optimal solution.

[0090] The parameters LB and UB of HHO respectively represent the upper and lower limits of the search space of HHO. Because after normalization, the value of DI encoding is between 0-1, the lower limit is set to 0 and the upper limit is set to 1.

[0091] In the HHO algorithm, the Harris hawk is a search agent, and a Harris hawk individual represents a scheduling scheme (solution) of FJSP. POP_SIZE Harris hawks form a population. According to the initialization strategy, POP_SIZE Harris hawk individuals are generated during initialization; then the main flow of the algorithm is entered, and the positions of the individuals in the Harris hawk population are updated in a loop; then the individual fitness is evaluated and the population is updated through the screening strategy, and the optimal solution is searched out through continuous iteration.

[0092] The rabbit is the current optimal solution and the best individual. In one iteration, the fitness is evaluated. If there is a Harris Hawk individual with a better fitness than the rabbit (in the minimization problem, the smaller the fitness value, the better; in the maximization problem, the opposite is true), the position of the Harris Hawk individual is updated to the rabbit, which is equivalent to updating the record of the current optimal solution.

[0093] HHO instructions are as follows.

[0094] 1. Input environment of HHO algorithm

[0095] The input of HHO is the complete environment definition of the FJSP problem, which includes the following key parameters:

[0096] 1. Operation and process structure

[0097] The number of jobs and the number of operations for each job.

[0098] The set of optional processing machines for each process and its corresponding processing time matrix.

[0099] Example:

[0100] 3 operations, each operation contains 2 processes;

[0101] The first step of operation 1 can be processed on machines M1, M2, and M3, with processing times of 5, 6, and 4 minutes respectively.

[0102] 2. Constraints

[0103] The processes of the same job must be executed in sequence (e.g., process 2 of job 1 can only be started after process 1 of job 1 is completed).

[0104] Each machine can only process one process at a time.

[0105] 2. HHO initialization strategy

[0106] 1. Population initialization

[0107] Generate initial candidate solutions (i.e., Harris Hawk individuals) representing different scheduling schemes.

[0108] The initialization strategy adopts a combination of random generation and heuristic strategy (such as global selection GS, local selection LS), but the present invention adopts the existing method during implementation.

[0109] 2. Encoded representation

[0110] Each Harris hawk individual is represented by MSOS code (including OS code and MS code) or normalized DI code to ensure the structural legitimacy of the solution.

[0111] 3. HHO core parameters

[0112] 1. Population size (POP_SIZE)

[0113] Indicates the number of candidate solutions in each generation of the population.

[0114] Influence:

[0115] Small values ​​may result in an insufficient search and low-quality solutions;

[0116] Larger values ​​increase the computational burden and need to be weighed according to the problem size.

[0117] 2. Maximum number of iterations (T)

[0118] One of the algorithm termination conditions, for example, setting it to stop after 50 iterations and output the optimal solution.

[0119] 3. Search space bounds (LB, UB)

[0120] Since the DI code is mapped to the interval [0, 1] after normalization, LB=0 and UB=1 are set to unify the search range.

[0121] 4. HHO algorithm flow

[0122] 1. Definition of Individual and Population

[0123] Harris Hawk individual: represents a complete FJSP scheduling plan (including process sequence and machine allocation).

[0124] Population: Consists of POP_SIZE individuals. The initial population is generated by the initialization strategy.

[0125] 2. Fitness Evaluation

[0126] The fitness value of each individual is the optimization target value of its corresponding scheduling scheme (such as the maximum completion time makespan).

[0127] Minimization problem: the smaller the fitness value, the better the solution; and vice versa.

[0128] 3. Optimal Solution Update ("Rabbit")

[0129] Rabbit: Record the best individual in the current population.

[0130] In each iteration, if the fitness of a Harris hawk individual is better than that of the rabbit, the position of the individual is updated to the new rabbit.

[0131] 4. Iterative update mechanism

[0132] According to the exploration and exploitation strategies of the HHO (such as encirclement, raid and other behavioral models), the positions of Harris Hawk individuals are updated (i.e., the scheduling plan is adjusted).

[0133] Fitness evaluation, position update, and optimal solution screening are performed cyclically until the termination condition (such as the number of iterations T) is reached.

[0134] 5. Key Design Notes

[0135] 1. The necessity of normalization

[0136] DI encoding eliminates the scale differences in the number of optional machines for different processes through normalization, ensuring that the algorithm works efficiently in a unified search space.

[0137] 2. Balance between population size and number of generations

[0138] POP_SIZE and T need to be adjusted according to the complexity of the problem to balance the solution quality and computational efficiency.

[0139] 3. The auxiliary role of heuristic strategies

[0140] Combining GS (global selection) and LS (local selection) during initialization can improve the quality of the initial solution, but it is necessary to avoid over-reliance on specific heuristic rules.

[0141] In the present invention,

[0142] Firstly, the exploration phase of the HHO algorithm is improved by using Sine chaotic mapping;

[0143] Introducing the Sine chaotic map value in the exploration phase of the HHO algorithm, the position update formula in the global exploration phase of the HHO algorithm is: (position update formula, because the HHO algorithm simulates the process of Harris hawk preying on rabbits, stopping or flying, diving attack, will involve position update, these formulas are actually used to control the algorithm's optimization path):

[0144]

[0145] Among them, s1~s4 are the chaotic numbers generated based on the Sine map in each iteration.

[0146]

[0147] X(t) is the current position vector of the eagle; Xrabbit(t) is the position of the target; r1, r2, r3 and r4 are random numbers in the range of (0, 1), which are updated in each iteration; LB and UB represent the lower and upper bounds of the variable, respectively; Xrand(t) is the position of the eagle randomly selected from the current population; Xmean is the average position of the current eagle population; q is a randomly generated parameter, defined as the probability of rabbit escape in HHO, used for flow control; Xmean represents the average position of the Harris eagle population; Xrabbit represents the position (coordinates) of the rabbit, which is the current global optimal solution; LB and UB are the lower and upper bounds of the search space of the HHO algorithm, respectively;

[0148] Then, the exploration phase and the development phase are balanced using a nonlinear control parameter;

[0149] The nonlinear control parameter is defined as:

[0150]

[0151] wherein parameter A is used to control the amplitude of the formula; parameters B and C control the time scale and the decay rate, respectively; parameter D represents the offset, ensuring that there is still some exploration ability in the later iterations; t represents the current iteration to the tth generation; T is the total number of iterations, which is set in advance as a termination condition (such as 50 iterations)

[0152] Thus, the escape energy formula is changed to

[0153]

[0154] Further, in step S5, the genetic operators include a partially ordered crossover (POX) operator and a swap mutation operator, for individuals in the OS population:

[0155] The steps of the POX operator are: first, select two parent individuals and randomly select a segment as the crossover region; then, copy the crossover region of the first parent individual to the offspring individual; finally, fill the offspring individual with the remaining part of the second parent individual, ensuring that there is no repetition and maintaining partial order;

[0156] The steps of the swap mutation operator are: first, randomly select two positions in the individual; then, exchange the values at the two positions to generate a new individual.

[0157] Further, in step S7, after the DI population and the OS population coevolve, a selection, replenishment strategy and a combination strategy are adopted to combine the DIOS population into a solution corresponding to the FJSP;

[0158] After evaluating the fitness of the DIOS chromosome, the DIOS inferior solution is used to update the taboo table, and the DIOS superior solution is used in the DI population and OS population supplementation strategy to supplement the DI population and OS population to the POP_SIZE scale;

[0159] After elimination and supplementation, the DI population and OS co-evolve again;

[0160] Repeat the whole process until the termination condition is reached.

[0161] Furthermore, in step S7, the method for evaluating the fitness of the DIOS chromosome is to obtain the completion time according to the process sequence. That is, assuming that the starting processing time of a process on a certain machine is start, the processing time is span, and the processing end time is end; insert the processes one by one into the production queue, the steps include:

[0162] Step 1: Initial processing of the process

[0163] If the process has not been processed on the corresponding machine and it is the first process of the workpiece:

[0164] Insert this process into the machine,

[0165] Set start to 0 and end to span.

[0166] Step 2: Subsequent process processing

[0167] If the process has not been processed on the corresponding machine, but this process is not the first process:

[0168] Get the end time last_end of the previous process of the workpiece;

[0169] Set start to last_end and end to last_end+span;

[0170] Step 3: Existing process

[0171] If the process has been processed on the corresponding machine, then:

[0172] Find an idle segment on the machine that meets the conditions, where the length of the idle segment is not less than the production time of the process on the machine;

[0173] If the process is not the first process, the start time of the idle segment must not be less than the end time last_end of the previous process of the workpiece corresponding to this process.

[0174] Furthermore, in step S1, the job shop environment data includes machine information, job and process details, and process route data; the machine information includes: technical parameters, processing capabilities, availability, and maintenance records of each machine; the job and process details include: specific requirements of each process including: required resource types, processing time, and quality standards; the process route data is organized to clarify all processes and their sequence from the start to the end of each job;

[0175] The collected data will be cleaned, verified and standardized.

[0176] In the mathematical model of FJSP, the processing time of each process varies with the machine. The scheduling goal is to select the most suitable machine for each process and determine the optimal processing sequence and start time for each process on each machine.

[0177] The constraints of FJSP include: the same machine can only process one workpiece at a time; the same process of the same workpiece can only be processed by one machine at the same time; once each process of each workpiece starts, the processing cannot be interrupted; different workpieces have the same priority; there are no sequence constraints between the processes of different workpieces, but there are sequence constraints between the processes of the same workpiece; all workpieces can be processed at time zero.

[0178] The FJSP solution method model proposed in the present invention based on the HHO algorithm improved by the collaborative evolution strategy is particularly suitable for processing actual flexible job shop standard scheduling problems.

[0179] The present invention provides an efficient and stable method for solving the multi-objective production scheduling problem of a flexible job shop and can provide effective scheduling decision support for actual production. BRIEF DESCRIPTION OF THE DRAWINGS

[0180] Figure 1 It is the flow chart of HHO algorithm;

[0181] Figure 2 It is a flow chart for solving the FJSP scheduling model solution;

[0182] Figure 3 It is a flow chart of the DIOS portfolio strategy;

[0183] Figure 4(a) is a flow chart of the DIOS population elimination strategy;

[0184] Figure 4(b) is a flow chart of the DIOS population recruitment strategy;

[0185] Figure 5 It is a flow chart of the algorithm model application solution. DETAILED DESCRIPTION

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

[0187] The specific steps of the present invention include:

[0188] 1. Propose the flexible job shop scheduling problem and establish a model:

[0189] In view of the production characteristics of flexible job shops, this paper proposes a flexible job shop scheduling problem and establishes a corresponding scheduling (optimization) model. This model aims to optimize resource allocation and process scheduling to improve production efficiency and flexibility.

[0190] 2. Data collection and conversion:

[0191] Collect relevant data about machines, jobs, processes, and process routes in a flexible job shop, construct a flexible job shop scheduling problem (FJSP), and convert it into an input dataset for the scheduling model. This data includes, but is not limited to, the technical parameters of each machine, the requirements of each job and its processes, and the dependencies between processes.

[0192] 3. Problem decomposition: Divide the FJSP problem into two sub-problems:

[0193] Machine selection and process sequence. This decomposition helps to simplify the solution process and improve the effectiveness and practicality of the algorithm.

[0194] 4. Machine selection sub-problem solving process:

[0195] For the machine selection subproblem, a DI encoding method is used to map the discrete machine selection sequence into the continuous solution space of the HHO algorithm. Each process's selection decision among its available machines is represented as a variable. The improved HHO algorithm is used to iteratively solve the problem, and decoding is used to remap the DI encoding back into the discrete machine selection sequence.

[0196] The improvement method of HHO algorithm is as follows: HHO algorithm improves initialization and control parameters through Sine chaotic mapping to enhance its global search capability and convergence speed.

[0197] 5. Processing sequence sub-problem processing:

[0198] For the process sequence subproblem, OS encoding is used, combined with the POX crossover operator and the exchange mutation operator for co-evolution. This helps to find the optimal or near-optimal process sequence solution while maintaining the logical order between processes.

[0199] 6. Combined chromosome generation:

[0200] Select one individual from each of the DI and OS populations to form a DIOS chromosome. Calculate the maximum makespan of the chromosome and decode it to obtain a complete scheduling solution.

[0201] 7. Co-evolution and screening:

[0202] The DI and OS populations co-evolve, selecting high-quality individuals based on the fitness of the DIOS chromosomes after each iteration and storing the remaining half of the inferior solutions (DIOS) in a taboo table to prevent the algorithm from falling into local optimality. This process ensures that the algorithm can continuously explore new solution spaces.

[0203] 8. Result output and application:

[0204] When the algorithm meets the termination criteria, the optimal solution is output as a Gantt chart for job shop scheduling. Simultaneously, this scheduling solution (planning results) can be asynchronously pushed to the Manufacturing Execution System (MES) for operators to reference and select the appropriate workpiece for machining. This not only improves the transparency and operability of production plans but also provides strong support for actual production.

[0205] In this way, the present invention effectively solves the FJSP problem and improves the scheduling efficiency and resource utilization of the flexible job shop.

[0206] The core innovation of the present invention is that:

[0207] 1. A continuous (real number) encoding scheme for the decision indicator (DI) variable in the FJSP machine selection subproblem is designed based on the well-established MS discrete (integer) encoding scheme. DI decision variable encoding maps the discrete machine selection problem sequence into a continuous search space, so that each process's choice of a machine from its set of available options is represented as a continuous variable.

[0208] 2. Improved HHO algorithm: Based on the improved Harris Hawk Optimization algorithm (HHO), the evolution of DI population is realized to improve the global search capability and convergence speed.

[0209] 3. Processing sequence sub-problem: Use operation sequence (OS) encoding and combine POX crossover operator and exchange mutation operator for evolution to optimize the process processing sequence.

[0210] In the present invention:

[0211] Coevolution of DI and OS populations: DI and OS populations were randomly combined without replacement to form a DIOS coevolutionary body, and the fitness of DIOS was evaluated.

[0212] Tabu list and elimination and supplement strategy: set the tabu list (the embodiment of the application comprehensively considers performance and other factors, and sets the length of the tabu list to be the population size POP_SIZE), to prevent the algorithm from falling into local optimum in the short term and repeatedly searching for the DIOS that is searched in the short term and has been evaluated for fitness; the application designs an elimination and supplement strategy to select the next generation of DIOS community, ensures the diversity of DI and OS populations respectively, and through the fitness value feedback of the DIOS community, high-quality genes (DI and OS individuals carrying high-quality genes that are considered to be optimal solutions of DIOS) are considered, the global optimization ability and solution speed of the algorithm are taken into account, and the algorithm is prevented from falling into local optimum.

[0213] Through the above mechanism, the application can more effectively optimize the production scheduling scheme, provide efficient and stable scheduling solutions, and adapt to changing market demands and complex production environments. This method not only improves the solution efficiency, but also enhances the accuracy and reliability of the results, ensuring that the generated scheduling scheme meets the actual production constraint conditions. Ultimately, these optimization measures help to improve the production efficiency and resource utilization of the entire flexible job shop.

[0214] Flexible job shop production scheduling problem modeling and sub-problem splitting

[0215] In intelligent manufacturing enterprises, minimizing the maximum completion time (Makespan) is one of the key optimization objectives. This is because minimizing the maximum completion time can significantly improve production efficiency and resource utilization, ensuring that all processes are completed in the shortest time. By shortening the entire production cycle, enterprises can respond more quickly to market demand, reduce work-in-process inventory, reduce operating costs, and improve customer satisfaction. In addition, minimizing the maximum completion time helps to balance the workload of each device, avoiding the situation where some machines are overloaded while others are idle, thereby enhancing the stability of production and the flexibility of scheduling. Therefore, this optimization objective is crucial for achieving efficient, flexible, and sustainable intelligent manufacturing.

[0216] Taking an actual electronic discrete manufacturing enterprise as an example, the objective function of the application is to minimize the maximum completion time (Makespan), and an optimization mathematical model is established to achieve efficient production scheduling. This model not only ensures on-time delivery of orders, but also maximizes the use of equipment resources, reduces waiting time and cost, thereby improving overall production efficiency and market competitiveness.

[0217] Definition of mathematical model in flexible job shop environment

[0218] In the flexible job shop environment, the mathematical model is defined as follows:

[0219] In the flexible job shop environment, there are n jobs, denoted as J1, J2,..., J n, and m machines (Machine), denoted as M1, M2, ..., M m Each operation Ji contains several operations (Operation), and each operation can select 1 to m machines from m to process. Specifically, the operation J i No. j The first process is recorded as O ij .

[0220] Definition: n: number of jobs. m: number of machines. J i : The i-th job. O ij : The j-th process of operation i. M k : The kth machine. T ijk : The processing time of the jth operation of job i on machine k. C ijk : The completion time of the j-th process of job i on machine k.

[0221] The start and end time of the process

[0222] Let S ijk represents the start time of the jth process of job i on machine k, then the completion time C ijk =S ijk +T ijk .

[0223] C ijk =S ijk +T ijk

[0224] Define sequence constraints for operations

[0225] For the same job i, assuming it has pi processes, then for each process j and j+1 (j=1,2,…,pi-1), it must satisfy:

[0226] C i (j)≤S i (j+1)

[0227] Among them C i(j) is the completion time of process j on any machine, S i(j+1) is the start time of process j+1 on any machine.

[0228] Machine availability constraints

[0229] For the same machine k, suppose multiple processes O are executed on it. i1j1 ,O i2j2 ,..., then the start and end times of these processes must satisfy:

[0230]

[0231] Makespan is the maximum completion time of all processes (maximum completion time), that is:

[0232]

[0233] Optimization goal of flexible job shop scheduling problem

[0234] In flexible job shop scheduling, time is the most common factor to consider. Specifically, the optimization goal is to minimize the maximum completion time of all jobs, that is, to minimize the maximum makespan. The maximum makespan is defined as the shortest time required to complete all jobs, ensuring the efficient operation of the entire production process.

[0235] Through the above definition, the flexible job shop scheduling problem can be transformed into an optimization problem, the goal of which is to find a reasonable machine selection and process sequence arrangement to minimize the maximum completion time Makespan.

[0236] This optimization method not only improves production efficiency, but also effectively utilizes workshop resources and enhances overall production capacity. This scheduling model provides a solid theoretical basis and practical tools for solving complex production scheduling problems.

[0237] Specifically, in practical applications, by i Each process O ij Reasonable allocation to the appropriate machine M k , and determine the processing sequence of each process to ensure the smoothness and efficiency of the entire production process. In this way, the goal of minimizing the maximum completion time can be achieved, thereby improving the overall production efficiency and resource utilization of the workshop.

[0238] This process involves not only complex mathematical modeling but also advanced optimization algorithms, such as the Harris Hawk Optimizer (HHO) algorithm used in this paper, to ensure the accuracy and feasibility of the solution. The resulting scheduling solution can be intuitively displayed to operators through Gantt charts and other formats, facilitating implementation and management in actual production.

[0239] The FJSP problem is divided into two sub-problems: machine selection and process sequence.

[0240] In the Flexible Job Shop Scheduling Problem (FJSP), splitting the original problem into two subproblems: machine selection and process sequence. This approach aims to simplify the solution process and improve solution efficiency and feasibility.

[0241] Firstly, the machine selection sub-problem focuses on determining the most suitable machine for each operation. Given that each operation in the FJSP can be completed by multiple machines with varying processing capabilities, the core of this sub-problem lies in optimizing the selection of machines that best suit the execution of specific operations based on factors such as machine availability, efficiency, and cost. This process requires a balance between resource allocation and maximizing production efficiency.

[0242] Secondly, the operation processing sequence sub-problem focuses on determining the optimal processing sequence between operations. Specifically, based on the selected machines for each operation, the execution order of all operations is arranged with the goal of minimizing the overall production flow time or cost. This involves analyzing the dependencies between operations and designing an optimal scheduling scheme to ensure smooth operation and efficient output of the production line.

[0243] Through this decomposition approach, not only can efficient solution algorithms be designed for each sub-problem independently, but it also facilitates flexible adjustment strategies in practical applications to adapt to changing production demands. This method not only improves the quality of the solution but also enhances the ability to cope with complex production environments.

[0244] Collecting Job Shop Environment Data

[0245] In the construction of the Flexible Job Shop Scheduling Problem (FJSP) framework, accurate data collection and processing is a crucial step. Specifically, the following operations need to be performed to ensure the effectiveness of the data and the accuracy of the model:

[0246] Firstly, collect machine information, including but not limited to technical parameters, processing capabilities, availability, and maintenance records of each machine. These information is crucial for determining the processing equipment that each operation can choose.

[0247] Secondly, collect job and operation details, which involves identifying all jobs to be completed and their corresponding operations. The specific requirements of each operation, such as the required resource type, processing time, and quality standards, should be recorded in detail.

[0248] Next, organize process route data, that is, clearly define all the operations and their order that each job goes through from start to finish. This process requires a deep understanding of each link in the production process and ensures that all paths are accurately mapped out.

[0249] Finally, the collected data is integrated and formatted to be converted into input data suitable for the scheduling model. This step requires cleaning, validating, and standardizing the raw data to ensure seamless integration into mathematical or computational models. In this way, the complex situation of the actual production workshop can be effectively abstracted into the FJSP model, and then the optimal or near-optimal scheduling scheme can be solved by using advanced algorithms, thereby improving production efficiency and resource utilization. This method not only enhances the practicality of the decision support system, but also provides a solid data foundation for realizing intelligent manufacturing.

[0250] Data initialization

[0251] In the process of converting the collected machine, job, process, process route, etc. Information into model input data set, a maximum selectable machine number array O_M_NUM needs to be constructed. This array records the maximum number of machines that can be selected for each process, for example [3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 2, 3, 3, 2].

[0252] Encoding

[0253] When solving the flexible job shop scheduling problem (FJSP), one of the key challenges faced by the Harris Hawk Optimization algorithm (HHO) is that the HHO search space is continuous, while the machine selection subproblem in FJSP is discrete.

[0254] Therefore, in order to solve the above problems, a new encoding mechanism is needed to adapt the difference between the continuous search space of HHO algorithm and the discrete decision variables of FJSP, ensuring that the generated solution not only meets the actual production constraint conditions, but also fully utilizes the strong global search ability of HHO algorithm.

[0255] Machine selection part adopts DI encoding

[0256] This method, based on the mature MS discrete (integer) encoding method for solving FJSP, modifies and designs a continuous (real number) encoding method called Decision Indicator (DI) encoding to adapt to the Harris Hawk Optimization algorithm (HHO), solving the mismatch between the discrete characteristics of the machine selection subproblem in FJSP and the continuous search space of HHO algorithm. DI encoding realizes the effective conversion from continuous search space to discrete decision variables by representing the selection decision of each process in its selectable machine set as a coefficient.

[0257] Define the set of processes

[0258] Define the set of all processes as {O11, O12, O21, O22, …, Oij, …}, where Oij represents the jth process of the ith job Ji.

[0259] Definition of optional machine collection

[0260] Definition of optional machine collection corresponding to all processes is Machine Collection = {MC11, MC12, MC21, MC22, …, MCij, …}, where MCij represents the machine collection that the jth process of the ith job can select. The specific form is MCij = {x | x = machine number that the jth process of the ith job can select}.

[0261] Definition of maximum optional machine number array

[0262] Definition of maximum optional machine number array O_M_NUM = {N11, N12, N21, N22, …, Nij, …}, where Nij represents the total number of machines that the jth process of the ith job can select.

[0263] Machine selection solution set

[0264] Definition of solution set of machine selection sub-problem is {S11, S12, S21, S22, …, Sij, …}, where Sij represents the machine number selected by the jth process of the ith job, that is, MCij[Sij] number machine is selected. For convenience of calculation, the machine number starts from 0.

[0265] DI code definition

[0266] DI code length

[0267] The length of DI code is equal to the total number of processes, and DI[i] is defined as the value of DI code at the ith position, which corresponds to each process Oij in order.

[0268] DI code rule is:

[0269]

[0270] DI decoding rule is:

[0271]

[0272] For example, given a solution of the machine selection sub-problem of FJSP as [1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1], and O_M_NUM as [3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 2, 3, 3, 2], the DI code can be [0.5, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.5, 1.0, 0, 1.0, 0.5, 1.0, 1.0].

[0273] Through the above definitions and encoding and decoding rules, the continuous search space of the Harris Hawk Optimizer (HHO) algorithm can be effectively mapped to the discrete decision variables of the machine selection subproblem in the Flexible Job Shop Scheduling Problem (FJSP). This mechanism not only ensures that the generated solution meets actual production constraints but also fully utilizes the powerful global search capabilities of the HHO algorithm, improving solution efficiency and accuracy. This process enables the efficient solution of complex production scheduling problems and provides strong support for real-world production.

[0274] Through the DI encoding and decoding process, the continuous search space of the HHO algorithm is converted into discrete decision variables for the machine selection subproblem in the FJSP problem. This method ensures that the generated solution not only meets the actual production constraints but also fully utilizes the powerful global search capability of the HHO algorithm.

[0275] Introduction to HHO Algorithm

[0276] Harris Hawk Optimization (HHO) algorithm is divided into three phases: exploration, transition and exploitation.

[0277] The calculation formula of escape energy E is:

[0278]

[0279] Where t is the current iteration number and T is the total number of iterations.

[0280] During the exploration phase (|E|>=1), Harris's hawks use their excellent eyesight to track prey, mainly through two strategies:

[0281] 1. Resting based on the location of family members and prey: Choose resting points based on the location of other family members and prey.

[0282] 2. Resting on random tall trees: Randomly select tall trees as resting points to expand the observation range.

[0283]

[0284] in:

[0285] Xrabbit(t) is the location of the rabbit (target). X(t) is the current hawk position vector. r1, r2, r3, and r4 are random numbers in the range (0, 1) that are updated at each iteration. LB and UB represent the lower and upper bounds of the variables, respectively. Xrand(t) is the location of a randomly selected hawk from the current population. Xmean is the mean position of the current hawk population.

[0286] These two strategies enable the Harris Hawk to efficiently search for prey over a wide area, ensuring that it can find its target even in complex environments. This mechanism gives the HHO algorithm powerful global search capabilities.

[0287] In the transition phase (E<1), Harris's hawks dynamically adjust their exploitation behavior based on the prey's escape energy. This is specifically manifested as follows:

[0288] Global exploration: When the energy of prey is high, Harris's hawks will search for prey in a wider area, conducting global exploration.

[0289] Local exploration: As the prey's escape energy decreases, Harris's hawk will gradually narrow its search area to the area around the prey and conduct local exploration.

[0290] Throughout the iterative process, the prey's escape energy decreases, prompting the Harris Hawk to gradually shift from global exploration to local exploration, thereby improving the algorithm's convergence speed and accuracy. This mechanism ensures that the algorithm effectively balances global and local search capabilities at different stages. This allows for more efficient finding of the optimal solution, improving the algorithm's overall performance.

[0291] During the development phase, the HHO algorithm employed four different predation strategies to simulate prey capture behavior:

[0292] 1. Soft encirclement: When the prey fails to escape, a soft attack method is used.

[0293] 2. Hard encirclement: When the prey fails to escape, a hard attack is adopted.

[0294] 3. Soft encirclement with gradual and rapid dives: When the prey successfully escapes, a gradual dive soft attack method is used.

[0295] 4. Hard encirclement with gradual and rapid dives: When the prey successfully escapes, a gradual dive hard attack method is adopted.

[0296] The selection of these strategies is based on the prey's escape energy E and a random number r5.

[0297] When the prey fails to escape and adopts a soft attack method, the position update formula is as follows:

[0298] X(t+1)=ΔX(t)-E|JX rabbit (t)-X(t)|

[0299] ΔX(t)=X rabbit (txt) (3)

[0301] Where ΔX(t) represents the difference between the rabbit's position vector and its current position at iteration t, r5 is a random number between 0 and 1, and J = 2(1r5) represents the random jumping intensity of the rabbit throughout the escape process. The jumping intensity J value varies randomly in each iteration to simulate the rabbit's movement characteristics.

[0302] When the prey fails to escape and adopts a hard attack method, the position update formula is as follows:

[0303] X(t+1)=X rabbit (t)-E|ΔX(t)| (4)

[0305] When the prey successfully escapes and adopts a gradual dive soft attack method, the position update formula is as follows:

[0306]

[0307] Y=X rabbit (t)-E|JX rabbit (t)-X(t)|

[0308] Z=Y+S*LF(D),0.5≤|E|<1∧r>0.5 (5)

[0310] F() is the objective function (fitness function fitenss). The optimization goal of this embodiment is to minimize the maximum completion time, so F() is the maximum completion time calculation function.

[0311] Where D is the spatial dimension, S is a 1×D random vector, that is, S=randon(1,D); LF(D) is the Levy flight function.

[0312] When the prey successfully escapes and adopts a gradual dive hard attack method, the position update formula is as follows:

[0313]

[0314] Y=X rabbit (t)-E|JX rabbit (t)-X mean (t)

[0315] Z=Y+S*LF(D),|E|<0.5∧r>0.5 (6)

[0317] Through the above four strategies, the HHO algorithm can effectively adjust the search behavior in different situations, ensuring the balance between global exploration and local development, thereby improving the overall performance and convergence speed of the algorithm.

[0318]

[0319]

[0320] Improving HHO exploration phase using Sine chaotic mapping

[0321] The Sine chaotic map is used to replace the values ​​of some parameters in the exploration phase formula (the original formula is random numbers) with the values ​​of the Sine chaotic sequence. The main purpose is to achieve:

[0322] Improved exploration capabilities: The values ​​generated by the Sine chaotic map have a higher diversity, which helps to search the solution space more comprehensively during the exploration phase.

[0323] Improved performance: Compared with the original algorithm, the use of Sine chaotic mapping can accelerate the convergence speed and overall performance of the HHO algorithm.

[0324] Effectively avoid falling into the local optimal solution and increase the probability of finding the global optimal solution.

[0325] Therefore, the position update formula of the HHO global exploration phase is improved as follows:

[0326]

[0327] Among them, s1~s4 are the chaotic numbers generated based on the Sine map in each iteration.

[0328]

[0329] Modifying the escape energy formula using nonlinear control parameters for balance exploration and development

[0330] It is very important to strike a balance between the exploration and exploitation phases of the metaheuristic method. Therefore, a nonlinear control parameter is used in the improved HHO algorithm to balance exploration and exploitation. The parameter is defined as follows:

[0331]

[0332] The escape energy formula is thus changed to

[0333] E=E0·P

[0334] Parameters A, B, C, and D can be adjusted according to the needs of specific problems to adapt to different application scenarios:

[0335] A controls the magnitude of the formula.

[0336] B and C control the time scale and decay rate.

[0337] D ensures that there is still some exploration capability in later iterations.

[0338] For example, adjusting B and C can control the decay rate, while adjusting D can ensure that there is still some exploration ability in later iterations.

[0339] Adjusting the values ​​of A, B, C, and D based on the specific FJSP situation can effectively balance the exploration and exploitation phases of HHO (essentially, balancing global and local search), improving the overall performance of the Harris Hawk Optimizer (HHO) algorithm. By more finely controlling the variation of escape energy, the algorithm can find high-quality solutions to FJSPs of varying sizes in a shorter time while reducing computational resource consumption.

[0340] In the test case, setting A = 2, B = 4, C = 2, D = 0.1, the solution performance is better than when using the original escape energy formula

[0341] Using POX crossover operator and exchange mutation operator to evolve OS of process sequence subproblem

[0342] POX crossover operator

[0343] The Partially Ordered Crossover (POX) operator is a genetic algorithm crossover operator specifically designed for permutation encoding. The specific steps are: first, two parent individuals are selected and a random segment is selected as the crossover region. The crossover region of the first parent is then copied to the offspring individual. Finally, the offspring individual is filled with the remaining portion of the second parent individual, ensuring no duplication and maintaining partial order.

[0344] Its main features and advantages are as follows:

[0345] 1. Preserving Partial Order: The POX operator generates offspring individuals by preserving partial order information of the parent individuals. This effectively inherits the excellent characteristics of the parent and improves search efficiency.

[0346] 2. Reduce destructiveness: Compared with the traditional crossover operator, the POX operator reduces the damage to the excellent gene fragments in the parent individuals, which helps maintain the diversity of the population.

[0347] Exchange mutation operator

[0348] The Swap Mutation operator is a simple mutation operator suitable for permutation coding optimization problems. The specific steps are: first, randomly select two positions in an individual. Then, swap the values ​​at these two positions to generate a new individual.

[0349] Its main features and advantages are as follows:

[0350] 1. Local Adjustment: The swap mutation operator performs local adjustments by randomly selecting two locations and swapping their values. This operation can introduce new solution spaces and enhance the algorithm's exploration capabilities.

[0351] 2. Low destructiveness: Since it only involves the exchange of two positions, the exchange mutation operator has little impact on the overall structure of the individual, avoiding large-scale destruction of the original excellent genes.

[0352] By combining the POX crossover operator and the exchange mutation operator to perform evolutionary operations on the process sequence subproblem (OS), the algorithm performance can be significantly improved in the following aspects:

[0353] 1. Efficient inheritance of excellent properties: The POX crossover operator can inherit the excellent properties of the parent individuals while maintaining partial order, thereby improving search efficiency.

[0354] 2. Enhanced population diversity: The exchange mutation operator introduces a new solution space through local adjustment, which enhances the diversity of the population and avoids premature convergence.

[0355] 3. Balancing global exploration and local exploitation: The combination of these two operators enables the algorithm to conduct extensive searches globally while making fine adjustments locally, thereby better balancing global exploration and local exploitation.

[0356] Using the POX crossover operator and the exchange mutation operator for evolutionary operations on the process sequence subproblem (OS) can effectively improve the performance of the Harris Hawk Optimizer (HHO) algorithm in solving the FJSP. The POX crossover operator inherits the positive properties of the parent generation by maintaining partial order, while the exchange mutation operator enhances population diversity through local adjustments. The combination of these two operators enables the algorithm to better balance global exploration and local exploitation at different stages, thereby more efficiently finding the optimal solution and improving overall optimization results. The parameters of these operators can be further adjusted to achieve optimal results based on specific needs.

[0357] This combination not only improves the algorithm's search efficiency, but also enhances its robustness and adaptability, ensuring that high-quality scheduling solutions can be found in complex production environments.

[0358] Fitness (maximum completion time) calculation

[0359] How to get the maximum completion time

[0360] The method for obtaining the maximum completion time based on the operation sequence in the manufacturing execution system data is as follows:

[0361] Considering the actual needs of an electronic discrete manufacturing company, assume that a process on a certain machine has a starting processing time of start, a processing duration of span, and an end time of end. The specific steps for inserting the processes one by one into the production queue are as follows:

[0362] Step 1: Initial processing of the process

[0363] 1. If the process has not been processed on the corresponding machine and it is the first process of the workpiece:

[0364] Insert this process into the machine.

[0365] Set start to 0 and end to span.

[0366] Step 2: Subsequent process processing

[0367] 2. If the process has not been processed on the corresponding machine, but this process is not the first process:

[0368] Get the end time last_end of the previous process of the workpiece.

[0369] Set start to last_end and end to last_end + span.

[0370] Step 3: Existing process

[0371] 3. If the process has been processed on the corresponding machine:

[0372] Find an idle segment that meets the conditions on the machine, the condition being that the length of the idle segment is not less than the production time of the process on the machine.

[0373] If the process is not the first process, the start time of the idle segment must not be less than the end time last_end of the previous process of the workpiece corresponding to this process.

[0374] Specific examples

[0375] Initial processing: Assume that the first process of a workpiece needs to be performed on machine A, and the processing time is span = 5 hours. In this case, start = 0 and end = 5.

[0376] Subsequent process: If the second process of the workpiece also needs to be performed on machine A, and the end time of the previous process is last_end = 5 hours, then set start = 5, end = 5 + span = 10 hours.

[0377] Existing Processes: If machine A already has another process scheduled, find an idle period that meets the requirements. For example, machine A's idle period starts at the 8th hour and lasts for 6 hours (i.e., the idle period starts at 8 and ends at 14). If the current process has a span of 4 hours and the previous process ended at last_end = 7 hours, you can choose to start processing at the 8th hour, setting start = 8 and end = 8 + 4 = 12 hours.

[0378] 1. Basic Definition

[0379] 1. Process attributes

[0380] Sequential constraint: The processes of the same workpiece must be executed in sequence (the subsequent process cannot be started until the predecessor process is completed).

[0381] Machine exclusivity: Each machine can only process one process at a time.

[0382] Time parameters:

[0383] start: The actual start time of the process on the machine.

[0384] span: The processing time of the process on the selected machine.

[0385] end: the end time of the process (end = start + span)

[0386] last_end: The end time of the predecessor process of the same workpiece.

[0387] 2. Goal

[0388] By reasonably inserting the processes into the machine timeline, the end values ​​of all processes are calculated, and the maximum value is the Makespan.

[0389] 2. Maximum Completion Time Calculation Process

[0390] Step 1: Initial processing (the first step of the workpiece)

[0391] 1. Conditions

[0392] The process is the first process of the workpiece (no predecessor process).

[0393] No processes (including processes for this workpiece and other workpieces) are scheduled on the target machine.

[0394] 2. Operation

[0395] Insert the process into the machine queue and set:

[0396] start=0,end=span,

[0397] 3. Example

[0398] The first process of workpiece 1 is processed on machine A, span = 5, then:

[0399] start=0, end=5.

[0400] At this time, the timeline of machine A is [0, 5].

[0401] Step 2: Subsequent process (not the first process for the same workpiece)

[0402] 1. Conditions

[0403] The process is not the first process of the workpiece (there is a predecessor process).

[0404] No other processes for this workpiece are scheduled on the target machine (processes for other workpieces may have been scheduled).

[0405] 2. Operation

[0406] Get the end time 1ast_end of the predecessor process.

[0407] Determine the earliest available time of the machine (i.e. the end time of the machine's current last process, machine_end).

[0408] Set the actual start time of the process to:

[0409] start=max(last_end,machine_end).

[0410] Calculation end time:

[0411] end=start+span.

[0412] 3. Example

[0413] The second step of workpiece 1 needs to be processed on machine A, span = 5, and:

[0414] The end time of the predecessor process is last_end=5.

[0415] The current last process of machine A ends at machine_end=5.

[0416] but:

[0417] start=max(5,5)=5,end=5+5=10.

[0418] The timeline of machine A is updated to [0, 5] → [5, 10].

[0419] Step 3: Insert idle segments when the machine already has a process

[0420] 1. Conditions

[0421] Other processes (possibly from this workpiece or other workpieces) have been scheduled on the target machine.

[0422] 2. Operation

[0423] Generate machine timeline: Sort all scheduled processes on the machine by time to form a continuous interval (such as [0,5], [8,12]).

[0424] Identify idle segments: Calculate the gaps between adjacent segments, for example:

[0425] The previous process ends at t1 and the next process starts at t2. The idle segment is [t1, t2] (if t2>t1). Filter the legal idle segments: a)

[0426] The length of the idle segment must satisfy t2-t1≥span.

[0427] If the current process is not the first process, t1≥1ast_end must also be satisfied.

[0428] Select the optimal idle segment:

[0429] Select the first free segment that meets the conditions according to the Earliest Feasible Gap principle.

[0430] Update process time:

[0431] start=tl,end=tl+span.

[0432] 3. Example

[0433] Machine A has scheduled processes: [8,5], [10,15], and the idle segments are [5,10], [15,∞).

[0434] Insert process span=4, and:

[0435] Precursor process end time 1ast_end=7

[0436] Legal idle segments must satisfy t1≥7 and t2-t1≥4.

[0437] Possible option: Idle segment [7, 10] (the actual gap is [5, 10], but the start time needs to be adjusted to 7).

[0438] start=7,end=7+4=11.

[0439] The timeline of machine A is updated to [8,5]→[[7,11]→[10,15] (needs to be reordered to [0,5], [7,11], [10,15]).

[0440] III. Calculation of the maximum completion time

[0441] 1. Traverse all machines, record the end value of the last process of each machine.

[0442] 2. Take the maximum value as the Makespan of the entire scheduling scheme, that is:

[0443]

[0444] Application scheme of the algorithm model proposed by the application

[0445] After the method is implemented by coding, it can be integrated into a production manufacturing execution system (MES) as an intelligent scheduling module, or it can be independently implemented as an advanced production planning and scheduling system (APS) or a real-time planning and scheduling system (RTS) to realize distributed real-time collection of workshop job environment data, and to establish an input data mart through ETL (extraction, transformation, and loading) of multiple data sources from the data center. After the model is solved, a Gantt chart is output, and is asynchronously pushed to the MES system of each machine through a message queue.

[0446] Experiment

[0447] Benchmark set MFJS

[0448] Algorithm configuration:

[0449] Population size: POP_SIZE 50

[0450] Maximum number of iterations: T 100

[0451] Coefficient of variation: INDPB 0.1

[0452] Referring to the following table, better solutions (optimization target: minimize the maximum completion time) and shorter program consumption are obtained for benchmark cases MFJS1-3, 5-10 than the traditional GA algorithm.

[0453]

[0454]

Claims

1. A flexible job shop scheduling method based on collaborative evolution improved HHO, comprising the following steps: S1. Data collection: Collecting the workshop environment data of the flexible workshop; S2. Abstract the flexible job shop scheduling problem (FJSP) into a mathematical model. The mathematical model of FJSP is as follows: In a flexible job shop environment, there are n jobs, denoted as J1, J2, ..., Jn, and m machines, denoted as M1, M2, ..., Mm. Each job Ji consists of several processes, and each process selects 1 to m machines from the m machines for processing. The j-th process of job Ji is denoted as Oij. S3. Divide FJSP into two sub-problems: the machine selection sub-problem used to determine the processing machine for each workpiece, and the process processing sequence sub-problem used to determine the processing sequence on each machine; The method is characterized in that it also includes the following steps: S4. Processing of machine selection sub-problem: In the data collected in step S1, the data used to solve the machine selection subproblem is encoded using the decision indicator DI encoding method, mapping the discrete machine selection sequence to the continuous solution space of the HHO algorithm; the selection decision of each process in the set of optional machines for that process is represented as a variable; after iterative solution through the HHO algorithm, the DI encoding is remapped back to the discrete machine selection sequence through decoding; S5. Processing sequence sub-problem: Among the data collected in step S1, the data used to solve the process processing sequence sub-problem is encoded using the operation sequence OS encoding method and co-evolved using genetic operators; S6, DI individual, OS individual combination and decoding into a scheduling plan: Adopting the idea of ​​swarm intelligence optimization, for the DIOS code corresponding to the FJSP solution: the DI code corresponding to the solution of the machine selection subproblem is called a DI individual, and the collection of DI individuals constitutes a DI population; the OS code corresponding to the solution of the process sequence subproblem is called an OS individual; the collection of OS individuals constitutes an OS population; one individual is selected from each of the DI population and the OS population to form a DIOS code; Calculate the maximum completion time Makespan of the DIOS code and decode it to obtain a complete scheduling plan; S7. Coevolution and screening: The DI population and OS population evolve together; after each iteration, the high-quality DIOS solutions are selected based on the fitness of the DIOS chromosome, and the inferior DIOS solutions are stored in the taboo table; S8. Result output and application: Output the optimal decoding; In step S4: The DI encoding method is to realize the transformation from continuous search space to discrete decision variables by expressing the selection decision of each process in its optional machine set as an indicator; The HHO algorithm is an improved HHO algorithm, and the improvement method is as follows: the HHO algorithm improves the control parameters of the exploration phase through Sine chaotic mapping to enhance the global search capability and convergence speed of the HHO algorithm; In step S5: The OS code is a sequence with a length equal to the total number of processes. The number of times each workpiece number appears in the sequence is equal to the number of processes. In step S4, for the DI encoding method: Define the set of all processes as {O11, O12, O21, O22, …, Oij, …}, where Oij represents the j-th process of the i-th job Ji; Define the set of optional machines corresponding to all processes as Machine Collection = {MC11, MC12, MC21, MC22, …, MCij, …}, where MCij represents the set of machines that can be selected for the j-th process of the i-th job Ji, and MCij = {x|x = the machine number selected for the j-th process of the i-th job Ji}; Define the maximum number of selectable machines array O_M_NUM = {N11, N12, N21, N22, ..., Nij, ...}, where Nij represents the total number of machines that can be selected for the j-th process of the i-th job Ji; The solution set of the machine selection subproblem is defined as {S11, S12, S21, S22, …, Sij, …}, where Sij represents the j-th process of the i-th job, which selects the machine numbered Sij, that is, selects the machine numbered MCij[Sij], and the machine number starts from 0; The length of the DI code is equal to the total number of processes; define DI[i] as the value of the DI code at the i-th position, corresponding to each corresponding process Oij in order; The DI coding rules are: The DI decoding rules are: In step S4, the improvement to the HHO algorithm is as follows: Firstly, the exploration phase of the HHO algorithm is improved by using Sine chaotic mapping; Introducing the Sine chaotic mapping value in the exploration phase of the HHO algorithm, the position update formula in the HHO global exploration phase is: Among them, s1~s4 are the chaotic numbers generated based on the Sine map in each iteration. X(t) is the current hawk position vector; Xrabbit(t) is the target position; r1, r2, r3 and r4 are random numbers in the range (0, 1) and are updated in each iteration; LB and UB are the lower and upper bounds of the variables, respectively; Xrand(t) is the position of a hawk randomly selected from the current population; Xmean is the average position of the current hawk population; q is a randomly generated parameter; Xmean represents the average position of the Harris hawk population; Xrabbit represents the position of the rabbit, which is the current global optimal solution; LB and UB are the lower and upper bounds of the search space of the HHO algorithm, respectively. Then, a nonlinear control parameter is used to balance the exploration phase with the exploitation phase; The nonlinear control parameters are defined as: Among them, parameter A is used to control the amplitude of the formula; parameters B and C control the time scale and decay rate respectively; parameter D represents the offset to ensure that there is still a certain exploration capability in the later iterations; t represents the current iteration to the tth generation; T is the total number of iterations, Then the escape energy formula changes to E=E0·P.

2. The flexible job shop scheduling method based on collaborative evolution improved HHO according to claim 1, Its characteristic is that in step S5, the genetic operator includes a partially ordered crossover POX operator and an exchange mutation operator, and for individuals in the OS population: The steps of the POX operator are as follows: first, select two parent individuals and randomly select a segment as the intersection region; then copy the intersection region of the first parent individual to the offspring individual; Finally, the remaining parts of the second parent individual are used to fill the offspring individuals to ensure no duplication and maintain partial order; The steps of the exchange mutation operator are: first randomly select two positions in the individual; then exchange the values ​​at these two positions to generate a new individual.

3. The flexible job shop scheduling method based on co-evolution improved HHO according to claim 1, characterized in that in step S7, after the DI population and the OS population co-evolve, elimination, supplementation and combination strategies are adopted to combine into a DIOS group corresponding to a solution of FJSP; After evaluating the fitness of the DIOS chromosome, the DIOS inferior solution is used to update the taboo table, and the DIOS superior solution is used in the DI population and OS population supplementation strategy to supplement the DI population and OS population to the POP_SIZE scale; After elimination and supplementation, the DI population and the OS population co-evolve again; The whole process is repeated until the termination condition is reached.

4. The flexible job shop scheduling method based on the collaborative evolution-improved HHO according to claim 3 is characterized in that in step S7, the method for evaluating the fitness of the DIOS chromosome is to obtain the completion time based on the process sequence. That is, assuming that the starting processing time of a process on a certain machine is start, the processing time is span, and the processing end time is end; the processes are inserted into the production queue one by one, and the steps include: Step 1: Initial processing of the process If the process has not been processed on the corresponding machine and it is the first process of the workpiece: Insert this process into the machine, Set start to 0 and end to span; Step 2: Subsequent process processing If the process has not been processed on the corresponding machine, but this process is not the first process: Get the end time last_end of the previous process of the workpiece; Set start to last_end and end to last_end+span; Step 3: Existing process If the process has been processed on the corresponding machine, then: Find an idle segment on the machine that meets the conditions, where the length of the idle segment is not less than the production time of the process on the machine; If the process is not the first process, the start time of the idle segment must not be less than the end time last_end of the previous process of the workpiece corresponding to this process.

5. The flexible job shop scheduling method based on collaborative evolution improved HHO according to claim 3 is characterized by In step S1, the job shop environment data includes machine information, job and process details, and process route data; Machine information includes: each machine's technical parameters, processing capabilities, availability and maintenance records; job and process details include: the specific requirements of each process, including the type of resources required, processing time and quality standards; organize process route data to clearly define all the processes and their sequence from start to finish for each job; The collected data will be cleaned, verified and standardized.

Citation Information

Patent Citations

  • Flexible job shop scheduling method based on improved grey wolf algorithm

    CN116090773A

  • Cloud computing task scheduling method of multi-strategy fusion improved Harris eagle algorithm

    CN118779116A