Manufacturing system scheduling method and device based on Petri network and multi-step optimization

By using a multi-step optimization method in the Petri network scheduling model to expand the search scope, the problems of poor real-time performance and low solution quality in manufacturing system scheduling are solved, and more efficient resource allocation and production efficiency are achieved.

CN119067336APending Publication Date: 2024-12-03XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410640958.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing manufacturing system scheduling methods have problems such as poor real-time performance, long running time and poor solution quality, especially when dealing with complex environments, which lead to deadlocks and unreasonable resource allocation problems.

Method used

Using the scheduling method based on Petri net and multi-step optimization search, multi-step optimization search is carried out in the deep subtree through greedy algorithms, expand the search range, avoid local optimal solutions, improve the approximation of global optimal solutions, and reduce memory consumption and computational complexity.

Benefits of technology

It improves the production efficiency of the manufacturing system, shortens the manufacturing cycle, improves the efficiency and real-time performance of the scheduling plan, avoids deadlock, and obtains a better scheduling plan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119067336A_ABST
    Figure CN119067336A_ABST
Patent Text Reader

Abstract

The invention discloses a manufacturing system scheduling method based on a Petri network and multi-step optimization, and the method comprises the steps: constructing a depth sub-tree according to a search depth and a current identifier, and carrying out the multi-step optimization in the depth sub-tree based on a greedy algorithm to determine a first priority enabling transition, thereby obtaining a next current identifier; and determining an optimal scheduling scheme of the manufacturing system according to all the first priority enabling transitions. According to the method provided by the invention, a depth sub-tree is constructed, and multi-step optimization is carried out in the depth sub-tree based on a greedy algorithm; according to the method, the local range of searching during optimization can be expanded, so that a result obtained by searching can be closer to a globally optimal solution, and the defect that greedy searching of single-step optimization is easy to fall into a locally optimal solution is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of industrial scheduling, and in particular relates to a manufacturing system scheduling method and device based on Petri net and multi-step optimization. Background Art

[0002] With the continuous advancement of technology, the manufacturing industry is facing many new challenges and opportunities. For example, in a typical discrete event system such as a semiconductor production line, unreasonable resource allocation may lead to deadlock, which not only reduces productivity but also may cause the entire system to stall. Therefore, designing and using an efficient scheduling method is of great significance to improving the production efficiency of the manufacturing system, reducing costs and meeting market demand.

[0003] Petri net is a graphical modeling tool used to describe discrete event systems. It can intuitively reflect the concurrency, deadlock and resource usage in flexible manufacturing systems, and can be used to model and analyze manufacturing system scheduling problems. At present, many advanced forms of Petri nets have appeared, such as colored Petri nets, fuzzy Petri nets and time Petri nets, to meet the needs of different application scenarios.

[0004] In the study of Petri net scheduling problems, intelligent algorithms combined with Petri nets to solve the scheduling problems of manufacturing systems have become a mainstream. A common method is to combine the A star algorithm and Petri nets to solve the scheduling problems of manufacturing systems. Since the A star algorithm needs to store a large amount of node information, it leads to large memory consumption and high computational complexity. When dealing with complex environments, it may cause the algorithm to run for a long time, affecting real-time performance. Another method is to combine the greedy algorithm and Petri nets to solve the scheduling problems of manufacturing systems. The current greedy search algorithm is generally a single-step optimization search method. It takes the best or most favorable choice in the current state in each step of selection, and approaches the global optimal solution through the local optimal choice. However, the greedy algorithm cannot always find the global optimal solution because it only considers the local optimal solution at each step, but not all possible global solutions.

[0005] Therefore, the current manufacturing system scheduling methods have problems such as poor real-time performance, long running time, or poor quality of the obtained solutions. Summary of the invention

[0006] The embodiment of the present invention provides a manufacturing system scheduling method and device based on Petri net and multi-step optimization, which can solve the problems of poor real-time performance, long running time, or poor solution quality in the current manufacturing system scheduling method.

[0007] In a first aspect, an embodiment of the present invention provides a manufacturing system scheduling method based on Petri net and multi-step optimization, the method comprising:

[0008] Determine whether the current identifier is the target identifier;

[0009] If the current identifier is not the target identifier, the nth depth subtree is determined according to the current identifier and the nth search depth of the multi-step optimization, where the identifier is used to represent the running state of the Petri net scheduling model, and the nth search depth is an integer greater than or equal to 1;

[0010] Based on the greedy algorithm, multi-step optimization is performed on the n-th depth subtree starting from the current identifier to prioritize the enabling transitions under the current identifier and obtain the first priority enabling transition, wherein the first priority enabling transition has the highest priority;

[0011] Transmit the first priority enabling transition to obtain the next identifier, and determine whether the next identifier is a dead identifier;

[0012] If the next identifier is not a dead identifier, the next identifier is determined as the next current identifier;

[0013] If the current identifier is the target identifier, the optimal scheduling solution for the manufacturing system is determined based on all first priority enabled transitions.

[0014] In a possible implementation of the first aspect, the enabled transition set of the i-th level identifier in the n-th depth subtree can be determined according to the transition emission rule and the Petri net scheduling model; the i+1-th level identifier of the n-th depth subtree obtained after each enabling transition is emitted is determined according to the Petri net scheduling model; the i-th level identifier of the n-th depth subtree and the i+1-th level identifier of the n-th depth subtree are associated with the enabling transition; and the above steps are repeated to obtain the n-th depth subtree after associating the i-1-th level identifier of the n-th depth subtree with the i-th level identifier of the n-th depth subtree.

