Scheduling method and device for flexible job shop, and storage medium
Through Q-learning technology and quality-diversity algorithm combined with a double-layer coding mechanism, the scheduling scheme of the flexible job shop is optimized, solving the scheduling problem under transmission constraints, improving production efficiency and energy utilization, and reducing costs.
Patent Information
- Application Number
- CN202410670332.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-09-17
AI Technical Summary
In the existing technology, there are few studies on the scheduling problem of flexible job shops with transmission constraints, resulting in low production efficiency, energy waste, low machine utilization, and lack of effective encoding and decoding rules and scheduling methods.
Q-learning technology is combined with the quality-diversity algorithm and double-layer coding mechanism to design a local search operator to minimize energy consumption and optimize the scheduling plan. By randomly obtaining the scheduling plan and updating the values in the feature space, the output energy can be satisfied to meet the termination conditions. The lowest cost option.
It significantly improves machine utilization and production efficiency, reduces energy consumption and production costs, ensures the diversity and high-quality characteristics of scheduling plans, and avoids uneven resource allocation.
Smart Images

Figure CN118655839A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flexible job shop scheduling, and in particular to a scheduling method, device and storage medium for a flexible job shop. Background Art
[0002] With the continuous progress of social productivity, manufacturing has become an important pillar of the national economy. The flexible job shop scheduling problem, as a common scheduling problem in the manufacturing industry, is widely present in the production environment of various fields in reality, such as logistics, semiconductors, steelmaking, and electricity, and has therefore attracted the attention of many researchers. Due to its NP-hard characteristics, traditional mathematical or precise methods are difficult to solve such problems. At this time, heuristic or meta-heuristic methods are needed to solve them. In the actual production process of enterprises, transmission constraints are commonly found in flexible job shops. By reducing the number of workpiece transmissions or the load rate of the machine, the productivity of the enterprise can be significantly improved, thereby reducing its production costs.
[0003] At present, the research on the flexible job shop scheduling problem with transmission constraints is not strong enough, and there are few related literatures. There are few studies to establish corresponding encoding and decoding rules for this problem, and there are also very few effective methods to solve this problem, but this problem is common in real production. Therefore, it is very important to establish effective encoding and decoding rules for the flexible job shop scheduling problem with transmission constraints and design corresponding methods. By solving this problem, the machine utilization efficiency of the enterprise can be fully improved, scheduling decisions can be provided for the actual production plan, unnecessary energy waste can be reduced, and production efficiency can be effectively improved. In addition, different scheduling sequences will have different effects on energy consumption. If the scheduling sequence is not arranged reasonably, it may cause a lot of idle time for the machine and significantly increase the transportation time, thereby extending the processing time and reducing the production efficiency of the workshop. Summary of the invention
[0004] In order to solve one of the technical problems existing in the prior art to at least a certain extent, an object of the present invention is to provide a scheduling method, device and storage medium for a flexible job shop.
[0005] The first technical solution adopted by the present invention is:
[0006] A scheduling method for a flexible job shop comprises the following steps:
[0007] Aiming at minimizing the energy consumption of the scheduling sequence, we design encoding and decoding rules for the flexible job shop scheduling problem with transmission constraints.
[0008] Randomly obtain a scheduling plan x from the feature space, use Q-learning technology to decide to obtain a local search operator; execute the obtained local search operator to obtain a new scheduling plan x ′ ;
[0009] Update the feature space according to the new scheduling scheme x′, and update the values in the Q table and related learning parameters;
[0010] Determine whether the termination condition is met. If so, output the scheduling plan with the lowest energy consumption value; otherwise, return to execute the step of randomly obtaining a scheduling plan x from the feature space.
[0011] Furthermore, the expression of the optimization objective of the flexible job shop scheduling problem with transmission constraints is:
[0012]
[0013] Where obj is the optimization target, i.e., the energy consumption value; I, J i , and M i,j Represent the workpiece set, process set and process O respectively i,j Optional machine set;TP i,j,k For process O i,j Processing energy consumption on machine k; TI k is the idle energy consumption of machine k; TT i,j,k,k , for process O i,j Transport energy consumption from machine k to machine k'.
[0014] Furthermore, the decoding rule adopts a two-layer coding mechanism, one layer is a coding based on process sequencing, and the other layer is a coding based on machine allocation sequence. The two layers of coding are combined together as the input of the decoding rule.
[0015] Furthermore, the encoding and decoding rules include the following steps:
[0016] Generate two integer vectors: process order OS and machine selection MS;
[0017] Retrieving the data stored in the two integer vectors to extract the machine number assigned to each process;
[0018] Using the decoding rule, all processes in the process sorting OS vector select the machine to be processed according to the corresponding machine number assigned in the machine selection MS vector;
[0019] Calculate the energy consumption of the entire machining process and obtain the target value, scheduling scheme sequence and corresponding characteristics.
[0020] Furthermore, the constraints of the flexible job shop scheduling problem include:
[0021] 1) At time zero, all processes and machines can be scheduled;
[0022] 2) One machine can only process one process at a time, and one process can only be processed by one machine at a time;
[0023] 3) Each process has one and only one direct predecessor and successor in the scheduling sequence. If the process is at the first or last position in the sequence, its predecessor and successor are both empty;
[0024] 4) Once a process starts on a machine, it cannot be preempted or interrupted by other processes;
[0025] 5) The time for setting up, adjusting and testing the machine is included in the processing time;
[0026] 6) The process processing time is greater than 0.
[0027] Furthermore, the scheduling method further comprises the step of initializing the feature space:
[0028] The quality-diversity algorithm is used to generate an initial scheduling plan, and the generated scheduling plan is saved in the feature space.
[0029] Further, the using the quality-diversity algorithm to generate an initial scheduling scheme includes:
[0030] The scheduling scheme is updated according to the existence of the scheduling scheme in the corresponding unit of the feature space and the size of the target value to determine whether the storage conditions are met. If there is no scheduling scheme in the unit (the unit is empty), the newly generated scheduling scheme is stored in the grid. Otherwise, it is determined whether the target value of the scheduling scheme in the unit is less than the target value of the newly generated scheduling scheme. If it is less, the newly generated scheduling scheme replaces the scheduling scheme in the unit. Otherwise, the scheduling scheme in the unit remains unchanged.
[0031] Furthermore, updating the feature space according to the new scheduling scheme x′ includes:
[0032] If the cell in the feature space corresponding to the scheduling plan x′ is empty, it is directly stored; otherwise, the scheduling plan x′ needs to be compared with the original scheduling plan x in the cell: if the scheduling plan x′ is better than the scheduling plan x, the scheduling plan x′ will replace the position of the scheduling plan x in the cell; otherwise, the scheduling plan x′ will be discarded.
[0033] Furthermore, the method of randomly obtaining a scheduling scheme x from the feature space and using Q-learning technology to decide and obtain a local search operator includes:
[0034] Randomly select a scheduling plan x from the space, and then select an execution action a according to the value in the Q table through Q-learning technology.t , as a local search operator; initially, the values of the Q table are all 0, and an action is randomly selected. If the values of the Q table are not all 0, the action with the largest Q value in the Q table is selected.
[0035] Furthermore, there are six local search operators, of which the first two are local search operators designed based on transmission constraints, and the remaining ones are local search operators designed based on machine sorting (two types) and process sorting (two types);
[0036] The operation steps of the first local search operator designed based on transmission constraints include:
[0037] Find the OS vector of the process order in the current scheduling scheme x;
[0038] Retrieve the process O with the longest transfer time i,j ;
[0039] Find process O i,j Selectable machine set M i,j ;
[0040] From the machine set M i,j Randomly select a i,j Machine k different from the original processing machine;
[0041] Change process O i,j The machine being processed;
[0042] Update the machine allocation in the machine selection MS vector and obtain a new scheduling plan x′;
[0043] The operation steps of the second local search operator designed based on transmission constraints include:
[0044] Find the critical path (the path with the longest completion time) in the current scheduling solution x;
[0045] Retrieve all key processes on the critical path;
[0046] Retrieve the process O with the longest transmission time among all key processes i,j ;
[0047] Find process O i,j Selectable machine set M i,j ;
[0048] From the machine set M i,j Randomly select a i,j Machine k different from the original processing machine;
[0049] Change process O i,j The machine being processed;
[0050] Update the machine allocation in the machine selection MS vector and obtain a new scheduling plan x′;
[0051] The operation steps of the third local search operator designed based on machine load include:
[0052] Find the machine selection MS vector in the current schedule x;
[0053] Retrieve the machines M1 and M2 with the largest and smallest loads from the machine selection MS vector respectively;
[0054] Traverse the processes on the machine with the smallest load. If the currently traversed process can be processed on the machine with the largest load, replace the processing machine of the process.
[0055] Update the information in the machine selection MS vector and obtain a new scheduling plan x′;
[0056] The operation steps of the fourth local search operator based on machine allocation design include:
[0057] Find the critical path in the current scheduling scheme x;
[0058] Retrieve all key processes on the critical path;
[0059] Randomly select a process O from all key processes i,j ;
[0060] From process O i,j The corresponding machine set M i,j Randomly select a machine k that can process, and make sure that machine k is different from the original assigned machine;
[0061] Change process O i,j The processing machine selected;
[0062] Update the information in the machine selection MS vector and obtain a new scheduling plan x′;
[0063] The operation steps of the fifth local search operator based on process sequencing design include:
[0064] Find the critical path in the current scheduling scheme x;
[0065] Retrieve all key processes on the critical path;
[0066] Randomly select two processes O that do not belong to the same workpiece i from the key processes i,j and process O i’,j ;
[0067] Exchange process O i,j and process O i’,jPosition in the process sorting OS vector;
[0068] Update the information in the process sorting OS vector and obtain a new scheduling plan x′;
[0069] The operation steps of the sixth local search operator based on process sequencing design include:
[0070] Find the critical path in the current scheduling scheme x;
[0071] Retrieve all key processes on the critical path;
[0072] Randomly select a process O from the key processes i,j ;
[0073] Randomly select a process O from all processes i,j , process O i,j and process O i’,j They do not belong to the same artifact;
[0074] Find process O i,j and process O i’,j Position in the process sorting OS vector;
[0075] In the process sorting OS vector, insert the later process in front of the earlier process;
[0076] Update the information in the process sorting OS vector and get a new scheduling plan x ′ .
[0077] The second technical solution adopted by the present invention is:
[0078] A scheduling device for a flexible job shop, comprising:
[0079] at least one processor;
[0080] at least one memory for storing at least one program;
[0081] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.
[0082] The third technical solution adopted by the present invention is:
[0083] A computer-readable storage medium stores a program executable by a processor, wherein the program executable by the processor is used to execute the method described above when executed by the processor.
[0084] The present invention provides a scheduling method for a flexible job shop, which has the following beneficial effects:
[0085] Method level:
[0086] (1) The present invention designs a quality-diversity algorithm based on transmission constraints and machine idle state, which can ensure the diversity of solutions in the feature space;
[0087] (2) Based on the quality-diversity algorithm, the Q-learning technology is combined to further improve the local search ability of the algorithm and greatly improve the convergence of the solution;
[0088] (3) A local search operator based on transportation constraint design is proposed. Combined with the local search operator based on machine sequencing and process sequencing, the scheduling scheme can be improved more comprehensively and the energy consumption in processing can be reduced.
[0089] (4) Applicable and effective decoding rules are designed, which provide an effective interface for the designed algorithm to calculate the target value.
[0090] Application level:
[0091] (1) Compared with the traditional flexible job shop scheduling method, the method provided by the present invention studies the problem from a new perspective and has the advantages of being easy to implement and improve, and easy to adjust parameters;
[0092] (2) The scheduling scheme can be continuously improved and optimized, obtaining diverse scheduling schemes while ensuring their high quality characteristics;
[0093] (3) It can effectively design the feature space according to the actual needs of users, improve the utilization rate of transportation machines and processing machines, and thus save the processing energy consumption of the factory;
[0094] (4) It can effectively maintain load balance among multiple machines, avoid uneven resource allocation during the processing process, and improve machine utilization. The optimized scheduling plan significantly shortens the energy consumption of transportation and machine space compared to the original plan, thereby reducing the company's production costs.
[0095] Therefore, the present invention provides an intelligent optimization algorithm for a flexible job shop, which provides a good scheduling solution for solving flexible job shop scheduling and related problems, ensures uniform resource allocation of machines in the factory, and reduces the energy consumption of the entire scheduling solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0096] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0097] Figure 1 It is a flow chart of a scheduling method of a flexible job shop of the present invention;
[0098] Figure 2 is a performance comparison chart of the method of the present invention and other algorithms;
[0099] Figure 3 It is a comparison diagram of the convergence curves of the present invention and other algorithms. DETAILED DESCRIPTION
[0100] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0101] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0102] In the description of the present invention, the meaning of "several" is one or more, the meaning of "more" is two or more, and the meanings of "greater than", "less than", "exceed" and the like are understood as not including the number itself, and the meanings of "above", "below", "within" and the like are understood as including the number itself. If there is a description of the first and the second, it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features. In addition, "and / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects before and after are in an "or" relationship.
[0103] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific content of the technical solution.
[0104] In order to better solve the problem of flexible job shop scheduling with transmission constraints, the present invention proposes an efficient intelligent optimization algorithm, which takes minimizing energy consumption as the optimization goal, and stores the scheduling scheme and the optimized energy consumption target value in the grid of the feature space. Compared with the traditional flexible job shop optimization algorithm, the optimization scheme provided by the present invention solves from a completely new perspective: finding a high-performance scheduling scheme based on the diversity of solution features, which has fewer parameters, is easier to implement and improve. In addition, the optimization algorithm can find more diverse scheduling schemes and continuously and stably optimize, so as to obtain a higher quality scheduling scheme as a whole. The algorithm can effectively define the feature space according to user needs, making the improvement more flexible. By using this algorithm, the production efficiency of the enterprise can be significantly improved, the unreasonable allocation phenomenon encountered in production can be avoided, and the stability and reliability of the production line can be improved. The optimized scheduling scheme can reduce transportation costs and processing costs, reduce energy waste, and thus reduce production costs.
[0105] like Figure 1 As shown, this embodiment provides a scheduling method for a flexible job shop, comprising the following steps:
[0106] Step 1: With the goal of minimizing the energy consumption of the scheduling sequence, the encoding and decoding rules of the flexible job shop scheduling problem with transmission constraints are designed. The decoding rule adopts a two-layer encoding mechanism. One layer is the encoding based on the process sequence, and the other layer is the encoding based on the machine allocation sequence. The two-layer encoding is combined as the input of the decoding rule. The optimization objective function of the flexible job shop scheduling problem with transmission constraints is:
[0107]
[0108] Where obj is the optimization target, i.e., the energy consumption value; I, J i , and M i,j Represent the workpiece set, process set and process O respectively i,j Optional machine set;TP i,j,k For process O i,j Processing energy consumption on machine k, TI k is the idle energy consumption of machine k; TT i,j,k,k , for process O i,j Transport energy consumption from machine k to machine k'.
[0109] Step 2: Generate an initial scheduling plan under the framework of the quality-diversity optimization algorithm and store it in the feature space; if the corresponding cell in the feature space is empty, store it directly; otherwise, compare the newly generated scheduling plan with the original scheduling plan in the cell: if the new scheduling plan is better than the original scheduling plan, the new plan replaces the original plan; otherwise, the new scheduling plan is discarded.
[0110] Step 3: Randomly select a scheduling scheme x from the feature space. The scheduling scheme is based on a two-layer encoding rule, and then the Q-learning technique is used to decide the local search operator to be executed; there are six local search operators to choose from, the first two are local search operators designed based on transmission constraints, and the remaining ones are local search operators designed based on machine sorting (two types) and process sorting (two types).
[0111] Step 4: The local search operator decided by Q-learning technique is used as action a t Execute the corresponding local search operator. After executing the local search operator, a new scheduling plan x′ is obtained.
[0112] Step 5: Update the solution stored in the feature space: If the cell in the feature space corresponding to x′ is empty, store it directly; otherwise, compare the new scheduling solution x′ with the original scheduling solution x in the cell: if x′ is better than x, x′ replaces the position of x in the cell; otherwise, x′ is discarded;
[0113] Step 6: Update the value of the Q table and related learning parameters to determine whether the termination conditions are met. If so, terminate the evaluation and output the scheduling plan with the lowest energy consumption value. Otherwise, continue to return to step 3.
[0114] As an optional implementation, the flexible job shop scheduling method with transmission constraints provided in this embodiment mainly includes the following implementation process:
[0115] Aiming at minimizing the energy consumption of the scheduling sequence, the encoding and decoding rules for the flexible job shop scheduling problem with transmission constraints are designed. The decoding rule adopts a two-layer encoding mechanism. One layer is the encoding based on the process sequence, and the other layer is the encoding based on the machine allocation sequence. The two-layer encoding is combined as the input of the decoding rule. The optimization objective function of the flexible job shop scheduling problem with transmission constraints is:
[0116]
[0117] Where obj is the optimization target, i.e., the energy consumption value; I, J i , and M i,j Represent the workpiece set, process set and process O respectively i,j Optional machine set;TP i,j,k For process O i,j Processing energy consumption on machine k, TI k is the idle energy consumption of machine k; TT i,j,k,k , for process O i,j Transport energy consumption from machine k to machine k'.
[0118] The encoding and decoding rules include the following steps:
[0119] First, generate two integer vectors, OS and MS;
[0120] Secondly, traverse the data in the two vectors and extract the machine number assigned to each process;
[0121] Next, select the machine for the process according to the MS vector;
[0122] Finally, the energy consumption of the entire process is calculated to obtain the target value, characteristics and corresponding scheduling plan.
[0123] The constraints of the flexible job shop scheduling problem with transport constraints include:
[0124] Ensure that all processes and machines can be scheduled at zero time;
[0125] Ensure that one machine can only process one process at a time, and one process can only be processed by one machine at a time;
[0126] Ensure that each process has one and only one direct predecessor and successor in the scheduling sequence. If the process is at the first or last position in the sequence, its predecessor and successor are both empty;
[0127] Ensure that once a process starts on a machine, it cannot be preempted or interrupted by other processes;
[0128] Ensure that the machine setup, adjustment, and testing time are included in the processing time;
[0129] Make sure the process time is greater than 0.
[0130] As an optional implementation, in step 1, the encoding and decoding rules of the flexible job shop scheduling problem with transportation constraints include the following steps:
[0131] First, generate two integer vectors, OS for process order and MS for machine selection;
[0132] Secondly, the data stored in the two vectors are retrieved to extract the machine number assigned to each process;
[0133] Then, using the decoding rule, all processes in the OS vector select the machine to be processed according to the corresponding machine number assigned in the MS vector;
[0134] Finally, the energy consumption of the entire machining process is calculated to obtain the target value, scheduling scheme sequence and corresponding characteristics.
[0135] As an optional implementation, the initial scheduling scheme generated in step 2 under the quality-diversity algorithm framework includes the following steps:
[0136] First, the target value, scheduling scheme sequence and corresponding features are calculated and obtained according to the encoding and decoding rules;
[0137] Secondly, the scheduling scheme is updated according to the existence of the scheduling scheme in the corresponding unit of the feature space and the size of the target value, and it is judged whether the storage conditions are met. If there is no scheduling scheme in the unit (the unit is empty), the newly generated scheduling scheme is stored in the grid. Otherwise, it is judged whether the target value of the scheduling scheme in the unit is less than the target value of the newly generated scheduling scheme. If it is less, the newly generated scheduling scheme replaces the scheduling scheme in the unit. Otherwise, the scheduling scheme in the unit remains unchanged.
[0138] As an optional implementation, after generating an initial solution under the quality-diversity optimization algorithm framework, the operation of the Q-learning technique to select an action has the following steps:
[0139] First, a scheduling scheme x is randomly selected from the space;
[0140] Secondly, the Q-learning technique selects an action a based on the value in the Q table. t Initially, the values in the Q table are all 0, and an action is randomly selected. If the values in the Q table are not all 0, the action with the largest Q value in the Q table is selected;
[0141] There are six local search operators to choose from. The first local search operator based on transmission constraints has the following steps:
[0142] First, find the OS vector in the current schedule x;
[0143] Secondly, retrieve the process O with the longest transfer time i,j ;
[0144] Next, find O i,j Selectable machine set M i,j ;
[0145] Next, from the machine set M i,j Randomly select a i,j Machine k different from the original processing machine;
[0146] Then, change O i,j The machine being processed;
[0147] Finally, the machine allocation in the machine vector MS is updated and a new schedule x' is obtained.
[0148] The operation steps of the second local search operator designed based on transmission constraints include:
[0149] First, find the critical path (the path with the longest completion time) in the current scheduling solution x;
[0150] Secondly, retrieve all the key processes on the critical path;
[0151] Secondly, retrieve the process O with the longest transmission time among all key processes i,j ;
[0152] Next, find O i,j Selectable machine set M i,j ;
[0153] Then, from the machine set M i,j Randomly select a i,j Machine k different from the original processing machine;
[0154] Finally, change O i,j The processed machines update the machine allocation in the machine vector MS and obtain a new scheduling plan x'.
[0155] The third type is a local search operator designed based on machine load, wherein the operation steps of the machine load search operator include:
[0156] First, find the MS vector in the current schedule x;
[0157] Secondly, retrieve the machines M1 and M2 with the largest and smallest loads from the MS vector respectively;
[0158] Next, traverse the processes on the machine with the smallest load. If the currently traversed process can be processed on the machine with the largest load, replace the processing machine of the process.
[0159] Finally, the information in the machine sort vector MS is updated and a new scheduling scheme x' is obtained.
[0160] The fourth type is a local search operator designed based on machine allocation, wherein the operation steps of the machine allocation search operator include:
[0161] First, find the critical path in the current scheduling scheme x;
[0162] Secondly, retrieve all the key processes on the critical path;
[0163] Next, randomly select a process O from all key processes i,j ;
[0164] Then, from O i,j The corresponding M i,j Randomly select a machine k that can process, and make sure that machine k is different from the original assigned machine;
[0165] Finally, change O i,j The selected processing machine updates the information in the machine selection vector MS and obtains a new scheduling plan x'.
[0166] The fifth type is a local search operator designed based on process sorting, wherein the operation steps of the search operator based on process sorting include:
[0167] First, find the critical path in the current scheduling scheme x;
[0168] Secondly, retrieve all the key processes on the critical path;
[0169] Next, randomly select two processes O that do not belong to the same workpiece i from the key processes i,j and O i’,j ;
[0170] Then, exchange O i,j and O i’,j Position in the OS vector;
[0171] Finally, the information in the machine sort vector OS is updated and a new scheduling scheme x' is obtained.
[0172] The sixth type is a local search operator designed based on process sorting, wherein the operation steps of the search operator based on process sorting include:
[0173] First, find the critical path in the current scheduling scheme x;
[0174] Secondly, retrieve all the key processes on the critical path;
[0175] Next, a process O is randomly selected from the key processes. i,j ;
[0176] Then, a process O is randomly selected from all processes. i’,j , O i,j and O i’,j They do not belong to the same artifact;
[0177] Finally, find O i,j and O i’,j At the position in the 0S vector, in the 0S vector, insert the process with a later position in front of the process with a earlier position, update the information in the machine sorting vector 0S, and obtain a new scheduling plan x'.
[0178] As an optional implementation, in step 5, updating the solution stored in the feature space comprises the following steps:
[0179] If the cell in the feature space corresponding to x' is empty, it is directly stored; otherwise, the new scheduling plan x' needs to be compared with the original scheduling plan x in the cell: if x' is better than x, x' replaces the position of x in the cell; otherwise, x' is discarded;
[0180] As an optional implementation, in step 6, the following steps are performed:
[0181] Update the value of the Q table and related learning parameters to determine whether the termination condition is met. If so, terminate the evaluation and output the scheduling plan with the lowest energy consumption value. Otherwise, continue to return to step 3.
[0182] This application improves the diversity of solutions by using a quality-diversity algorithm. By combining this framework with the Q-learning method, the local search capability of the algorithm is further improved, and the quality of the solution is improved, achieving a balance between exploration and development capabilities. The present invention is further described below through specific embodiments:
[0183] The simulation experiment uses 20 standard examples, where the number of workpieces j = {20, 30, 40, 50, 100}, the number of machines m = {5, 6, 7, 8}, and the workpiece processing time is evenly distributed in the range of [5, 20]. In the specific examples of the present invention, detailed description and experimental verification will be carried out.
[0184] The quality-diversity algorithm based on Q-learning, referred to as QQD, proposed in the present invention is compared with the original quality-diversity algorithm QD, the variable neighborhood search-genetic algorithm VNS-GA and the improved iterative greedy-simulated annealing algorithm IGSA to verify the effectiveness of the present invention. In addition, it is also compared with the most novel LRVMA and DQCE algorithms based on learning mechanisms. The above comparison algorithms are all high-performance optimization algorithms proposed in recent years. In order to reduce the error of the experiment, each example is repeated 20 times to ensure the uniformity and consistency of the algorithm. The relative percentage deviation Relativepercentageincrease, RPI, is used as the evaluation index of the algorithm performance. The calculation formula of RPI is RPI=(C i -C best ) / C best ×100, where C i represents the energy consumption value obtained by the specific algorithm, and C best It represents the minimum energy consumption value obtained by all algorithms. Obviously, the smaller the RPI value, the better the performance of the corresponding algorithm.
[0185] Figure 2 It is an intuitive representation of the statistics and solution distribution of all algorithm optimization results. Figure 2From the distribution range of RPI values, we can see that QQD is significantly better than VNS-GA, QD, IGSA, LRVMA and DQCE. In addition, Figure 3 The convergence curves of the minimum energy consumption values of the four algorithms are given as the number of evaluations increases. Figure 3 It can be seen that with the increase in the number of evaluations, the evolution curve of the QQD algorithm of the present invention is significantly lower than the evolution curves of other comparison algorithms, and the energy consumption value continues to decrease, indicating that the convergence of the method of the present invention is very good and can be continuously iterated and updated.
[0186] This embodiment also provides a scheduling device for a flexible job shop, including:
[0187] at least one processor;
[0188] at least one memory for storing at least one program;
[0189] When the at least one program is executed by the at least one processor, the at least one processor implements Figure 1 The method shown.
[0190] A scheduling device for a flexible job shop in this embodiment can execute a scheduling method for a flexible job shop provided by an embodiment of the method of the present invention, can execute any combination of implementation steps of the method embodiment, and has the corresponding functions and beneficial effects of the method.
[0191] The present application also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes Figure 1 The method shown.
[0192] This embodiment also provides a storage medium, which stores instructions or programs that can execute a scheduling method for a flexible job shop provided by an embodiment of the method of the present invention. When the instructions or programs are run, any combination of implementation steps of the method embodiment can be executed, and the corresponding functions and beneficial effects of the method can be obtained.
[0193] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0194] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0195] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0196] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0197] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0198] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0199] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0200] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0201] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A scheduling method for a flexible job shop, characterized in that: The following steps are involved: Aiming at minimizing the energy consumption of the scheduling sequence, the encoding and decoding rules of the flexible job shop scheduling problem are designed; a scheduling scheme x is randomly obtained from the feature space, and a local search operator is obtained using Q-learning technology; the obtained local search operator is executed to obtain a new scheduling scheme x′; Update the feature space according to the new scheduling scheme x′, and update the values in the Q table and related learning parameters; Determine whether the termination condition is met. If so, output the scheduling plan with the lowest energy consumption value; otherwise, return to execute the step of randomly obtaining a scheduling plan x from the feature space.
2. A scheduling method for a flexible job shop according to claim 1, characterized in that: The expression of the optimization objective of the flexible job shop scheduling problem with transmission constraints is: Where obj is the optimization target, i.e., the energy consumption value; I, J i , and M i,j Represent the workpiece set, process set and process O respectively i,j Optional machine set;TP i,j,k For process O i,j Processing energy consumption on machine k; TI k is the idle energy consumption of machine k; TT i,j,k,k’ For process O i,j Transport energy consumption from machine k to machine k'.
3. The method for scheduling a flexible job shop according to claim 1, characterized in that: The decoding rule adopts a double-layer coding mechanism, one layer is a coding based on process sequencing, and the other layer is a coding based on machine allocation sequence. The double-layer coding is combined together as the input of the decoding rule.
4. A scheduling method for a flexible job shop according to claim 1 or 3, characterized in that: The encoding and decoding rules include the following steps: Generate two integer vectors: process order OS and machine selection MS; Retrieving the data stored in the two integer vectors to extract the machine number assigned to each process; Using the decoding rule, all processes in the process sorting OS vector select the machine to be processed according to the corresponding machine number assigned in the machine selection MS vector; Calculate the energy consumption of the entire machining process and obtain the target value, scheduling scheme sequence and corresponding characteristics.
5. The method for scheduling a flexible job shop according to claim 1, characterized in that: The constraints of the flexible job shop scheduling problem include: 1) At time zero, all processes and machines can be scheduled; 2) One machine can only process one process at a time, and one process can only be processed by one machine at a time; 3) Each process has one and only one direct predecessor and successor in the scheduling sequence. If the process is at the first or last position in the sequence, its predecessor and successor are both empty; 4) Once a process starts on a machine, it cannot be preempted or interrupted by other processes; 5) The time for setting up, adjusting and testing the machine is included in the processing time; 6) The process processing time is greater than 0.
6. The method for scheduling a flexible job shop according to claim 1, characterized in that: The scheduling method further comprises the step of initializing the feature space: The quality-diversity algorithm is used to generate an initial scheduling plan, and the generated scheduling plan is saved in the feature space.
7. The method for scheduling a flexible job shop according to claim 1, characterized in that: The method randomly obtains a scheduling scheme x from the feature space and uses Q-learning technology to decide and obtain a local search operator, including: Randomly select a scheduling plan x from the space, and then select an execution action a according to the value in the Q table through Q-learning technology. t , as a local search operator; initially, the values of the Q table are all 0, and an action is randomly selected. If the values of the Q table are not all 0, the action with the largest Q value in the Q table is selected.
8. The method for scheduling a flexible job shop according to claim 1, characterized in that: There are six types of local search operators; The operation steps of the first local search operator include: Find the OS vector of the process order in the current scheduling scheme x; Retrieve the process O with the longest transfer time i,j ; Find process O i,j Selectable machine set M i,j ; From the machine set M i,j Randomly select a i,j Machine k different from the original processing machine; Change process O i,j The machine being processed; Update the machine allocation in the machine selection MS vector and obtain a new scheduling plan x′; The operation steps of the second local search operator include: Find the critical path in the current scheduling scheme x; Retrieve all key processes on the critical path; Retrieve the process O with the longest transmission time among all key processes i,j ; Find process O i,j Selectable machine set M i,j ; From the machine set M i,j Randomly select a i,j Machine k different from the original processing machine; Change process O i,j The machine being processed; Update the machine allocation in the machine selection MS vector and obtain a new scheduling plan x′; The operation steps of the third local search operator include: Find the machine selection MS vector in the current schedule x; Retrieve the machines M1 and M2 with the largest and smallest loads from the machine selection MS vector respectively; Traverse the processes on the machine with the smallest load. If the currently traversed process can be processed on the machine with the largest load, replace the processing machine of the process. Update the information in the machine selection MS vector and obtain a new scheduling plan x′; The operation steps of the fourth local search operator include: Find the critical path in the current scheduling scheme x; Retrieve all key processes on the critical path; Randomly select a process O from all key processes i,j ; From process O i,j The corresponding machine set M i,j Randomly select a machine k that can process, and make sure that machine k is different from the original assigned machine; Change process O i,j The processing machine selected; Update the information in the machine selection MS vector and obtain a new scheduling plan x′; The operation steps of the fifth local search operator include: Find the critical path in the current scheduling scheme x; Retrieve all key processes on the critical path; Randomly select two processes O that do not belong to the same workpiece i from the key processes i,j and process O i’,j ; Exchange process O i,j and process O i’,j Position in the process sorting OS vector; Update the information in the process sorting OS vector and obtain a new scheduling plan x′; The operation steps of the sixth local search operator include: Find the critical path in the current scheduling scheme x; Retrieve all key processes on the critical path; Randomly select a process O from the key processes i,j ; Randomly select a process O from all processes i,j , process O i,j and process O i’,j They do not belong to the same artifact; Find process O i,j and process O i’,j Position in the process sorting OS vector; In the process sorting OS vector, insert the later process in front of the earlier process; Update the information in the process sorting OS vector and get a new scheduling plan x ′ .
9. A scheduling device for a flexible job shop, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to perform the method according to any one of claims 1 to 8 when executed by the processor.
