Flexible workshop production scheduling method based on unreliable degraded machine model

By constructing the Markov system model based on unreliable degraded machine model and finite buffers and optimizing the processing time and sequence of workpieces using genetic algorithms, the problem of low production scheduling efficiency is solved and efficient and flexible production scheduling is achieved. , meets the needs of small batch production.

CN119005551APending Publication Date: 2024-11-22BEIJING INST OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410845170.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In the face of unreliable degraded machines and limited buffers, existing production scheduling methods are difficult to effectively improve production efficiency and flexibility, resulting in slow production speed and unable to meet the personalized needs of small batch production.

Method used

Using a flexible workshop production scheduling method based on unreliable degradation machine model, the Markov system model and genetic algorithm are constructed to optimize the processing time and order of workpieces in different processing workshops, realize the optimal scheduling strategy, and improve the accuracy of production scheduling and efficiency.

Benefits of technology

It significantly improves production efficiency, reduces production costs, shortens delivery cycles, meets customers' personalized and customized needs, and improves the reliability and stability of the production system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005551A_ABST
    Figure CN119005551A_ABST
Patent Text Reader

Abstract

The invention discloses a flexible workshop production scheduling method based on an unreliable degraded machine model, and belongs to the field of production analysis and optimal scheduling. The implementation method comprises the following steps: carrying out system modeling on a flexible job shop consisting of unreliable degradation machines with buffer areas, accurately calculating the processing time of processed workpieces on the degradation machines on the basis of modeling, and planning the processing sequence in the flexible job shop to obtain the shortest completion time. According to the method, the Bernoulli machine is replaced by the degraded machine, the flexible job shop is formed, and the method has the advantages of high prediction precision and high efficiency. According to the method, each double-machine single-buffer-area system is used as a unit machining workshop, the machining time of different processes of various workpieces in different machining workshops is predicted, and after all the machining time is obtained, multi-type and multi-process flexible job shop small-batch production scheduling is carried out according to the genetic algorithm, so that the production efficiency is improved. The production efficiency and accuracy are improved, and time and production energy are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a flexible workshop production scheduling method based on an unreliable degraded machine model, and belongs to the field of production analysis and optimization scheduling. Background Art

[0002] Production scheduling is an important part of the manufacturing system, which directly affects the efficiency and competitiveness of enterprises. With the continuous development of science and technology and the continuous improvement of the manufacturing level, the efficiency of machine production needs to be solved urgently. The job shop problem has attracted the attention of a large number of scholars and researchers with its characteristics of maximizing production efficiency, reducing production costs, shortening delivery cycles, and ensuring flexibility and controllability in the production process.

[0003] In the classic scheduling model, it is assumed that the processing machine always maintains a certain processing efficiency. However, due to complex environmental conditions, many machines and material handling equipment in the production system will inevitably fail. At the same time, small batch production is widely used in today's production environment. Small batch production can meet the personalized and customized needs of customers and improve customer satisfaction and loyalty. At the same time, small batch production can quickly innovate and maintain the market competitiveness of enterprises.

[0004] Therefore, the present invention proposes a machining workshop model consisting of degenerate machines and limited buffer zones, which ensures that the selected performance indicators are optimal and significantly improves the company's economic benefits by completing machining tasks under limited resources and various constraints and determining the processing time and sequence of workpieces on various equipment. Summary of the invention

[0005] In order to solve the problem of slow production speed caused by existing scheduling problems, the purpose of the present invention is to provide a flexible workshop production scheduling method based on an unreliable degraded machine model; the method: ① replace Bernoulli machines with degraded machines to form a flexible job shop, realize the modeling of a dual-machine single buffer system containing unreliable degraded machines, and predict the completion time based on the modeling of the dual-machine single buffer system. ② take each dual-machine single buffer system as a unit processing workshop, use genetic algorithms to solve the small-batch production scheduling problem of flexible job shops with multiple types and processes, and improve the accuracy and efficiency of production scheduling.

[0006] The purpose of the present invention is achieved through the following technical solutions.

[0007] The flexible workshop production scheduling method of the degenerate machine model disclosed in the present invention adopts the Markov method to construct the system model of the system composed of two machines in each processing workshop, obtains the distribution of the probability of each state changing with time by obtaining the state transfer matrix, and thus obtains the completion time required for each process of each workpiece in different processing workshops. The present invention will use genetic algorithms for scheduling optimization, so that each workpiece can obtain the optimal scheduling strategy under the processing constraints of different processing workshops, thereby improving the accuracy and efficiency of production scheduling.

[0008] The flexible workshop production scheduling method based on the unreliable degraded machine model disclosed in the present invention comprises the following steps:

[0009] Step 1: Model a system consisting of multiple unreliable degraded machine workshops with buffers; system modeling includes designing parameters of each part of the system and setting the state of the degraded machines; the parameters of each part of the system include production structure parameters m i,j , b i , Q q OP p ; Genetic algorithm parameters N_size, count, p_count, pm and workpiece processing cycle parameters τ, C l ; The degraded machine state includes the degraded machine operation state, the degraded machine failure state and the degradation probability parameter matrix p_state i,j ;

[0010] Step 1.1: Set the parameters of the genetic algorithm; set the population size, number of population iterations, crossover probability and mutation probability;

[0011] The population size is set to N_size, the number of population iterations is set to count, the crossover probability is set to p_count, and the mutation probability is set to pm;

[0012] Step 1.2: Initialize the production structure of the flexible job shop;

[0013] There are M processing workshops in the system, each of which consists of 2 degenerate machines and 1 buffer zone; the degenerate machine consists of m i,j Indicates, where i = 1, 2, ..., M; j = 1, 2; the buffer is represented by b i Indicates that the maximum number of workpieces that the buffer can accommodate is recorded as N i , where i = 1, 2, ..., M, N i ∈(0,∞); there are Q types of workpieces to be processed, and each type has OP processes;

[0014] Step 1.3: Determine the system processing cycle;

[0015] Each processing workshop has the same processing cycle τ, and different processing workshops have different cycle mapping coefficients C l ;In each processing workshop, the time axis is segmented based on the processing cycle τ;

[0016] Step 1.4: Determine the operating status of the degraded machine;

[0017] The degraded machine has a total of W operating states, denoted by D w , where w = 1, 2, ..., l ..., W, and the degraded machine has a fault state D f ; The best operating state is D1; ​​The degraded machine is in operating state D l After completing one processing, at the beginning of the next processing cycle, the fixed probability is maintained at D l state, or degrade to the next worse state D l+1 , or degrade to the fault state D with a fixed probability f ;

[0018] Step 1.5: Determine the fault state of the degraded machine;

[0019] When the machine is in a fault state during a certain processing cycle f , the processed part fails; at the same time, at the beginning of the next processing cycle, it returns to the optimal state D1 with a fixed probability, or remains in the fault state D f ;

[0020] Step 1.6: Determine the state degradation parameters of the degraded machine;

[0021] With p l,k Denotes a degraded machine from state D l Change to state D k The probability that the machine is in state D l When p l,l +p l,l+1 +p l,f =1; that is, the machine remains in state D in the next processing cycle l The probability p l,l , degenerate to the next state D l+1 The probability p l,l+1 and degrades to the fault state D f The probability p l,f The sum is 1; when the machine is in state D f When p f,1 +p f,f =1, that is, the machine remains in the fault state D in the next processing cycle f The probability p f,f, the sum of the probabilities of returning to the optimal state D1 is 1; and the worse the state of the machine is, the greater the probability that the machine will degenerate to a fault state in the next cycle, that is, the machine will degenerate from state D to a fault state in the next processing cycle. l Degraded to state D f The probability p l,f Less than the machine in the next processing cycle from state D l+1 Degraded to state D f The probability p l+1,f ; Each degraded machine follows a certain degradation probability parameter matrix p_state i,j , where i = 1, 2, ..., M; j = 1, 2; the degradation probability parameter matrix is ​​expressed as:

[0022]

[0023] Step 1.7: Determine the starvation state of the degraded machine;

[0024] Before a certain processing cycle begins, if the degraded machine m i,j The previous buffer b i,j-1 There are no parts to be processed, and the degraded machine is in running state during the current processing cycle D w , w=1,2,…,W, then the degenerate machine is in a starving state during the processing cycle; the first machine will never be in a starving state;

[0025] Step 1.8: Determine the blocking state of the degraded machine;

[0026] At the beginning of a certain processing cycle, if the degraded machine m i,j Buffer b afterwards i,j N is already stored in i,j workpieces, and the current degraded machine is in running state D w , w=1,2,…,W, the next machine is in the fault state and running state D f ; then the machine is in a blocked state in the current processing cycle, and the last machine will never be in a blocked state.

[0027] Step 2: Constrain the processing mode of the flexible job shop and determine the production sequence; the processing mode constraints include resource occupancy constraints between different workpieces, process constraints between different processes of the same workpiece, and technical constraints of the workshops that can process the workpiece; the production sequence is the processing sequence of each process of each workpiece;

[0028] Step 2.1: Determine the production sequence;