[0015] Exemplarily, i=0,1...I, I equals the nth search depth, the 0th level identifier of the nth depth subtree is the current identifier, the enabling transition set includes at least zero enabling transitions, and the time that the token associated with the enabling transition stays in its library satisfies the enabling time interval.

[0016] In a possible implementation method of the first aspect, it can be determined whether there is a target identifier in the first-level identifier of the n-th deep subtree. If there is a target identifier in the first-level identifier of the n-th deep subtree, the optimization search is stopped and the enabling transition that associates the first-level identifier and the target identifier is determined as the first priority enabling transition; if there is no target identifier in the first-level identifier of the n-th deep subtree, the optimization search continues in the n-th deep subtree to prioritize the enabling transitions under the current identifier to obtain the first priority enabling transition.

[0017] In a possible implementation of the first aspect, the first-level identifier of the n-th depth subtree can be added to the first-level queue; starting from i=1, it is determined whether i is less than I and whether the i-th queue is empty; if i is less than I and the i-th queue is not empty, it is determined whether there is an enabling change on each identifier in the i-th queue; if there is an enabling change on an identifier in the i-th queue, the i+1-th level identifier pointed to by the enabling change is determined as the i+1-th level new identifier; it is determined whether the i+1-th level new identifier includes a target identifier; and the target identifier that is not a target identifier is determined. The new identifier of the i+1th level identified is added to the i+1th level queue, and / or the endpoint time is updated according to the target identifier; if there is no enabling change on the identifier in the i-th level queue, the i+1th level queue is empty, i=i+1; if i is equal to I and the i-th level queue is not empty, the nth global time is updated; if i is equal to I and the i-th level queue is empty, the nth global time is not updated; compare the updated nth global time with the updated endpoint time, and determine the enabling change that can obtain a smaller time as the first priority enabling change.

[0018] Exemplarily, the updated end time is the shortest time from the current identifier to the target identifier.

[0019] Exemplarily, the updated nth global time is the shortest time from the current identifier to the identifier in the first level queue.

[0020] In a possible implementation of the first aspect, if the next identifier is a dead identifier, the first priority enabling transition can be abolished and it is determined whether there are other enabling transitions on the current identifier, and after the other enabling transitions are transmitted, no identifier included in the path that has been traversed can be obtained; if there are other enabling transitions on the current identifier, another first priority enabling transition is determined based on the other enabling transitions on the current identifier; if there are no other enabling transitions on the current identifier, a first-level backtracking strategy is used to determine in sequence whether there are other enabling transitions on identifiers before the current identifier; if there are other enabling transitions on identifiers before the current identifier, the first identifier with other enabling changes before the current identifier is determined as the next current identifier; if there are no identifiers with other enabling transitions before the current identifier, the result that the target identifier is unreachable is output.

[0021] In a possible implementation manner of the first aspect, the search depth may be an integer greater than 1.

[0022] In a possible implementation manner of the first aspect, if the sum of the first n search depths is greater than a preset step threshold, the (n+1)th search depth may be equal to 1.

[0023] In a second aspect, an embodiment of the present invention provides a manufacturing system scheduling device based on Petri nets and multi-step optimization, the device comprising a comprehensive processing module, a deep subtree construction module and a multi-step optimization module.

[0024] The comprehensive processing module is used to determine whether the current identification is a target identification;

[0025] If the current identifier is not the target identifier, the depth subtree construction module is used to determine the nth depth subtree according to the current identifier and the nth search depth of the multi-step optimization, where the identifier is used to represent the running state of the Petri net scheduling model, and the nth search depth is an integer greater than or equal to 1;

[0026] The multi-step optimization module is used to perform multi-step optimization on the n-th depth subtree starting from the current identifier based on a greedy algorithm to prioritize the enabling transitions under the current identifier and obtain the first priority enabling transition, wherein the first priority enabling transition has the highest priority;

[0027] The comprehensive processing module is also used to transmit the first priority enabling transition to obtain the next identifier, and determine whether the next identifier is a dead identifier;

[0028] If the next identifier is not a dead identifier, the comprehensive processing module is further used to determine the next identifier as the next current identifier;

[0029] If the current identifier is a target identifier, the comprehensive processing module is further configured to determine an optimal scheduling solution for the manufacturing system according to all first priority enabling transitions.

[0030] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is used to store computer programs; the processor can be used to execute the computer program (instructions) stored in the memory to implement the method of the first aspect above.

[0031] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed, the method of the first aspect described above can be implemented.

[0032] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: according to the method provided by the present invention, a deep subtree is constructed and multi-step optimization is performed in the deep subtree based on a greedy algorithm; the local scope of the search during optimization can be expanded, so that the search result can be closer to the global optimal solution, avoiding the disadvantage that the greedy search of single-step optimization is prone to fall into the local optimal solution; because the greedy algorithm does not need to store a large amount of node information during operation, searching in the deep subtree through the greedy algorithm can reduce memory consumption and computational complexity, thereby improving the efficiency and real-time performance of determining the scheduling plan, thereby shortening the manufacturing cycle of the manufacturing system and improving its production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of a Petri net scheduling model provided by an embodiment of the present invention;

