Dispatching method and system for discrete flexible manufacturing production line, terminal and storage medium
By establishing a scheduling mathematical model in a discrete flexible manufacturing production line and combining the Gray Wolf algorithm and DQN algorithm, the process route selection, process sorting and machine allocation of workpieces is optimized, and the problem of insufficient flexibility of existing scheduling methods is solved, achieving high efficiency and Flexible scheduling solutions significantly improve productivity.
Patent Information
- Application Number
- CN202510000661.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-02-07
AI Technical Summary
The scheduling methods of existing discrete flexible manufacturing workshops are not flexible enough to effectively deal with sudden changes in the production process, and the calculation volume is large, making it difficult to meet the rapidly changing production environment needs.
A discrete flexible manufacturing production line scheduling method is adopted. By establishing a scheduling mathematical model, combining the Gray Wolf algorithm and the DQN algorithm, the process route selection, process sorting and machine allocation of the workpiece are optimized to minimize the maximum completion time.
It improves the effectiveness and adaptability of the scheduling scheme, reduces the workpiece manufacturing time, improves the machine utilization rate, reduces the idle rate and waiting time of the production line, and significantly improves the productivity of the flexible manufacturing system.
Smart Images

Figure CN119396107A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of discrete flexible manufacturing scheduling, and in particular relates to a discrete flexible manufacturing production line scheduling method, system, terminal and storage medium. Background Art
[0002] Discrete flexible manufacturing refers to a production method that uses independent, single products as units. In discrete manufacturing, each product produced usually has different designs, specifications and production requirements, and the processing technology, materials and number of processes for each product in the production process may be different. Unlike the traditional assembly line production model, discrete flexible manufacturing can handle the personalized needs of products. The machinery and work processes in the workshop need to be quickly adjusted according to different tasks to adapt to the production requirements of different products.
[0003] There are many problems in the scheduling and production optimization technology of discrete flexible manufacturing workshops in the prior art. First, the existing scheduling methods usually rely on traditional production plans and manual adjustments, which leads to insufficient scheduling flexibility. Traditional scheduling methods usually assume that all production processes and tasks are fixed, and cannot cope with sudden changes in the production process, such as equipment failure, urgent order insertion or production plan changes, resulting in low resource utilization efficiency. Second, most of the existing scheduling methods rely on manually set fixed parameters and cannot adapt to production tasks of different scales and complexities. When faced with large-scale production tasks, it may not be possible to find the optimal solution efficiently. Especially in the case of diversified production processes, the existing optimization algorithms often require a lot of manual debugging and experience accumulation, lacking automation and intelligent capabilities, which directly affects production efficiency and response speed. Third, due to the high complexity of discrete flexible manufacturing workshops, the traditional algorithms have a large amount of calculation when solving problems, resulting in a slow solution speed and difficulty in meeting the needs of rapidly changing production environments. As the scale of production expands, the scale of the problem will also grow rapidly. When solving these large-scale scheduling problems, traditional methods often face exponential time complexity, resulting in a sharp drop in solution efficiency. Summary of the invention
[0004] In view of the problems in the prior art that discrete flexible manufacturing production lines have poor flexibility in scheduling, sudden events occur during the production process, and the optimal solution cannot be found in a short time, the present invention provides a discrete flexible manufacturing production line scheduling method, system, terminal and storage medium to solve the above technical problems.
[0005] In a first aspect, the present invention provides a discrete flexible manufacturing production line scheduling method, comprising: Acquiring data of a workpiece to be processed and data of a machine used to process the workpiece to be processed; Based on the data of the workpiece to be processed, the data of the machine used to process the workpiece to be processed and the preset constraints, a scheduling mathematical model is established with the minimization of the maximum completion time as the optimization goal; Setting the coding scheme, decoding scheme and increase / decrease coding scheme of the scheduling mathematical model, establishing the mapping relationship between the scheduling mathematical model and the gray wolf individual position vectors in the gray wolf algorithm, wherein the gray wolf individual position vectors include the process route selection, process sequencing and machine allocation of the workpiece to be processed; Use the DQN algorithm to pre-train the control parameters of the gray wolf algorithm, obtain the trained parameter control model, and iterate the gray wolf algorithm to output the optimal solution of the gray wolf algorithm, and decode and generate a scheduling plan that minimizes the maximum completion time of the scheduling mathematical model.
[0006] Furthermore, based on the data of the workpiece to be processed, the data of the machine used to process the workpiece to be processed and the preset constraints, a scheduling mathematical model is established with minimization of the maximum completion time as the optimization goal, including: The workpiece data to be processed includes Workpieces to be processed , the machine data for processing the workpiece to be processed includes m machines that can be used to process the workpiece ; Set each workpiece to be processed Process routes, where the workpiece to be processed The number of processes corresponding to each process route is , each process You can select the processing machine set from all machines M Any machine The processing time of the same process on different machines varies; Set constraints, establish scheduling mathematical models, and set processing route decision variables It is used to indicate the process route selected for the workpiece to be processed, that is, (1) in, Representation of workpiece No. process routes; Setting machine decision variables The processing machine used to indicate the process selection, i.e. (2) in, Representation of workpiece In the The first process line A process; The objective function is to minimize the maximum completion time of the workpiece, that is, (3) in, Representation of workpiece The completion time, Indicates the maximum completion time of all workpieces.
[0007] Furthermore, the constraints include: (4) Formula (a) means that each workpiece can only choose one process route at a time, where Representation of workpiece The number of process routes; Formula (b) means that only one machine can be selected for each process, where Representation of workpiece In the The total number of processes on the process route; Formula (c) means that each machine can only process one process at any time; Formula (d) means that the completion time of the process is not less than the sum of the start time and the processing time, where Indicates the process In the machine The completion time on Indicates the process In the machine The start processing time on Indicates the process In the machine The processing time on the workpiece; Formula (e) means that the workpiece can only be processed in the next process after the previous process is completed.
[0008] Furthermore, the coding scheme, decoding scheme and increase / decrease code scheme of the scheduling mathematical model are set, and a mapping relationship between the scheduling mathematical model and the gray wolf individual position vectors in the gray wolf algorithm is established. The gray wolf individual position vectors include the process route selection, process sequencing and machine allocation of the workpiece to be processed, including: The coding scheme of the scheduling mathematical model is set, and the individual position vector of each gray wolf in the gray wolf algorithm is designed as a three-segment vector, the candidate solution dimension d=N+2G, the length of the first segment position vector is N, N represents the number of workpieces, the length of the second segment position vector is G, G represents the total number of processes for processing all workpieces, and the length of the third segment position vector is G, and the value of each segment code adopts a real number between (0,1) as the code value; A decoding scheme of the scheduling mathematical model is set, and the corresponding process route coding interval is partitioned according to the number of optional process routes for each workpiece. After the decoding of the route selection position vector is completed in a roulette manner, the total number of processes of the workpiece can be obtained, and the position vectors of the process segments are sorted in descending order, and then the corresponding process sequence is rearranged according to the arranged position vectors to obtain the decoding result of the process vector segment. After the decoding of the first two segments of the position vectors is completed, the set of processing machines that can be selected for each process can be determined, and the machine for processing each process is obtained by using the roulette method according to the position vector; Setting the increase and decrease coding scheme of the scheduling mathematical model, measuring the total number of processes corresponding to the original dimension of the candidate solution and the total number of actual processes corresponding to the route selection segment of the candidate solution before each coding; If the total number of original processes is less than the total number of actual processes, the code is increased, and the complement number is the difference between the total number of actual processes and the total number of original processes. A random function is used to generate the complement code of the corresponding number of position elements; If the total number of original processes is greater than or equal to the total number of actual processes, then the code is reduced. The reduction method is to use the end of the position vector to reduce the code, and the reduction number is the difference between the total number of actual processes and the total number of original processes.
[0009] Furthermore, the DQN algorithm is used to pre-train the control parameters of the gray wolf algorithm to obtain a trained parameter control model, including: The population optimization process of the gray wolf algorithm is modeled as a Markov decision process MDP, and the state feature vector, action and reward function of the Markov decision process MDP are set; Construct the neural network structure of the DQN algorithm, set 1 input layer, 1 output layer and 5 hidden layers. The number of nodes in the input layer and the output layer are the same as the number of state features in the state and the number of available actions in the action. Each hidden layer has 128 neuron nodes, and the Tanh function is used as the activation function. Based on the state feature vector, action, reward function and neural network structure of the DQN algorithm, the parameter control model of the gray wolf algorithm is trained.
[0010] Furthermore, the method of setting the state feature vector of the Markov decision process MDP includes: Define the population evolution rate of the tth generation , define the population diversity of the tth generation , define the tth generation population neutrality And define the dispersion of the population in the tth generation , based on the population evolution rate of the tth generation , population diversity in the tth generation , the tth generation population neutrality and the dispersion degree of the population in the tth generation Constructing state feature vector ; Define the population evolution rate of the tth generation The ratio of the change in the fitness value of the current generation to the change in the fitness value of the previous generation: (5) in, is the population size, Represents an individual The fitness value of , used to distinguish individual gray wolves, t is the current iteration number, that is, the tth generation population, if If the value of is equal to 0, it means that the population tends to converge or falls into a local optimum; Define the population diversity of generation t for: (6) Use The sum of cosine similarities between the best individual in the population and other individuals is used to define population neutrality. : (7) in, Indicates The best individual in the population, represents the 2-norm of an individual; The maximum value of the Euclidean distance between individuals in the population and the best individual is used as the measure of population dispersion, and the dispersion degree of the t-th generation population is defined as for: (8) The state feature vector describing the current environment is composed based on the above feature definitions and combinations. for: (9) in, represents the initial population diversity, Indicates that the initial population is neutral, represents the initial population dispersion, is the maximum number of iterations of the gray wolf population.
[0011] Furthermore, the Grey Wolf Algorithm is iterated, the optimal solution of the Grey Wolf Algorithm is output, and the scheduling scheme that minimizes the maximum completion time of the scheduling mathematical model is decoded and generated, including: Q1. Initialize the Grey Wolf Algorithm population according to the coding scheme; Q2. Calculate the state of the gray wolf algorithm population according to the state feature vector; Q3. Under the state of the gray wolf algorithm population, perform the action to obtain the control parameters of the gray wolf algorithm and , the control parameters and is the synergy coefficient vector; Q4. According to the control parameters and Perform roundup, hunting and attack operations on the gray wolf algorithm and update the individual positions of the gray wolves; Q5. Determine whether the gray wolf algorithm has reached the preset number of iterations. If so, output the optimal gray wolf individual and the gray wolf algorithm ends. If not, return to step Q3.
[0012] In a second aspect, the present invention provides a discrete flexible manufacturing production line scheduling system, comprising: An acquisition module, used for acquiring data of a workpiece to be processed and data of a machine used for processing the workpiece to be processed; A scheduling mathematical model building module is used to build a scheduling mathematical model based on the workpiece data to be processed, the machine data for processing the workpiece to be processed and the preset constraint conditions, with the minimization of the maximum completion time as the optimization goal; A coding and decoding scheme design module is used to set the coding scheme, decoding scheme and increase and decrease code scheme of the scheduling mathematical model, and establish a mapping relationship between the scheduling mathematical model and the gray wolf individual position vector in the gray wolf algorithm, wherein the gray wolf individual position vector includes the process route selection, process sorting and machine allocation of the workpiece to be processed; The scheduling scheme generation module is used to use the DQN algorithm to pre-train the control parameters of the gray wolf algorithm, obtain the trained parameter control model, iterate the gray wolf algorithm, output the optimal solution of the gray wolf algorithm, and decode and generate a scheduling scheme that minimizes the maximum completion time of the scheduling mathematical model.
[0013] In a third aspect, a terminal is provided, including: processor, memory, wherein: The memory is used to store computer programs. The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.
[0014] According to a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the methods described in the above aspects.
[0015] The beneficial effect of the present invention is that the discrete flexible manufacturing production line scheduling method, system, terminal and storage medium provided by the present invention fully consider the diversity of workpiece processing paths in actual production through the scheduling mathematical model, and break through the limitations of fixed process routes in traditional scheduling methods. This model can not only flexibly deal with uncertainties in production such as equipment failures and emergency orders, but also maximize the use of production resources, thereby improving the effectiveness and adaptability of the overall scheduling scheme. Through the encoding and decoding scheme, the complex scheduling problem is mapped into a three-segment position vector representation, which can not only fully describe the process route selection, process sorting and machine allocation, but also solve the dimensional inconsistency problem caused by the change of the process route through the increase and decrease code operations. By reducing the workpiece in-process time through efficient scheduling, improving machine utilization, reducing the idle rate and waiting time of the production line, the productivity of the flexible manufacturing system can be significantly improved. In addition, the design principle of the present invention is reliable, the structure is simple, and it has a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0018] Figure 2 It is a schematic diagram of a box plot comparison effect of the SL-GWO algorithm of an embodiment of the present invention and other algorithms in solving problems of different scales.
[0019] Figure 3 It is a schematic diagram of the algorithm convergence curve comparison effect of the SL-GWO algorithm of an embodiment of the present invention and other algorithms in solving problems of different scales.
[0020] Figure 4 is a schematic block diagram of a system according to an embodiment of the present invention.
[0021] Figure 5 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0024] The discrete flexible manufacturing production line scheduling method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the discrete flexible manufacturing production line scheduling system runs in the computer device.
[0025] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a discrete flexible manufacturing production line scheduling system. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.
[0026] To facilitate understanding of the present invention, the discrete flexible manufacturing production line scheduling method provided by the present invention is further described below based on the principle of the discrete flexible manufacturing production line scheduling method of the present invention and the process of managing pluggable module materials in the embodiment.
[0027] The embodiment randomly generates 10 small- to medium-sized flexible job shop scheduling examples with multiple process routes for simulation testing, in which the number of machines ranges from 3 to 15, the number of workpieces ranges from 6 to 20, and each workpiece has at least 2 process routes, as shown in Table 1.
[0028] Table 1
[0029] Specifically, Figure 1 As shown, the discrete flexible manufacturing production line scheduling method includes: S1. Acquire data of a workpiece to be processed and data of a machine used to process the workpiece to be processed.
[0030] S2. Based on the data of the workpiece to be processed, the data of the machine used to process the workpiece to be processed and the preset constraints, a scheduling mathematical model is established with minimization of the maximum completion time as the optimization goal.
[0031] Determine the discrete flexible manufacturing production line scheduling problem (MRFJSP) with multiple process routes. MRFJSP can be described as follows: the workpiece data to be processed includes Workpieces to be processed , the machine data for processing the workpiece to be processed includes m machines that can be used to process the workpiece . Set each workpiece to be processed Process routes, where the workpiece to be processed The number of processes corresponding to each process route is , each process You can select the processing machine set from all machines M Any machine The processing time of the same process on different machines may vary.
[0032] Set constraints. The constraints include:
[0033] Formula (a) means that each workpiece can only choose one process route at a time, where Representation of workpiece The number of process routes; Formula (b) means that only one machine can be selected for each process, where Representation of workpiece In the The total number of processes on the process route; Formula (c) means that each machine can only process one process at any time; Formula (d) means that the completion time of the process is not less than the sum of the start time and the processing time, where Indicates the process In the machine The completion time on Indicates the process In the machine The start processing time on Indicates the process In the machine The processing time on the workpiece; Formula (e) means that the workpiece can only be processed in the next process after the previous process is completed.
[0034] Establish a scheduling mathematical model and set processing route decision variables It is used to indicate the process route selected for the workpiece to be processed, that is, (1) in, Representation of workpiece No. process routes; Setting machine decision variables The processing machine used to indicate the process selection, i.e. (2) in, Representation of workpiece In the The first process line A process; The objective function is to minimize the maximum completion time of the workpiece, that is, (3) in, Representation of workpiece The completion time, Indicates the maximum completion time of all workpieces.
[0035] Specifically, for example, there are 2 workpieces to be processed and 6 machines for processing the workpieces to be processed. Each workpiece has two process routes to choose from, and the process corresponding to each process route can be processed by any machine in the machine set, as shown in Table 2.
[0036] Table 2
[0037] The description of the variables used in this application is shown in Table 3.
[0038] Table 3
[0039] S3. Set the encoding scheme, decoding scheme and increase / decrease code scheme of the scheduling mathematical model, and establish a mapping relationship between the scheduling mathematical model and the gray wolf individual position vectors in the gray wolf algorithm. The gray wolf individual position vectors include the process route selection, process sorting and machine allocation of the workpiece to be processed.
[0040] The coding scheme of the scheduling mathematical model is set, and the individual position vector of each gray wolf in the gray wolf algorithm is designed as a three-segment vector, the candidate solution dimension d=N+2G, the length of the first segment position vector is N, N represents the number of workpieces, the length of the second segment position vector is G, G represents the total number of processes for processing all workpieces, and the length of the third segment position vector is G, and the value of each segment code adopts a real number between (0,1) as the code value; A decoding scheme of the scheduling mathematical model is set, and the corresponding process route coding interval is partitioned according to the number of optional process routes for each workpiece. After the decoding of the route selection position vector is completed in a roulette manner, the total number of processes of the workpiece can be obtained, and the position vectors of the process segments are sorted in descending order, and then the corresponding process sequence is rearranged according to the arranged position vectors to obtain the decoding result of the process vector segment. After the decoding of the first two segments of the position vectors is completed, the set of processing machines that can be selected for each process can be determined, and the machine for processing each process is obtained by using the roulette method according to the position vector; Setting the increase and decrease coding scheme of the scheduling mathematical model, measuring the total number of processes corresponding to the original dimension of the candidate solution and the total number of actual processes corresponding to the route selection segment of the candidate solution before each coding; If the total number of original processes is less than the total number of actual processes, the code is increased, and the complement number is the difference between the total number of actual processes and the total number of original processes. A random function is used to generate the complement code of the corresponding number of position elements; If the total number of original processes is greater than or equal to the total number of actual processes, then the code is reduced. The reduction method is to use the end of the position vector to reduce the code, and the reduction number is the difference between the total number of actual processes and the total number of original processes.
[0041] Specifically, based on the characteristics of the MRFJSP model, the encoding needs to simultaneously represent the process route selection, the order between processes, and the machine allocation, so the position vector of each individual is designed as a three-segment vector. During decoding, the encoding of the position vector is composed of the process route segment, the process segment, and the machine segment in sequence. Since the total number of processes corresponding to different process routes for the same workpiece may be different, when the process route selection string changes when updating the gray wolf individual position vector, the dimension will be inconsistent, resulting in an inability to solve. Therefore, it is necessary to consider the increase and decrease of the gray wolf individual position vector.
[0042] S4. Use the DQN algorithm to pre-train the control parameters of the gray wolf algorithm, obtain a trained parameter control model, and iterate the gray wolf algorithm to output the optimal solution of the gray wolf algorithm, and decode and generate a scheduling plan that minimizes the maximum completion time of the scheduling mathematical model.
[0043] Use the DQN algorithm to pre-train the control parameters of the Gray Wolf algorithm to obtain a trained parameter control model, including S41-S43: S41. Model the population optimization process of the gray wolf algorithm as a Markov decision process MDP, and set the state feature vector, action and reward function of the Markov decision process MDP.
[0044] S411, the method for setting the state characteristic vector of the Markov decision process MDP includes: State space design: defining the population evolution rate in generation t , define the population diversity of the tth generation , define the tth generation population neutrality And define the dispersion of the population in the tth generation , based on the population evolution rate of the tth generation , population diversity in the tth generation , the tth generation population neutrality and the dispersion degree of the population in the tth generation Constructing state feature vector ; Define the population evolution rate of the tth generation The ratio of the change in the fitness value of the current generation to the change in the fitness value of the previous generation: (5) in, is the population size, Represents an individual The fitness value of , used to distinguish individual gray wolves, t is the current iteration number, that is, the tth generation population, if If the value of is equal to 0, it means that the population tends to converge or falls into a local optimum; Define the population diversity of generation t for: (6) Use The sum of cosine similarities between the best individual in the population and other individuals is used to define population neutrality. : (7) in, Indicates The best individual in the population, represents the 2-norm of an individual; The maximum value of the Euclidean distance between individuals in the population and the best individual is used as the measure of population dispersion, and the dispersion degree of the t-th generation population is defined as for: (8) The state feature vector describing the current environment is composed based on the above feature definitions and combinations. for: (9) in, represents the initial population diversity, Indicates that the initial population is neutral, represents the initial population dispersion, is the maximum number of iterations of the gray wolf population.
[0045] Specifically, the parameter control problem of the gray wolf optimization algorithm is modeled as a Markov decision process (MDP), and its state, action and reward functions are analyzed and designed.
[0046] S412, Action Space Design: Coordination Coefficient of Grey Wolf Algorithm (GWO) The convergence factor The value of is controlled to change within the interval [-a, a]. It will keep the gray wolves away from prey and prompt the wolf pack to conduct a global search; When the gray wolf approaches the prey, it will prompt the wolf pack to conduct a local search. In order to facilitate the construction of the action set, the synergy coefficient calculation formula is modified as follows: (10) in and The value range of is [0,2]. By controlling the values of these two parameters, the proportion of global and local search in the population can be balanced. In DQN, the action that should be performed in each state is determined as a combination of the two algorithm parameter values, and the action set is defined. as follows: (11) in, is the dimension of the action space, i.e. the number of actions, and They are and The subdivision density is larger and It can achieve better parameter control effect, but it will also bring higher training complexity.
[0047] S413. Define the reward function: Represents an individual Execute an action After obtaining the objective function value of the algorithm parameter value, the reward function is defined as follows: (12) in, is a hyperparameter that controls the population evolution rate. Here, the population evolution rate is set to , Represents an individual In action The change of the objective function value after is a symbolic function: (13) S42. Construct the neural network structure of the DQN algorithm, set 1 input layer, 1 output layer and 5 hidden layers, the number of nodes in the input layer and the output layer are the same as the number of state features in the state and the number of available actions in the action, each hidden layer has 128 neuron nodes, and the Tanh function is used as the activation function. S43. Based on the state feature vector, action, reward function and the neural network structure of the DQN algorithm, train the parameter control model of the gray wolf algorithm.
[0048] Specifically, the structure of the DQN online network and the target network is exactly the same as the initial parameters. This application uses a multi-layer perceptron (MLP) with 1 input layer, 1 output layer and 5 hidden layers. The number of nodes in the input layer and the output layer is the same as the number of state features and the number of available actions, respectively. Each hidden layer has 128 neuron nodes, and the Tanh function is used as the activation function. The relevant parameter settings of the DQN algorithm are shown in Table 4.
[0049] Table 4
[0050] Pre-train the DQN model, use the scheduling example of case 4 as the training set, and generate the gray wolf population offline training DQN network structure according to the encoding method. Calculate the state of reinforcement learning according to formulas (5)-(9), discretize the coordination coefficient and convergence factor of the gray wolf algorithm according to formulas (10)-(11), and calculate the reinforcement learning action set composed of control parameters. , calculate the reward value after executing the action according to formula (12)-(13), and train 2000 times to allow the agent to learn the experience of solving this type of scheduling problem.
[0051] This application compares the solving performance of five algorithms including genetic algorithm (IGA), artificial bee colony algorithm (ABC), improved particle swarm algorithm (IPSO), grey wolf algorithm (GWO), and the grey wolf optimization algorithm based on parameter self-learning (SL-GWO) proposed in this invention according to the algorithm characteristics. The population size of all algorithms is set to 200, the maximum number of iterations is set to 500, and the other algorithm-related parameters are shown in Table 5.
[0052] Table 5
[0053] For each instance under the algorithm, the experiment was repeated 10 times independently. The results are shown in Table 6. The relative percentage deviation (RPD) is used to measure the discrete degree of the solutions of different algorithms. It can be seen that the performance of the SL-GWO proposed in this application has been significantly improved compared with the original GWO. Compared with other algorithms, the SL-GWO algorithm performs best in both the optimal completion time and the average time. In all the examples, the value of SL-GWO is the smallest, which shows that the SL-GWO algorithm always maintains superior solution accuracy and stability in the processing of multi-process route flexible workshop scheduling problems. Furthermore, the box plots of the five algorithms in solving three different examples, Case 1, Case 5 and Case 8, are given (as shown in Figure 2). Figure 2 As shown) and the algorithm convergence curve (as shown Figure 3 This further verifies the superiority and effectiveness of the algorithm proposed in this application.
[0054] Table 6
[0055] According to the state feature vector, action, reward function and network structure defined in the above steps, the parameter control model is trained offline based on the DQN algorithm, namely the DQN action value function. Specifically, during the training process, DQN randomly samples from the four-tuple of historical state-action-reward-next state through experience replay, and updates the Q value using the Q-learning algorithm. The target network is updated regularly to improve the stability of training. Ultimately, the agent selects the optimal action by maximizing the Q value, thereby optimizing the decision-making process. The update formula of the action value function Q is as follows: (14) in, Indicates in status The next agent performs an action What you get value, is the learning rate, is the reward in the current state, is a discount factor, which indicates the influence of current rewards on future rewards. Is to perform an action The next state to enter is is among all possible actions in the next state The action with the greatest value.
[0056] Iterate the Grey Wolf Algorithm, output the optimal solution of the Grey Wolf Algorithm, and decode and generate the scheduling plan that minimizes the maximum completion time of the scheduling mathematical model, including: Q1. Initialize the grey wolf algorithm population according to the encoding scheme.
[0057] Q2. Calculate the state of the grey wolf algorithm population according to the state feature vector.
[0058] Q3. Under the state of the gray wolf algorithm population, perform the action to obtain the control parameters of the gray wolf algorithm and , the control parameters and is the synergy coefficient vector.
[0059] Q4. According to the control parameters and Perform roundup, hunting and attack operations on the gray wolf algorithm and update the individual positions of the gray wolves.
[0060] Specifically, the gray wolf algorithm performs the trapping, hunting and attacking operations according to the control parameters, and iteratively generates and updates the wolf pack positions. The gray wolf optimization (GWO) process consists of the best three solutions (i.e. , , ) and is completed by a person with good prey search ability. , , The wolf leads other individuals to round up and hunt, ultimately completing the capture of the prey. The process of encircling and capturing prey is as follows: Formula (14) is the distance calculation formula between the gray wolf and the prey, and Formula (15) is the position update formula of the gray wolf.
[0061] (15) (16) in represents the position vector of the prey, represents the position vector of the gray wolf; is the current iteration number; , The synergy coefficient is determined by the control parameter and Calculated.
[0062] During hunting, the main , , The wolf is responsible for locating the location of the prey and instructing other individuals in the pack to update their location.
[0063] (17) (18) (19) In the formula , , Respectively express , , Wolf influence, The wolf's position after adjustment, the final movement direction of the wolf pack is determined by Sure.
[0064] Q5. Determine whether the gray wolf algorithm has reached the preset number of iterations. If so, output the optimal gray wolf individual and the gray wolf algorithm ends. If not, return to step Q3.
[0065] In some embodiments, the discrete flexible manufacturing production line scheduling system may include multiple functional modules composed of computer program segments. The computer program of each program segment in the discrete flexible manufacturing production line scheduling system may be stored in the memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Function of discrete flexible manufacturing production line scheduling.
[0066] In this embodiment, the discrete flexible manufacturing production line scheduling system can be divided into multiple functional modules according to the functions it performs, such as Figure 4 As shown. The functional modules of the system 200 may include: an acquisition module 210, a scheduling mathematical model building module 220, a coding scheme design module 230 and a scheduling scheme generation module 240. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0067] An acquisition module, used for acquiring data of a workpiece to be processed and data of a machine used for processing the workpiece to be processed; A scheduling mathematical model building module is used to build a scheduling mathematical model based on the workpiece data to be processed, the machine data for processing the workpiece to be processed and the preset constraint conditions, with the minimization of the maximum completion time as the optimization goal; A coding and decoding scheme design module is used to set the coding scheme, decoding scheme and increase and decrease code scheme of the scheduling mathematical model, and establish a mapping relationship between the scheduling mathematical model and the gray wolf individual position vector in the gray wolf algorithm, wherein the gray wolf individual position vector includes the process route selection, process sorting and machine allocation of the workpiece to be processed; The scheduling scheme generation module is used to use the DQN algorithm to pre-train the control parameters of the gray wolf algorithm, obtain the trained parameter control model, iterate the gray wolf algorithm, output the optimal solution of the gray wolf algorithm, and decode and generate a scheduling scheme that minimizes the maximum completion time of the scheduling mathematical model.
[0068] Figure 5 The present invention is a schematic diagram of the structure of a terminal 300 provided in an embodiment of the present invention. The terminal 300 can be used to execute the discrete flexible manufacturing production line scheduling method provided in an embodiment of the present invention.
[0069] The terminal 300 may include: a processor 310, a memory 320 and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0070] The memory 320 can be used to store the execution instructions of the processor 310, and the memory 320 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 can perform some or all of the steps in the following method embodiments.
[0071] The processor 310 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 310 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0072] The communication unit 330 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.
[0073] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0074] Therefore, the present invention fully considers the diversity of workpiece processing paths in actual production through the scheduling mathematical model, breaking through the limitations of fixed process routes in traditional scheduling methods. This model can not only flexibly deal with uncertainties in production such as equipment failures and emergency orders, but also maximize the use of production resources, thereby improving the effectiveness and adaptability of the overall scheduling solution. Through the encoding and decoding scheme, the complex scheduling problem is mapped into a three-segment position vector representation, which can not only fully describe the process route selection, process sorting and machine allocation, but also solve the dimensional inconsistency problem caused by the change of the process route through the increase and decrease code operations. By reducing the workpiece in-process time, improving machine utilization, and reducing the idle rate and waiting time of the production line through efficient scheduling, the productivity of the flexible manufacturing system can be significantly improved. The technical effects that can be achieved by this embodiment can be found in the description above, and will not be repeated here.
[0075] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.
[0076] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0077] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.
[0078] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0079] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0080] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all of these shall be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A discrete flexible manufacturing production line scheduling method, characterized in that: include: Acquiring data of a workpiece to be processed and data of a machine used to process the workpiece to be processed; Based on the data of the workpiece to be processed, the data of the machine used to process the workpiece to be processed and the preset constraints, a scheduling mathematical model is established with the minimization of the maximum completion time as the optimization goal; Setting the coding scheme, decoding scheme and increase / decrease coding scheme of the scheduling mathematical model, establishing the mapping relationship between the scheduling mathematical model and the gray wolf individual position vectors in the gray wolf algorithm, wherein the gray wolf individual position vectors include the process route selection, process sequencing and machine allocation of the workpiece to be processed; The DQN algorithm is used to pre-train the control parameters of the gray wolf algorithm to obtain a trained parameter control model, and the gray wolf algorithm is iterated to output the optimal solution of the gray wolf algorithm. The scheduling plan that minimizes the maximum completion time of the scheduling mathematical model is decoded and generated.
2. The method according to claim 1, characterized in that Based on the data of the workpiece to be processed, the data of the machine used to process the workpiece to be processed and the preset constraints, a scheduling mathematical model is established with the minimization of the maximum completion time as the optimization goal, including: The workpiece data to be processed includes Workpieces to be processed , the machine data for processing the workpiece to be processed includes m machines that can be used to process the workpiece ; Set each workpiece to be processed Process routes, where the workpiece to be processed The number of processes corresponding to each process route is , each process You can select the processing machine set from all machines M Any machine The processing time of the same process on different machines varies; Set constraints, establish scheduling mathematical models, and set processing route decision variables It is used to indicate the process route selected for the workpiece to be processed, that is, (1) in, Representation of workpiece No. process routes; Setting machine decision variables The processing machine used to indicate the process selection, i.e. (2) in, Representation of workpiece In the The first process line A process; The objective function is to minimize the maximum completion time of the workpiece, that is, (3) in, Representation of workpiece The completion time, Indicates the maximum completion time of all workpieces.
3. The method according to claim 2, characterized in that The constraints include: (4) Formula (a) means that each workpiece can only choose one process route at a time, where Representation of workpiece The number of process routes; Formula (b) means that only one machine can be selected for each process, where Representation of workpiece In the The total number of processes on the process route; Formula (c) means that each machine can only process one process at any time; Formula (d) means that the completion time of the process is not less than the sum of the start time and the processing time, where Indicates the process In the machine The completion time on Indicates the process In the machine The start processing time on Indicates the process In the machine The processing time on the workpiece; Formula (e) means that the workpiece can only be processed in the next process after the previous process is completed.
4. The method according to claim 1, characterized in that The coding scheme, decoding scheme and increase / decrease code scheme of the scheduling mathematical model are set, and the mapping relationship between the scheduling mathematical model and the gray wolf individual position vector in the gray wolf algorithm is established. The gray wolf individual position vector includes the process route selection, process sorting and machine allocation of the workpiece to be processed, including: The coding scheme of the scheduling mathematical model is set, and the individual position vector of each gray wolf in the gray wolf algorithm is designed as a three-segment vector, the candidate solution dimension d=N+2G, the length of the first segment position vector is N, N represents the number of workpieces, the length of the second segment position vector is G, G represents the total number of processes for processing all workpieces, and the length of the third segment position vector is G, and the value of each segment code adopts a real number between (0,1) as the code value; A decoding scheme of the scheduling mathematical model is set, and the corresponding process route coding interval is partitioned according to the number of optional process routes for each workpiece. After the decoding of the route selection position vector is completed in a roulette manner, the total number of processes of the workpiece can be obtained, and the position vectors of the process segments are sorted in descending order, and then the corresponding process sequence is rearranged according to the arranged position vectors to obtain the decoding result of the process vector segment. After the decoding of the first two segments of the position vectors is completed, the set of processing machines that can be selected for each process can be determined, and the machine for processing each process is obtained by using the roulette method according to the position vector; Setting the increase and decrease coding scheme of the scheduling mathematical model, measuring the total number of processes corresponding to the original dimension of the candidate solution and the total number of actual processes corresponding to the route selection segment of the candidate solution before each coding; If the total number of original processes is less than the total number of actual processes, the code is increased, and the complement number is the difference between the total number of actual processes and the total number of original processes. A random function is used to generate the complement code of the corresponding number of position elements; If the total number of original processes is greater than or equal to the total number of actual processes, then the code is reduced. The reduction method is to use the end of the position vector to reduce the code, and the reduction number is the difference between the total number of actual processes and the total number of original processes.
5. The method according to claim 1, characterized in that: Use the DQN algorithm to pre-train the control parameters of the Gray Wolf algorithm to obtain a trained parameter control model, including: Model the optimization process of the gray wolf algorithm population as a Markov decision process MDP, and set the state feature vector, action and reward function of the Markov decision process MDP; Construct the neural network structure of the DQN algorithm, set 1 input layer, 1 output layer and 5 hidden layers. The number of nodes in the input layer and the output layer are the same as the number of state features in the state and the number of available actions in the action. Each hidden layer has 128 neuron nodes, and the Tanh function is used as the activation function. Based on the state feature vector, action, reward function and neural network structure of the DQN algorithm, the parameter control model of the gray wolf algorithm is trained.
6. The method according to claim 5, characterized in that Methods for setting the state feature vector of the Markov decision process MDP include: Define the population evolution rate of the tth generation , define the population diversity of the tth generation , define the tth generation population neutrality And define the dispersion of the population in the tth generation , based on the population evolution rate of the tth generation , population diversity in the tth generation , the tth generation population neutrality and the dispersion degree of the population in the tth generation Constructing state feature vector ; Define the population evolution rate of the tth generation The ratio of the change in the fitness value of the current generation to the change in the fitness value of the previous generation: (5) in, is the population size, Represents an individual The fitness value of , used to distinguish individual gray wolves, t is the current iteration number, that is, the t-th generation population, if If the value of is equal to 0, it means that the population tends to converge or falls into a local optimum; Define the population diversity of generation t for: (6) Use The sum of cosine similarities between the best individual in the population and other individuals is used to define population neutrality. : (7) in, Indicates The best individual in the population, represents the 2-norm of an individual; The maximum value of the Euclidean distance between individuals in the population and the best individual is used as the measure of population dispersion, and the dispersion degree of the t-th generation population is defined as for: (8) The state feature vector describing the current environment is composed based on the above feature definitions and combinations. for: (9) in, represents the initial population diversity, Indicates that the initial population is neutral, represents the initial population dispersion, is the maximum number of iterations of the gray wolf population.
7. The method according to claim 5, characterized in that Iterate the Grey Wolf Algorithm, output the optimal solution of the Grey Wolf Algorithm, and decode and generate a scheduling solution that minimizes the maximum completion time of the scheduling mathematical model, including: Q1. Initialize the grey wolf algorithm population according to the coding scheme; Q2. Calculate the state of the gray wolf algorithm population according to the state feature vector; Q3. Under the state of the gray wolf algorithm population, perform the action to obtain the control parameters of the gray wolf algorithm. and , the control parameters and is the synergy coefficient vector; Q4. According to the control parameters and Perform roundup, hunting and attack operations on the gray wolf algorithm and update the individual positions of the gray wolves; Q5. Determine whether the gray wolf algorithm has reached the preset number of iterations. If so, output the optimal gray wolf individual and the gray wolf algorithm ends. If not, return to step Q3.
8. A discrete flexible manufacturing production line scheduling system, characterized in that: include: An acquisition module, used for acquiring data of a workpiece to be processed and data of a machine used for processing the workpiece to be processed; A scheduling mathematical model building module is used to build a scheduling mathematical model based on the workpiece data to be processed, the machine data for processing the workpiece to be processed and the preset constraint conditions, with the minimization of the maximum completion time as the optimization goal; A coding and decoding scheme design module is used to set the coding scheme, decoding scheme and increase and decrease code scheme of the scheduling mathematical model, and establish a mapping relationship between the scheduling mathematical model and the gray wolf individual position vector in the gray wolf algorithm, wherein the gray wolf individual position vector includes the process route selection, process sorting and machine allocation of the workpiece to be processed; The scheduling scheme generation module is used to use the DQN algorithm to pre-train the control parameters of the gray wolf algorithm, obtain the trained parameter control model, iterate the gray wolf algorithm, output the optimal solution of the gray wolf algorithm, and decode and generate a scheduling scheme that minimizes the maximum completion time of the scheduling mathematical model.
9. A terminal, characterized in that: include: A memory for storing a discrete flexible manufacturing production line scheduling program; A processor is used to implement the steps of the discrete flexible manufacturing production line scheduling method as described in any one of claims 1-7 when executing the discrete flexible manufacturing production line scheduling program.
10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a discrete flexible manufacturing production line scheduling program, and when the discrete flexible manufacturing production line scheduling program is executed by the processor, the steps of the discrete flexible manufacturing production line scheduling method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Optimized scheduling method of metal casting blank cutting and shaping process
CN108829036A
Method for obtaining optimal scheduling scheme for processing part based on improved multi-target Grey Wolf algorithm
CN109669423A
5G communication system resource allocation method based on improved grey wolf optimization algorithm
CN111787543A
Robot multi-target path planning based on improved mayfly naiad optimization algorithm
CN113485451A
Flexible job shop scheduling method based on improved wolf pack algorithm
CN113902173A