Multi-target flexible job shop scheduling method based on improved sparrow search algorithm
By improving the sparrow search algorithm, using harmonic vector coding and quantum multi-population initialization strategy, the initial solution randomness and local optimal problems of the scheduling problem in the flexible job shop are solved, the optimization of multi-objective scheduling is realized, and the flexible job shop is improved. production efficiency and equipment utilization.
Patent Information
- Application Number
- CN202410723521.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-08-30
AI Technical Summary
The traditional sparrow search algorithm's initial solution in flexible job shop scheduling is highly random and unbalanced, resulting in slow convergence and easy falling into local optimality, and it cannot effectively optimize completion time, product quality and equipment utilization.
Improve the sparrow search algorithm by introducing harmonic vector coding, quantum multi-population initial strategy and hierarchical sparrow search strategy, optimizing the scheduling model and objective function, combining quantum computing and gate mutation mechanism to improve the convergence speed of the algorithm and the optimization ability of the solution .
It achieves effective optimization of multi-objective scheduling problems in flexible job workshops, improves the optimal allocation of completion time, product quality and equipment utilization, and improves the feasibility and efficiency of scheduling solutions.
Smart Images

Figure CN118569747A
Abstract
Description
Technical Field
[0001] The invention patent relates to the field of production scheduling of flexible job shops, specifically a multi-objective flexible job shop scheduling method based on an improved sparrow search algorithm. Background Art
[0002] Flexible workshops can efficiently process orders of multiple varieties and small batches, and quickly respond to the diversification and personalization of market demand. In actual workshop production, scheduling plans must not only ensure the timely completion and delivery of production tasks, but also comprehensively consider product quality, equipment utilization, etc. Therefore, the present invention selects flexible workshops as the object, and studies the scheduling problem of flexible workshops from the perspectives of completion time, reducing tool changes to ensure product quality, and improving equipment utilization. The present invention lays the foundation for subsequent dynamic scheduling and has guiding significance for solving scheduling problems in actual production. Summary of the invention
[0003] The present invention aims at the shortcomings of the traditional sparrow search algorithm in flexible job shop scheduling, and proposes a multi-objective flexible job shop scheduling method based on the improved sparrow search algorithm. The present invention aims at the problems that the initial solution of the traditional sparrow search algorithm is highly random and unbalanced, resulting in slow convergence speed and easy to fall into local optimal in the late iteration. By improving the sparrow search algorithm, the method is used for flexible job shop scheduling, and can achieve optimal allocation of completion time, product quality and equipment utilization.
[0004] The technical solution of the present invention is a multi-objective flexible job shop scheduling method based on an improved sparrow search algorithm, the method comprising the following steps:
[0005] Step 1: Establish a flexible job shop production line scheduling model;
[0006] Step 1.1: Determine the constraint model;
[0007] According to the scene layout diagram and processing information table of the flexible job shop production line, determine the mathematical model based on the flexible job shop scheduling problem and the constraints based on the sequence and switching between processes, wherein the mathematical model includes the workpieces of the production line, the number of processes, and the location of each process;
[0008] Step 1.2: Determine the objective function of the scheduling problem in the flexible job shop;
[0009] A flexible job shop scheduling optimization model is established with the goal of minimizing the maximum completion time, minimizing the number of tool changes in the same task pool, and minimizing the idle rate of the production line; let n be the total number of workpieces, C i is the completion time of the i-th job, then the calculation formula for the maximum completion time is:
[0010]
[0011] Assume T is the production cycle of each task pool, M is the total number of machines, K is the total number of tools in the current machine, x j is a decision variable. When the tool does not meet the maximum number of processing times, x j = 0, when the tool meets the maximum number of processing times, x j =1, then the calculation formula for the number of tool changes in the same task pool is:
[0012]
[0013] Let S i is the time when the i-th workpiece starts processing, p ijm For process o ij The processing time on machine m, For process o ij If the process is performed on machine m, the variable value is 1, otherwise it is 0. i is the number of processes included in workpiece i, and the calculation formula for the idle rate of the production line is:
[0014]
[0015] Step 2: Create a task pool based on the existing order priorities and determine the order of workpieces added to the scheduling processing window;
[0016] Step 2.1: Split the orders according to their existing priorities, establish a task pool, and divide the overall scheduling problem in the flexible job shop into scheduling problems in several continuous intervals;
[0017] When splitting orders according to order priority, split the order with the highest priority at present; establish a task pool based on the split orders, and divide each week as the time dimension;
[0018] Step 2.2: Locate the split workpieces to the process dimension to determine the order of the workpieces added to the scheduling processing window; merge the split processes, add the processes to the scheduling processing window in turn, and determine the weekly scheduling plan;
[0019] Step 3: Take the objective function in step 1 as the fitness function, introduce the order priority task pool in step 2, design the solution steps based on the improved sparrow search algorithm, and solve the multi-objective flexible job shop scheduling problem;
[0020] Step 3.1: Determine the encoding method and decoding method, and generate a feasible scheduling plan;
[0021] Step 3.1.1: Introduce harmonic vector for encoding;
[0022] Step 3.1.2: Convert the continuous harmonic vector in the code into a discrete two-vector code;
[0023] Step 3.1.3: Decode the transformed dual-vector code and map it into a feasible scheduling scheme;
[0024] After active scheduling decoding of the dual-vector code, the scheduling scheme is obtained and the objective function value is calculated;
[0025] Step 3.2: Use the quantum multivariate population initial strategy to generate an initial population of n sparrow individuals;
[0026] Step 3.2.1: Improve the circle chaotic map and obtain the modified formula:
[0027]
[0028] Where y i is the current mapping value;
[0029] The formula for initializing the population is then:
[0030] x i,j =lb+(ub-lb)×y i
[0031] Where lb and ub are the lower and upper bounds of the search space respectively;
[0032] Step 3.2.2: Introduce quantum computing to the improved circle chaotic mapping, combine quantum computing with the quantum gate mutation mechanism, compare the mutated populations, and obtain the final initial population;
[0033] Quantum bits are used to construct individuals, that is, the probability amplitude is used to represent the position of each individual. The corresponding relationship between the quantum space position of the individual and the state matrix is:
[0034]
[0035] Where θ i,j is the rotation angle, x i,c is the cosine position, x i,s is the sinusoidal position;
[0036] Assuming that the current position is a sine position or a cosine position, the inverse transformation formula for restoring the rotation angle of the superposition state is:
[0037]
[0038] Another position is derived based on the rotation angle, and a linear transformation is used to establish a mapping relationship between the quantum space and the solution space for the individual quantum bits. The conversion formula is:
[0039]
[0040] These two positions constitute the two state bits of the initial qubit;
[0041] Perform mutation operation on the population, expressed as:
[0042]
[0043] In the formula
[0044] The update formula using the dynamic quantum revolving door is:
[0045]
[0046] Compare the individuals at the initial sine and cosine positions with the individuals at the sine and cosine positions after the quantum gate mutation, and select the best individuals as the final initial population;
[0047] Step 3.3: Randomly divide the initial population into producers and followers, accounting for 50% and 30% respectively, and calculate the fitness of all solutions;
[0048] Step 3.4: Iteratively update the producer, the formula is:
[0049]
[0050] α=rand(0,1)
[0051] In the formula, j = 1, 2, ..., d, d means that the individual sparrow has d dimensions of information, iter max Indicates the current maximum number of iterations, x i,j is the position information of the i-th sparrow in the j-th dimension, Q is a normal random number, R2∈(0,1] is the warning value, ST∈[0.5,1] is the safety value, L is a 1×d matrix, and all elements are 1;
[0052] Step 3.5: Introduce the hierarchical sparrow search strategy to update the population;
[0053] Step 3.5.1: Generate virtual individuals and select a virtual population of size N through the tournament method;
[0054] Step 3.5.2: Iteratively update the follower, the formula is:
[0055]
[0056] In the formula, VB b is the optimal position of the virtual individual, is the global worst position of the virtual individual at the sth iteration, A is a 1×d matrix, in which each element is randomly assigned a value of 1 or -1, and A + =A T (AA T ) -1 ,when When , the i-th follower is in a hungry state, and it will randomly fly to other places to find food; when When , it means that the follower is near the optimal position of the current population, with sufficient food resources and can forage nearby;
[0057] Step 3.6: Iteratively update the sentinel, the formula is:
[0058]
[0059] Where β is a random number that follows a standard normal distribution and K is a random number in the range of [-1,1]. i is the current sparrow’s fitness value, F g and F w are the optimal and worst fitness values of the current sparrow, respectively, and ε is a very small constant;
[0060] Step 3.7: Determine whether the current number of iterations s reaches the maximum number of iterations g; if so, execute step 3.8, otherwise, jump to step 3.4;
[0061] Step 3.8: Convert the individual position vectors of all sparrows in the updated population into feasible scheduling solutions through decoding, update the current two child populations, find the current optimal scheduling solution and output it as the optimal solution for the flexible job shop scheduling problem.
[0062] Furthermore, the constraint model is determined in step 1.1, and the specific method is as follows:
[0063] There are n workpieces to be processed in the flexible workshop, M processing machines, and each workpiece includes J i Each process is processed according to the specified process route. ij Can be processed on different machines with the same processing capacity;
[0064] The starting time and processing time of the workpiece should be less than the completion time:
[0065]
[0066] The end time of the previous process must be less than the start time of the next process:
[0067] c ijm ≤s ij+1m
[0068] Where c ijm Indicates process o ij Time to complete processing on machine m, s ij+1m Indicates process o ij+1 The time when processing starts on machine m;
[0069] Each workpiece's completion time should be before the total completion time:
[0070]
[0071] A machine can only produce one workpiece at a time:
[0072]
[0073] Furthermore, the harmonic vector is introduced in step 3.1.1 for encoding, and the specific method is as follows:
[0074] The harmonic vector X = {x(1), x(2), ..., x(n)} is an n-dimensional real vector, l is the number of all operations required, where n = 2l. The chromosome encoding scheme adopts a two-stage machine-process encoding design. The first stage of the encoding is the first half of the harmonic vector X X (1) = {x(1), x(2), ..., x(l)}, select the appropriate machine for each process; the second segment of the code is the second half of the harmonic vector X (2) ={x(l+1),x(l+2),...,x(2l)}, which is the order of operations on all machines;
[0075] Furthermore, in step 3.1.2, the continuous harmonic vector in the encoding is converted into a discrete two-vector code, and the specific method is as follows: the two-vector code consists of two vectors, one of which is the machine allocation vector MA={u(1),u(2),...,u(l)}, for u(j) in the vector, 1≤j≤l, indicating that process j selects machine u(j); let s(j) be the number of machines that can process process j, and convert the first half of the harmonic vector XX (1) The real number x(j)∈[-δ,δ] in is mapped to the integer u(j)∈[1,s(j)] and converted into the machine allocation vector MA, where δ is the number of workpieces; the conversion formula is:
[0076]
[0077] Where round(x) represents a function that rounds x to the nearest integer;
[0078] The second is the operation sequence vector OS = {v(1), v(2), ..., v(l)}. Using the maximum position value (LPV) rule, the position values of the operation sequence are sorted and corresponded one to one. The second half of the harmonic vector X (2) Convert to operation sequence vector OS;
[0079] Furthermore, in step 3.1.3, the transformed dual-vector code is decoded and mapped into a feasible scheduling scheme, and the specific method is as follows:
[0080] Active scheduling is used to decode the dual-vector code and shift the operation of the process to the left, transferring it to an earlier start time; let M k For the kth machine, [S x ,E x ] is the machine M k The idle time interval, o i,j is the jth process of workpiece i, p i,j,k for o i,j Processing time on machine k, c i,j For process o i,j Processing completion time; process o i,j Can be arranged on machine M k For processing, the following inequality needs to be satisfied in the time interval:
[0081]
[0082] If an available time interval is found, then process o i,j The start time S i,j for:
[0083]
[0084] If no available time interval is found, then ET is set k For machine M k Current end time, S i,j The setting formula is as follows:
[0085]
[0086] When all processing operations are scheduled, the maximum completion time f1 is calculated;
[0087] Furthermore, in step 3.5.1, virtual individuals are generated and a virtual population of size N is screened out through the tournament method, and the specific method is as follows:
[0088] First, virtual individuals are generated based on random producers, the current best position of producers, and the global optimal position. The generation formula of virtual individuals is:
[0089] α,β=rand(0.5)
[0090]
[0091] Where s is the current iteration number, They are random producers, best producer positions, and global optimal positions. For a virtual individual generated by three positions, the direction, distance and influence degree of the three positions to the virtual individual are adjusted by two coefficients, α and β;
[0092] After the virtual individuals are generated, the tournament method is used to screen the virtual individuals. The specific steps are as follows:
[0093] Individuals are randomly selected from them;
[0094] Evaluate the fitness of individuals;
[0095] Choose the winner;
[0096] The winner is replicated until the selected winner reaches the scale N;
[0097] Then, according to the hierarchical strategy, the entire update process is divided into four layers. The top layer is the random producer, the current best position of the producer, and the global optimal position. The middle layer is guided by the top layer to generate virtual individuals. The screening layer is composed of virtual individuals with a size of N left after the tournament method. The followers at the bottom layer are generated under the guidance of the remaining virtual individuals. BRIEF DESCRIPTION OF THE DRAWINGS
[0098] Figure 1 This is a schematic diagram of the production line scenario in a flexible workshop;
[0099] Figure 2 A schematic diagram illustrating the operation sequence vector;
[0100] Figure 3 It is a schematic diagram of the conversion from continuous harmonic vector to discrete dual-vector code;
[0101] Figure 4 This is a Gantt chart of exemplary scheduling results;
[0102] Figure 5 The present invention improves the flow chart of the sparrow search scheduling algorithm. DETAILED DESCRIPTION
[0103] The implementation of the present invention comprises the following steps:
[0104] Step 1: Establish a flexible job shop production line scheduling model;
[0105] Step 1.1: Determine the constraint model;
[0106] According to the scene layout diagram and processing information table of the flexible job shop production line, determine the mathematical model based on the flexible job shop scheduling problem and the constraints based on the sequence and switching between processes, wherein the mathematical model includes the workpieces of the production line, the number of processes, and the location of each process;
[0107] Therefore, it is assumed that there are a total of M processing machines in the flexible workshop, O orders, including J types of n workpieces to be processed, and they are processed according to the specified process route. ij Can be processed on different machines with the same processing capacity;
[0108] The order priorities are divided into SR, R, and LR from urgent to minor. The order task table is shown in Table 1, and the workpiece processing information table is shown in Table 2, where T represents the delivery cycle and L represents the processing quantity;
[0109] Table 1 Order Task Table
[0110]
[0111] Table 2 Workpiece processing information
[0112]
[0113]
[0114]
[0115] The following constraints are set for flexible job shop workpiece processing:
[0116] The starting time and processing time of the workpiece should be less than the completion time:
[0117]
[0118] The end time of the previous process must be less than the start time of the next process:
[0119] c ijm ≤s ij+1m
[0120] Where c ijm Indicates process o ij Time to complete processing on machine m, s ij+1m Indicates process o ij+1 The time when processing starts on machine m;
[0121] Each workpiece's completion time should be before the total completion time:
[0122]
[0123] A machine can only produce one workpiece at a time:
[0124]
[0125] Step 1.2: Determine the objective function of the scheduling problem in the flexible job shop;
[0126] A flexible job shop scheduling optimization model is established with the goal of minimizing the maximum completion time, minimizing the number of tool changes in the same task pool, and minimizing the idle rate of the production line; let n be the total number of workpieces, C i is the completion time of the i-th job, then the calculation formula for the maximum completion time is:
[0127]
[0128] Assume T is the production cycle of each task pool, M is the total number of machines, K is the total number of tools in the current machine, x j is a decision variable. When the tool does not meet the maximum number of processing times, x j = 0, when the tool meets the maximum number of processing times, x j =1, then the calculation formula for the number of tool changes in the same task pool is:
[0129]
[0130] Let S i is the time when the i-th workpiece starts processing, p ijm For process o ij The processing time on machine m, For process o ij If the process is performed on machine m, the variable value is 1, otherwise it is 0. i is the number of processes included in workpiece i, and the calculation formula for the idle rate of the production line is:
[0131]
[0132] Step 2: Create a task pool based on the existing order priorities and determine the order of workpieces added to the scheduling processing window;
[0133] Step 2.1: Split the orders according to their existing priorities, establish a task pool, and divide the overall scheduling problem in the flexible job shop into scheduling problems in several continuous intervals;
[0134] When splitting orders according to order priority, split the order with the highest priority at present; establish a task pool based on the split orders, and divide each week as the time dimension;
[0135] Step 2.2: Locate the split workpieces to the process dimension to determine the order of the workpieces added to the scheduling processing window; merge the split processes, add the processes to the scheduling processing window in turn, and determine the weekly scheduling plan;
[0136] Step 3: Take the objective function in step 1 as the fitness function, introduce the order priority task pool in step 2, design the solution steps based on the improved sparrow search algorithm, and solve the multi-objective flexible job shop scheduling problem;
[0137] Step 3.1: Determine the encoding method and decoding method, and generate a feasible scheduling plan;
[0138] Step 3.1.1: Introduce harmonic vector for encoding;
[0139] The harmonic vector X = {x(1), x(2), ..., x(n)} is an n-dimensional real vector, l is the number of all operations required, where n = 2l. The chromosome encoding scheme adopts a two-stage machine-process encoding design. The first stage of the encoding is the first half of the harmonic vector X X (1) = {x(1), x(2), ..., x(l)}, select the appropriate machine for each process; the second segment of the code is the second half of the harmonic vector X (2) ={x(l+1),x(l+2),...,x(2l)}, which is the order of operations on all machines;
[0140] Step 3.1.2: Convert the continuous harmonic vector in the code into a discrete two-vector code;
[0141] The two-vector code consists of two vectors, one of which is the machine allocation vector MA = {u(1), u(2), ..., u(l)}. For u(j) in the vector, 1≤j≤l, indicating that process j selects machine u(j); let s(j) be the number of machines that can process process j, and the first half of the harmonic vector X is X (1) The real number x(j)∈[-δ,δ] in is mapped to the integer u(j)∈[1,s(j)] and converted into the machine allocation vector MA, where δ is the number of workpieces; the conversion formula is:
[0142]
[0143] Where round(x) represents a function that rounds x to the nearest integer;
[0144] The second is the operation sequence vector OS = {v(1), v(2), ..., v(l)}. Using the maximum position value (LPV) rule, the position values of the operation sequence are sorted and corresponded one to one. The second half of the harmonic vector X (2) Convert to operation sequence vector OS;
[0145] Step 3.1.3: Decode the transformed dual-vector code and map it into a feasible scheduling scheme;
[0146] Active scheduling is used to decode the dual-vector code and shift the operation of the process to the left, transferring it to an earlier start time; let M k For the kth machine, [S x ,E x ] is the machine M k The idle time interval, o i,j is the jth process of workpiece i, p i,j,k for o i,j Processing time on machine k, c i,j For process o i,j Processing completion time; process o i,j Can be arranged on machine M k For processing, the following inequality needs to be satisfied in the time interval:
[0147]
[0148] If an available time interval is found, then process o i,j The start time S i,j for:
[0149]
[0150] If no available time interval is found, then ET is set k For machine M k Current end time, S i,j The setting formula is as follows:
[0151]
[0152] When all processing operations are scheduled, the maximum completion time f1 is calculated;
[0153] After active scheduling decoding of the dual-vector code, the scheduling scheme is obtained and the objective function value is calculated;
[0154] Step 3.2: Use the quantum multivariate population initial strategy to generate an initial population of n sparrow individuals;
[0155] Step 3.2.1: Improve the circle chaotic map and obtain the modified formula:
[0156]
[0157] Where y i is the current mapping value;
[0158] The formula for initializing the population is then:
[0159] x i,j =lb+(ub-lb)×y i
[0160] Where lb and ub are the lower and upper bounds of the search space respectively;
[0161] Step 3.2.2: Introduce quantum computing to the improved circle chaotic mapping, combine quantum computing with the quantum gate mutation mechanism, compare the mutated populations, and obtain the final initial population;
[0162] Quantum bits are used to construct individuals, that is, the probability amplitude is used to represent the position of each individual. The corresponding relationship between the quantum space position of the individual and the state matrix is:
[0163]
[0164] Where θ i,j is the rotation angle, x i,c is the cosine position, x i,s is the sinusoidal position;
[0165] Assuming that the current position is a sine position or a cosine position, the inverse transformation formula for restoring the rotation angle of the superposition state is:
[0166]
[0167] Another position is derived based on the rotation angle, and a linear transformation is used to establish a mapping relationship between the quantum space and the solution space for the individual quantum bits. The conversion formula is:
[0168]
[0169] These two positions constitute the two state bits of the initial qubit;
[0170] Perform mutation operation on the population, expressed as:
[0171]
[0172] In the formula
[0173] The update formula using the dynamic quantum revolving door is:
[0174]
[0175] Compare the individuals at the initial sine and cosine positions with the individuals at the sine and cosine positions after the quantum gate mutation, and select the best individuals as the final initial population;
[0176] Step 3.3: Randomly divide the initial population into producers and followers, accounting for 50% and 30% respectively, and calculate the fitness of all solutions;
[0177] Step 3.4: Iteratively update the producer, the formula is:
[0178]
[0179] α=rand(0,1)
[0180] In the formula, j = 1, 2, ..., d, d means that the individual sparrow has d dimensions of information, iter max Indicates the current maximum number of iterations, x i,j is the position information of the i-th sparrow in the j-th dimension, Q is a normal random number, R2∈(0,1] is the warning value, ST∈[0.5,1] is the safety value, L is a 1×d matrix, and all elements are 1;
[0181] Step 3.5: Introduce the hierarchical sparrow search strategy to update the population;
[0182] Step 3.5.1: Generate virtual individuals and select a virtual population of size N through the tournament method;
[0183] First, virtual individuals are generated based on random producers, the current best position of producers, and the global optimal position. The generation formula of virtual individuals is:
[0184] α,β=rand(0.5)
[0185]
[0186] Where s is the current iteration number, They are random producers, best producer positions, and global optimal positions. For a virtual individual generated by three positions, the direction, distance and influence degree of the three positions to the virtual individual are adjusted by two coefficients, α and β;
[0187] After the virtual individuals are generated, the tournament method is used to screen the virtual individuals. The specific steps are as follows:
[0188] Individuals are randomly selected from them;
[0189] Evaluate the fitness of individuals;
[0190] Choose the winner;
[0191] The winner is replicated until the selected winner reaches the scale N;
[0192] Then, according to the hierarchical strategy, the entire update process is divided into four layers. The top layer is the random producer, the current best position of the producer, and the global optimal position. The middle layer is guided by the top layer to generate virtual individuals. The screening layer is composed of virtual individuals with a size of N left after the tournament method. The followers at the bottom layer are generated under the guidance of the remaining virtual individuals.
[0193] Step 3.5.2: Iteratively update the follower, the formula is:
[0194]
[0195] In the formula, VB b is the optimal position of the virtual individual, is the global worst position of the virtual individual at the sth iteration, A is a 1×d matrix, in which each element is randomly assigned a value of 1 or -1, and A + =A T (AA T ) -1 ,when When , the i-th follower is in a hungry state, and it will randomly fly to other places to find food; when When , it means that the follower is near the optimal position of the current population, with sufficient food resources and can forage nearby;
[0196] Step 3.6: Iteratively update the sentinel, the formula is:
[0197]
[0198] Where β is a random number that follows a standard normal distribution and K is a random number in the range of [-1,1]. i is the current sparrow’s fitness value, F g and F w are the optimal and worst fitness values of the current sparrow, respectively, and ε is a very small constant;
[0199] Step 3.7: Determine whether the current number of iterations s reaches the maximum number of iterations g; if so, execute step 3.8, otherwise, jump to step 3.4;
[0200] Step 3.8: Convert the individual position vectors of all sparrows in the updated population into feasible scheduling solutions through decoding, update the current two child populations, find the current optimal scheduling solution and output it as the optimal solution for the flexible job shop scheduling problem.
Claims
1. A multi-objective flexible job shop scheduling method based on an improved sparrow search algorithm, characterized in that: include: Step 1: Establish a flexible job shop production line scheduling model; Step 1.1: Determine the constraint model; According to the scene layout diagram and processing information table of the flexible job shop production line, determine the mathematical model based on the flexible job shop scheduling problem and the constraints based on the sequence and switching between processes, wherein the mathematical model includes the workpieces of the production line, the number of processes, and the location of each process; Step 1.2: Determine the objective function of the scheduling problem in the flexible job shop; A flexible job shop scheduling optimization model is established with the goal of minimizing the maximum completion time, minimizing the number of tool changes in the same task pool, and minimizing the idle rate of the production line; let n be the total number of workpieces, C i is the completion time of the i-th job, then the calculation formula for the maximum completion time f1 is: Assume T is the production cycle of each task pool, M is the total number of machines, K is the total number of tools in the current machine, x j is a decision variable. When the tool does not meet the maximum number of processing times, x j =0, when the tool meets the maximum number of processing times x j =1, then the calculation formula for the number of tool changes f2 in the same task pool is: Let S i is the time when the i-th workpiece starts processing, p ijm For process o ij Processing time on machine m, operation o i,j is the j-th process of workpiece i, For process o ij If the process is performed on machine m, the variable value is 1, otherwise it is 0. i is the number of processes included in workpiece i, and the calculation formula for the production line idle rate f3 is: Step 2: Create a task pool based on the existing order priorities and determine the order of workpieces added to the scheduling processing window; Step 2.1: Split the orders according to their existing priorities, establish a task pool, and divide the overall scheduling problem in the flexible job shop into scheduling problems in several continuous intervals; When splitting orders according to order priority, split the order with the highest priority at present; establish a task pool based on the split orders, and divide each week as the time dimension; Step 2.2: Locate the split workpieces to the process dimension to determine the order of the workpieces added to the scheduling processing window; Merge the split processes, add the processes into the scheduling processing window one by one, and determine the weekly scheduling plan; Step 3: Take the objective function in step 1 as the fitness function, introduce the order priority task pool in step 2, design the solution steps based on the improved sparrow search algorithm, and solve the multi-objective flexible job shop scheduling problem; Step 3.1: Determine the encoding method and decoding method, and generate a feasible scheduling plan; Step 3.1.1: Encoding using harmonic vectors; Step 3.1.2: Convert the continuous harmonic vector in the code into a discrete two-vector code; Step 3.1.3: Decode the transformed dual-vector code and map it into a scheduling scheme; After active scheduling decoding of the dual-vector code, the scheduling scheme is obtained and the objective function value is calculated; Step 3.2: Use the quantum multivariate population initial strategy to generate an initial population of n sparrow individuals; Step 3.2.1: Use the following improved circle chaos mapping for mapping: Where y i is the current mapping value in the i-th iteration, y i+1 is the current mapping value after the i+1th iteration; The formula for initializing the population is then: x i,j =lb+(ub-lb)×y i Where lb and ub are the lower and upper bounds of the search space respectively; Step 3.2.2: Introduce quantum computing to the improved circle chaotic mapping, combine quantum computing with the quantum gate mutation mechanism, compare the mutated populations, and obtain the final initial population; Quantum bits are used to construct individuals, that is, the probability amplitude is used to represent the position of each individual. The corresponding relationship between the quantum space position of the individual and the state matrix is: Where θ i,j is the rotation angle of the jth iteration of the ith individual, x i,c is the cosine position of the ith individual, x i,s is the sinusoidal position of the i-th individual; Assuming that the current position is a cosine position or a sine position, the inverse transformation formula for restoring the rotation angle of the superposition state is: θ c ,θ s is the rotation angle when restoring the superposition state corresponding to the cosine position or sine position; Another position is derived based on the rotation angle, and a linear transformation is used to establish a mapping relationship between the quantum space and the solution space for the individual quantum bits. The conversion formula is: x c is the cosine position of the current individual, x s is the sinusoidal position of the current individual, and these two positions constitute the two state bits of the initial quantum bit; Perform mutation operation on the population, expressed as: In the formula, θ r is the rotation angle, R(θ r ) is a quantum rotating gate, which is a 2×2 unitary matrix. The update formula using the dynamic quantum revolving door is: θ′ represents the updated quantum bit state vector. The individuals at the initial sine and cosine positions are compared with the individuals at the sine and cosine positions after the quantum gate mutation, and the best individuals are selected as the final initial population. Step 3.3: Randomly divide the initial population into producers and followers, accounting for 50% and 30% respectively, and calculate the fitness of all solutions; Step 3.4: Iteratively update the producer, the formula is: α=rand(0,1) Where s is the current iteration number, j = 1, 2, ..., d, d means that the sparrow individual has d dimensions of information, X i,j is the position information of the i-th sparrow in the j-th dimension, is the producer of the s+1th iteration after the update, iter max represents the current maximum number of iterations, Q is a normal random number, R2∈(0,1] is the warning value, ST∈[0.5,1] is the safety value, L is a 1×d matrix, and all elements are 1; Step 3.5: Introduce the hierarchical sparrow search strategy to update the population; Step 3.5.1: Generate virtual individuals and select a virtual population of size N through the tournament method; Step 3.5.2: Iteratively update the follower, the formula is: In the formula, VB b is the optimal position of the virtual individual, is the global worst position of the virtual individual at the sth iteration, A is a 1×d matrix, in which each element is randomly assigned a value of 1 or -1, and A + =A T (AA T ) -1 ,when When , the i-th follower is in a hungry state and will randomly fly to other places; when When , it means that the follower is near the optimal position of the current population; Step 3.6: Iteratively update the sentinel, the formula is: In the formula, is the current global optimal position at the sth iteration, is the current global worst position at the sth iteration, β is a random number that follows a standard normal distribution for step size control, K is a random number in the range of [-1,1], and F i is the current sparrow’s fitness value, F g and F w are the optimal and worst fitness values of the current sparrow, respectively, and ε is a constant; Step 3.7: Determine whether the current number of iterations s reaches the maximum number of iterations g; if so, execute step 3.8, otherwise, jump to step 3.4; Step 3.8: Convert the individual position vectors of all sparrows in the updated population into feasible scheduling solutions through decoding, update the current two child populations, find the current optimal scheduling solution and output it as the optimal solution for the flexible job shop scheduling problem.
2. The multi-objective flexible job shop scheduling method based on the improved sparrow search algorithm according to claim 1 is characterized in that: The specific method for determining the constraint model in step 1.1 includes: There are n workpieces to be processed in the flexible workshop, M processing machines, and each workpiece includes J i Each process is processed according to the specified process route. ij Can be processed on different machines with the same processing capacity; The starting time and processing time of the workpiece should be less than the completion time: The end time of the previous process must be less than the start time of the next process: c ijm ≤s ij+1m Where c ijm Indicates process o ij Time to complete processing on machine m, s ij+1m Indicates process o ij+1 The time when processing starts on machine m; Each workpiece's completion time should be before the total completion time: A machine can only produce one workpiece at a time:
3. The multi-objective flexible job shop scheduling method based on the improved sparrow search algorithm according to claim 1 is characterized in that: The specific method of using harmonic vectors for encoding in step 3.1.1 is: The harmonic vector X = {x(1), x(2), ..., x(n)} is an n-dimensional real vector, l is the number of all operations required, where n = 2l. The chromosome encoding scheme adopts a two-stage machine-process encoding design. The first stage of the encoding is the first half of the harmonic vector X X (1) = {x(1), x(2), ..., x(l)}, select the appropriate machine for each process; the second segment of the code is the second half of the harmonic vector X (2) ={x(l+1),x(l+2),...,x(2l)}, which is the order of operations on all machines.
4. The multi-objective flexible job shop scheduling method based on the improved sparrow search algorithm according to claim 1 is characterized in that: The specific method of converting the continuous harmonic vector in the encoding into a discrete two-vector code in step 3.1.2 is: The two-vector code consists of two vectors, one of which is the machine allocation vector MA = {u(1), u(2), ..., u(l)}. For u(j) in the vector, 1≤j≤l, indicating that process j selects machine u(j); let s(j) be the number of machines that can process process j, and the first half of the harmonic vector X is X (1) The real number x(j)∈[-δ,δ] in is mapped to the integer u(j)∈[1,s(j)] and converted into the machine allocation vector MA, where δ is the number of workpieces; the conversion formula is: Where round(x) represents a function that rounds x to the nearest integer; The second is the operation sequence vector OS = {v(1), v(2), ..., v(l)}, where v(1), v(2), ..., v(l) is the operation sequence corresponding to each process number. The maximum position value LPV rule is used to sort the position values of the operation sequence and correspond them one by one. The second half of the harmonic vector X (2) Convert to an operation sequence vector OS.
5. The multi-objective flexible job shop scheduling method based on the improved sparrow search algorithm according to claim 1 is characterized in that: The specific method of decoding the transformed dual-vector code in step 3.1.3 and mapping it into a feasible scheduling solution includes: Active scheduling is used to decode the dual-vector code and shift the operation of the process to the left, transferring it to an earlier start time; let M k For the kth machine, [S x ,E x ] is the machine M k The idle time interval, S x Indicates the idle start time, E x Indicates the idle end time, p i,j,k for o i,j Processing time on machine k, c i,j For process o i,j Processing completion time; process o i,j Can be arranged on machine M k For processing, the following inequality needs to be satisfied in the time interval: If an available time interval is found, then process o i,j The start time S i,j for: If no available time interval is found, then ET is set k For machine M k Current end time, S i,j The setting formula is as follows: When all processing operations are scheduled, the maximum completion time f1 is calculated.
6. The multi-objective flexible job shop scheduling method based on the improved sparrow search algorithm according to claim 1 is characterized in that: The specific method of generating virtual individuals in step 3.5.1 and screening out a virtual population of size N through the tournament method is as follows: First, virtual individuals are generated based on random producers, the current best position of producers, and the global optimal position. The generation formula of virtual individuals is: α,β=rand(0.5) Where s is the current iteration number, They are random producers, best producer positions, and global optimal positions. For a virtual individual generated by three positions, the direction, distance and influence degree of the three positions to the virtual individual are adjusted by two coefficients, α and β; After the virtual individuals are generated, the tournament method is used to screen the virtual individuals. The specific steps are as follows: S1: randomly select individuals from them; S2: Evaluate the fitness of individuals; S3: Select the winner; S4: Duplicate the winner until the selected winner reaches the scale N; Then, according to the hierarchical strategy, the entire update process is divided into four layers. The top layer is the random producer, the current best position of the producer, and the global optimal position. The middle layer is guided by the top layer to generate virtual individuals. The screening layer is composed of virtual individuals with a size of N left after the tournament method. The followers at the bottom layer are generated under the guidance of the remaining virtual individuals.
Citation Information
Cited By
Multi-device fault scheduling method and device for sound control system, equipment and medium
CN119476654A