[0029] The process of the workpiece is predetermined. Each process can be processed on multiple different processing workshops. The processing time of the process varies with the performance of the processing workshop. Each processing workpiece requires processing B q , q represents the type of workpiece to be processed; and each type of workpiece to be processed has OP p process, q=1,2,…,i…,Q,p=1,2,…,j…,OP;when the Qth process i OP of class artifact j Select the Mth process l When processing in a processing workshop, all B q Processing of workpieces;

[0030] Step 2.1: Determine the production sequence;

[0031] The process of the workpiece is predetermined. Each process can be processed on multiple different processing workshops. The processing time of the process varies with the performance of the processing workshop. Each processing workpiece requires processing B q , q represents the type of workpiece to be processed; and each type of workpiece to be processed has OP p process, q=1,2,…,i…,Q,p=1,2,…,j…,OP;when the Qth process i OP of class artifact j Select the Mth process l When processing in a processing workshop, all B q Processing of workpieces;

[0032] Step 2.2: Determine resource occupancy constraints;

[0033] Let c w,l ,t w,l Indicates that the w-th workpiece is in the Mth l The end time and start time of processing in a processing workshop; for two types of workpieces Q w and Q v , w=1,2,…,Q,v=1,2,…,Q,w≠v;If both types of workpieces need to be processed in workshop M l Processing is performed on w Before Q v Processing should satisfy the constraint c v,l -c w,l ≥t w,l On the contrary, if Q v Before Q w Processing should satisfy the constraint c w,l -c v,l ≥t v,l ; There is no processing priority between different types of workpieces;

[0034] Step 2.3: Determine process constraints;

[0035] For different processes of the same workpiece Q w,h and Q w,k , w=1,2,…,Q, h=1,2,…,OP h , k=1,2,…,OP k , h≠k; if process Q w,h In process Q w,k Before processing, there is a constraint c w,h ≤t w,k On the contrary, if process Q w,k In process Q w,h Before processing, there is a constraint c w,k ≤t w,h ;

[0036] Step 2.4: Identify technical constraints;

[0037] For a certain process Q of a certain workpiece w,h , w=1,2,…,Q, h=1,2,…,OP h , it is allowed that there are constraints, so that the process can only be processed in a few fixed processing workshops, denoted by a q,p,l is the indicator coefficient, and its meaning is:

[0038]

[0039] Step 3: When the number of workpieces to be processed for each type of workpiece is determined, determine the total number of states S of the processing workshop consisting of two machines and a single buffer;

[0040] The number of workpieces of the qth type to be processed is B q , q=1,2,…,Q, in the processing workshop M l Processing is performed on the machine; the state number is calculated according to the following formula

[0041]

[0042] Step 4: Define the processing workshop M according to the production structure parameters of step 1, combined with the processing mode constraints defined in step 2 and the total number of states S defined in step 3. l In processing Q q OP of class artifact p The status of the system model of each processing cycle during the process;

[0043] Under the constraints of step 2, To indicate that in the nth processing cycle, the processing workshop M l In processing Qq OP of class artifact p During the process, the system model is in a state among states;

[0044] s l,1 (n) and s l,2 (n) represents the processing workshop M l The degradation state of the first and second machines in the nth processing cycle, s l,1 (n)=D1,D2,…,D w ,D f ;s l,2 (n)=D1,D2,…,D w ,D f ; After the last machine m in each processing workshop i,j A processed workpiece is defined as a workpiece that has been processed. l,2 (n) represents the processing workshop M l The second machine m i,2 The number of workpieces processed, f l,2 (n)=0,1,…,B q ;

[0045] h l (n) represents the processing workshop M l The first machine completes the processing and puts the workpiece into buffer b l The number of l (n)=0,1,…,N l ; It is assumed that the processing workshop is in the initial state of (D1, D1, 0, 0) every time it starts processing workpieces of various types and processes, that is, in the processing cycle n, the first degraded machine m l,1 and the second degenerate machine m l,2 The status of both machines is D1. The second machine has processed 0 workpieces and there are 0 workpieces in the buffer.

[0046] After completing the processing of the last workpiece, the system is in (s l,1 (n), s l,2 (n), B q ,0) state,s l,1 (n)=D1,D2,…,D w ,D f ;s l,2 (n)=D1,D2,…,D w ,D f ;

[0047] Step 5: Define the unreachable state of the system;

[0048] In the initial state (D1, D1, 0, 0), the processing workshop M l The two machines are in the best state, and machine 1 will not be in a faulty state during this processing cycle; when the buffer stores a workpiece, that is, the processing workshop M l In (s l,1 (n), D1, 0, 1) state, machine 2 will not be in a fault state during this processing cycle; therefore, each processing workshop M l The unreachable state is expressed as:

[0049]

[0050] Step 6: Based on the state of the system model of each processing cycle obtained in step 4 and excluding the unreachable state in step 5, the degradation probability parameter matrix p_state i,j Calculate the probability of state transition in the next processing cycle;

[0051] If the processing workshop M l The state in processing cycle n This is the initial state defined in step 5; the transition probability follows the following formula:

[0052]

[0053] Where a represents the next processing cycle degradation machine m l,1 Status;

[0054] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The state is D1, the second machine has completed processing 0 workpieces, and there are 0 workpieces in the buffer. The transition probability follows the following formula:

[0055]

[0056] Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status;

[0057] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is sl,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed the processing of f l,2 (n) artifacts, there are 0 artifacts in the buffer, where f l,2 (n)=1,2…,B q -1; then the transition probability follows the following formula:

[0058]

[0059] Where a represents the next processing cycle degradation machine m l,1 Status;

[0060] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed the processing of f l,2 (n) workpieces, there are N workpieces in the buffer, where f ,2 (n)=1,2…,B q -h l (n)-1, N l is the maximum number of workpieces that the buffer can store; then the transition probability follows the following formula:

[0061]

[0062] Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status;

[0063] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine ml,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed processing B q -h l (n) workpieces, and the buffer contains h l (n) workpieces, where f l,2 (n) = B q -h l (n),B q -h l (n)+1,…,B q -1,h l (n)=1,2,…,N l -1; then the transition probability follows the following formula:

[0064]

[0065] Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status;

[0066] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed the processing of f l,2 (n) workpieces, and the buffer contains h l (n) workpieces, where f l,2 (n)=1,2…,B q -1,h l (n)=1,2,…,N l -1; then the transition probability follows the following formula:

[0067]

[0068] Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status;

[0069] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed processing B q workpieces, there are 0 workpieces in the buffer, that is, all workpieces in the batch have been processed; then the transfer probability follows the following formula:

[0070]

[0071] Step 7: Based on the probability obtained in step 6, the state transfer matrix is ​​constructed using the Markov method. The state probability distribution at each processing moment is obtained based on the state probability distribution, so as to calculate the time for each processing workshop to complete the same type of workpiece through the processing cycle parameters defined in step 1;

[0072] Step 7.1: According to Calculate the Mth l The processing workshop processes Q q OP of class artifact p The state transfer matrix A during the first process l , expressed as:

[0073]

[0074] Transfer Matrix satisfy:

[0075]

[0076] Step 7.2: Order Indicates that in the nth processing cycle, the processing workshop M l The probability of reaching processing state d is such that X l The initial conditions for (n) are:

[0077]

[0078] Step 7.3: Let n = 1; that is, X l (1);

[0079] Step 7.4: For all l = 1, 2, …, M, calculate X according to the following formula l,q,p (n+1), find the probability of the system being in each processing state in each processing cycle:

[0080]

[0081] Step 7.5: In the Mth l The processing workshop processes Q q OP of class artifact p During the process, if the buffer h l The number of workpieces in the process is 1, and the number of workpieces processed at the same time is f l,2 =B q -1, and when the second degraded machine is not in a faulty state in the current processing cycle, the next processing cycle will complete the processing; the time-varying probability of the system reaching the processing completion time is obtained

[0082]

[0083] s l,1 (n) = D1, D2, ... D f ,s l,2 (n)≠D f , b = s l,2 (n), s l,2 (n)+1,...,D f

[0084] Step 7.6: Set n = n + 1 and return to step 7.4 until the predicted number of processing cycles required is reached; Step 7.7: Based on the probability obtained in step 7.5 Calculation and processing workshop M l Processing Q q OP of class artifact p The processing time CT required for the first process l,q,p :

[0085]

[0086] Step 8: According to the processing time CT of each process of various types of workpieces in different processing workshops obtained in step 7 l,q,p , stored in the input data matrix input_data with cell data type:

[0087]

[0088] Step 9: Start the genetic algorithm operation, the current number of iterations is t, and the number of iteration terminations is count; establish the initial population according to the population size C_size designed in step 1.1 and the input data input_data obtained in step 8;

[0089] Step 9.1: Initialize the processing workshop set initial_p and the processing time set initial_TN as cell arrays of size N_size, each element of which is a Q×OP matrix, representing the processing workshop arrangement of each solution in the solution set and the processing time of each solution;

[0090] Step 9.2: Loop to generate N_size initial solutions;

[0091] For each process of each workpiece, obtain the processing data input_data{q,p}, including the optional processing workshop number and the corresponding processing time;

[0092] If there is a 0 array in the processing data input_data{q,p}, it proves that the workpiece Q q OP p The process does not exist;