[0034] Figure 2 A schematic diagram of a depth subtree provided by an embodiment of the present invention;

[0035] Figure 3 A schematic diagram of a multi-step optimization method based on a greedy algorithm provided in an embodiment of the present invention;

[0036] Figure 4 A flowchart of a manufacturing system scheduling method based on Petri net and multi-step optimization provided by an embodiment of the present invention;

[0037] Figure 5 A schematic diagram of the structure of a manufacturing system scheduling device based on Petri net and multi-step optimization provided by an embodiment of the present invention;

[0038] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0039] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.

[0040] Figure 1 Shown is a schematic diagram of a Petri net scheduling model provided by an embodiment of the present invention.

[0041] See also Figure 1 Each place in the Process Oriented Petri Net scheduling model, such as p0, p1, etc., represents a processing flow. The tokens in the place, such as Figure 1The black dot in the figure represents a workpiece to be processed; transitions, such as t1 and t2, can represent a transportation process. The delay of a place can be used to represent the time required for processing, and the delay of a transition can represent the time required for transportation. A token needs to stay in a place for the place delay (i.e., complete processing) before it can be migrated to another place by transition; when a transition is launched, it also needs to be launched successfully after the transition delay.

[0042] A place can be associated with one or more transitions, for example, place p0 is associated with transitions t0 and t2, and place p2 is associated with transition t1. The token associated with a transition is the token in the place associated with the transition. If the time a token associated with a transition stays in a place meets the enabling time interval of the transition, the transition can be an enabling transition. Only enabling transitions that stay in a place for the time delay of the place can be emitted.

[0043] Exemplarily, the enabling time interval may include the earliest launch time to the latest launch time of the transition. The enabling time interval may be determined by actual constraints in the processing and transportation process.

[0044] For example, if the latency of place p0 is 1 minute, and the enabling time interval of transition t0 is [2 minutes, 5 minutes], then the earliest emission time of transition t0 is 3 minutes, and the latest emission time is 6 minutes. If the token in place p0 stays in place p0 for 1.5 minutes, the transition cannot be emitted; if the stay time is 4 minutes, the transition can be emitted.

[0045] If the transition is successfully emitted, the token can be moved from its associated place to the place it points to. Figure 1 , if place p0 successfully launches a transition t0, the token can be transferred from place p0 to place p1. This means that an item is transported to the location of process p1 by transport device t0 after completing process p0.

[0046] As an example, before determining the optimal scheduling plan for a manufacturing system, we can first select a process-oriented modeling method to perform Petri net modeling on the manufacturing system based on the processing procedures of the internal workpieces of the manufacturing system and the machine occupancy between the workpieces to obtain a Petri net scheduling model.

[0047] Specifically, the initial state, number of places, and number of transitions of the Petri net scheduling model can be set; and the time constraints during actual processing and production can be considered, and delays can be added to places and transitions to obtain a timed Petri net model (i.e., a Petri net scheduling model). Then, transition emission rules can be formulated for the Petri net scheduling model, i.e., time intervals. Finally, the model can be converted into a net file that can be read by the program.

[0048] Figure 2 A schematic diagram of a deep subtree provided by an embodiment of the present invention.

[0049] For example, see Figure 2 , Figure 2 The medium-depth subtree is a subtree with a depth of 5 constructed according to the Petri net scheduling model.

[0050] Each level of the deep subtree may include multiple identifiers, and the identifiers between two adjacent levels may be associated through an enabling transition from the upper level identifier to the lower level identifier. The identifier of the deep subtree may correspond to a running state of the Petri net scheduling model.

[0051] For example, see Figure 1 , if the initial mark is set to M0 = [5,0,0] T , indicating that there are 5 tokens in the place p0 in the Petri net scheduling model, and the number of tokens in the other places is 0. If the place p0 is the warehouse for goods to be transferred, the running state of the Petri net scheduling model at this moment can be: there are 5 items stored in the warehouse for goods to be transferred waiting to be processed, and the rest of the processing flow is idle. After emitting a transition t0, the place p0 can reach the state M1, at which time the mark M1=[4,1,0] T .

[0052] The manufacturing system scheduling method based on Petri net and multi-step optimization provided in the embodiment of the present invention can be applied to electronic devices such as mobile terminals, personal notebook computers, supercomputers, etc. The embodiment of the present invention does not impose any restrictions on the specific type of electronic devices.

[0053] Figure 3 The flowchart of a multi-step optimization method based on a greedy algorithm provided by an embodiment of the present invention is shown. As an example but not a limitation, the method 300 may include steps S301-S308, and each step is described below.

[0054] S301, determining whether the first-level identifier of the n-th depth subtree has a target identifier.

[0055] In an example, if the target identifier exists in the first-level identifier of the n-th depth subtree, step S302a may be performed.

[0056] For example, see Figure 2 , if the current identifier is identifier M 12 , then the target identifier M 15 It is the first level identifier of the n+1th depth subtree, and step S302a can be performed at this time.

[0057] In another example, if the target identifier does not exist in the first-level identifier of the nth depth subtree, step S302b can be performed to continue searching in the nth depth subtree to prioritize the enabling transitions under the current identifier to obtain the first priority enabling transition.

