Flexible job shop scheduling method and device
By constructing a disjunction graph of time step cycles and using reinforcement learning agents, the flexible job shop scheduling method solves the large-scale scheduling problems in the flexible job shop scheduling problem, improves scheduling accuracy and efficiency, and is suitable for workshops of different sizes.
Patent Information
- Application Number
- CN202311227869.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2024-08-30
AI Technical Summary
In the Flexible Job Shop Scheduling Problem (FJSP), existing methods such as constraint programming and heuristic methods are difficult to effectively solve in large-scale situations. Although reinforcement learning has been applied, the learning effect is poor and the computational complexity is high, resulting in limited practical applications. .
A flexible job shop scheduling method is proposed. By obtaining the description information of the workshop to be scheduled, a disjunction diagram of the time step cycle is constructed to represent the execution relationship between processes, and a reinforcement learning agent is used to determine the allocation strategy based on machine characteristics and process characteristics. , gradually update the allocation strategy to optimize scheduling.
It improves the accuracy and efficiency of scheduling, reduces the difficulty of determining allocation strategies, is suitable for flexible workshop operations of different sizes, and expands the scope of practical applications.
Smart Images

Figure CN118567301A
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of flexible job shops, and more specifically, to a flexible job shop scheduling method and apparatus. Background Art
[0002] The Flexible Job-shop Scheduling Problem (FJSP) is one of the common problems in the manufacturing industry. In this problem, there are many types of workpieces that need to be processed, and the processing of each workpiece requires a series of processes, and each process has some optional processing machines. The problem that the flexible job shop needs to solve is how to schedule the processes of these workpieces (including selecting machines and specifying the start time of processing) to maximize the production capacity of the entire workshop (that is, the overall processing time is the shortest) and meet some production constraints. The flexible job shop scheduling problem is an NP-hard problem. Traditional methods such as Constraint Programming (CP) take a long time to find a feasible solution under large-scale conditions. Although heuristic methods can find feasible solutions, they cannot guarantee the final effect.
[0003] Currently, reinforcement learning has also been applied to the problem of flexible job shop scheduling. However, relying solely on reinforcement learning has the problem of poor learning effect. In order to improve the learning effect, very complex modeling is often required. The complexity is too high and the amount of calculation is too large. It is not suitable for large-scale flexible job shop scheduling problems, which limits the scope of actual application. Summary of the invention
[0004] The present disclosure provides a flexible job shop scheduling method and a flexible job shop scheduling device, which are used to at least solve the above problems, or may not solve the above problems.
[0005] According to one aspect of the present disclosure, a flexible job shop scheduling method is provided, the flexible job shop scheduling method comprising: obtaining description information of a flexible job shop to be scheduled, the description information being used to describe a plurality of machines and a plurality of workpieces in the flexible job shop to be scheduled, each workpiece being processed by a plurality of sequentially arranged processes, each process being able to be assigned to at least one of the plurality of machines, and each machine being able to perform at least one process; cyclically executing the allocation step according to a plurality of time steps until all processes are allocated, wherein the allocation step executed at each time step comprises: constructing a disjunctive graph of the flexible job shop to be scheduled at the current time step according to the description information and the allocation strategies of the previous time steps, and determining the set of executable processes of each machine at the current time step, wherein the disjunctive graph is used to characterize the execution relationship between the processes; determining the allocation strategy for the current time step based on the disjunctive graph at the current time step and the set of executable processes of each machine.
[0006] Optionally, the execution relationship includes a sequential relationship, a competitive relationship and an allocated relationship. The sequential relationship represents the execution order relationship between multiple processes for processing the same workpiece. The competitive relationship represents that two unallocated processes in the execution relationship can be allocated to the same machine. The allocated relationship represents that one of the two processes originally in the competitive relationship has completed the allocation.
[0007] Optionally, the competitive relationship is represented by a double-arrow line between two processes; the allocated relationship is represented by a single-arrow line pointing from a process that has completed allocation to a process that has not completed allocation.
[0008] Optionally, the allocation step executed at each time step also includes: determining the execution status of each process at the current time step according to the description information and the allocation strategies of previous time steps; determining the process characteristics of each process at the current time step according to the execution status of each process at the current time step; wherein, determining the allocation strategy of the current time step based on the disjunctive graph at the current time step and the set of executable processes of each machine includes: determining the allocation strategy of the current time step based on the process characteristics of each process at the current time step, the disjunctive graph and the set of executable processes of each machine.
[0009] Optionally, the process characteristics include process static characteristics and process dynamic characteristics, the process static characteristics are used to describe the inherent characteristics of the corresponding process related to processing, and the process dynamic characteristics are used to describe the characteristics of the corresponding process that change with the advancement of time steps.
[0010] Optionally, the method of determining the allocation strategy for the current time step based on the process characteristics of each process at the current time step, the disjunctive graph, and the set of executable processes of each machine includes: based on the process characteristics of each process at the current time step and the disjunctive graph, performing information transfer processing between each process to update the process characteristics of each process; and determining the allocation strategy for the current time step according to the updated process characteristics of each process and the set of executable processes of each machine at the current time step.
[0011] Optionally, the method of determining the allocation strategy for the current time step based on the updated process characteristics of each process and the set of executable processes of each machine at the current time step includes: determining the machine characteristics of each machine based on the updated process characteristics of each process and the set of executable processes of each machine at the current time step; inputting the machine characteristics of each machine into the reinforcement learning agent to obtain the process to be executed by each machine at the current time step, so as to allocate the process to each machine as the allocation strategy for the current time step.
[0012] Optionally, the machine features include machine state features and relationship features of the corresponding machine, where the relationship features are features used to characterize the relationship between the corresponding machine and each executable process of the machine.
[0013] Optionally, the step of inputting the machine characteristics of each machine into the reinforcement learning agent to obtain the process to be executed by each machine at the current time step, so as to allocate the process to each machine as the allocation strategy for the current time step, includes: for each machine, inputting the machine characteristics into the reinforcement learning agent to obtain the score of each executable process of the corresponding machine; determining the process to be executed by each machine at the current time step according to the score of each executable process of each machine, so as to allocate the process to each machine as the allocation strategy for the current time step.
[0014] Optionally, the reinforcement learning agent is trained through the following steps: obtaining description information of a flexible job shop sample; for the flexible job shop sample, using the reinforcement learning agent to be trained, executing the allocation step in a loop according to multiple time steps until all processes complete the allocated operations, and obtaining an allocation strategy for each time step; determining a feedback signal for each time step according to the allocation strategy for each time step; and updating the reinforcement learning agent to be trained based on the feedback signal to obtain the reinforcement learning agent.
[0015] Optionally, determining the feedback signal of each time step according to the allocation strategy of each time step includes: determining the maximum completion time according to the allocation strategy of each time step; determining the feedback information of each time step according to the maximum completion time; for each time step, inputting the process characteristics of each process updated in the corresponding time step into the evaluation network to be trained to obtain the estimated state value of the corresponding time step; using the estimated state value of each time step as the sample estimated value and the feedback information of the corresponding time step as the sample label, and performing supervised training on the evaluation network to be trained to obtain the evaluation network; for each time step, inputting the process characteristics of each process updated in the corresponding time step into the evaluation network to obtain the state value of the corresponding time step; determining the feedback signal of each time step according to the state value and feedback information of each time step.
[0016] Optionally, in the process of training the reinforcement learning agent, the process of determining the process to be executed by each machine at the current time step based on the scores of each executable process of each machine is performed, including: for each machine, normalizing the scores of each executable process of the corresponding machine to obtain the allocation probability of each executable process of the corresponding machine; and determining the process to be executed by each machine at the current time step based on the allocation probability of each executable process of each machine.
[0017] According to another aspect of the present disclosure, a flexible job shop scheduling device is provided, the flexible job shop scheduling device comprising: an acquisition unit, configured to acquire description information of a flexible job shop to be scheduled, the description information being used to describe a plurality of machines and a plurality of workpieces in the flexible job shop to be scheduled, each workpiece being processed by a plurality of sequentially arranged processes, each process being able to be assigned to at least one of the plurality of machines, and each machine being able to perform at least one process; an allocation unit, configured to execute allocation steps cyclically according to a plurality of time steps until all processes are allocated, wherein the allocation steps executed at each time step comprise: constructing a disjunctive graph of the flexible job shop to be scheduled at the current time step according to the description information and the allocation strategies of the previous time steps, and determining a set of executable processes of each machine at the current time step, wherein the disjunctive graph is used to characterize the execution relationship between the processes; determining an allocation strategy for the current time step based on the disjunctive graph at the current time step and the set of executable processes of each machine.
[0018] Optionally, the execution relationship includes a sequential relationship, a competitive relationship and an allocated relationship. The sequential relationship represents the execution order relationship between multiple processes for processing the same workpiece. The competitive relationship represents that two unallocated processes in the execution relationship can be allocated to the same machine. The allocated relationship represents that one of the two processes originally in the competitive relationship has completed the allocation.
[0019] Optionally, the competitive relationship is represented by a double-arrow line between two processes; the allocated relationship is represented by a single-arrow line pointing from a process that has completed allocation to a process that has not completed allocation.
[0020] Optionally, the allocation step performed by the allocation unit at each time step also includes: determining the execution status of each process at the current time step according to the description information and the allocation strategies of previous time steps; determining the process characteristics of each process at the current time step according to the execution status of each process at the current time step; wherein, determining the allocation strategy for the current time step based on the disjunctive graph at the current time step and the set of executable processes of each machine includes: determining the allocation strategy for the current time step based on the process characteristics of each process at the current time step, the disjunctive graph and the set of executable processes of each machine.
[0021] Optionally, the process characteristics include process static characteristics and process dynamic characteristics, the process static characteristics are used to describe the inherent characteristics of the corresponding process related to processing, and the process dynamic characteristics are used to describe the characteristics of the corresponding process that change with the advancement of time steps.
[0022] Optionally, the allocation unit is further configured to: perform information transfer processing between each process based on the process characteristics and disjunctive graph of each process at the current time step to update the process characteristics of each process; determine the allocation strategy of the current time step according to the updated process characteristics of each process and the set of executable processes of each machine at the current time step.
[0023] Optionally, the allocation unit is further configured to: determine the machine characteristics of each machine based on the updated process characteristics of each process and the set of executable processes of each machine at the current time step; input the machine characteristics of each machine into the reinforcement learning agent to obtain the process to be executed by each machine at the current time step, so as to allocate the process to each machine as the allocation strategy for the current time step.
[0024] Optionally, the machine features include machine state features and relationship features of the corresponding machine, where the relationship features are features used to characterize the relationship between the corresponding machine and each executable process of the machine.
[0025] Optionally, the allocation unit is further configured to: for each machine, input machine features into the reinforcement learning agent to obtain scores of each executable process of the corresponding machine; determine the process to be executed by each machine at the current time step based on the scores of each executable process of each machine, so as to allocate the process to each machine as the allocation strategy for the current time step.
[0026] Optionally, the flexible job shop scheduling device also includes a training unit, which is configured to train the reinforcement learning agent through the following steps: obtaining description information of the flexible job shop sample; for the flexible job shop sample, using the reinforcement learning agent to be trained, executing the allocation step in a loop according to multiple time steps until all processes complete the allocated operation, and obtaining the allocation strategy for each time step; according to the allocation strategy for each time step, determining the feedback signal for each time step; based on the feedback signal, updating the reinforcement learning agent to be trained to obtain the reinforcement learning agent.
[0027] Optionally, the training unit is further configured to: determine the maximum completion time according to the allocation strategy of each time step; determine the feedback information of each time step according to the maximum completion time; for each time step, input the process characteristics of each process updated in the corresponding time step into the evaluation network to be trained to obtain the estimated state value of the corresponding time step; use the estimated state value of each time step as the sample estimated value, and the feedback information of the corresponding time step as the sample label, and perform supervised training on the evaluation network to be trained to obtain the evaluation network; for each time step, input the process characteristics of each process updated in the corresponding time step into the evaluation network to obtain the state value of the corresponding time step; determine the feedback signal of each time step according to the state value and feedback information of each time step.
[0028] Optionally, the training unit is further configured to: for each machine, normalize the scores of each executable process of the corresponding machine to obtain the allocation probability of each executable process of the corresponding machine; and determine the process to be executed by each machine at the current time step according to the allocation probability of each executable process of each machine.
[0029] According to another aspect of the present disclosure, a computer-readable storage medium storing instructions is provided, wherein when the instructions are executed by at least one computing device, the at least one computing device is prompted to execute the flexible job shop scheduling method as described above.
[0030] According to another aspect of the present disclosure, a system is provided that includes at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, prompt the at least one computing device to execute the flexible job shop scheduling method as described above.
[0031] According to the flexible job shop scheduling method and the flexible job shop scheduling device of the exemplary embodiment of the present disclosure, by improving the existing disjunctive graph and adding a graph representing the execution relationship between each process, the disjunctive graph can be updated at each time step according to the actual machine allocation situation, thereby ensuring that the global state of the flexible job shop at each time step can be represented by the disjunctive graph, thereby increasing the amount of information that can be provided by the disjunctive graph, and providing an accurate and reliable information basis for determining the allocation strategy at each time step, which not only helps to improve the accuracy of scheduling and ensure the final scheduling effect, but also can determine the allocation strategy in steps, which helps to reduce the difficulty of determining the allocation strategy and reduce the calculation amount of a single decision, so that the present disclosure can be applicable to flexible shop operation problems of different scales, and helps to expand the practical application scope of the present disclosure.
[0032] Additional aspects and / or advantages of the present general inventive concept will be set forth in part in the following description and in part will be apparent from the description or may be learned through practice of the present general inventive concept. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] These and / or other aspects and advantages of the present disclosure will become clear and more easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0034] Figure 1 is a flow chart showing a flexible job shop scheduling method according to an exemplary embodiment of the present disclosure;
[0035] Figure 2 is an initial disjunctive graph showing an exemplary embodiment of the present disclosure;
[0036] Figure 3 is a disjunctive graph illustrating a certain time step according to an exemplary embodiment of the present disclosure;
[0037] Figure 4 is a block diagram illustrating a flexible job shop scheduling apparatus according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0038] The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of the embodiments of the present invention as defined by the claims and their equivalents. Various specific details are included to assist in understanding, but these details are considered to be exemplary only. Therefore, one of ordinary skill in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. In addition, descriptions of well-known functions and structures are omitted for clarity and brevity.
[0039] It should be noted that the phrase "at least one of the items" in the present disclosure includes three types of parallel situations: "any one of the items", "a combination of any number of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "executing at least one of step 1 and step 2" which means the following three parallel situations: (1) executing step 1; (2) executing step 2; (3) executing step 1 and step 2.
[0040] A flexible job shop scheduling method and a flexible job shop scheduling device according to exemplary embodiments of the present disclosure.
[0041] Refer to the following Figures 1 to 4 A flexible job shop scheduling method and a flexible job shop scheduling device according to exemplary embodiments of the present disclosure are described in detail.
[0042] Figure 1 is a flow chart showing a flexible job shop scheduling method according to an exemplary embodiment of the present disclosure. The flexible job shop scheduling method according to an exemplary embodiment of the present disclosure can be implemented in a computing device with sufficient computing power.
[0043] Reference Figure 1 In step S110, the description information of the flexible job shop to be scheduled is obtained, and the description information is used to describe multiple machines and multiple workpieces in the flexible job shop to be scheduled. Each workpiece needs to be processed through multiple sequentially arranged processes, each process can be assigned to at least one machine among the multiple machines, and each machine can be used to execute at least one process.
[0044] The description information can clearly describe the initial state of the flexible job shop to be scheduled, as well as the operation restrictions of each machine and each workpiece. For example, each machine and each workpiece can be marked with a serial number, and the description information includes the model of each machine, the processes that each model of machine can perform and the time it takes to perform each process, the workpiece type of each workpiece, and the process sequence contained in each type of workpiece.
[0045] In step S120, the allocation step is executed in a loop according to multiple time steps until all processes are allocated. The allocation step executed in each time step includes:
[0046] In step S121, based on the description information and the allocation strategies of the previous time steps, a disjunctive graph of the flexible job shop to be scheduled at the current time step is constructed, wherein the disjunctive graph is used to characterize the execution relationship between the various processes.
[0047] The description information can reflect the initial state of the flexible job shop to be scheduled, at which time all machines have not started working and have not been assigned to any process. The allocation strategy specifically includes which processes are assigned to which machines at the corresponding time step, and when these machines start to perform processing (it can be in the form of a given specific time or a given waiting time), so that the changes in the state of the flexible job shop to be scheduled after the allocation can be determined. This state change includes when a certain / certain machine starts to perform a certain / certain process, and / or when a certain / certain process will start to perform a certain / certain process. Since the computing speed of the computing device is very fast, the time spent on determining the allocation strategy can be basically ignored, and it is considered that the determined allocation strategy is executed immediately at the corresponding time step. At the same time, the interval between two adjacent time steps is clear (it may remain inconvenient or may change, and the duration is known), so the state changes of the flexible job shop to be scheduled during this interval can also be determined, thereby determining the state of the shop in the next time step. Therefore, each time step can determine the state of the workshop at the current time step based on the state of the workshop at the previous time step and the allocation strategy at the previous time step, thereby constructing a disjunctive graph.
[0048] It should be understood that for the first time step, since the allocation strategy has not been determined before, the "allocation strategy of each previous time step" is empty, and it is only necessary to construct the disjunctive graph based on the description information. Thereafter, as the time step progresses, the state changes gradually accumulate, and the state of the job shop to be scheduled at the current time step can be determined, thereby constructing the corresponding disjunctive graph. In other words, although in principle, the disjunctive graph of the current time step is constructed based on the description information and the allocation strategies of each previous time step, in actual execution, an initial disjunctive graph can be first constructed based on the description information as the disjunctive graph of the first time step, and then in each subsequent time step, based on the allocation strategy determined in the previous time step, the disjunctive graph of the previous time step is modified to obtain the disjunctive graph of the current time step.
[0049] As an example, the state of the workshop at each time step includes the state of each process and the state of each machine. The state of each process includes, for example, unreleased, unexecuted, executing, and completed execution according to the type. Among them, unreleased is a description of the workpiece, that is, the corresponding workpiece has not yet entered the processing flow. The following three states are the states of specific processes. Unexecuted can be further subdivided into pending state and silent state. The pending state refers to the state of the process that is about to be executed, including the state of the first process of the workpiece that has just been released, and also includes the state of the process whose previous process has been completed. The pending state can further include the state of not yet allocated a machine and the state of allocated but not executed; the silent state refers to the state of other processes after the process in the pending state. In order to facilitate control, between the allocated unexecuted state and the executing state, the ready state can be further configured to refer to the state that has been allocated and can be executed. After a process has experienced a waiting period from the allocated unexecuted state, it reaches the ready state, and the allocated machine can start processing at this time. It should be understood that if the process status is classified according to the above types, then at the same time step, a released workpiece may have several processes in the completed execution state, the executing state, and the silent state at the same time, or several processes in the completed execution state, the pending state, and the silent state at the same time, or even several processes in the completed execution state, the ready state, and the silent state at the same time, but it is impossible for two processes in the executing state and the pending state to exist at the same time. Similarly, the status of each machine includes, for example, unassigned process, assigned but not executed, and executing according to the type.
[0050] Regarding the disjunctive graph, optionally, the execution relationship represented by the disjunctive graph includes a sequential relationship, a competitive relationship, and an allocated relationship. Among them, the sequential relationship represents the execution order relationship between multiple processes for processing the same workpiece, which means that for the same workpiece, the subsequent process can only be executed after the previous process is completed. The competitive relationship means that the two unallocated processes in the execution relationship can be allocated to the same machine, so from the perspective of the machine, there is competition between the two processes, and the specific competition is the opportunity to be allocated to the same machine. The allocated relationship means that one of the two processes that were originally in a competitive relationship has completed the allocation, which indicates that the two processes that were originally in a competitive relationship have resolved the competition, and one of the processes has completed the allocation. At this time, the one that has not been allocated can be allocated first. Such a concise, clear and comprehensive execution relationship can express more information in the disjunctive graph, thereby providing a rich, accurate and reliable information basis for the allocation decision of the corresponding time step.
[0051] Optionally, the competitive relationship is represented by a double-arrow line between two processes; the allocated relationship is represented by a single-arrow line pointing from the allocated process to the unallocated process. By using the conversion between double arrows and single arrows to represent the conversion between competitive relationships and allocated relationships, different relationships can be represented concisely and reliably, and effective information expression is achieved, thereby improving the feasibility of the solution. As an example, since the sequential relationship can also be represented by a single-arrow line, in order to distinguish them, the line representing the sequential relationship and the line representing the allocated relationship can have different colors and / or line types, and the color and / or line type of the line representing the competitive relationship can be further made the same as the color and / or line type of the line representing the allocated relationship, so as to distinguish between the execution relationship related to the process and the execution relationship related to the machine.
[0052] It should be noted that the existing disjunctive graph contains connecting arcs representing sequential relationships and disjunctive arcs representing relationships similar to allocated relationships, but the difference is that the existing disjunctive arcs often use a set of disjunctive arcs to represent the complete allocation process of a workshop from the start of processing to the end of processing, that is, one machine corresponds to multiple disjunctive arcs, and these disjunctive arcs gradually point from the first process to be executed by the machine to the last process to be executed by the machine, forming a process chain. The process chains corresponding to each machine in the workshop together constitute the scheduling strategy of the entire workshop. Correspondingly, the process of solving the flexible job shop scheduling problem is to find the best or relatively better one from multiple full-shop scheduling strategies. The present disclosure improves the disjunctive graph, constructs a disjunctive graph that can characterize sequential relationships, competitive relationships, and allocated relationships at each time step, and can fully represent the state of each time step, so that allocation decisions can be made step by step for each time step, which can reduce the calculation amount of a single decision. This also means that the disjunctive graph constructed at each time step often does not contain a complete process chain. Specifically, in the initial disjunctive diagram, among all the processes that can be performed by the same machine, any two are in a competitive relationship, so any two are connected by a double-arrow line. As time goes by, some double-arrow lines gradually turn into single-arrow lines, and some single-arrow lines will be further deleted, thus eventually forming a process chain.
[0053] As an example, there are 3 workpieces to be processed and 4 machines in the flexible job workshop to be scheduled. Each workpiece needs to be processed through 4 processes, among which workpiece Job1 needs to be processed through processes OP_11, OP_12, OP_13, and OP_14 in sequence, workpiece Job2 needs to be processed through processes OP_21, OP_22, OP_23, and OP_24 in sequence, and workpiece Job3 needs to be processed through processes OP_31, OP_32, OP_33, and OP_34 in sequence; processes OP_11, OP_21, and OP_33 have a competitive relationship, processes OP_12, OP_23, and OP_31 have a competitive relationship, processes OP_13, OP_22, and OP_32 have a competitive relationship, and processes OP_14, OP_24, and OP_34 have a competitive relationship, thus constructing the following Figure 2 The initial disjunctive graph is shown in Figure 2. Subsequently, if the process OP_11 is assigned to the first machine at a certain time step, the competition relationship between process OP_11 and process OP_21, and the competition relationship between process OP_11 and process OP_33 are converted into assigned relationships, and the following graph is constructed: Figure 3 The disjunctive diagram shown. At this time, the competition relationship between process OP_21 and process OP_33 is still retained, so the next time you need to assign a process to the first machine, you need to choose one from process OP_21 and process OP_33.
[0054] Return to reference Figure 1 In step S122, the allocation strategy of the current time step is determined based on the disjunctive graph at the current time step. This step specifically executes the decision based on the disjunctive graph.
[0055] According to the flexible job shop scheduling method of the exemplary embodiment of the present disclosure, by improving the existing disjunctive graph and adding a representation of the execution relationship between each process, the disjunctive graph can be updated at each time step according to the actual machine allocation situation, ensuring that the global state of the flexible job shop at each time step can be represented by the disjunctive graph, thereby increasing the amount of information that can be provided by the disjunctive graph, and providing an accurate and reliable information basis for determining the allocation strategy at each time step, which not only helps to improve the accuracy of scheduling and ensure the final scheduling effect, but also can determine the allocation strategy in steps, which helps to reduce the difficulty of determining the allocation strategy and reduce the calculation amount of a single decision, so that the present disclosure can be applicable to flexible shop operation problems of different scales, and helps to expand the practical application scope of the present disclosure.
[0056] It should be noted that the present disclosure adopts the idea of executing decisions according to time steps, which can not only reduce the amount of calculation for a single decision, but also more effectively reflect the influence of the time dimension compared to the idea of executing decisions according to decision steps (referring to the idea of determining a process and a corresponding machine at each step). Specifically, on the one hand, according to the advancement of the actual processing process, more than two processes may be assigned at the same time at each time step, or only one process may be assigned, or no process may be assigned. It is not necessary to be limited to the decision-making idea of assigning one process in turn, which is more practical and flexible. On the other hand, as mentioned above, the content of the allocation decision, in addition to including which processes are assigned to which machines at the corresponding time step, also includes when these machines start to perform processing, that is, the machine may need to wait for a period of time before starting to execute the assigned process, which means that unexpected state changes may occur during the waiting period, for example, a workpiece may not need to continue processing temporarily, resulting in the subsequent process corresponding to the workpiece no longer participating in the allocation, and the process required to be executed by the corresponding machine changes. At this time, timely re-decision can be achieved by temporarily increasing the time step, or setting the time step interval as small as possible when setting parameters in the early stage, thereby improving the adaptability of the scheme to emergencies. It should be understood that even if no unexpected state change occurs during the waiting period, it can increase a decision-making opportunity, which helps to improve the quality of decision-making.
[0057] Next, step S120 is further introduced.
[0058] Optionally, in step S120, the allocation step executed at each time step also includes: determining the execution status of each process at the current time step and the executable process set of each machine at the current time step according to the description information and the allocation strategy of each previous time step; determining the process characteristics of each process at the current time step according to the execution status of each process at the current time step; accordingly, step S122 includes: determining the allocation strategy of the current time step based on the process characteristics of each process at the current time step, the disjunctive graph and the executable process set of each machine. The execution status of each process can refer to the state of the process in the aforementioned workshop state. On this basis, the serial number and waiting time of the allocated machine can be further recorded for the allocated but unexecuted state, and the serial number of the allocated machine, the executed time and the remaining execution time can be further recorded for the executed state, and more detailed information can be further recorded to increase the amount of information. After the corresponding process characteristics are determined according to the execution status of each process, data that can participate in the calculation can be provided for the determination of the allocation strategy. The executable process set of each machine at the current time step contains the processes that the corresponding machine can use to execute, which are called executable processes. As time goes by, the elements in the executable process set will gradually decrease until they are cleared. By combining the process characteristics and disjunctive graph of the current time step, it is possible to fully understand the status of each process at the current time step and the relationship between each other. The executable process set of each machine provides the processes that can be assigned to each machine. By using the status and relationship of the process as a decision reference, and determining the process to be assigned from the executable processes of each machine, the reliable decision-making is guaranteed. As an example, for the aforementioned process status classification example, in order to reduce the amount of calculation, the executable processes can be preliminarily screened first, and the selectable processes at the current time step can be screened out, including the process currently in the pending state and the next process of the process in the executing state, and then the process to be assigned is determined from them.
[0059] As an example, process characteristics include process static characteristics and process dynamic characteristics. Process static characteristics are used to describe the inherent characteristics of the corresponding process related to processing, such as processing time (for different processing times on different machines, for example, the maximum processing time, the minimum processing time, and the average processing time may be specifically included), the number of optional machines, the optional process (the category of the process used in the current process, one machine may correspond to one process, or multiple machines may be able to implement the same process, which can be represented by a process identifier), the total number of processes for the corresponding workpiece, the priority of the workpiece (when the processes of two workpieces have a competitive relationship, the process of the workpiece with a higher priority can be allocated first), the number of resources occupied (resources usually refer to machine resources, that is, they can be allocated to several machines, and the default value is 1), and other characteristics that are obviously related to the decision. In addition, it may also include some redundant information whose relevance to the decision is not yet clear, such as the number and weight of the corresponding workpieces, and other information reflecting the size of the workpiece. These redundant information may provide a reference for the decision. The dynamic characteristics of a process are used to describe the characteristics of the corresponding process that change as time steps progress. They can achieve a dynamic description of state changes, such as the state type of each process mentioned above, the remaining time for releasing the workpiece (i.e., how long it will take to release the corresponding workpiece, if it has been released, it is 0), the waiting time (starting from the completion of the previous process, the longer the wait, the stronger the competitiveness when competing with other processes, and the priority will be allocated), the remaining completion time (i.e., how long it will take to complete the corresponding process being executed), the lower limit of the total remaining completion time (i.e., how long it will take to complete the corresponding workpiece at least), and the number of subsequent processes (i.e., how many processes are left). By covering both the static characteristics and dynamic characteristics of processes, a more comprehensive description and characterization of processes can be achieved, which helps improve decision-making efficiency.
[0060] Optionally, step S122 specifically includes: based on the process characteristics and disjunctive graph of each process at the current time step, information transfer processing is performed between each process to update the process characteristics of each process; according to the updated process characteristics of each process and the executable process set of each machine at the current time step, the allocation strategy of the current time step is determined. The process characteristics of each process comprehensively describe the corresponding process. On this basis, by combining the disjunctive graph to perform information transfer processing, such as information transfer processing through a graph neural network, information exchange can be achieved between each process, so that the process characteristics of each process contain global information, and the updated process characteristics can more accurately describe the overall state of the flexible job shop to be scheduled, thereby optimizing the decision results and improving the decision efficiency.
[0061] Further optionally, the step of determining the allocation strategy of the current time step according to the updated process characteristics of each process and the executable process set of each machine at the current time step in step S122 includes: determining the machine characteristics of each machine according to the updated process characteristics of each process and the executable process set of each machine at the current time step; inputting the machine characteristics of each machine into the reinforcement learning agent to obtain the process to be executed by each machine at the current time step, so as to allocate the process to each machine as the allocation strategy of the current time step. Related technologies often solve scheduling problems from the perspective of processes, first determining the process to be executed from a number of available processes (i.e., the unexecuted process with the highest current ranking in each workpiece), and then determining the machine to execute the corresponding process. However, since each process of the same workpiece is executed one by one, the combination of available processes in the workshop is changing every time a decision is made, and as the scale of the flexible job shop increases, this change will be more drastic and complex, resulting in a sudden increase in the amount of calculation. Unlike the process, although the state type of each machine in the workshop changes, the combination of machines involved in the processing is often stable. By switching to a more stable machine perspective and using machine features as the data basis for decision-making, the present disclosure can determine the process to be executed by each machine at the current time step for the same number of machines at each time step, thereby ensuring the relative stability of the calculation object, helping to control the amount of calculation, and further improving the adaptability of the method disclosed in the present disclosure to flexible job shop scheduling problems of different scales. Of course, it is also possible to only determine the process to be executed by the idle machine at the current time step to appropriately reduce the amount of calculation. At this time, compared with the method of making decisions from the process perspective, the calculation object (that is, the machine involved in the calculation) is still relatively stable overall. Specifically, when describing the machine directly, the workshop information that can be represented is limited, and the process feature is relatively easier to describe and update, and can represent more workshop information. The executable process set of each machine describes the relationship between the process and the machine. Based on this, by determining the machine features according to the process features and the executable process set of each machine, the determination process of the machine features can be made more orderly and reliable, which is convenient for reliably describing the state of the entire flexible job shop to be scheduled from the perspective of each machine. In addition, by utilizing reinforcement learning agents to make decisions, it is possible to respond more flexibly to different workshop formats, which helps to further improve the adaptability of the method disclosed in the present invention.
[0062] Optionally, the machine features include machine state features and relationship features of the corresponding machine. The relationship features are features used to characterize the relationship between the corresponding machine and each executable process of the machine. The machine state features can reflect the features of the corresponding machine that are independent of a single process and fully provide global information; the relationship features can reflect the features of the corresponding machine that are strongly related to a single process and accurately provide local information. Combining the two can provide reference information for decision-making from different levels, help optimize decision-making results, and improve decision-making efficiency.
[0063] Optionally, in step S122, the machine features of each machine are input into the reinforcement learning agent to obtain the process to be executed by each machine at the current time step, so as to allocate the process to each machine as the allocation strategy for the current time step, and the step includes: for each machine, the machine features are input into the reinforcement learning agent to obtain the scores of each executable process of the corresponding machine; according to the scores of each executable process of each machine, the process to be executed by each machine at the current time step is determined, so as to allocate the process to each machine as the allocation strategy for the current time step. By using the scores of each executable process to determine the process to be executed by the machine at the current time step, a clear standard can be provided for decision-making, which helps to ensure the reliable implementation of the decision. It should be understood that in order to avoid contradictions, it is necessary to ensure that the processes to be executed determined by different machines are different. As an example, in the process of processing each machine one by one, if the executable process with the highest score of the subsequent machine has been allocated to the previous machine, it is continued to confirm whether the executable process with the second highest score has been allocated, until an executable process that has not been allocated and has the highest score is found, which is used as the process to be executed by the subsequent machine at the current time step.
[0064] For step S122, that is, the entire process from updating the process characteristics to determining the process to be executed by each machine at the current time step, as an example, firstly, a graph convolutional neural network (GCN) is used to implement information transmission processing, and the transmission method is as follows:
[0065]
[0066] Among them, h is the process feature, the subscript i is the sequence number of the corresponding process, σ represents the activation function, and R is the type of execution relationship. are the neighbors of the corresponding process under the execution relation r, that is, other processes in the disjunctive graph connected to the corresponding process by lines of execution relation r, c i,r is the number of neighbors of the execution relationship, l is the number of information transmissions of GCN, and the total number of transmissions L is an optional hyperparameter. and is the weight to be updated during the information transfer process. The meaning of this transfer formula is that based on the result of the last information transfer (i.e., l times), the average value of the neighboring process characteristics of the corresponding process under a single execution relationship r is first calculated. Then, the average values of the neighboring process characteristics under each execution relationship are summed, and finally the weighted sum of the sum and the characteristic value of the corresponding process is calculated (the weights are and ) as the input of the activation function σ, and the output of the activation function is taken as the result of the corresponding process in this information transmission (i.e., l+1 times).
[0067] The state of the flexible job shop to be scheduled after updating at the current time step is expressed as:
[0068]
[0069] Where N is the number of all processes, It is the process feature of process i obtained after L times of information transfer, that is, the process feature updated after information transfer processing combined with the disjunctive graph.
[0070] For example, the reinforcement learning solution can use the Actor-Critic model, which includes two networks, the Actor and the Critic. The Actor uses a policy function to make decisions based on the current state and determine the appropriate action. After the action interacts with the environment, a new state will be obtained; the Critic network uses a value function to calculate the state value (Value) under different states, and evaluates the Actor's decision based on the different state values. The Actor then adjusts the decision based on the Critic's evaluation.
[0071] The state value of the current state is expressed as:
[0072] V(h graph )
[0073] V is the Critic network.
[0074] All machines share a common actor network. At each time step, each idle machine will select a selectable process from the executable process set M of the current time step. The machine state feature h of machine m is m And the relationship characteristics between machine m and process i Respectively expressed as:
[0075]
[0076]
[0077] in, is the processing time of process i on machine m, m′ M represents other machines that can be used to perform process i, which can be understood as machines that compete with machine m with respect to process i (hereinafter referred to as competing machines). ′ is the total number of all competing machines of machine m. It can be seen that The selectable process i of machine m and the corresponding competing machine m ′ The relationship characteristics can be referred to as competitive relationship characteristics, h m In The meaning of expression is the average value of all competitive relationship characteristics of machine m.
[0078] On machine m, the scores of the selected process i are:
[0079]
[0080] Among them, MLP (Multi-Layer Perceptron) is an Actor network. How the Actor network adjusts its decision according to the evaluation of the Critic network is the existing knowledge in this field and will not be elaborated here. Since the number of optional processes of the machine will change, the output sequence length of the MLP needs to change accordingly, and it is not suitable to use a fixed output sequence length. Therefore, the MLP can use a pointer network to make the output sequence length adapt to the change of the input sequence length.
[0081] Each idle machine will select the process to be executed according to the score of the selectable processes at the current time step. After the machine selects a process, it will wait for the process to reach the ready state before executing it. During the waiting period, if the machine's executable process set or selectable process changes, it can make a new decision.
[0082] Regarding the reinforcement learning agent, optionally, the reinforcement learning agent is trained by the following steps: obtaining the description information of the flexible operation workshop sample; for the flexible operation workshop sample, using the reinforcement learning agent to be trained, executing the allocation step according to multiple time steps in a loop until all processes complete the allocation operation, and obtaining the allocation strategy for each time step; according to the allocation strategy for each time step, determining the feedback signal for each time step; based on the feedback signal, updating the reinforcement learning agent to be trained to obtain the reinforcement learning agent. By first determining the complete allocation strategy, the allocation strategy can be evaluated more accurately, and then the feedback signal for each time step can be obtained, thereby ensuring the decision accuracy of the reinforcement learning agent trained in this way and improving the decision efficiency.
[0083] Optionally, still taking the Actor-Critic mode as an example, the step of determining the feedback signal of each time step according to the allocation strategy of each time step during the training process includes: determining the maximum completion time (makespan) according to the allocation strategy of each time step; determining the feedback information (reward) of each time step according to the maximum completion time; for each time step, updating the process characteristics of each process in the corresponding time step (specifically, the workshop status h graph ) is input into the evaluation network to be trained (that is, the Critic network to be trained) to obtain the estimated state value (value) of the corresponding time step; the estimated state value of each time step is used as the sample estimated value, and the feedback information of the corresponding time step is used as the sample label, and the evaluation network to be trained is supervised to obtain the evaluation network; for each time step, the process characteristics of each process updated in the corresponding time step are input into the evaluation network to obtain the state value of the corresponding time step; according to the state value and feedback information of each time step, the feedback signal (advantage value) of each time step is determined. The feedback information reflects the actual completion situation, and it is used as a sample label to train the evaluation network separately, so that the evaluation network can be trained separately first. After this part of the training is completed, the evaluation accuracy of the evaluation network can be improved. By using the evaluation network obtained by training to recalculate the state value of each time step, the training of the reinforcement learning agent (that is, the Actor network) can be realized. In addition, by combining the state value calculated by the evaluation network and the feedback information reflecting the actual completion situation to determine the feedback signal used for training the reinforcement learning agent, the decision accuracy of the reinforcement learning agent can be improved, which is helpful to improve the decision efficiency, accelerate convergence, and improve the training efficiency. Specifically, in the order of time steps from back to front, the feedback information of each time step is determined according to the maximum completion time. For example, assuming that the Actor network to be trained completes the allocation of all processes and has gone through 30 time steps in total, then from the last time step, 30 is used as feedback information to update the Critic network to be trained once, and then 29 is used as the feedback signal to update the Critic network to be trained once, and so on, until the update of the first time step is completed to obtain the Critic network. Then, the obtained Critic network is used to calculate the state value of each time step, and the feedback signal is obtained in combination with the feedback information. The feedback signal is used as the evaluation based on which the Actor network to be trained is made to update its parameters to adjust the decision, thereby achieving training. As an example, the feedback signal is expressed as:
[0084] av t =re t +γv t+1 -v t
[0085] Among them, t is the feedback information of the current time step t, γ is the discount factor, v t+1 and v t are the state values of the next time step and the current time step respectively.
[0086] During the training process, for example, PPO (Proximal Policy Optimization) can be used to collect data and update the network.
[0087] Optionally, in the process of training the reinforcement learning agent, the process to be executed by each machine at the current time step is determined according to the scores of each executable process of each machine, including: for each machine, the scores of each executable process of the corresponding machine are normalized to obtain the allocation probability of each executable process of the corresponding machine; according to the allocation probability of each executable process of each machine, the process to be executed by each machine at the current time step is determined. By normalizing the scores of each executable process in the training stage, using the allocation probability representing the relative size rather than the score representing the absolute size as the decision basis, the exploration ability of the reinforcement learning agent in the training stage can be increased, the diversity of actions can be increased, and the training efficiency can be improved. As an example, the normalized exponential function softmax can be used to achieve normalization. It should be understood that in the reasoning application stage, the score can be directly used as the decision basis to select the process with the largest score. At this time, normalization is not required, which can reduce the amount of calculation and reduce the calculation load.
[0088] Figure 4 is a block diagram illustrating a flexible job shop scheduling apparatus according to an exemplary embodiment of the present disclosure.
[0089] Reference Figure 4 The flexible job shop scheduling device 400 includes an acquisition unit 401 and an allocation unit 402 .
[0090] The acquisition unit 401 can obtain the description information of the flexible job workshop to be scheduled, and the description information is used to describe multiple machines and multiple workpieces in the flexible job workshop to be scheduled. Each workpiece needs to be processed through multiple sequentially arranged processes, each process can be assigned to at least one machine among the multiple machines, and each machine can be used to execute at least one process.
[0091] The allocation unit 402 can execute the allocation steps in a loop according to multiple time steps until all processes are allocated, wherein the allocation steps executed at each time step include: constructing a disjunctive graph of the flexible job shop to be scheduled at the current time step based on the description information and the allocation strategies of the previous time steps, wherein the disjunctive graph is used to characterize the execution relationship between the various processes; and determining the allocation strategy of the current time step based on the disjunctive graph at the current time step.
[0092] Optionally, the execution relationship includes a sequential relationship, a competitive relationship and an allocated relationship. The sequential relationship indicates the execution order relationship between multiple processes for processing the same workpiece. The competitive relationship indicates that two unallocated processes in the execution relationship can be allocated to the same machine. The allocated relationship indicates that one of the two processes originally in a competitive relationship has completed allocation.
[0093] Optionally, the competitive relationship is represented by a double-arrow line between two processes; the allocated relationship is represented by a single-arrow line pointing from the process that has completed the allocation to the process that has not completed the allocation.
[0094] Optionally, the allocation step performed by the allocation unit 402 at each time step also includes: determining the execution status of each process at the current time step according to the description information and the allocation strategy of the previous time steps; determining the process characteristics of each process at the current time step according to the execution status of each process at the current time step; wherein, determining the allocation strategy of the current time step based on the disjunctive graph at the current time step and the set of executable processes of each machine includes: determining the allocation strategy of the current time step based on the process characteristics of each process at the current time step, the disjunctive graph and the set of executable processes of each machine.
[0095] Optionally, the process characteristics include process static characteristics and process dynamic characteristics. The process static characteristics are used to describe the inherent characteristics of the corresponding process related to processing, and the process dynamic characteristics are used to describe the characteristics of the corresponding process that change with the advancement of time steps.
[0096] Optionally, the allocation unit 402 may also: perform information transfer processing between each process based on the process characteristics and disjunctive graph of each process at the current time step to update the process characteristics of each process; determine the allocation strategy for the current time step based on the updated process characteristics of each process and the set of executable processes of each machine at the current time step.
[0097] Optionally, the allocation unit 402 may also: determine the machine characteristics of each machine based on the updated process characteristics of each process and the set of executable processes of each machine at the current time step; input the machine characteristics of each machine into the reinforcement learning agent to obtain the process to be executed by each machine at the current time step, so as to allocate the process to each machine as the allocation strategy for the current time step.
[0098] Optionally, the machine features include machine state features and relationship features of the corresponding machine, where the relationship features are features used to characterize the relationship between the corresponding machine and various executable processes of the machine.
[0099] Optionally, the allocation unit 402 may also: for each machine, input the machine features into the reinforcement learning agent to obtain the scores of each executable process of the corresponding machine; determine the process to be executed by each machine at the current time step based on the scores of each executable process of each machine, so as to allocate the process to each machine as the allocation strategy for the current time step.
[0100] Optionally, the flexible job shop scheduling device 400 also includes a training unit (not shown in the figure), which can train the reinforcement learning agent through the following steps: obtaining the description information of the flexible job shop sample; for the flexible job shop sample, using the reinforcement learning agent to be trained, executing the allocation step in a loop according to multiple time steps until all processes have completed the allocated operations, and obtaining the allocation strategy for each time step; according to the allocation strategy for each time step, determining the feedback signal for each time step; based on the feedback signal, updating the reinforcement learning agent to be trained to obtain the reinforcement learning agent.
[0101] Optionally, the training unit may also: determine the maximum completion time based on the allocation strategy of each time step; determine the feedback information of each time step based on the maximum completion time; for each time step, input the process characteristics of each process updated in the corresponding time step into the evaluation network to be trained to obtain the estimated state value of the corresponding time step; use the estimated state value of each time step as the sample estimated value, and the feedback information of the corresponding time step as the sample label, and perform supervised training on the evaluation network to be trained to obtain the evaluation network; for each time step, input the process characteristics of each process updated in the corresponding time step into the evaluation network to obtain the state value of the corresponding time step; determine the feedback signal of each time step based on the state value and feedback information of each time step.
[0102] Optionally, the training unit may also: for each machine, normalize the scores of each executable process of the corresponding machine to obtain the allocation probability of each executable process of the corresponding machine; and determine the process to be executed by each machine at the current time step according to the allocation probability of each executable process of each machine.
[0103] The above has been referred to Figures 1 to 4 A flexible job shop scheduling method and apparatus according to exemplary embodiments of the present disclosure are described.
[0104] Figure 4 Each unit in the flexible job shop scheduling device shown can be configured as software, hardware, firmware, or any combination of the above items to perform a specific function. For example, each unit may correspond to a dedicated integrated circuit, or may correspond to a pure software code, or may correspond to a module that combines software and hardware. In addition, one or more functions implemented by each unit may also be uniformly executed by components in a physical entity device (e.g., a processor, a client, or a server, etc.).
[0105] In addition, refer to Figure 1 The flexible job shop scheduling method described can be implemented by a program (or instruction) recorded on a computer-readable storage medium. For example, according to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions can be provided, wherein when the instructions are executed by at least one computing device, the at least one computing device is prompted to execute the flexible job shop scheduling method according to the present disclosure.
[0106] The computer program in the computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. It should be noted that the computer program can also be used to perform additional steps in addition to the above steps or perform more specific processing when performing the above steps. The contents of these additional steps and further processing have been described in reference to Figure 1 It is mentioned in the description of the related method, so it will not be repeated here to avoid repetition.
[0107] It should be noted that each unit in the flexible job shop scheduling device according to the exemplary embodiment of the present disclosure can completely rely on the operation of the computer program to realize the corresponding function, that is, each unit corresponds to each step in the functional architecture of the computer program, so that the entire system is called through a special software package (for example, lib library) to realize the corresponding function.
[0108] on the other hand, Figure 4 The various units shown may also be implemented by hardware, software, firmware, middleware, microcode, or any combination thereof. When implemented by software, firmware, middleware, or microcode, the program code or code segment for performing the corresponding operation may be stored in a computer-readable medium such as a storage medium, so that the processor may perform the corresponding operation by reading and running the corresponding program code or code segment.
[0109] For example, an exemplary embodiment of the present disclosure may also be implemented as a computing device, which includes a storage component and a processor, wherein a set of computer executable instructions is stored in the storage component. When the set of computer executable instructions is executed by the processor, a flexible job shop scheduling method according to an exemplary embodiment of the present disclosure is executed.
[0110] Specifically, the computing device can be deployed in a server or client, or can be deployed on a node device in a distributed network environment. In addition, the computing device can be a PC, a tablet device, a personal digital assistant, a smart phone, a web-based flexible job shop scheduling, or other devices capable of executing the above instruction set.
[0111] Here, the computing device is not necessarily a single computing device, but may also be any device or circuit collection that can execute the above instructions (or instruction sets) individually or jointly. The computing device may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that is interconnected with a local or remote (e.g., via wireless transmission) interface.
[0112] In a computing device, a processor may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, a processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0113] According to the exemplary embodiment of the present disclosure, some operations described in the flexible job shop scheduling method can be implemented by software, some operations can be implemented by hardware, and furthermore, these operations can also be implemented by a combination of software and hardware.
[0114] The processor may execute instructions or codes stored in one of the storage components, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transmission protocol.
[0115] The storage component may be integrated with the processor, for example, RAM or flash memory is arranged within an integrated circuit microprocessor, etc. In addition, the storage component may include a separate device, such as an external disk drive, a storage array, or any other storage device that can be used by a database system. The storage component and the processor may be operatively coupled, or may communicate with each other, such as through an I / O port, a network connection, etc., so that the processor can read files stored in the storage component.
[0116] In addition, the computing device may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the computing device may be connected to each other via a bus and / or a network.
[0117] The flexible job shop scheduling method according to the exemplary embodiment of the present disclosure can be described as various interconnected or coupled functional blocks or functional diagrams. However, these functional blocks or functional diagrams can be equally integrated into a single logical device or operate according to non-exact boundaries.
[0118] Therefore, refer to Figure 1 The described flexible job shop scheduling method may be implemented by a system including at least one computing device and at least one storage device storing instructions.
[0119] According to an exemplary embodiment of the present disclosure, at least one computing device is a computing device for executing a flexible job shop scheduling method according to an exemplary embodiment of the present disclosure, and a computer executable instruction set is stored in the storage device. When the computer executable instruction set is executed by the at least one computing device, the execution reference Figure 1 The flexible job shop scheduling method described.
[0120] The above describes various exemplary embodiments of the present disclosure, and it should be understood that the above description is only exemplary and not exhaustive, and the present disclosure is not limited to the disclosed exemplary embodiments. Without departing from the scope and spirit of the present disclosure, many modifications and changes are obvious to those of ordinary skill in the art. Therefore, the scope of protection of the present disclosure should be based on the scope of the claims.
Claims
1. A flexible job shop scheduling method, characterized in that: The flexible job shop scheduling method comprises: Acquire description information of a flexible job shop to be scheduled, where the description information is used to describe a plurality of machines and a plurality of workpieces in the flexible job shop to be scheduled, each workpiece needs to be processed by a plurality of sequentially arranged processes, each process can be assigned to at least one of the plurality of machines, and each machine can be used to execute at least one process; The allocation steps are executed in a loop according to multiple time steps until all processes are allocated. The allocation steps executed in each time step include: According to the description information and the allocation strategies of each previous time step, a disjunctive graph of the flexible job shop to be scheduled at the current time step is constructed, wherein the disjunctive graph is used to characterize the execution relationship between each process; Based on the disjunctive graph at the current time step, determine the allocation strategy for the current time step.
2. The flexible job shop scheduling method according to claim 1, characterized in that: The execution relationship includes a sequential relationship, a competitive relationship and an allocated relationship. The sequential relationship represents the execution order relationship between multiple processes for processing the same workpiece. The competitive relationship represents that two unallocated processes in the execution relationship can be allocated to the same machine. The allocated relationship represents that one of the two processes originally in the competitive relationship has completed the allocation.
3. The flexible job shop scheduling method according to claim 1 or 2, characterized in that: The allocation step performed at each time step also includes: Determine the execution status of each process at the current time step and the set of executable processes of each machine at the current time step according to the description information and the allocation strategy of each previous time step; According to the execution status of each process at the current time step, the process characteristics of each process at the current time step are determined; Wherein, determining the allocation strategy of the current time step based on the disjunctive graph at the current time step includes: Based on the process characteristics of each process at the current time step, the disjunctive graph and the executable process set of each machine, the allocation strategy of the current time step is determined.
4. The flexible job shop scheduling method according to claim 3, characterized in that: The step of determining the allocation strategy for the current time step based on the process characteristics of each process at the current time step, the disjunctive graph, and the executable process set of each machine includes: Based on the process characteristics and disjunctive graph of each process at the current time step, information transfer processing is performed between each process to update the process characteristics of each process; According to the updated process characteristics of each process and the executable process set of each machine at the current time step, the allocation strategy of the current time step is determined.
5. The flexible job shop scheduling method according to claim 4, characterized in that: The step of determining the allocation strategy for the current time step according to the updated process characteristics of each process and the executable process set of each machine at the current time step includes: Determine the machine characteristics of each machine according to the updated process characteristics of each process and the executable process set of each machine at the current time step; The machine features of each machine are input into the reinforcement learning agent to obtain the process to be executed by each machine at the current time step, so as to allocate the process to each machine as the allocation strategy for the current time step.
6. The flexible job shop scheduling method according to claim 5, characterized in that: The machine features of each machine are input into the reinforcement learning agent to obtain the process to be executed by each machine at the current time step, so as to allocate the process to each machine as the allocation strategy for the current time step, including: For each machine, input the machine features into the reinforcement learning agent to obtain the scores of each executable process of the corresponding machine; According to the scores of each executable process of each machine, the process to be executed by each machine at the current time step is determined, so as to allocate the process to each machine as the allocation strategy for the current time step.
7. The flexible job shop scheduling method according to claim 6, characterized in that: The reinforcement learning agent is trained by the following steps: Get the description information of the flexible job shop sample; For the flexible job shop sample, using the reinforcement learning agent to be trained, the allocation step is executed cyclically according to multiple time steps until all processes complete the allocated operations, and the allocation strategy for each time step is obtained; Determine the feedback signal for each time step according to the allocation strategy for each time step; Based on the feedback signal, the reinforcement learning agent to be trained is updated to obtain the reinforcement learning agent.
8. The flexible job shop scheduling method according to claim 7, characterized in that: Determining the feedback signal of each time step according to the allocation strategy of each time step includes: Determine the maximum completion time based on the allocation strategy for each time step; Determining feedback information for each time step according to the maximum completion time; For each time step, the process features of each process updated in the corresponding time step are input into the evaluation network to be trained to obtain the estimated state value of the corresponding time step; The estimated state value of each time step is used as the sample estimated value, and the feedback information of the corresponding time step is used as the sample label, and the evaluation network to be trained is subjected to supervised training to obtain the evaluation network; For each time step, the process characteristics of each process updated in the corresponding time step are input into the evaluation network to obtain the state value of the corresponding time step; According to the state value and feedback information of each time step, the feedback signal of each time step is determined.
9. A flexible job shop scheduling device, characterized in that: The flexible job shop scheduling device comprises: an acquisition unit, configured to acquire description information of a flexible job shop to be scheduled, wherein the description information is used to describe a plurality of machines and a plurality of workpieces in the flexible job shop to be scheduled, each workpiece needs to be processed by a plurality of sequentially arranged processes, each process can be assigned to at least one of the plurality of machines, and each machine can be used to execute at least one process; The allocation unit is configured to execute the allocation step in a loop according to a plurality of time steps until all the processes are allocated, wherein the allocation step executed in each time step includes: According to the description information and the allocation strategies of each previous time step, a disjunctive graph of the flexible job shop to be scheduled at the current time step is constructed, wherein the disjunctive graph is used to characterize the execution relationship between each process; Based on the disjunctive graph at the current time step, determine the allocation strategy for the current time step.
10. A computer-readable storage medium storing instructions, characterized in that: When the instructions are executed by at least one computing device, the at least one computing device is prompted to execute the flexible job shop scheduling method according to any one of claims 1 to 12.
Citation Information
Cited By
Resource state prediction and deep reinforcement learning scheduling fused workshop active scheduling method and device, and readable storage medium
CN120764935A