[0093] If there is a non-zero array in the processing data input_data{q,p}, set the processing threshold initial_threshold; randomly select an optional processing workshop. If the number of selected processing workshops does not exceed the threshold initial_threshold, update the selected processing workshop to the processing workshop set initial_p{i}, and update the corresponding processing time to the processing time set initial_TN{i}, i=1,2,…,N_size; otherwise, reselect the processing workshop; the size of the threshold initial_threshold is set as follows:

[0094]

[0095] The initial population is the processing workshop set initial_p{i} and the processing time set initial_TN{i}.

[0096] Step 10: Calculate the completion time of each chromosome in the initial population obtained in step 9;

[0097] Step 10.1: Initialize the end time matrix fit, process schedule and processing time cell arrays Y1, Y2, Y3;

[0098] The fit matrix is ​​a vector matrix of N_size×1, representing the total processing time after all workpieces are processed; Y1, Y2, and Y3 are all cell arrays of size N_size, and each element in the array is a Q×OP matrix. Y1 is used to store the start time of each process of each workpiece in each solution; Y2 is used to store the end time of each process of each workpiece in each solution; and Y3 is used to store the processing workshop selected for each process;

[0099] Step 10.2: Let n count =1;

[0100] Step 10.3: Based on the processing workshop set and time set obtained in step 9, calculate the arrangement and processing time of each process of each workpiece;

[0101] According to the number of processes OP in step 1, create empty matrices Y1_p, Y2_p, and Y3_p to store the start processing time, completion processing time, and processing workshop selection of the chromosome respectively; calculate the subsequent processes OP in sequence according to the processing end time of the first process OP1 and the processing workshop selected by the first process i The start and end time of the subsequent process are determined, and the processing workshop selected for each subsequent process is determined, i = 2, 3, ..., p;

[0102] Step 10.4: Calculate the completion time of the chromosome;

[0103] Complete the distribution of all types of workpiece processing through step 10.3 and obtain the last processing operation OP p time and store it in the matrix fit(n count ) as the completion time of the process; at the same time, the data in Y1_p, Y2_p, and Y3_p are stored in Y1{n count}、Y2{n count}、Y3{n count}middle;

[0104] Step 10.5: If n count ≠N_size, then n count =n count +1; and return to step 10.3.

[0105] Step 11: According to the completion time of each chromosome obtained in step 10, the corresponding fitness is calculated respectively, and the population is selected and evolved based on the roulette wheel to generate a new population;

[0106] Step 11.1: Define the new population size;

[0107] Define the number of chromosomes in the new population as newN_size; define a new processing workshop set newinitial_p and a new processing time set newinitial_TN, both of which are cell arrays of size newN_size, and each element in the array is a Q×OP matrix; define a new fitness matrix as newfit, which is a vector matrix of newN_size×1;

[0108] Step 11.2: Calculate the fitness of each chromosome newfit(i) and store it in the matrix newfit;

[0109] According to the completion time fit(i) obtained in step 10.4, calculate the corresponding fitness newfit(i). The calculation formula is as follows:

[0110]

[0111] At the same time, the proportion of each chromosome p_fit(i) is obtained, and the calculation formula is as follows:

[0112]

[0113] Wherein, i=1,2,…,newN_size;

[0114] Step 11.3: Let newin = 1, which means the index of the new population individual is currently being generated;

[0115] Step 11.4: Let fitin = 1, which represents the index of the fitness value currently being considered;

[0116] Step 11.5: Perform roulette selection based on the random number random_fit and the fitness proportion p_fit, select individuals with high fitness, and generate a new population;

[0117] Generate newN_size numbers between 0 and 1 randomly, and put them into the random matrix random_fit in ascending order for roulette wheel selection; if the random number random_fit(newin) is less than or equal to the cumulative probability p_fit(fitin), select the fitinth chromosome as a member of the new population and store it in newinitial_p and newinitial_TN; if not, continue to check the next individual; Accept is 1 to accept the chromosome as a member of the new population, and Accept is 0 to reject the chromosome as a member of the new population;

[0118]

[0119] Step 11.6: newin = newin + 1, return to Step 11.5; until newin = newN_size;

[0120] Step 11.7: fitin = fitin + 1, return to Step 11.5; until fitin = newN_size.

[0121] Step 12: Perform crossover operation on the chromosomes in the new population generated in Step 11 to generate new chromosomes;

[0122] Step 12.1: Define new matrices cross_1, cross_2, cross_3, cross_4; cross_1 and cross_2 are used to store two adjacent individuals in newinitial_p obtained in Step 11, and cross_3 and cross_4 are used to store two adjacent individuals in newinitial_TN obtained in Step 11 for subsequent crossover operations;

[0123] Step 12.2: Let i = 1;

[0124] Step 12.3: Select the individuals to be crossed;

[0125] According to the crossover probability p_cross given in Step 1; in the i-th loop, if a randomly generated number rand < p_cross, then put newinitial_p{i} and newinitial_p{i + 1} in the new population obtained in Step 11 into cross_1 and cross_2 defined in Step 12.1 respectively, and at the same time put newinitial_TN{i} and newinitial_TN{i + 1} into cross_3 and cross_4 respectively;

[0126] Step 12.4: Perform the crossover operation;

[0127] Randomly generate a crossover point apoint, apoint = 1, 2, …, OP p ; Swap the machining workshop sets after the crossover point in cross_1 and cross_2, and swap the corresponding processing times in cross_3 and cross_4 to form new chromosomes, and update newinitial_p{i}, newinitial_p{i + 1} and newinitial_TN{i}, newinitial_TN{i + 1} in the population;

[0128] Step 12.5: i = i + 2, return to Step 12.3; until i reaches the largest odd number in the population newN_size.

[0129] Step 13: Perform mutation operations on the chromosomes in the new population generated in Step 12, introducing a certain degree of random variation among the individuals in the population to increase the diversity of the population; obtain new chromosomes and generate a new population;

[0130] Step 13.1: Let i = 1;

[0131] Step 13.2: Select the individuals that need to undergo mutation;

[0132] According to the mutation probability pm given in Step 1, in the o-th iteration, if a randomly generated number rand < pm, then newinitial_p{i} and newinitial_TN{i} in the population will undergo mutation operations; randomly generate integers bpoint and cpoint to select the workpiece and process for this mutation point, where bpoint = 1, 2,..., Q; cpoint = 1, 2,..., OP;

[0133] Step 13.3: Perform the mutation operation;

[0134] According to the process data input_data{bpoint, cpoint} in Step 8, obtain the corresponding optional processing workshops and processing times; randomly select a position epoint from the optional processing workshops and processing times, obtain the corresponding machine and processing time, and replace the value at the corresponding position in the original individual; update the processing workshop set and processing time set:

[0135]

[0136] Step 13.4: i = i + 1, return to Step 13.2; until i = newN_size.

[0137] Step 14: Based on the processing set and time set newinitial_p and newinitial_TN corresponding to the new population obtained in Step 13, find the individual fit(i) with the minimum completion time, store the minimum completion time in the best fit variable, and update the processing workshop set best_p for each process of each type of workpiece and the corresponding time set best_TN for each processing workshop set under this completion time;

[0138] Step 15: Check if t = count is satisfied; if not, then t = t + 1, return to Step 9 to continue the calculation; if satisfied, end the genetic algorithm, and based on the minimum completion time best updated in Step 14 fit, the processing workshop set best_p selected for each process of each type of workpiece under the completion time and the time set best_TN corresponding to each processing workshop set output the historical global optimal processing time and processing Gantt chart, and realize flexible workshop production scheduling based on unreliable degraded machine model according to the global optimal processing time and processing Gantt chart.

[0139] Beneficial effects:

[0140] 1. The flexible workshop production scheduling method based on the unreliable degraded machine model disclosed in the present invention, which is a processing workshop model composed of degraded machines and limited buffers, significantly improves production efficiency, reduces production costs, and shortens delivery cycles by completing processing tasks under limited resources and various constraints. At the same time, the present invention can meet the personalized and customized needs of customers in a small batch production environment, and improve customer satisfaction and loyalty.

[0141] 2. The flexible workshop production scheduling method based on the unreliable degraded machine model disclosed in the present invention realizes processing workshop scheduling based on degraded machines and limited buffer zones, takes into account the impact of machine failures and maintenance, and optimizes the processing time and sequence of workpieces on each device to ensure the flexibility and controllability of the production process, thereby significantly improving the reliability and stability of the production system.

[0142] 3. The flexible workshop production scheduling method based on the unreliable degraded machine model disclosed in the present invention is aimed at optimizing the scheduling system of the processing workshop under the constraints of limited resources. By comprehensively considering the operating status of the degraded machine and the limited capacity of the buffer zone, it realizes the optimal allocation and utilization of resources, effectively reduces production interruptions caused by machine failures and improper material handling, and improves overall production efficiency.

[0143] 4. The flexible workshop production scheduling method based on the unreliable degraded machine model disclosed in the present invention is aimed at the processing workshop scheduling in a small batch production environment. By optimizing the scheduling strategy under the conditions of degraded machines and limited buffer zones, it can quickly adapt to market changes and customer needs and ensure that the selected performance indicators are optimal. BRIEF DESCRIPTION OF THE DRAWINGS