[0058] For example, see Figure 2 If the current identifier is the initial identifier M0, the first-level identifiers may include M1, M2, M3, and M4, among which there is no target identifier; at this time, step S302b may be performed.

[0059] S302a, stop optimizing and determine the enabling transition associated with the first-level identifier and the target identifier as the first priority enabling transition.

[0060] For example, see Figure 2 , if the current identifier is identifier M 12 , but the nth search depth is 4. Even if the search depth is not reached, the optimization can be stopped at this time and the association marker M 12 and target identifier M 15 The enabling transition t5 is determined as the marker M 12 If the enabling transitions t0, t1, t3, t4, and t5 are marked M0, M1, M5, and M6, respectively, 10 、M 12 The first priority enabling transition of , then the output can be from the initial mark M0 along the above path to the target mark M 15 The global time.

[0061] S302b, adding the first-level identifier of the n-th depth subtree to the first-level queue.

[0062] For example, if the current identifier is the initial identifier M0, identifiers M1, M2, M3, and M4 may be added to the first-level queue.

[0063] S303, starting from i=1, determine whether i is less than I and whether the i-th level queue is empty.

[0064] In a possible implementation, if i is equal to 1 and the i-th level queue is not empty, step S304a may be performed.

[0065] For example, see Figure 2 As in the above example, if the current identifier is the initial identifier M0, the first-level queue includes four identifiers: M1, M2, M3, and M4, which is not empty, and the search depth is 1, i=1; then step S304a can be performed.

[0066] In another possible implementation, if i is less than 1 and the i-th level queue is not empty, S304b may be performed.

[0067] For example, see Figure 2 As in the above example, if the current identifier is the initial identifier M0, the first-level queue includes four identifiers: M1, M2, M3, and M4, which are not empty, and the search depth is 5, then i=1; then step S304b can be performed.

[0068] In yet another possible implementation, if the i-th level queue is empty, the n-th global time may not be updated.

[0069] In one example, if i=I, the i-th queue is empty, then step S308 may be performed.

[0070] For example, see Figure 2 If the current identifier is the initial identifier M0, the search depth is 3, and the second-level queue includes identifiers M8 and M9; these two identifiers cannot be further expanded, then the third-level queue is empty, and step S308 can be performed at this time.

[0071] In another example, if i is less than 1 and the i-th level queue is empty, then any identified enabling transition in the i-1-th level queue may be determined as the first priority enabling transition.

[0072] For example, see Figure 2 , if the current identifier is the initial identifier M0, the search depth is 5, and the second-level queue includes identifiers M8 and M9; these two identifiers cannot be further expanded, and the third-level queue is empty. At this time, the enabling transition t3 can be determined as the first priority enabling transition of the identifier M2. Since the identifier M8 is a dead identifier that cannot be further expanded, the subsequent step can be rolled back according to the steps in the following method 400.

[0073] S304a, updating the nth global time.

[0074] In one example, before performing multi-step optimization on the depth subtree, the initial value of the global time of the nth depth subtree (i.e., the nth global time) can be set to the maximum time value preset by the system. In this way, when the global time and the end time are subsequently compared, if the global time is not updated, that is, no path that can reach the search depth is found in the nth depth subtree, the enabling transition that obtains the smaller end time can be directly determined as the first priority enabling transition.

[0075] Exemplarily, the nth global time is the shortest time from the current identifier to the identifiers in the first level queue.

[0076] For example, see Figure 2 , if the current marker is the initial marker M0, the search depth is 3, if along the enabling transition sequence: t0, t2, t3, to the marker M 11The time is 12s, along the enabling transition sequence: t0, t1, t3, reaching the marker M 10 The time is 15s; although the mark M 11 It is a dead mark, but you can still choose to update the global time to 12s.

[0077] S304b, determining whether there is an enable transition on each flag in the i-th level queue.

[0078] In an example, if there is an enable transition on any flag in the i-th level queue, step S305 may be performed.

[0079] For example, see Figure 2 , if the i-th level queue includes the marker M 11 、M 10 , mark M 10 If there is an enable transition, step S305 can be performed.

[0080] In another example, if no transition is enabled on all flags in the i-th level queue, it can be determined that the i+1-th level queue is empty, and i=i+1 is set to proceed to step S303.

[0081] For example, see Figure 2 If the i-th level queue includes identifiers M8 and M9, both of which are dead identifiers, it can be determined that the i+1-th level queue is empty, and i=i+1 is set to proceed to step S303.

[0082] S305: Determine the i+1th level identifier pointed to by the enable transition as the i+1th level new identifier.

[0083] For example, see Figure 2 , if the i-th level queue includes the marker M 11 、M 10 , then the new identifier of the i+1th level may include the identifier M 12 、M 13 、M 14 .

[0084] S306: Determine whether the new identifier at the i+1th level includes the target identifier.

[0085] In one example, if the new identifiers at the (i+1)th level only include the target identifier, only step S307a may be performed.

[0086] In another example, if the new identifier at the i+1th level does not include the target identifier, step S307b may be performed.

[0087] In yet another example, if the new identifiers at the (i+1)th level include the target identifier and identifiers other than the target identifier, steps S307a and S307b may be performed synchronously.

[0088] S307a, updating the end time.

[0089] In one example, before optimizing the depth subtree, the initial value of the end time can be set to the maximum time preset by the system, and then the end time can be updated if the target identifier is found in the depth subtree. In this way, when the target identifier is not included in the nth depth subtree, the enabling transition from the current identifier to the deepest level of the depth subtree can be determined as the first priority enabling transition.

[0090] Exemplarily, the end time is the shortest time from the current identifier to the target identifier.

[0091] For example, see Figure 2 , if the current identifier is identifier M 10 , the search depth is 3, and the target identifier M is included in the i+1th level new identifier when i=1 15 From the logo M 10 The target marker M can be reached by enabling the transition sequence: t5, t4 15 , or through the enabling transition sequence: t4, t5, to the target marker M 15 If the enabling transition sequence: t5, t4 to the target marker M 15 The time consumed is 20s, through the enabling transition sequence: t4, t5 to the target mark M 15 If the time consumed is 18 seconds, the end time can be updated to 18 seconds.

[0092] For example, see Figure 2 , if the current identifier is identifier M5, the search depth is 4, and when i=2, the path to the target identifier through the enabling transition sequence: t7, t4 is determined, and the time taken by this path is 15s. When i=3, the path to the target identifier through the enabling transition sequence: t3, t4, t5 and the path to the target identifier through the enabling transition sequence t3, t5, t4 are obtained. These two paths take 20s and 25s respectively. Although the time taken by the path to the target identifier through the enabling transitions t3, t4, t5 is shorter than that of the other path determined when i=3, the end time does not need to be updated to 20s at this time, and the end time is still kept at the value obtained when i=2: 15s. In this way, the value of the end time can always be the shortest time from the current identifier to the end identifier.

[0093] S307b, adding the new identifier of the i+1th level that is not the target identifier to the i+1th level queue.

[0094] Exemplarily, a new identifier of the i+1th level that is not a target identifier may be added to the i+1th level queue.

[0095] S308 , comparing the updated global time with the updated key time, and determining the enabling transition that can obtain a smaller time as the first priority enabling transition.

[0096] For example, see Figure 2 If the current marker is marker M7, it will go through the enabling transition sequence: t1, t6, t5 to reach marker M 16 , the nth global time is 18s; after passing through the enabling transition sequence: t7, t4, the target marker is reached and the end time is 15s. If the nth global time is greater than the end time, the enabling transition t7 can be determined as the first priority enabling transition of marker M7. If the nth global time is 12s and the end time is 15s; the enabling transition t1 can be determined as the first priority enabling transition of marker M7, and the marker M 10 Determine as the next current identifier.

[0097] Figure 4 The flowchart of a manufacturing system scheduling method based on Petri net and multi-step optimization provided by an embodiment of the present invention is shown. As an example but not a limitation, method 400 can be applied to the above electronic device. Method 400 can include steps S401-S408, and each step is described below.

[0098] S401, determining whether the current identifier is a target identifier.

[0099] Exemplarily, the first current identifier may be an initial identifier, and the state of the Petri net scheduling model represented by the initial identifier may be an initial state before the manufacturing system is started.

[0100] Exemplarily, the target identifier is also a type of identifier, and the state of the Petri net scheduling model represented by the target identifier can be an expected state set by the user. Figure 1 , the target identifier can be set to M e =[0,2,2] T .

[0101] In a possible implementation, if the current identifier is a target identifier, step S408 may be performed.

[0102] In another possible implementation, if the current identifier is not the target identifier, then the optimal path from the initial identifier to the target identifier has not been found yet, and the optimization can continue starting from the current identifier.

[0103] In one example, if the nth search depth is greater than 1, step S302 may be performed to construct a depth subtree and perform multi-step optimization through the depth subtree.

[0104] In another example, if the nth search depth is equal to 1, a depth subtree with a depth of 1 can be constructed for search. The currently identified enabling transitions can also be directly sorted according to the transition delay, and the enabling transition with the shortest transmission time is determined as the first priority enabling transition, and then step S304 is performed; this can improve processing efficiency.

[0105] Optionally, each current identifier may be stored to record the states that have been visited during the search process, so as to avoid duplication or looping, which would waste computing resources.

[0106] S402, determining an nth depth subtree according to the current identifier and the nth search depth of the multi-step optimization.

[0107] In one possible implementation, see Figure 2 , we can first determine the enabled transition set of the i-th level identifier of the n-th deep subtree according to the transition emission rule and the Petri net scheduling model; then determine the i+1-th level identifier obtained after the emission of the enabled transition in the enabled transition set of the i-th level identifier according to the Petri net scheduling model; finally, associate the two through the enabling transition to complete the construction of the i+1-th layer deep subtree, and obtain the n-th deep subtree after completing the construction of the I-th layer deep subtree.

[0108] Illustratively, an enabling transition set may include at least zero enabling transitions.

[0109] Exemplarily, i=0, 1...I, where I is the nth search depth.

[0110] In one example, the search depth of each search may be an integer greater than 1, that is, multiple steps of optimization are performed each time.

[0111] In another example, if the sum of the first n search depths is greater than a preset step number threshold, the n+1th search depth may be 1. That is, after performing sufficiently many multi-step optimization searches, a single-step optimization search may be performed. Combining single-step optimization searches with multi-step optimization searches to determine the optimal scheduling method can reduce processing time and improve efficiency.

[0112] Optionally, single-step optimization and multi-step optimization can be performed in a random and cross-over manner.