[0144] Figure 1 It is a flow chart of flexible workshop production scheduling of the present invention.

[0145] Figure 2 It is the genetic algorithm flow chart of the present invention.

[0146] Figure 3 It is a disjunctive graph model of the flexible workshop problem of the present invention.

[0147] Figure 4It is a schematic diagram of the production system considered by the present invention, wherein the circle represents the degradation machine, the rectangle represents the buffer zone, the trapezoid represents the various processes of various types of workpieces that need to be processed, and the arrow represents the flow direction of the workpiece.

[0148] Figure 5 It is the internal structure of a cell array in the input data matrix input_data in Example 1 of the present invention.

[0149] Figure 6 It is a schematic diagram of the crossover algorithm in Example 1 of the present invention.

[0150] Figure 7 It is a schematic diagram of the mutation algorithm in Example 1 of the present invention.

[0151] Figure 8 It is a Gantt chart of the optimal processing time in Example 1 of the present invention. The horizontal axis represents the processing time, and the vertical axis represents the selected processing workshop. DETAILED DESCRIPTION

[0152] In order to better illustrate the purpose and advantages of the present invention, the invention is further described below with reference to the accompanying drawings and examples.

[0153] Embodiment 1:

[0154] Taking the vehicle processing line as an example, the first processing workshop is used for the initial casting of the engine block, the initial casting of the gearbox housing, and the initial casting of the car door; the second processing workshop is used for the rough processing of the engine block, the rough processing of the gearbox housing, and the cutting of the car door; the third processing workshop is used for the spraying of the engine block, the spraying of the gearbox housing, and the spraying of the car door. The three types of workpieces are engine blocks, gearbox housings, and car doors.

[0155] like Figure 1 and Figure 2 As shown, the specific implementation steps of the flexible job shop production scheduling method for the unreliable degraded machine model disclosed in this embodiment are as follows:

[0156] Step 1: Model a system consisting of multiple unreliable degraded machine workshops with buffers; system modeling mainly includes: designing parameters of each part of the system and setting the state of the degraded machine; the parameters of each part of the system include production structure parameters m i,j , b i , Q q OP p ; Genetic algorithm parameters N_size, count, p_count, pm and workpiece processing cycle parameters τ, C l ; The degraded machine state includes the degraded machine operation state, the degraded machine failure state and the degradation probability parameter matrix p_state i,j ;

[0157] Step 1.1: Set the parameters of the genetic algorithm; set the population size, number of population iterations, crossover probability and mutation probability;

[0158] The population size is set to 50, the number of population iterations is set to 1000, the crossover probability is set to 0.8, and the mutation probability is set to 0.2.

[0159] Step 1.2: Initialize the production structure of the flexible job shop;

[0160] like Figure 4 As shown in Figure 1, there are three processing workshops in the system, each of which consists of two degenerate machines and a buffer. i,j Indicated by, where i = 1, 2, 3; j = 1, 2. The buffer is represented by b i The maximum number of workpieces that the buffer can accommodate is denoted by N. i , where i = 1, 2, 3, N i ∈(0,∞). In this embodiment, N1=3, N2=4, N3=5. There are 3 types of machined parts, and each type has at most 3 processes.

[0161] Step 1.3: Determine the system processing cycle;

[0162] Each processing workshop has the same processing cycle τ, and different processing workshops have different cycle mapping coefficients C l ; In each processing workshop, the time axis is segmented in units of processing cycle τ; In this embodiment, the cycle mapping coefficient C of processing workshops 1-3 l =[1.0 0.8 1.2]. In each processing workshop, the time axis is segmented with the processing cycle τ as the unit.

[0163] Step 1.4: Determine the operating status of the degraded machine

[0164] The degraded machine has two operating states, denoted as D w , where w = 1, 2, and the degraded machine has a fault state D f ; The best operating state is D1; ​​The degraded machine is in operating state D l After completing one processing, at the beginning of the next processing cycle, the fixed probability is maintained at D l state, or degrade to the next worse state D l+1 , or degrade to the fault state D with a fixed probability f ;

[0165] Step 1.5: Determine the fault state of the degraded machine.

[0166] When the machine is in a fault state during a certain processing cyclef , the processed part fails; at the same time, at the beginning of the next processing cycle, it returns to the optimal state D1 with a fixed probability, or remains in the fault state D f ;

[0167] Step 1.6: Determine the state degradation parameters of the degraded machine.

[0168] With p l,k Denotes a degraded machine from state D l Change to state D k The probability that the machine is in state D l When p l,l +p l,l+1 +p l,f =1; that is, the machine remains in state D in the next processing cycle l The probability p l,l , degenerate to the next state D l+1 The probability p l,l+1 and degrades to the fault state D f The probability p l,f The sum is 1; when the machine is in state D f When p f,1 +p f,f =1, that is, the machine remains in the fault state D in the next processing cycle f The probability p f,f , the sum of the probabilities of returning to the optimal state D1 is 1; and the worse the state of the machine is, the greater the probability that the machine will degenerate to a fault state in the next cycle, that is, the machine will degenerate from state D to a fault state in the next processing cycle. l Degraded to state D f The probability p l,f Less than the machine in the next processing cycle from state D l+1 Degraded to state D f The probability p l+1,f ; Each degraded machine follows a certain degradation probability parameter matrix p_state i,j , where i = 1, 2, 3; j = 1, 2. In this embodiment, the degradation parameter matrix of each processing workshop is the same, which can be expressed as:

[0169]

[0170] Step 1.7: Determine the starvation state of the degraded machine;

[0171] Before a certain processing cycle begins, if the degraded machine m i,j The previous buffer b i,j-1 There are no parts to be processed, and the degraded machine is in running state during the current processing cycle D w, w=1,2, then the degenerate machine is in a starving state during the processing cycle; the first machine will never be in a starving state;

[0172] Step 1.8: Determine the blocking state of the degraded machine;

[0173] At the beginning of a certain processing cycle, if the degraded machine m i,j Buffer b afterwards i,j N is already stored in i,j workpieces, and the current degraded machine is in running state D w , w=1,2, the next machine is in fault state operation state D f ; then the machine is in a blocked state in the current processing cycle, and the last machine will never be in a blocked state.

[0174] Step 2: Constrain the processing mode of the flexible job shop and determine the production sequence; the processing mode constraints include resource occupancy constraints between different workpieces, process constraints between different processes of the same workpiece, and technical constraints of the workshops that can process the workpiece; the production sequence is the processing sequence of each process of each workpiece;

[0175] Step 2.1: Determine the production sequence.

[0176] The process of the workpiece is predetermined, and each process can be processed on multiple different processing workshops. The processing time of the process varies with the performance of the processing workshop. Each processing workpiece requires processing B q q represents the type of workpiece. Each part has OP p There are three processes, q = 1, 2, 3, p = 1, 2, 3. In this example, B1 = 20, B2 = 10, B3 = 15. Each part has at most three processes, OP1 = 2, OP2 = 3, OP3 = 3. i OP of class artifact j Select the Mth process l When processing in a processing workshop, all B q Processing of workpieces.

[0177] Step 2.1: Determine the production sequence;

[0178] The process of the workpiece is predetermined. Each process can be processed on multiple different processing workshops. The processing time of the process varies with the performance of the processing workshop. Each processing workpiece requires processing B q , q represents the type of workpiece to be processed; and each type of workpiece to be processed has OP p process, q=1,2,…,i…,Q,p=1,2,…,j…,OP;when the Qth process iOP of class artifact j Select the Mth process l When processing in a processing workshop, all P q Processing of workpieces;

[0179] Step 2.2: Determine resource occupancy constraints;

[0180] Let c w,l ,t w,l Indicates that the w-th workpiece is in the Mth l The end time and start time of processing in a processing workshop; for two types of workpieces Q w and Q v , w=1,2,3,v=1,2,3,w≠v; if both types of workpieces need to be processed in workshop M l Processing is performed on w Before Q v Processing should satisfy the constraint c v,l -c w,l ≥t w,l On the contrary, if Q v Before Q w Processing should satisfy the constraint c w,l -c v,l ≥t v,l ; There is no processing priority between different types of workpieces;

[0181] Step 2.3: Determine process constraints;

[0182] For different processes of the same workpiece Q w,h and Q w,k , w=1,2,3,h=1,2,…,OP h , k=1,2,…,OP k , h≠k; if process Q w,h In process Q w,k Before processing, there is a constraint c w,h ≤t w,k On the contrary, if process Q w,k In process Q w,h Before processing, there is a constraint c w,k ≤t w,h ;

[0183] Step 2.4: Identify technical constraints;

[0184] For a certain process Q of a certain workpiece w,h , w=1,2,3, h=1,2,3, constraints are allowed to exist, so that the process can only be processed in a few fixed processing workshops, denoted by a q,p,l Is the indicator coefficient, its meaning is:

[0185]

[0186] In this embodiment, a 1,1,3 =a 1,2,2 =a 2,1,2 =a 2,1,3 =a 2,2,1 =a 2,3,1 =a 2,3,3 =a 3,1,2 =a 3,1,3 =a 3,2,1 =0.

[0187] Step 3: When the number of workpieces to be processed for each type of workpiece is determined, determine the total number of states S of the processing workshop consisting of two machines and a single buffer;

[0188] The number of workpieces of the qth type to be processed is B q , q=1,2,…,Q, in the processing workshop M l Processing is performed on the machine; the state number is calculated according to the following formula

[0189]

[0190] In this example, the number of workpieces processed in any one process is B q It is always greater than the buffer capacity N of any processing workshop l , the total number of states is calculated as follows:

[0191] Step 4: Define the processing workshop M according to the production structure parameters of step 1, combined with the processing mode constraints defined in step 2 and the total number of states S defined in step 3. l In processing Q q OP of class artifact p The status of the system model of each processing cycle during the process;

[0192] Under the constraints of step 2, To indicate that in the nth processing cycle, the processing workshop M l In processing Q q OP of class artifact p During the process, the system model is in a state among states;

[0193] s l,1 (n) and s l,2 (n) represents the processing workshop M l The degradation state of the first and second machines in the nth processing cycle, s l,1 (n)=D1,D2,D f;s l,2 (n)=D1,D2,D f ; After the last machine m in each processing workshop i,j A processed workpiece is defined as a workpiece that has been processed. l,2 (n) represents the processing workshop M l The second machine m i,2 The number of workpieces processed, f l,2 (n)=0,1,…,B q ;

[0194] h l (n) represents the processing workshop M l The first machine completes the processing and puts the workpiece into buffer b l The number of l (n)=0,1,…,N l ; It is assumed that the processing workshop is in the initial state of (D1, D1, 0, 0) every time it starts processing workpieces of various types and processes, that is, in the processing cycle n, the first degraded machine m l,1 and the second degenerate machine m l,2 The status of both machines is D1. The second machine has processed 0 workpieces and there are 0 workpieces in the buffer.

[0195] After completing the processing of the last workpiece, the system is in (s l,1 (n), s l,2 (n), B q ,0) state,s l,1 (n)=D1,D2,D f ;s l,2 (n)=D1,D2,D f ;

[0196] Step 5: Define the unreachable state of the system;

[0197] In the initial state (D1, D1, 0, 0), the processing workshop M l The two machines are in the best state, and machine 1 will not be in a faulty state during this processing cycle; when the buffer stores a workpiece, that is, the processing workshop M l In (s l,1 (n), D1, 0, 1) state, machine 2 will not be in a fault state during this processing cycle; therefore, each processing workshop M l The unreachable state is expressed as:

[0198]

[0199] Step 6: Based on the state of the system model of each processing cycle obtained in step 4 and excluding the unreachable state in step 5, the degradation probability parameter matrix p_state i,j Calculate the probability of state transition in the next processing cycle;

[0200] If the processing workshop M l The state in processing cycle n This is the initial state defined in step 5; the transition probability follows the following formula:

[0201]

[0202] Where a represents the next processing cycle degradation machine m l,1 Status;

[0203] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The state is D1, the second machine has completed processing 0 workpieces, and there are 0 workpieces in the buffer. The transition probability follows the following formula:

[0204]

[0205] Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status;

[0206] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed the processing of f l,2 (n) artifacts, there are 0 artifacts in the buffer, where f l,2 (n)=1,2…,B q-1; then the transition probability follows the following formula:

[0207]

[0208] Where a represents the next processing cycle degradation machine m l,1 Status;

[0209] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed the processing of f l,2 (n) workpieces, there are N in the buffer l workpieces, among which, f l,2 (n)=1,2…,B q -h l (n)-1, N l is the maximum number of workpieces that the buffer can store; then the transition probability follows the following formula:

[0210]

[0211] Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status;

[0212] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed processing B q -h l(n) workpieces, and the buffer contains h l (n) workpieces, where f l,2 (n) = B q -h l (n),B q -h l (n)+1,…,B q -1,h l (n)=1,2,…,N l -1; then the transition probability follows the following formula:

[0213]

[0214] Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status;

[0215] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed the processing of f l,2 (n) workpieces, and the buffer contains h l (n) workpieces, where f l,2 (n)=1,2…,B q -1,h l (n)=1,2,…,N l -1; then the transition probability follows the following formula:

[0216]

[0217] Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status;