[0113] S403 , based on a greedy algorithm, starting from the current identifier, a multi-step optimization search is performed on the n-th depth subtree to prioritize the enabling transitions under the current identifier to obtain a first priority enabling transition.

[0114] Specifically, the method 300 can be used to perform multi-step optimization based on a greedy algorithm to obtain a first priority enabling transition, and then transmit the first priority enabling transition to obtain a next identifier.

[0115] S404, determining whether the next identifier is a dead identifier.

[0116] Exemplarily, in the dead flag state, all transitions in the Petri net scheduling model are not enabled transitions.

[0117] In one example, if the next identifier is not a dead identifier, the path is still unblocked and step S405a can be performed. For example, the current identifier is M1 and the next identifier is M5.

[0118] In another example, if the next identifier is a dead identifier, there is no enable transition that can be transmitted at this time, and the path is interrupted and step S405b can be performed. For example, the current identifier is M2 and the next identifier is M8.

[0119] S405a, determining the next identifier as the next current identifier.

[0120] Exemplarily, when the next identifier is not a dead identifier, the next identifier may be determined as the next current identifier, and n=n+1 to perform step S401.

[0121] S405b, determining whether there are other enabling transitions on the current flag.

[0122] Exemplarily, after the other enabling transitions are emitted, any identifier included in the traversed path cannot be obtained.

[0123] For example, the current marker is M2, and the next marker is M8. Since marker M8 is a dead marker, it can be determined whether there are other enabling transitions on marker M2.

[0124] In one example, if the current identifier has other enabling transitions, the current identifier can continue to be extended, and the previously determined first priority enabling transition of the current identifier can be abolished and then step S406a is performed.

[0125] Optionally, the first priority enabling transition may be abolished by setting the delay of the first priority enabling transition to a maximum value of the transition delay.

[0126] For example, see Figure 2 If the current marker is M7, in step S403, transition t2 is determined as the first priority enabled transition. 11 It is a dead flag, so the delay of transition t2 can be set to the maximum value of the transition delay, and then step S406a is performed.

[0127] In another example, if there is no other enabling transition on the current identifier, the current identifier cannot be further extended, and the identifier can be rolled back to perform step S406b.

[0128] S406a: Determine another first priority enabling transition according to other enabling transitions currently marked.

[0129] Exemplarily, since each currently identified enabling transition is prioritized in step S403, the prioritized sequence can be called to remove the previous priority enabling transition in the sequence, and then the enabling transition with the highest priority in the updated priority sequence is determined as another first priority enabling transition.

[0130] S406b: Use the first-level backtracking strategy to determine whether there are other enabling transitions on the identifier before the current identifier.

[0131] Specifically, a first-level backtracking strategy can be adopted to sequentially backtrack the markers along the current path to check whether there are other enabled transitions on it, so as to avoid deadlock during the search process.

[0132] Exemplarily, the current path may be obtained by transmitting the first priority enabled transitions in sequence.

[0133] For example, starting from the initial marker, according to the enabling transition sequence: t0, t2, t3, the first priority enabling transition is emitted to obtain the current path to the marker M. 11 . Logo M 11 It is a dead mark. You can roll back the mark to mark M6 in sequence. If there is still no other enabled transition on mark M6, you can continue to roll back to mark M1.

[0134] Optionally, the first priority enabling transition of the rolled-back identification may be abolished.

[0135] In an example, if there are other enabling transitions on the identifier before the current identifier on the current path, the current path can be further extended, and step S407a can be performed.

[0136] In another example, if there is no other enabling transition before the current identifier, the current path cannot be further extended and cannot achieve the purpose of going from the initial identifier to the target identifier, so step S407b can be performed.

[0137] S407a, determining the first identifier with other enabled transitions before the current identifier as the next current identifier.

[0138] S407b, outputting the result that the target identifier is unreachable.

[0139] S408: Determine an optimal scheduling solution for the manufacturing system according to all first priority enabling transitions.

[0140] Exemplarily, an optimal scheduling solution for the manufacturing system can be obtained according to the emission sequence of the first priority enabling transition, solving a scheduling problem with the goal of minimizing the maximum completion time.

[0141] For example, see Figure 2 , if the target marker M is reached from the initial marker M0 by transmitting the first priority enabling transition sequence: t0, t1, t3, t4, t5 15 , the time and sequence of each process can be determined based on the transportation process corresponding to each transition and the processing process corresponding to the warehouse associated with the transition, thereby obtaining the optimal scheduling plan for the manufacturing system.

[0142] According to the method provided by the present invention, a deep subtree is constructed and a multi-step optimization search is performed in the deep subtree based on a greedy algorithm; the local scope of the search during the optimization can be expanded, so that the search result can be closer to the global optimal solution, avoiding the disadvantage that the greedy search of the single-step optimization is easy to fall into the local optimal solution; because the greedy algorithm does not need to store a large amount of node information during operation, searching in the deep subtree through the greedy algorithm can reduce memory consumption and computational complexity, thereby improving the efficiency and real-time performance of determining the scheduling plan, thereby shortening the manufacturing cycle of the manufacturing system and improving its production efficiency. Furthermore, the use of a first-level backtracking strategy to back off the identifier that cannot be expanded can avoid deadlock during the search process.

[0143] Figure 5 The structure diagram of a manufacturing system scheduling device based on Petri net and multi-step optimization provided by an embodiment of the present invention is shown. As an example but not limitation, the device 500 may include a comprehensive processing module 510, a deep subtree construction module 520 and a multi-step optimization module 530.

[0144] The comprehensive processing module 510 is used to determine whether the current identifier is a target identifier;

[0145] If the current identifier is not the target identifier, the depth subtree construction module 520 is used to determine the nth depth subtree according to the current identifier and the nth search depth of the multi-step optimization, where the identifier is used to represent the running state of the Petri net scheduling model, and the nth search depth is an integer greater than or equal to 1;

[0146] The multi-step optimization module 530 is used to perform multi-step optimization on the n-th depth subtree starting from the current identifier based on a greedy algorithm to prioritize the enabling transitions under the current identifier to obtain a first priority enabling transition, wherein the first priority enabling transition has the highest priority;

[0147] The comprehensive processing module 510 is further used to transmit the first priority enabling transition to obtain a next identifier, and determine whether the next identifier is a dead identifier;

[0148] If the next identifier is not a dead identifier, the comprehensive processing module 510 is further configured to determine the next identifier as the next current identifier;

[0149] If the current identifier is a target identifier, the comprehensive processing module 510 is further configured to determine an optimal scheduling solution for the manufacturing system according to all first priority enabled transitions.

[0150] In order to better illustrate the beneficial effects of the method provided by the present invention, the following simulation experiment can be performed:

[0151] Exemplarily, the deep subtree or Petri net scheduling models used in the simulation experiment are all bounded networks. The number of reachable states determined based on the bounded network has an upper limit, so the feasibility of the algorithm can be verified by comparing the completion time and the number of extended identifiers.

[0152] Table 1 shows data on completion time and single optimization time provided by an embodiment of the present invention.

[0153] Table 1

[0154] Scheduling strategy time / s Single optimization time / s Single-step optimization 18622.1 0.117 Multi-step optimization 9835.5 31.587 Hybrid step size optimization 9813.6 18.47

[0155] As shown in Table 1, if each step uses a single-step optimization to find the optimal scheduling solution, although the optimization time is short, it takes a long time to get the optimal scheduling solution. If each step uses multi-step optimization to find the optimal scheduling solution, although the single optimization time increases, the time to get the optimal scheduling solution is reduced by almost half; this shows that the multi-step optimization solution can improve efficiency. The mixed step optimization method is less than the multi-step optimization method in both single optimization time and scheduling strategy time. Therefore, the mixed step optimization can further improve efficiency.

[0156] According to the method provided by the present invention, a deep subtree is constructed and multi-step optimization is performed in the deep subtree based on a greedy algorithm; the local scope of the search during optimization can be expanded, so that the search result can be closer to the global optimal solution, avoiding the disadvantage that the greedy search of single-step optimization is prone to fall into the local optimal solution; because the greedy algorithm does not need to store a large amount of node information during operation, searching in the deep subtree through the greedy algorithm can reduce memory consumption and computational complexity, thereby improving the efficiency and real-time performance of determining the scheduling plan, thereby shortening the manufacturing cycle of the manufacturing system and improving its production efficiency.

[0157] Figure 6 FIG. 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 6 The electronic device 600 shown may include: at least one processor 610 ( Figure 6Only one processor is shown in the figure), a memory 620, and a computer program 630 stored in the memory 620 and executable on the at least one processor 610, wherein the processor 610 implements the steps of any of the above-mentioned method embodiments when executing the computer program 630.

[0158] The electronic device 600 may be a processing device such as a robot that can implement the above method. The embodiment of the present invention does not impose any limitation on the specific type of the electronic device.

[0159] Those skilled in the art will understand that Figure 6 The electronic device 600 is merely an example and does not constitute a limitation on the electronic device. The electronic device 600 may include more or fewer components than shown in the figure, or may combine certain components, or may include different components. For example, the electronic device 600 may also include an input and output interface.

[0160] The processor 610 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASTC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0161] The memory 620 may be an internal storage unit in some embodiments, such as a hard disk or a memory. The memory 620 may also be an external storage device in other embodiments, such as a plug-in hard disk, a smart memory card (SmartMemory Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 620 may also include both an internal storage unit and an external storage device. The memory 620 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, such as the program code of the computer program, etc. The memory 620 may also be used to temporarily store data that has been output or is to be output.

[0162] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0163] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0164] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0165] An embodiment of the present invention provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0167] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0168] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

Claims

1. A manufacturing system scheduling method based on Petri net and multi-step optimization, characterized in that: include: Determine whether the current identifier is the target identifier; If the current identifier is not the target identifier, determining an nth depth subtree according to the current identifier and an nth search depth of the multi-step optimization, wherein the identifier is used to represent the running state of the Petri net scheduling model, and the nth search depth is an integer greater than or equal to 1; Based on a greedy algorithm, starting from the current identifier, a multi-step optimization search is performed on the n-th depth subtree to prioritize the enabling transitions under the current identifier to obtain a first priority enabling transition, wherein the first priority enabling transition has the highest priority; Transmitting a first priority enabling transition to obtain a next identifier, and determining whether the next identifier is a dead identifier; If the next identifier is not the dead identifier, determining the next identifier as the next current identifier; If the current identifier is the target identifier, an optimal scheduling solution for the manufacturing system is determined according to all of the first priority enabling transitions.