[0218] If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1(n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed processing B q workpieces, there are 0 workpieces in the buffer, that is, all workpieces in the batch have been processed; then the transfer probability follows the following formula:

[0219]

[0220] Step 7: Based on the probability obtained in step 6, the state transfer matrix is ​​constructed using the Markov method. The state probability distribution at each processing moment is obtained based on the state probability distribution, so as to calculate the time for each processing workshop to complete the same type of workpiece through the processing cycle parameters defined in step 1;

[0221] Step 7.1: According to Calculate the Mth l The processing workshop processes Q q OP of class artifact p The state transfer matrix A during the process l , expressed as:

[0222]

[0223] Transfer Matrix satisfy:

[0224]

[0225] Step 7.2: Order Indicates that in the nth processing cycle, the processing workshop M l The probability of reaching processing state d is such that X l The initial conditions for (n) are:

[0226]

[0227] Step 7.3: Let n = 1; that is, X l (1);

[0228] Step 7.4: For all l = 1, 2, 3, calculate X according to the following formula l,q,p (n+1), find the probability of the system being in each processing state in each processing cycle:

[0229]

[0230] Step 7.5: In the Mth l The processing workshop processes Q q OP of class artifact p During the process, if the buffer h l The number of workpieces in the process is 1, and the number of workpieces processed at the same time is f l,2 =B q -1, and when the second degraded machine is not in a faulty state in the current processing cycle, the next processing cycle will complete the processing; the time-varying probability of the system reaching the processing completion time is obtained

[0231]

[0232] s l,1 (n) = D1, D2, D f ,s l,2 (n)≠D f , b = s l,2 (n), s l,2 (n)+1,...,D f

[0233] Step 7.6: Set n = n + 1 and return to step 7.4 until the predicted number of processing cycles required is reached;

[0234] Step 7.7: Based on the probability obtained in step 7.5 Calculation and processing workshop M l Processing Q q OP of class artifact p The processing time CT required for the first process l,q,p :

[0235]

[0236] Step 7.3: Let n=1.

[0237] Step 8: According to the processing time CT of each process of various types of workpieces in different processing workshops obtained in step 7 l,q,p , stored in the input data matrix input_data with cell data type:

[0238]

[0239] Step 9: Start the genetic algorithm operation, assuming that the current number of iterations is t and the number of iteration terminations is 1000. According to the population size N designed in step 1.1 size =50 and the input data input_data obtained in step 8 to establish the initial population;

[0240] Step 9.1: Initialize the processing workshop set initial_p and the processing time set initial_TN to cell arrays of size 50. Each element is a 3×3 matrix, which represents the processing workshop arrangement of each solution in the solution set and the processing time of each solution;

[0241] Step 9.2: Loop to generate 50 initial solutions.

[0242] For each process of each workpiece, obtain the processing data input_data{q,p}, including the optional processing workshop number and the corresponding processing time;

[0243] If there is a 0 array in the processing data input_data{q,p}, it proves that the workpiece Q q OP p The first process does not exist; in this example, input_data{1,3} is an array of 0, which means that the third process of the first workpiece does not exist.

[0244] If there is a non-zero array in the processing data input_data{q,p}, set the processing threshold initial_threshold; randomly select an optional processing workshop. If the number of selected processing workshops does not exceed the threshold initial_threshold, update the selected processing workshop to the processing workshop set initial_p{i}, and update the corresponding processing time to the processing time set initial_TN{i}, i=1,2,…,50; otherwise, reselect the processing workshop; the size of the threshold initial_threshold is set as follows:

[0245]

[0246] Step 10: Calculate the completion time of each chromosome in the initial population obtained in step 9;

[0247] Step 10.1: Initialize the end time matrix fit, process schedule and processing time cell arrays Y1, Y2, Y3;

[0248] The fit matrix is ​​a 50×1 vector matrix, representing the total processing time after all workpieces are processed; Y1, Y2, and Y3 are all cell arrays of size 50, and each element in the array is a 3×3 matrix. Y1 is used to store the start time of each process of each workpiece in each solution; Y2 is used to store the end time of each process of each workpiece in each solution; and Y3 is used to store the processing workshop selected for each process;

[0249] Step 10.2: Let n count =1;

[0250] Step 10.3: Based on the processing workshop set and time set obtained in step 9, calculate the arrangement and processing time of each process of each workpiece;

[0251] According to the number of processes OP in step 1, create empty matrices Y1_p, Y2_p, and Y3_p to store the start processing time, completion processing time, and processing workshop selection of the chromosome respectively; calculate the subsequent processes OP in sequence according to the processing end time of the first process OP1 and the processing workshop selected by the first process i The start and end time of the process are determined and the processing workshop selected for each subsequent process is determined, i = 2, 3;

[0252] Step 10.4: Calculate the completion time of the chromosome;

[0253] Complete the distribution of all types of workpiece processing through step 10.3 and obtain the last processing operation OP p time and store it in the matrix fit(n count ) as the completion time of the process; at the same time, the data in Y1_p, Y2_p, and Y3_p are stored in Y1{n count}、Y2{n count}、Y3{n count}middle;

[0254] Step 10.5: If n count ≠N_size, then n count =n count +1; and return to step 10.3.

[0255] Step 11: According to the completion time of each chromosome obtained in step 10, the corresponding fitness is calculated respectively, and the population is selected and evolved based on the roulette wheel to generate a new population;

[0256] Step 11.1: Define the new population size;

[0257] Define the number of chromosomes in the new population as 50; define a new processing workshop set newinitial_p and a new processing time set newinitial_TN, both of which are cell arrays of size 50, and each element in the array is a 3×3 matrix; define a new fitness matrix newfit, which is a vector matrix of newN_size×1;

[0258] Step 11.2: Calculate the fitness of each chromosome newfit(i) and store it in the matrix newfit;

[0259] According to the completion time fit(i) obtained in step 10.4, calculate the corresponding fitness newfit(i). The calculation formula is as follows:

[0260]

[0261] At the same time, the proportion of each chromosome p_fit(i) is obtained, and the calculation formula is as follows:

[0262]

[0263] Where i = 1, 2, ..., 50;

[0264] Step 11.3: Let newin = 1, which means the index of the new population individual is currently being generated;

[0265] Step 11.4: Let fitin = 1, which represents the index of the fitness value currently being considered;

[0266] Step 11.5: Perform roulette selection based on the random number random_fit and the fitness proportion p_fit, select individuals with high fitness, and generate a new population;

[0267] Generate 50 random numbers between 0 and 1 and place them in the random matrix random_fit in ascending order for roulette wheel selection; if the random number random_fit(newin) is less than or equal to the cumulative probability p_fit(fitin), select the fitinth chromosome as a member of the new population and store it in newinitial_p and newinitial_TN; if not, continue to check the next individual; Accept is 1 to accept the chromosome as a member of the new population, and Accept is 0 to reject the chromosome as a member of the new population;

[0268]

[0269] Step 11.6: newin=newin+1, return to step 11.5; until newin=newN_szie;

[0270] Step 11.7: fitin=fitin+1, return to step 11.5; until fitin=newN_size.

[0271] Step 12: Perform a chromosome mutation operation on the new population generated in step 12, introduce a certain degree of random changes in the individuals in the population to increase the diversity of the population; obtain new chromosomes and generate a new population;

[0272] Step 12.1: Define new matrices cross_1, cross_2, cross_3, cross_4; cross_1 and cross_2 are used to store two adjacent individuals in newinitial_p obtained in Step 11, and cross_3 and cross_4 are used to store two adjacent individuals in newinitial_TN obtained in Step 11 for subsequent crossover operations;

[0273] Step 12.2: Let i = 1;

[0274] Step 12.3: Select the individuals to be crossed;

[0275] According to the crossover probability p cross = 0.8 given in Step 1; in the i-th loop, if a randomly generated number rand < p_cross, then put newinitial_p{i} and newinitial_p{i + 1} in the new population obtained in Step 11 into cross_1 and cross_2 defined in Step 12.1 respectively, and at the same time put newinitial_TN{i} and newinitial_TN{i + 1} into cross_3 and cross_4 respectively;

[0276] Step 12.4: Perform the crossover operation;

[0277] Randomly generate a crossover point apoint, apoint = 1, 2, 3; swap the sets of processing workshops after the crossover point in cross_1 and cross_2, and swap the corresponding processing times in cross_3 and cross_4 to form new chromosomes, and update newinitial_p{i}, newinitial_p{i + 1} and newinitial_TN{i}, newinitial_TN{i + 1} in the population. The crossover algorithm is as Figure 6 shown;

[0278] Step 12.5: i = i + 2, return to Step 12.3. Until i = 49.

[0279] Step 13: Perform mutation operations on the chromosomes in the population, introducing a certain degree of random variation in the individuals in the population to increase the diversity of the population.

[0280] Step 13.1: Let i = 1;

[0281] Step 13.2: Select the individuals to be mutated;

[0282] According to the mutation probability pm = 0.2 given in step 1, in the i-th loop, if a randomly generated number rand < pm, then newinitial_p{i} and newinitial_TN{i} in the population will undergo mutation operations; randomly generate integers bpoint and cpoint to select the workpiece and process for this mutation point, bpoint = 1, 2, 3; cpoint = 1, 2, 3;

[0283] According to the process data input_data{bpoint, cpoint} in step 8, obtain the corresponding optional processing workshops and processing times; randomly select a position epoint from the optional processing workshops and processing times, obtain the corresponding machine and processing time, and replace the value at the corresponding position in the original individual; update the processing workshop set and processing time set:

[0284]

[0285] Step 13.4: i = i + 1, return to step 13.2; until i = 50.

[0286] Step 14: According to the processing set and time set newinitial_p and newinitial_TN corresponding to the new population obtained in step 13, find the individual fit(i) with the minimum completion time, store the minimum completion time in the best fit variable, and update the set of processing workshops best_p selected for each process of each type of workpiece under this completion time and the time set best_TN corresponding to each processing workshop set;

[0287] Step 15: Check whether t = count is satisfied; if not, then t = t + 1, return to step 9 to continue the calculation; if satisfied, end the genetic algorithm, and output the historical global optimal processing time and the Gantt chart according to the minimum completion time best fit updated in step 14, the set of processing workshops best_p selected for each process of each type of workpiece under this completion time, and the time set best_TN corresponding to each processing workshop set. For Example 1, the Gantt chart of its optimal completion time is as Figure 8 shown.

[0288] The above specific description further details the purpose, technical solution, and beneficial effects of the invention. It should be understood that the above is only a specific embodiment of the present invention and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A flexible workshop production scheduling method based on an unreliable degraded machine model, characterized by: The following steps are included: Step 1: Model a system consisting of multiple unreliable degraded machine workshops with buffers; system modeling includes designing parameters of each part of the system and setting the state of the degraded machines; the parameters of each part of the system include production structure parameters m i,j , b i , Q q OP p ; Genetic algorithm parameters N_size, count, p_count, pm and workpiece processing cycle parameters τ, C l ; The degraded machine state includes the degraded machine operation state, the degraded machine failure state and the degradation probability parameter matrix p_state i,j ; Step 2: Constrain the processing mode of the flexible job shop and determine the production sequence; the processing mode constraints include resource occupancy constraints between different workpieces, process constraints between different processes of the same workpiece, and technical constraints of the workshops that can process the workpiece; the production sequence is the processing sequence of each process of each workpiece; Step 3: When the number of workpieces to be processed for each type of workpiece is determined, determine the total number of states S of the processing workshop consisting of two machines and a single buffer; Step 4: Based on the production structure parameters of step 1, combined with the processing mode constraints defined in step 2 and the total number of states S defined in step 3, define the processing workshop M l In processing Q q OP of class artifact p The status of the system model of each processing cycle during the process; Step 5: Define the unreachable state of the system; Step 6: Based on the state of the system model of each processing cycle obtained in step 4 and excluding the unreachable state in step 5, the degradation probability parameter matrix p_state i,j Calculate the probability of state transition in the next processing cycle; Step 7: Based on the probability obtained in step 6, the state transfer matrix is ​​constructed using the Markov method. The state probability distribution at each processing moment is obtained based on the state probability distribution, so as to calculate the time for each processing workshop to complete the same type of workpiece through the processing cycle parameters defined in step 1; Step 8: According to the processing time CT of each process of various types of workpieces in different processing workshops obtained in step 7 l,q,p , stored in the input data matrix input_data with cell data type: Step 9: Start the genetic algorithm operation, the current number of iterations is t, and the number of iteration terminations is count; establish the initial population according to the population size N_size designed in step 1.1 and the input data input_data obtained in step 8; Step 10: Calculate the completion time of each chromosome in the initial population obtained in step 9; Step 11: According to the completion time of each chromosome obtained in step 10, the corresponding fitness is calculated respectively, and the population is selected and evolved based on the roulette wheel to generate a new population; Step 12: Perform a crossover operation on the chromosomes in the new population generated in step 11 to generate new chromosomes; Step 13: Perform a chromosome mutation operation on the new population generated in step 12, introduce a certain degree of random changes in the individuals in the population to increase the diversity of the population; obtain new chromosomes and generate a new population; Step 14: According to the processing set and time set newinitial_p and newinitial_TN corresponding to the new population obtained in step 13, find the individual fit(i) with the minimum completion time and store the minimum completion time in best fit In the variables, update the processing workshop set best_p selected by each process of each type of workpiece under the completion time and the time set best_TN corresponding to each processing workshop set; Step 15: Check whether t=count is satisfied; if not, then t=t+1, and return to step 9 to continue the calculation; if satisfied, the genetic algorithm ends, and the minimum completion time best updated according to step 14 is fit , the processing workshop set best_p selected for each process of each type of workpiece under the completion time and the time set best_TN corresponding to each processing workshop set output the historical global optimal processing time and processing Gantt chart, and realize flexible workshop production scheduling based on unreliable degraded machine model according to the global optimal processing time and processing Gantt chart.

2. The flexible workshop production scheduling method based on the unreliable degraded machine model as claimed in claim 1, characterized in that: Step 1 is implemented as follows: Step 1.1: Set the parameters of the genetic algorithm; set the population size, number of population iterations, crossover probability and mutation probability; The population size is set to N_size, the number of population iterations is set to count, the crossover probability is set to p_count, and the mutation probability is set to pm; Step 1.2: Initialize the production structure of the flexible job shop; There are M processing workshops in the system, each of which consists of 2 degenerate machines and 1 buffer zone; the degenerate machine consists of m i,j Indicates, where i = 1, 2, ..., M; j = 1, 2; the buffer is represented by b i Indicates that the maximum number of workpieces that the buffer can accommodate is recorded as N i , where i = 1, 2, ..., M, N i ∈(0,∞); there are Q types of workpieces to be processed, and each type has OP processes; Step 1.3: Determine the system processing cycle; Each processing workshop has the same processing cycle τ, and different processing workshops have different cycle mapping coefficients C l ;In each processing workshop, the time axis is segmented based on the processing cycle τ; Step 1.4: Determine the operating status of the degraded machine; The degraded machine has a total of W operating states, denoted by D w , where w = 1, 2, ..., l ..., W, and the degraded machine has a fault state D f ; The best operating state is D1; ​​The degraded machine is in operating state D l After completing one processing, at the beginning of the next processing cycle, the fixed probability is maintained at D l state, or degrade to the next worse state D l+1 , or degrade to the fault state D with a fixed probability f ; Step 1.5: Determine the fault state of the degraded machine; When the machine is in a fault state during a certain processing cycle f , the processed part fails; at the same time, at the beginning of the next processing cycle, it returns to the optimal state D1 with a fixed probability, or remains in the fault state D f ; Step 1.6: Determine the state degradation parameters of the degraded machine; With p l,k Denotes a degraded machine from state D l Change to state D k The probability that the machine is in state D l When p l,l +p l,l+1 +p l,f =1; that is, the machine remains in state D in the next processing cycle l The probability p l,l , degenerate to the next state D l+1 The probability p l,l+1 and degrades to the fault state D f The probability p l,f The sum is 1; when the machine is in state D f When p f,1 +p f,f =1, that is, the machine remains in the fault state D in the next processing cycle f The probability p f,f , the sum of the probabilities of returning to the optimal state D1 is 1; and the worse the state of the machine is, the greater the probability that the machine will degenerate to a fault state in the next cycle, that is, the machine will degenerate from state D to a fault state in the next processing cycle. l Degraded to state D f The probability p l,f Less than the machine in the next processing cycle from state D l+1 Degraded to state D f The probability p l+1,f ; Each degraded machine follows a certain degradation probability parameter matrix p_state i,j , where i = 1, 2, ..., M; j = 1, 2; the degradation probability parameter matrix is ​​expressed as: Step 1.7: Determine the starvation state of the degraded machine; Before a certain processing cycle begins, if the degraded machine m i,j The previous buffer b i,j-1 There are no parts to be processed, and the degraded machine is in running state during the current processing cycle D w , w=1,2,…,W, then the degenerate machine is in a starving state during the processing cycle; the first machine will never be in a starving state; Step 1.8: Determine the blocking state of the degraded machine; At the beginning of a certain processing cycle, if the degraded machine m i,j The buffer b after i,j N is already stored in i,j workpieces, and the current degraded machine is in running state D w , w=1,2,…,W, the next machine is in the fault state and running state D f ; then the machine is in a blocked state in the current processing cycle, and the last machine will never be in a blocked state.

3. The flexible workshop production scheduling method based on the unreliable degraded machine model as claimed in claim 2, characterized in that: Step 2 is implemented as follows: Step 2.1: Determine the production sequence; The process of the workpiece is predetermined. Each process can be processed on multiple different processing workshops. The processing time of the process varies with the performance of the processing workshop. Each processing workpiece requires processing B q , q represents the type of workpiece to be processed; and each type of workpiece to be processed has OP p process, q=1,2,…,i…,Q,p=1,2,…,j…,OP;when the Qth process i OP of class artifact j Select the Mth process l When processing in a processing workshop, all B q Processing of workpieces; Step 2.2: Determine resource occupancy constraints; Let c w,l ,t w,l Indicates that the w-th workpiece is in the Mth l The end time and start time of processing in a processing workshop; for two types of workpieces Q w and Q v , w=1,2,…,Q,v=1,2,…,Q,w≠v;If both types of workpieces need to be processed in workshop M l Processing is performed on w Before Q v Processing should satisfy the constraint c v,l -c w,l ≥t w,l On the contrary, if Q v Before Q w Processing should satisfy the constraint c w,l -c v,l ≥t v,l ; There is no processing priority between different types of workpieces; Step 2.3: Determine process constraints; For different processes of the same workpiece Q w,h and Q w,k , w=1,2,…,Q, h=1,2,…,OP h , k=1,2,…,OP k , h≠k; if process Q w,h In process Q w,k Before processing, there is a constraint c w,h ≤t w,k On the contrary, if process Q w,k In process Q w,h Before processing, there is a constraint c w,k ≤t w,h ; Step 2.4: Identify technical constraints; For a certain process Q of a certain workpiece w,h , w=1,2,…,Q, h=1,2,…,OP h , it is allowed that there are constraints, so that the process can only be processed in a few fixed processing workshops, denoted by a q,p,l Is the indicator coefficient, its meaning is: Step 3 is implemented as follows: The number of workpieces of the qth type to be processed is B q , q=1,2,…,Q, in the processing workshop M l Processing is performed on the machine; the state number is calculated according to the following formula 4. The flexible workshop production scheduling method based on the unreliable degraded machine model as claimed in claim 3, characterized in that: Step 4 is implemented as follows: Under the constraints of step 2, To indicate that in the nth processing cycle, the processing workshop M l In processing Q q OP of class artifact p During the process, the system model is in a state among states; s l,1 (n) and s l,2 (n) represents the processing workshop M l The degradation state of the first and second machines in the nth processing cycle, s l,1 (n)=D1,D2,…,D w ,D f ;s l,2 (n)=D1,D2,…,D w ,D f ; After the last machine m in each processing workshop i,j A processed workpiece is defined as a workpiece that has been processed. l,2 (n) represents the processing workshop M l The second machine m i,2 The number of workpieces processed, f l,2 (n)=0,1,…,B q ; h l (n) represents the processing workshop M l The first machine completes the processing and puts the workpiece into buffer b l The number of l (n)=0,1,…,N l ; It is assumed that the processing workshop is in the initial state of (D1, D1, 0, 0) every time it starts processing workpieces of various types and processes, that is, in the processing cycle n, the first degraded machine m l,1 and the second degenerate machine m l,2 The status of both machines is D1. The second machine has processed 0 workpieces and there are 0 workpieces in the buffer. After completing the processing of the last workpiece, the system is in (s l,1 (n), s l,2 (n), B q ,0) state,s l,1 (n)=D1,D2,…,D w ,D f ;s l,2 (n)=D1,D2,…,D w ,D f ; Step 5 is implemented as follows: In the initial state (D1, D1, 0, 0), the processing workshop M l The two machines are in the best state, and machine 1 will not be in a faulty state during this processing cycle; when the buffer stores a workpiece, that is, the processing workshop M l In (s l,1 (n), D1, 0, 1) state, machine 2 will not be in a fault state during this processing cycle; therefore, each processing workshop M l The unreachable state is expressed as: 。 5. The flexible workshop production scheduling method based on the unreliable degraded machine model according to claim 4, characterized in that: Step 6 is implemented as follows: If the processing workshop M l The state in processing cycle n This is the initial state defined in step 5; the transition probability follows the following formula: Where a represents the next processing cycle degradation machine m l,1 Status; If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The state is D1, the second machine has completed processing 0 workpieces, and there are 0 workpieces in the buffer. The transition probability follows the following formula: Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status; If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed the processing of f l,2 (n) artifacts, there are 0 artifacts in the buffer, where f l,2 (n)=1,2…,B q -1; then the transition probability follows the following formula: Where a represents the next processing cycle degradation machine m l,1 Status; If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed the processing of f l,2 (n) workpieces, there are N in the buffer l workpieces, among which, f l,2 (n)=1,2…,B q -h l (n)-1, N l is the maximum number of workpieces that the buffer can store; then the transition probability follows the following formula: Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status; If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed processing B q -h l (n) workpieces, and the buffer contains h l (n) workpieces, where f l,2 (n) = B q -h l (n),B q -h l (n)+1,…,B q -1,h l (n)=1,2,…,N l -1; then the transition probability follows the following formula: Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status; If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed the processing of f l,2 (n) workpieces, and the buffer contains h l (n) workpieces, where f l,2 (n)=1,2…,B q -1,h l (n)=1,2,…,N l -1; then the transition probability follows the following formula: Where a represents the next processing cycle degradation machine m l,1 state, b represents the next processing cycle degradation machine m l,2 Status; If the processing workshop M l The state in processing cycle n That is, in the processing cycle n, the first degraded machine m l,1 Status is s l,1 (n), s l,1 (n)=D1,D2,…,D w ,D f , the second degenerate machine m l,2 The status is s l,2 (n), s l,2 (n)=D1,D2,…,D w ,D f , the second machine completed processing B q workpieces, there are 0 workpieces in the buffer, that is, all workpieces in the batch have been processed; then the transfer probability follows the following formula:

6. The flexible workshop production scheduling method based on the unreliable degraded machine model according to claim 5, characterized in that: Step 7 is implemented as follows: Step 7.1: According to Calculate the Mth l The processing workshop processes Q q OP of class artifact p The state transfer matrix A during the first process l , expressed as: Transfer Matrix satisfy: Step 7.2: Order Indicates that in the nth processing cycle, the processing workshop M l The probability of reaching processing state d is such that X l The initial conditions for (n) are: Step 7.3: Let n = 1; that is, X l (1); Step 7.4: For all l = 1, 2, …, M, calculate X according to the following formula l,q,p (n+1), find the probability of the system being in each processing state in each processing cycle: Step 7.5: In the Mth l The processing workshop processes Q q OP of class artifact p During the process, if the buffer h l The number of workpieces in the process is 1, and the number of workpieces processed at the same time is f l,2 =B q -1, and when the second degraded machine is not in a faulty state in the current processing cycle, the next processing cycle will complete the processing; the time-varying probability of the system reaching the processing completion time is obtained d=(s l,1 (n), s l,2 (n), B q -1,1),s l,1 (n)=D1,D2,…D f ,s l,2 (n)≠D f , b = s l,2 (n),s l,2 (n)+1,…,D f Step 7.6: Set n = n + 1 and return to step 7.4 until the predicted number of processing cycles required is reached; Step 7.7: Based on the probability obtained in step 7.5 Computing and processing workshop M l Processing Q q OP of class artifact p The processing time CT required for the first process l,q,p :

7. The flexible workshop production scheduling method based on the unreliable degraded machine model according to claim 6, characterized in that: The specific implementation method of step 9 is: Step 9.1: Initialize the processing workshop set initial_p and the processing time set initial_TN as cell arrays of size N_size, each element of which is a Q×OP matrix, representing the processing workshop arrangement of each solution in the solution set and the processing time of each solution; Step 9.2: Loop to generate N_size initial solutions; For each process of each workpiece, obtain the processing data input_data{q,p}, including the optional processing workshop number and the corresponding processing time; If there is a 0 array in the processing data input_data{q,p}, it proves that the workpiece Q q OP p The process does not exist; If there is a non-zero array in the processing data input_data{q,p}, set the processing threshold initial_threshold; randomly select an optional processing workshop. If the number of selected processing workshops does not exceed the threshold initial_threshold, update the selected processing workshop to the processing workshop set initial_p{i}, and update the corresponding processing time to the processing time set initial_TN{i}, i=1,2,…,N_size; otherwise, reselect the processing workshop; the size of the threshold initial_threshold is set as follows: The initial population is the processing workshop set initial_p{i} and the processing time set initial_TN{i}.

8. The flexible workshop production scheduling method based on the unreliable degraded machine model according to claim 7, characterized in that: The specific implementation method of step 10 is: Step 10.1: Initialize the end time matrix fit, process schedule and processing time cell arrays Y1, Y2, Y3; The fit matrix is ​​a vector matrix of N_size×1, representing the total processing time after all workpieces are processed; Y1, Y2, and Y3 are all cell arrays of size N_size, and each element in the array is a Q×OP matrix. Y1 is used to store the start time of each process of each workpiece in each solution; Y2 is used to store the end time of each process of each workpiece in each solution; and Y3 is used to store the processing workshop selected for each process; Step 10.2: Let n count =1; Step 10.3: Based on the processing workshop set and time set obtained in step 9, calculate the arrangement and processing time of each process of each workpiece; According to the number of processes OP in step 1, create empty matrices Y1_p, Y2_p, and Y3_p to store the start processing time, completion processing time, and processing workshop selection of the chromosome respectively; calculate the subsequent processes OP in sequence according to the processing end time of the first process OP1 and the processing workshop selected by the first process i The start and end time of the subsequent process are determined, and the processing workshop selected for each subsequent process is determined, i = 2, 3, ..., p; Step 10.4: Calculate the completion time of the chromosome; Complete the distribution of all types of workpiece processing through step 10.3 and obtain the last processing operation OP p time and store it in the matrix fit(n count ) as the completion time of the process; at the same time, the data in Y1_p, Y2_p, and Y3_p are stored in Y1{n count }、Y2{n count }、Y3{n count }middle; Step 10.5: If n count ≠N_size, then n count =n count +1; and return to step 10.

3.

9. The flexible workshop production scheduling method based on the unreliable degraded machine model according to claim 8, characterized in that: The specific implementation method of step 11 is: Step 11.1: Define the new population size; Define the number of chromosomes in the new population as newN_size; define a new processing workshop set newinitial_p and a new processing time set newinitial_TN, both of which are cell arrays of size newN_size, and each element in the array is a Q×OP matrix; define a new fitness matrix as newfit, which is a vector matrix of newN_size×1; Step 11.2: Calculate the fitness of each chromosome newfit(i) and store it in the matrix newfit; According to the completion time fit(i) obtained in step 10.4, calculate the corresponding fitness newfit(i). The calculation formula is as follows: At the same time, the proportion of each chromosome p_fit(i) is obtained, and the calculation formula is as follows: where \(i = 1, 2, \ldots, newN\_size\); Step 11.3: Let \(newin = 1\), representing the index of the individual currently being generated in the new population; Step 11.4: Let \(fitin = 1\), representing the index of the fitness value currently being considered; Step 11.5: Perform roulette wheel selection according to the random number \(random\_fit\) and the fitness proportion \(p\_fit\), select the individual with high fitness, and generate a new population; Randomly generate \(newN\_size\) numbers between 0 and 1, and arrange them in ascending order and put them into the random matrix \(random\_fit\) for roulette wheel selection; if the random number \(random\_fit(newin)\) is less than or equal to the cumulative probability \(p\_fit(fitin)\), then select the \(fitin\)-th chromosome as a member of the new population and store it in \(newinitial\_p\) and \(newinitial\_TN\); if not, continue to check the next individual; \(Accept = 1\) indicates accepting the chromosome as a member of the new population, and \(Accept = 0\) indicates not accepting the chromosome as a member of the new population; Step 11.6: \(newin=newin + 1\), return to Step 11.5; until \(newin = newN\_size\); Step 11.7: \(fitin=fitin + 1\), return to Step 11.5; until \(fitin = newN\_size\).

10. The flexible workshop production scheduling method based on unreliable degraded machine model according to claim 9, characterized in that: The specific implementation method of Step 12 is as follows: Step 12.1: Define new matrices \(cross\_1\), \(cross\_2\), \(cross\_3\), \(cross\_4\); \(cross\_1\) and \(cross\_2\) are used to store two adjacent individuals in \(newinitial\_p\) obtained in Step 11, and \(cross\_3\) and \(cross\_4\) are used to store two adjacent individuals in \(newinitial\_TN\) obtained in Step 11 for subsequent crossover operations; Step 12.2: Let \(i = 1\); Step 12.3: Select the individuals to be crossed; According to the crossover probability \(p\_cross\) given in Step 1; in the \(i\)-th loop, if a randomly generated number \(rand < p\_cross\), then put \(newinitial\_p\{i\}\) and \(newinitial\_p\{i + 1\}\) in the new population obtained in Step 11 into \(cross\_1\) and \(cross\_2\) defined in Step 12.1 respectively, and at the same time put \(newinitial\_TN\{i\}\) and \(newin\_TN\{i + 1\}\) into \(cross\_3\) and \(cross\_4\) respectively; Step 12.4: Perform the crossover operation; Randomly generate intersection point apoint, apoint=1,2,…,OP p ; Exchange the processing workshop sets after the intersection in cross_1 and cross_2, and exchange the corresponding processing times in cross_3 and cross_4 to form a new chromosome, and update newinitial_p{i}, newinitial_[{i+1} and newinitial_TN{i}, newinitial_TN{i+1} in the population; Step 12.5: \(i=i + 2\), return to Step 12.3; until \(i\) reaches the largest odd number in the population \(newN\_size\); The specific implementation method of Step 13 is as follows: Step 13.1: Let \(i = 1\); Step 13.2: Select the individuals to be mutated; According to the mutation probability pm given in step 1, in the i-th loop, if a randomly generated number rand < pm, then newinitial_p{i} and newinitial_TN{i} in the population will undergo mutation operations; randomly generate integers bpoint and cpoint to select the workpiece and process of the mutation point, bpoint = 1, 2, …, Q; cpoint = 1, 2, …, OP; Step 13.3: Perform the mutation operation; According to the process data input_data{cpoint, cpoint} in step 8, obtain the corresponding optional processing workshops and processing times; randomly select a position epoint from the optional processing workshops and processing times, obtain the corresponding machine and processing time, and replace the value at the corresponding position in the original individual; update the processing workshop set and processing time set: Step 13.4: i = i + 1, return to step 13.2; until i = newN_size.