2. The method according to claim 1, characterized in that Determining the nth depth subtree according to the current identifier and the nth search depth of the multi-step optimization includes: Determine the enabled transition set of the i-th level identifier in the n-th depth subtree according to the transition emission rule and the Petri net scheduling model; Wherein, i=0,1...I, I is equal to the nth search depth, the 0th level identifier of the nth depth subtree is the current identifier, the enabling transition set includes at least zero enabling transitions, and the time that the token associated with the enabling transition stays in the library satisfies the enabling time interval; Determine, according to the Petri net scheduling model, the i+1th level identifier of the nth depth subtree obtained after each of the enabling transitions is transmitted; Associating the i-th level identifier of the n-th depth subtree and the i+1-th level identifier of the n-th depth subtree through an enabling transition, wherein the identifier where the enabling transition is located obtains the identifier pointed to by the enabling transition after transmitting the enabling transition; The above steps are repeated to obtain the nth depth subtree after associating the I-1th level identifier of the nth depth subtree with the Ith level identifier of the nth depth subtree.

3. The method according to claim 2, characterized in that The method of performing multi-step optimization on the n-th depth subtree starting from the current identifier based on the greedy algorithm to prioritize the enabling transitions under the current identifier to obtain a first priority enabling transition includes: Determine whether the target identifier exists in the first-level identifier of the n-th depth subtree, and if the target identifier exists in the first-level identifier of the n-th depth subtree, stop optimizing and determine the enabling transition that associates the first-level identifier with the target identifier as the first priority enabling transition; If the target identifier does not exist in the first-level identifier of the n-th depth subtree, the optimization is continued in the n-th depth subtree to prioritize the enabling transitions under the current identifier to obtain a first priority enabling transition.

4. The method according to claim 3, characterized in that The step of continuing to search for an optimal solution in the n-th depth subtree to prioritize the enabled transitions under the current identifier to obtain a first-priority enabled transition includes: Add the first level identifier of the nth depth subtree to the first level queue; Starting from i=1, determine whether i is less than I and whether the i-th level queue is empty; If i is less than 1 and the i-th level queue is not empty, determining whether each identifier in the i-th level queue has the enabling transition; If there is an enable transition on an identifier in the i-th level queue, the i+1-th level identifier pointed to by the enable transition is determined as a new identifier for the i+1-th level; Determine whether the target identifier is included in the new identifier of the i+1th level; Adding a new identifier of the i+1th level that is not the target identifier to the i+1th level queue, and / or updating the end time according to the target identifier, wherein the updated end time is the shortest time from the current identifier to the target identifier; If there is no enabling transition on the flag in the i-th level queue, the i+1-th level queue is empty, i=i+1; If i is equal to 1 and the i-th level queue is not empty, then update the n-th global time, wherein the updated n-th global time is the shortest time from the current identifier to the identifier in the i-th level queue; If i is equal to 1 and the i-th level queue is empty, the n-th global time is not updated; The updated nth global time is compared with the updated end time, and the enabling transition that can obtain a smaller time is determined as the first priority enabling transition.

5. The method according to claim 1, characterized in that If the next identifier is a dead identifier, the method further includes: Abolish the first priority enabling transition and determine whether there are other enabling transitions on the current identifier, wherein the other enabling transitions cannot obtain any identifier included in the traversed path after being transmitted; If the other enabling transitions are present on the current identifier, determining another first priority enabling transition according to the other enabling transitions on the current identifier; If the current identifier does not have the other enabling transition, then use a first-level backtracking strategy to sequentially determine whether there is an identifier before the current identifier with the other enabling transition; If there is an identifier with the other enabling transition before the current identifier, the first identifier with the other enabling transition before the current identifier is determined as the next current identifier; If there is no identifier with the other enabling transition before the current identifier, a result indicating that the target identifier is unreachable is outputted.

6. The method according to any one of claims 1 to 5, characterized in that: The search depths are all integers greater than 1.

7. The method according to any one of claims 1 to 5, characterized in that: If the sum of the first n search depths is greater than the preset step threshold, the n+1th search depth is equal to 1.

8. A manufacturing system scheduling device based on Petri net and multi-step optimization, characterized in that: The device comprises a comprehensive processing module, a deep subtree construction module and a multi-step optimization module; The comprehensive processing module is used to determine whether the current identifier is a target identifier; If the current identifier is not the target identifier, the depth subtree construction module is used to determine the nth depth subtree according to the current identifier and the nth search depth of the multi-step optimization, wherein the identifier is used to represent the running state of the Petri net scheduling model, and the nth search depth is an integer greater than or equal to 1; The multi-step optimization module is used to perform multi-step optimization on the n-th depth subtree starting from the current identifier based on a greedy algorithm to prioritize the enabling transitions under the current identifier to obtain a first priority enabling transition, wherein the first priority enabling transition has the highest priority; The comprehensive processing module is also used to transmit the first priority enabling transition to obtain a next identifier, and determine whether the next identifier is a dead identifier; If the next identifier is not the dead identifier, the comprehensive processing module is further configured to determine the next identifier as the next current identifier; If the current identifier is the target identifier, the comprehensive processing module is further configured to determine an optimal scheduling solution for the manufacturing system according to all of the first priority enabling transitions.

9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the electronic device, the method according to any one of claims 1 to 7 is implemented.