FMS system scheduling and resource allocation optimization method based on Petri net
By combining Petri net modeling with an improved simulated annealing algorithm for FMS system scheduling and resource allocation optimization, the global optimal problem of resource allocation and scheduling in large-scale flexible manufacturing systems is solved, and the overall scheduling efficiency and resource utilization of the system are improved.
Patent Information
- Application Number
- CN202510844664.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-06-23
AI Technical Summary
In large-scale flexible manufacturing systems, existing scheduling optimization methods are difficult to simultaneously take into account multi-dimensional optimization objectives and the real-time dynamic configuration requirements of system resources. In addition, the state space of Petri nets is prone to explosion, resulting in low computational efficiency.
A Petri net-based FMS system scheduling and resource allocation optimization method is adopted, combined with an improved simulated annealing algorithm and a generative filter beam search algorithm, to perform integrated optimization of resource allocation and scheduling in the basis reachable graph. Through Petri net modeling and beam search algorithm, efficient search in the state space is performed to optimize resource allocation and scheduling.
It improves the scheduling efficiency and resource utilization of large-scale flexible manufacturing systems, reduces the maximum completion time, and is suitable for optimization scenarios of multi-task complex flexible manufacturing systems.
Smart Images

Figure CN120355041B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of manufacturing system optimization and intelligent control, and in particular relates to a Petri net-based FMS system scheduling and resource allocation optimization method. Background Art
[0002] With the continuous improvement of industrial manufacturing, Flexible Manufacturing Systems (FMS) have been widely adopted in modern manufacturing due to their advantages, such as multi-task parallel processing and strong adaptability to changing production requirements. However, achieving efficient scheduling in FMS has always been a key issue. Especially in the face of large-scale, multi-resource, and complex production processes, how to rationally allocate system resources, optimize scheduling solutions, and balance resource costs and production efficiency has become a challenging task.
[0003] Common scheduling optimization methods currently used include heuristic algorithms, mathematical programming, and intelligent optimization algorithms. However, in practical applications, these methods often struggle to simultaneously address multi-dimensional optimization objectives and the real-time dynamic configuration requirements of system resources. Furthermore, traditional scheduling algorithms require a long time to traverse the system state space, resulting in significant computational efficiency issues when dealing with large-scale flexible manufacturing systems.
[0004] To address these challenges, Petri nets, an effective discrete event system modeling tool, have been gradually introduced into the modeling and scheduling of flexible manufacturing systems due to their excellent ability to describe concurrency, asynchrony, and shared resources. Petri nets intuitively and accurately describe state changes and resource constraints in a system, providing a reliable foundation for subsequent scheduling optimization. However, in large-scale systems, the state space of Petri nets is prone to "explosion," resulting in a rapid growth in the search space and making it difficult to complete scheduling optimization within a reasonable timeframe.
[0005] To address the state space explosion problem in Petri nets, the BS (Beam Search) algorithm was introduced to improve search efficiency. Beam search is a heuristic search method that controls the expansion of the state space by limiting the number of search paths, thereby obtaining high-quality suboptimal solutions in a shorter time. Within the basic reachable space of a Petri net, the beam search algorithm efficiently explores state paths with high potential payoffs, reducing overall search complexity. However, relying solely on beam search for scheduling still cannot achieve global optimal resource allocation and scheduling. Summary of the Invention
[0006] The purpose of the present invention is to overcome the problem of complex scheduling of large-scale systems and propose an FMS system scheduling and resource allocation optimization method based on Petri nets.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] In a first aspect, the present invention provides a method for optimizing FMS system scheduling and resource allocation based on Petri nets, comprising the following steps:
[0009] Allocate the resources of the flexible manufacturing system according to the production requirements of the flexible manufacturing system, obtain the current processing information of the flexible manufacturing system, and establish a Petri net model of the flexible manufacturing system based on the current processing information of the flexible manufacturing system;
[0010] Divide the transition set of the Petri net into base partitions and construct a base reachability graph based on the base partitions;
[0011] An improved simulated annealing algorithm combined with a generative filter beam search algorithm is used to optimize resource allocation and scheduling in a basis reachable graph, obtaining the optimized resource allocation plan and machine processing time.
[0012] According to the optimized resource allocation plan and machine processing time, the operations of all workpieces are sorted on the time axis according to the process start time to generate the final scheduling result.
[0013] Furthermore, generating a filter beam search algorithm includes the following steps:
[0014] Combining Petri net states and machine processing time into extended states in a base reachability graph , where M is the Petri net state identifier and R is the machine processing time;
[0015] Based on extended state Search for a path from the initial state to the final identification condition in the base reachable graph. The cost estimation heuristic function of the path is: ,in, represents the maximum completion time from the initial mark to the final mark, Indicates the maximum completion time from the initial mark to the current mark, Indicates the minimum processing time of the remaining steps from the current mark to the final mark;
[0016] The processing time matrix is updated by sorting the event list and detecting resource idle time conflicts.
[0017] Furthermore, the improved simulated annealing algorithm includes the following steps:
[0018] Step 1. Set the initial temperature , cooling factor , neighborhood adjustment coefficient , penalty coefficient , termination temperature , the Markov chain length ;
[0019] Step 2: Randomly generate an initial resource allocation plan , W(r) is the initial configuration quantity of each resource r, 1, 2, ..., q is the type of resource r, and the Petri net system corresponding to the initial resource configuration scheme is constructed ( N, M 0), N For Petri nets, M 0 is the initial identifier of the Petri net;
[0020] Step 3: Evaluate the fitness function of the initial configuration solution , and the corresponding processing time on the machine ,in is the maximum completion time of the beam search algorithm in the Petri net-based reachable graph space. is the penalty function; ,in, is the penalty function, is the penalty coefficient, max is the maximum function, q is the number of resource types, i is the intermediate variable, For resources, For the current resource allocation plan, v(r i ) Indicates the cost of configuring resources. is the total cost that can be controlled;
[0021] Step 4. Check the current temperature Is it less than termination If yes, go to step 5, otherwise output the resource allocation plan And the corresponding processing time on the machine , terminate the iteration;
[0022] Step 5: Check whether the current number of iterations reaches the Markov chain length If yes, go to step 9, otherwise go to step 6;
[0023] Step 6: Based on the current solution , randomly adopt one of the four neighborhood search strategies to generate a new neighborhood solution :
[0024] Step 7: Evaluate the new neighborhood solution The fitness function ,in is the fitness function of the new solution, The beam search algorithm for the new solution searches for the maximum completion time of the scheduling in the Petri net-based reachable graph space. is the penalty function of the new solution;
[0025] Step 8: If , then accept the new solution: ;like , then with probability Accept the new solution; return to step 5;
[0026] Step 9: Calculate the acceptance rate of the current solution , using the adaptive temperature adjustment mechanism to update the temperature;
[0027] Step 10: Using the adaptive neighborhood search range mechanism to adjust the neighborhood search range;
[0028] Step 11. Return to step 4 to continue checking the current temperature Is it less than termination If yes, go to step 5, otherwise output the resource allocation plan And the corresponding processing time on the machine , terminate the iteration.
[0029] Furthermore, step 3 includes the following steps:
[0030] Step 3.1: Given the target state M f , initialize the global beam width and local beam width And construct the initial state of the Petri net under the current resource allocation scheme Add to the storage list LIST; M0 is the initial identifier, R0 is the initial processing time on the machine;
[0031] Step 3.2: Check if the LIST list is empty. If not, proceed to step 3.3. If yes, proceed to step 3.9.
[0032] Step 3.3, take the first state from the LIST list ;The state consists of an identifier M and the corresponding machine processing time R;
[0033] Step 3.4: If Then return R and maximum completion time , and terminate the search;
[0034] Step 3.5, Calculate all Down , for all , there are combined events , find the set of enabled transitions; T E is an explicit transition set, t is a single explicit transition, represents an implicit transition sequence, represents the minimum set of explanation vectors that make explicit transition t activated under the mark M;
[0035] Step 3.6: For each The enabled transition triggers the combined event to produce the subsequent state , In state M, a combination of events The new state generated, is the processing time on the machine corresponding to the new state, and the maximum completion time from the initial mark to the current mark is calculated , the minimum processing time of the remaining steps from the current marking to the final marking and maximum completion time ;
[0036] Step 3.7: Add the successor state to the temporary list TEMP If the temporary list TEMP If there is a state that is the same as the new state currently generated, the state with the smallest g value is retained;
[0037] Step 3.8: Rearrange in non-descending order of maximum completion time value TEMP List, take TEMP Before the list Nodes are put into the global list GLOBAL , clear TEMP List and return to step 3.2;
[0038] Step 3.9: Rearrange in ascending order of maximum completion time value GLOBAL In the list, if there are states with the same maximum completion time value, the latest expanded state is placed at the top of the states with the same maximum completion time value;
[0039] Step 3.10, Clear List, take GLOBAL First in list Nodes are placed List, return to step 3.2.
[0040] Furthermore, step 3.6 is specifically as follows:
[0041] Step 3.6.1, Initialization: , is the maximum completion time from the initial mark to the current mark, is the status M By combining events The new state generated, is the processing time on the machine corresponding to the new state, and the idle time on the machine ;
[0042] Step 3.6.2: For the arrival state Combination of events All changes in the selected front library p Corresponding resources ;
[0043] Step 3.6.3, initialize the event list EVENT to be empty, the counter ;
[0044] Step 3.6.4: For each Processing time interval , the left endpoint of the interval and the right endpoint of the interval Mark them as start and end respectively and add them to the EVENT list. Sort in ascending order;
[0045] Step 3.6.5: Take the first event in the EVENT list and proceed to step 3.6.6. If the EVENT list is empty, proceed to step 3.6.8.
[0046] Step 3.6.6: If the event is marked as start, ,like , record the time corresponding to the current event as the overload start time , go to step 3.6.5; For each resource capacity;
[0047] Step 3.6.7: If the event is marked as end, it already exists and ,but , record the time corresponding to the current event as the overload end time , and order , go to step 3.6.5;
[0048] Step 3.6.8, from Select the one that meets the conditions ,and , ,renew ; For p associated time delays;
[0049] Step 3.6.9, return .
[0050] Furthermore, in step 6, one of the four neighborhood search strategies is randomly adopted to generate a new neighborhood solution The four neighborhood search strategies in include:
[0051] Strategy 1: Randomly select a resource , for resources Adjust the neighborhood search range by the number of ;
[0052] Strategy 2: Make the resource with the longest usage time in the scheduling result Increase the number of neighborhood search ranges ;
[0053] Strategy 3: Minimize the resource usage time in the scheduling result Reduce the number of neighborhood search ranges ;
[0054] Strategy 4: Make the workpiece with the longest waiting time in the scheduling result correspond to the resource Increase the number of neighborhood search ranges .
[0055] Furthermore, the adaptive temperature adjustment mechanism in step 9 of updating the temperature using the adaptive temperature adjustment mechanism is: ,in, To update the temperature, To adjust the temperature before is the temperature drop coefficient, is the acceptance rate function;
[0056] The adaptive neighborhood search range mechanism in step 10 of adjusting the neighborhood search range by using the adaptive neighborhood search range mechanism is: ,in, is the neighborhood search range, is the neighborhood adjustment coefficient, and T is the current temperature.
[0057] In a second aspect, the present invention provides a Petri net-based FMS system scheduling and resource allocation optimization system, comprising:
[0058] The model building module is used to build a Petri net model of the flexible manufacturing system according to production requirements. The Petri net model of the flexible manufacturing system includes a resource set, a workpiece type set, a processing path set, and the relationship between the operation library and the resource library. It also defines the dynamic behavior of the system through initial identification and state transition formulas.
[0059] Base partitioning module, used to divide the transition set of the Petri net into base partitions and construct a base reachability graph based on the base partitions;
[0060] The resource allocation and scheduling integrated optimization module is used to optimize resource allocation and scheduling in a basis reachable graph using an improved simulated annealing algorithm combined with a generative filter beam search algorithm to obtain the optimized resource allocation plan and machine processing time.
[0061] The final scheduling result generation module is used to generate the final scheduling result based on the optimized resource allocation plan and machine processing time.
[0062] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and a Petri net-based FMS system scheduling and resource allocation optimization method implemented when the processor executes the computer program.
[0063] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, and a Petri net-based FMS system scheduling and resource allocation optimization method when the computer program is executed by a processor.
[0064] Compared with the prior art, the present invention has the following beneficial technical effects:
[0065] This invention proposes a Petri net-based FMS system scheduling and resource allocation optimization method. To further optimize resource allocation, the invention introduces the SA (Simulated Annealing) algorithm, a stochastic optimization algorithm that excels at finding global optimal solutions in large, complex search spaces. By allowing a certain probability of "annealing" during the search process, the SA algorithm can escape local optima and optimize resource allocation while satisfying resource cost constraints. Combining Petri net modeling with the BS algorithm for scheduling, the introduction of the simulated annealing algorithm effectively enables dynamic resource allocation and adjustment during system scheduling, further improving overall system scheduling efficiency and resource utilization. By modeling the system using Petri nets, optimizing resource allocation using the simulated annealing algorithm, and efficiently searching within the Petri net's base reachable space to complete system scheduling, the method can improve the scheduling efficiency and resource allocation of large-scale flexible manufacturing systems while satisfying system cost constraints. This invention effectively solves the problem of integrated resource allocation and scheduling optimization, reduces maximum completion time, and improves resource utilization and scheduling efficiency. It is particularly suitable for optimizing complex, multi-task flexible manufacturing systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The drawings described herein are for illustrative purposes only and are not intended to limit the scope of the present invention in any way. In addition, the shapes and proportional dimensions of the components in the drawings are only schematic and are used to help understand the present invention, and are not intended to specifically limit the shapes and proportional dimensions of the components of the present invention. In the drawings:
[0067] Figure 1 The present invention is a flowchart of the FMS system scheduling and resource allocation optimization method based on Petri nets.
[0068] Figure 2 This is a structural diagram of the FMS system scheduling and resource allocation optimization system based on Petri nets of the present invention.
[0069] Figure 3 This is an electronic device diagram of the FMS system scheduling and resource allocation optimization method based on Petri nets of the present invention.
[0070] Figure 4 This is a flowchart of the FMS system scheduling and resource allocation optimization method based on Petri nets in an embodiment of the present invention.
[0071] Figure 5 This is the production requirement of the flexible manufacturing system in the embodiment of the present invention.
[0072] Figure 6 Schematic diagram of the processing of the flexible manufacturing system in an embodiment of the present invention.
[0073] Figure 7 A Petri net model diagram of the flexible manufacturing system workshop environment in an embodiment of the present invention .
[0074] Figure 8 This is a flowchart of generating a filtered beam search based on a Petri net-based reachability graph using an improved simulated annealing algorithm in an embodiment of the present invention.
[0075] Figure 9 This is a diagram showing the scheduling results of the flexible manufacturing system in an embodiment of the present invention. DETAILED DESCRIPTION
[0076] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0077] Example 1
[0078] See also Figure 1 , an optimization method for FMS system scheduling and resource allocation based on Petri net, see Figure 4 The main steps include:
[0079] Step 1: Establish a Petri net model of the flexible manufacturing system according to the operation requirements;
[0080] Step 1 is as follows:
[0081] Flexible manufacturing systems include q Types of resources, using collections A resource can be a machine, a robot, or a buffer.
[0082] Each resource Capacity Indicates the maximum number of artifacts that the resource can produce simultaneously. v(r i ) It represents the cost of configuring the resource. The total cost is .
[0083] When a resource is idle or has not exceeded its maximum capacity , it is considered to be in available state.
[0084] The system can produce s A workpiece is represented by:
[0085] , j 1 is the first workpiece, j 2 is the second workpiece, j s For the third type of artifact;
[0086] Each workpiece type has a specific batch size, denoted as , the total number of workpieces in the system is:
[0087] ;
[0088] Each workpiece is processed according to a predetermined processing sequence, which is called the workpiece's processing path. A workpiece may have multiple optional processing paths, and one of them can be selected during the manufacturing process.
[0089] All machining paths in the system are collected using Indicates that The first k The processing path is expressed as:
[0090] ;
[0091] in Indicates the path The j The total number of processes required to complete the workpiece is . Machining Operations The time requirement is expressed as , each processing step requires a resource.
[0092] In order to facilitate management, two virtual processes that do not occupy any resources are added to each workpiece type, namely the starting process and end process , used to represent the initial storage location and final processing location of the workpiece. Therefore, the processing path can be expressed as:
[0093] ;
[0094] Type is Workpiece processing route It can be represented as a sequence of places and transitions, namely:
[0095] ;
[0096] In this path, Indicates execution of activities The operation library, Indicates activity The beginning of the change, The trigger type is The workpiece processing is completed.
[0097] warehouse and They represent the starting point and end point of the processing path, that is, the original storage location of the workpiece and the location where the processing is completed.
[0098] For resources Assigned resource repository , the set of all resource repositories is represented as , the cost associated with the resource is expressed as It should be noted that different processing routes may share some resources, which means that different place-transition paths in the FMS may contain the same resource places.
[0099] For the operation library , its preceding changes and post-transition Represent the start and end of an operation, respectively. The use and release of resources are modeled by directed arcs.
[0100] If the resource library Needed for operating the library To perform an activity, set and The number of tokens on the starting place in the initial tag indicates the quantity of raw materials, the tokens on the operation place indicate whether the operation is in progress, and the tokens on the resource place indicate whether the resource is available.
[0101] According to the obtained processing information, the global environment is modeled as a place-timed Petri net model, which is expressed as: ;
[0102] For the library ,symbol and Represent its pre- and post-transitions respectively.
[0103] Similarly, for the transition , and Indicates its front and back places.
[0104] definition To identify, define M 0 represents the network N Initial identification.
[0105] when When p In the logo M The following is marked.
[0106] In the logo M Next, if for any , both , then the transition t is said to be It is enabled. It represents the predecessor association matrix related to transition t in the Petri net. It represents the number of tokens in the predecessor transition p required to launch transition t. The number must be sufficient to enable it. For example, M(p1)=1 means there is one token in p1.
[0107] If the mark If you choose to trigger an enabled transition t, a new identifier will be generated. , its state transition formula is: ;
[0108] The process is expressed as . represents the post-incidence matrix associated with transition t in the Petri net. represents the number of tokens added to its post-place p after emitting transition t. The entire equation represents the state transition process, first taking tokens from t's previous place and then adding tokens to its post-place p.
[0109] If in the mark A new logo was generated after a series of changes , then it is called from Reachable. From The set of reachable identifiers is denoted as .
[0110] P M 、 P S and P E Represents the set of operations, start and end places, T S and T E Represents the set of start and end transitions, respectively, and the place The associated time delay is expressed as .
[0111] Obviously, for all , both .
[0112] Initial Mark ,in Indicates the starting place.
[0113] For any operation library , initially marked as .
[0114] For each resource , whose initial mark is .
[0115] With the library The associated resource cost is expressed as .
[0116] The final markup of the defined system is , the following conditions are met:
[0117] For all ,have ;
[0118] For each ,have ;
[0119] For each ,have .
[0120] When a transition sequence satisfy and , it is called a feasible resource allocation and scheduling plan.
[0121] Therefore, the goal of the integrated resource allocation and scheduling optimization problem is to find a feasible transition sequence that meets the total cost constraint to minimize the maximum completion time, that is, the total time required to complete the workpiece, within the cost constraint.
[0122] Step 2: Divide the base partition of the Petri net to simplify the state space;
[0123] Step 2 is as follows:
[0124] Given a Petri net system , and its reachability graph is represented as .
[0125] In this graph, each vertex represents a reachable identity, and each edge represents an identity transition. , recording the changes triggered during this conversion process .
[0126] If the transition set T Explicit Transition Sets T E and implicit transition sets T I ,Right now , then in the reachable graph, the reachable states corresponding to some transitions will be represented as a combination of transition sequences in the implicit transition set, thus obtaining a reachable graph with some states hidden, called a base reachable graph .
[0127] For a given transition partition T E and T I , which is called the base partition .
[0128] In a specific base partition Petri Net N The set of partially reachable identifiers, namely the base reachable graph The state in is represented as a base identity set ,in For the network N Initial identification.
[0129] The base reachability graph can be expressed as: ;
[0130] Among them, the state set represents the base identity set, For the initial identification.
[0131] Combined event set Defined as: ;
[0132] A composite event set is a composite event consisting of explicit transitions and implicit transition sequences. A non-negative integer vector representing the dimension, is the number of implicit transitions. is the non-negative integer vector representing an implicit transition sequence, and t is a single explicit transition.
[0133] Conversion relationship between identifiers Defined as:
[0134] ;
[0135] Indicates the logo You can combine events Convert to Logo , It refers to the minimum set of explanation vectors that activate the explicit transition t under the marker M1. C is the incidence matrix, C = post-pre. The post-incidence matrix minus the pre-incidence matrix. Represents the column corresponding to transition t in the incidence matrix. And satisfies: ;
[0136] in, represents a sequence of transitions, represents a non-negative integer vector ( The triggering times vector of t1, t2, and t3 are transmitted once, for example, [1 1 1] represents a triggering time of t1, t2, and t3. The difference is that the vector can represent the number of times, for example, [2 1 1] means that t1 is emitted twice, t2 is emitted once, and t3 is emitted once. Indicated in the logo Explicit transition The minimal set of explanations for is defined as: ;
[0137] here, For explicit transitions In the logo The set of explanations under Explicit Transition Combined into events and reach all the new logos A collection of events that can make the display change All implicit transition sequences triggered by the minimum interpretation set. The minimum interpretation set represents the implicit transition sequence with the least number of emissions in the interpretation set. The minimum interpretation set is defined as: for a transition emission sequence in an interpretation set , there is no other transition emission sequence , making The triggering times vector No greater than in any dimension The triggering times vector .
[0138] For Petri net system , first set all transitions to implicit transitions , so the explicit transition set is .
[0139] Then check the implicit transition set , if it contains only implicit transitions A loop consisting of and classify it into explicit transition sets .
[0140] Repeat the above steps until the implicit transition set There are no longer loops consisting only of implicit transitions.
[0141] At this point, a new feasible base partition is obtained .
[0142] Step 3: Use the improved simulated annealing algorithm combined with the generative filter beam search algorithm to optimize resource allocation and scheduling integration;
[0143] Petri Net System , base partition .
[0144] The resource configuration explored during simulated annealing is , and its corresponding cost is ,Since the simulated annealing algorithm does not have a mechanism to automatically satisfy ,constraints, each time a neighborhood solution is generated, the constraints may be violated, ,making the solution generated by the algorithm infeasible;
[0145] For example, the generated machine configuration cannot be scheduled or the total price of the machine exceeds the total cost Therefore, a penalty function is introduced to deal with infeasible solutions. If the solution violates the scheduling time or total cost constraints, a penalty is imposed on the objective function to guide the algorithm to avoid infeasible solutions and gradually approach feasible solutions.
[0146] The penalty function is defined as: ;
[0147] in, is the penalty coefficient, For resources, For the current resource allocation plan, v(r i ) It represents the cost of configuring the resource. The total cost is , q is the number of resource types.
[0148] At the same time, cooling at a rate that is too fast can easily lead to local optima, while cooling at a rate that is too slow increases computational complexity and time overhead. Complex machine configuration combinations, a large solution space, and the difficulty of generating controlled neighborhood solutions make efficient algorithmic search within the solution space difficult.
[0149] As the temperature decreases, the neighborhood adjustment range can be gradually reduced, that is: ;in, is the neighborhood adjustment coefficient, and T is the temperature.
[0150] Four neighborhood search mechanisms are used simultaneously:
[0151] Strategy 1: Randomly select a resource , randomly adjust its number , the range decreases as the temperature decreases.
[0152] Strategy 2: Based on the Gantt chart information of the current solution, select the resource with the longest machine usage time and increase the number of this machine .
[0153] Strategy 3: Select resources with the shortest usage time and reduce their quantity , to save costs. Introduce an adaptive cooling mechanism, the temperature update is based on the search progress, and define the attenuation factor , and dynamically adjust according to the acceptance rate of the solution. Assume the acceptance rate is the ratio of the number of accepted solutions to the total number of generated solutions at the current temperature. If Too low, slow down the cooling rate; if The higher the temperature, the faster the cooling.
[0154] Strategy 4: Increase the number of resources corresponding to the workpieces with the longest waiting time in the scheduling results;
[0155] The specific update formula is: ;
[0156] in, is the acceptance rate function, if >0.8 ,but ,like 0.2≤ ≤0.8 ,but ,like <0.2 ,but .
[0157] Adaptive temperature adjustment allows maintaining a high temperature in the early exploration phase and rapidly cooling down and converging in the later phase.
[0158] Specifically, the integrated optimization process of resource allocation and scheduling based on simulated annealing and beam search algorithms can be described as follows:
[0159] 1) Set the initial temperature , cooling factor , neighborhood adjustment coefficient , penalty coefficient , termination temperature , the Markov chain length ;
[0160] 2) Randomly generate initial resource allocation plan , W(r) is the initial configuration quantity of each resource r, 1, 2, ..., q is the type of resource r, and the corresponding Petri net system is constructed ( N,M 0), N For Petri nets, M 0 is the initial identifier of the Petri net;
[0161] 3) Evaluate the fitness function of the initial configuration solution , and the corresponding processing time on the machine ,in is the maximum completion time of the beam search algorithm in the Petri net-based reachable graph space. is the penalty function;
[0162] 4) Check the current temperature Is it less than If yes, go to 5), otherwise output the resource allocation plan And the corresponding processing time on the machine , terminate the iteration;
[0163] 5) Check whether the current number of iterations reaches the Markov chain length If yes, go to step 9) otherwise go to step 6);
[0164] 6) According to the current solution , randomly adopt one of the following four strategies to generate a new neighborhood solution :
[0165] Strategy 1: Randomly select a resource , adjust its quantity ;
[0166] Strategy 2: Make the resource with the longest usage time in the scheduling result The number of ;
[0167] Strategy 3: Minimize the resource usage time in the scheduling result The number of ;
[0168] Strategy 4: Make the workpiece with the longest waiting time in the scheduling result correspond to the resource The number of ;
[0169] The resource of the workpiece waiting the longest for processing means:
[0170] If the processing time of the three operations of workpiece A on resource 123 is:
[0171] Resource 1: [0, 1] (from time 0 to time 1);
[0172] Resource 2: [1, 3] (from time 1 to time 3);
[0173] Resource 3: [5, 6] (from time 5 to time 6);
[0174] If the processing time of the three operations of workpiece B on resource 213 is:
[0175] Resource 2: [0, 1] (from time 0 to time 1);
[0176] Resource 1: [1, 2] (from time 1 to time 2);
[0177] Resource 3: [2, 5] (from time 2 to time 5);
[0178] Workpiece A has a waiting time of 2, and spends 3 on the machine (resource). Workpiece B has no waiting time. Therefore, the workpiece with the longest waiting time for processing corresponds to resource 3.
[0179] 7) Evaluate the fitness function of the new solution ,in is the fitness function of the new solution, The beam search algorithm for the new solution searches for the maximum completion time of the scheduling in the Petri net-based reachable graph space. is the penalty function of the new solution;
[0180] 8) If , then accept the new solution: .
[0181] like , then with probability Accept the new solution; return to step 5);
[0182] 9) Calculate the acceptance rate of the current solution , update temperature ,
[0183] like >0.8 ,but ,like 0.2≤ ≤0.8 ,but ,like <0.2 ,but ;in, is the acceptance rate function, is the temperature drop coefficient;
[0184] 10) Adjust the neighborhood search range ,in, is the neighborhood adjustment coefficient, T is the current temperature;
[0185] 11) Return to step 4);
[0186] The beam search algorithm searches for the maximum completion time of the scheduling in the Petri net-based reachable graph space. Here's how.
[0187] Indicates the current state of the Petri net, represents the processing time on the machine, where , when recording and updating processing time When , it should be ensured that the start processing time of each workpiece in the same process meets the following constraints: for each process of each workpiece, the start processing time of the next process shall not be earlier than the completion time of the previous process of the workpiece, so as to ensure the sequential processing of the processes. x The corresponding Petri net model can be constructed. Due to the different Petri net states M The processing time on the corresponding machine R is different, the Petri net state and the processing time on the machine together form a new state, that is , for a more refined search. ,in M and R For resource allocation plan x Corresponding to the state generated by the search under the Petri net model M The processing time on the corresponding machine R。
[0188] ,in Indicates from arrive Cost estimates, Indicates from arrive The cost incurred, Indicates from arrive An estimate of the minimum cost is still needed. represents the minimum remaining processing time of the flexible manufacturing system, To represent the workpiece token From its M Tag Place q Move to its end location e The minimum cost.
[0189] For example, the remaining processing path of workpiece 1 is:
[0190] Process 3: 2 units of time are spent on machine 1;
[0191] Process 4: 2 units of time are spent on machine 2 or 1 unit of time is spent on machine 3;
[0192] Process 5: 2 units of time are spent on machine 4;
[0193] The minimum remaining processing time is min((2+2+2),(2+1+2))=5;
[0194] Petri Net System The scheduling problem becomes Search the base reachable graph from its initial state To a given target state M f The transition launch sequence.
[0195] Specifically, the beam search process based on the base reachability graph in step 3) can be expressed as follows:
[0196] 3.1) Initialize global beam width and local beam width And construct the initial state of the Petri net under the current resource allocation scheme Add to the storage list LIST; M0 is the initial identifier of PN, R0 is the initial processing time on the machine;
[0197] 3.2) Check if the LIST list is empty. If not, proceed to 3.3). If yes, proceed to 3.9).
[0198] 3.3) Take the first state from the LIST list ;The state consists of a PN identifier M and the corresponding machine processing time R;
[0199] 3.4) If Then return R and maximum completion time , and terminate;
[0200] 3.5) Calculate it at all Down , for all , there are combined events , find the set of enabled transitions;
[0201] 3.6) For each The enabled transition triggers the combined event to produce the subsequent state , In state M, a combination of events The new state generated, is the processing time on the machine corresponding to the new state. , and ;
[0202] 3.7) If in the temporary list TEMP There is a state ,have , and , then Replace with Otherwise, Add to TEMP list; that is, if TEMP There is a state that is the same as the current new state, and the state with the smallest g value (actual cost) is retained.
[0203] 3.8) Rearrange in non-descending order of maximum completion time value TEMP List, take TEMP Before the list Nodes are put into the global list GLOBAL , clear TEMP List and return to step 3.2); global list GLOBAL A global list is a data structure (such as an array or linked list) accessible within a program or system, used to store shared data. A global list's lifecycle spans the entire program's lifecycle, making it a variable accessible to all functions or modules throughout the program's lifetime.
[0204] 3.9) Rearrange values in ascending order GLOBAL List, if present If the values are the same, the latest extended status will be sorted to the same The first place of value status;
[0205] 3.10) Clear the LIST list and take GLOBAL First in list Put the nodes into the LIST list and return to step 3.2);
[0206] Steps 3.2) to 3.8) are to continuously obtain the status in the LIST until the LIST is empty. When returning to step 3.2) again, it will be determined whether the LIST is empty. If it is empty, it will go to step 3.9).
[0207] Steps 3.2) to 3.8) are to explore the states in the LIST list in turn, add the subsequent states explored by each state to the TEMP list, and sort the TEMP list. The state is added to the GLOBAL list until all the states in the LIST are retrieved (explored), and then go to step 3.9). In step 3.10), sort the GLOBAL list and take the first state. After adding each state to the LIST list, return to step 3.2).
[0208] Furthermore, in 3.5) The method is described as follows:
[0209] 3.5.1) Constructing the Matrix ,in , for The matrix that only contains implicit transition information. for The transposed matrix of The dimension is The identity matrix of express. , , is a dimension of The zero vector of ; represents the column corresponding to transition t in the pre-incidence matrix, is a zero vector, is the number of implicit transitions. If there are 3 implicit transitions, then B=[0;0;0];
[0210] 3.5.2) If the matrix If there are no negative elements, go to step 3.5.6), otherwise go to step 3.5.3);
[0211] 3.5.3) For All elements less than 0 , represents a row of the matrix, Denotes a column of the matrix, let ; Store all i, indicating The i-th row in If the value in row i and column j* is greater than 0, store it;
[0212] 3.5.4) If Remove if empty middle And go to step 3.5.2); otherwise go to step 3.5.5); Indicates the first OK;
[0213] 3.5.5) For all ,exist Add new line in ,in yes The regular basis vectors, Represents all columns of row i, i.e. row i. If the new row is If the row in is repeated, there is no need to add it;
[0214] 3.5.6) Remove middle And proceed to step 3.5.2);
[0215] 3.5.7) Merge Return after repeated rows , The row vectors in .
[0216] Calculate in step 3.6) of beam search based on the base reachability graph The process is as follows:
[0217] calculate The method is expressed as follows, where the idle time on the machine is :
[0218] 3.6.1) Initialization: , is the maximum completion time from the initial mark to the current mark, Is in state M By combining events The new state generated, is the processing time on the machine corresponding to the new state, idle time ;
[0219] 3.6.2) For the arrival state Combination of events All changes in the p Corresponding resources .
[0220] 3.6.3) Initialize the event list EVENT to be empty and the counter ;
[0221] 3.6.4) For each Processing time interval ,Will and Mark them as "start" and "end" respectively and add them to the EVENT list. Sort in ascending order.
[0222] 3.6.5) Take the first event in the EVENT list and proceed to step 3.6.6). If the EVENT list is empty, proceed to step 3.6.8).
[0223] 3.6.6) If the event is marked as "start" then ,like , record the current event corresponding time as overload start time , proceed to step 3.6.5).
[0224] 3.6.7) If the event is marked as "end", it already exists and ,but , record the current event corresponding time as overload end time is , and order , proceed to step 3.6.5).
[0225] 3.6.8) From Select the one that meets the conditions ,and , ,renew .
[0226] 3.6.9) Return .
[0227] Step 4: Directly return the scheduling result based on R(x), obtain the optimal scheduling solution and output it;
[0228] Return the resource allocation plan according to step 3 And the corresponding processing time on the machine .
[0229] return x This is the final resource allocation result that meets the cost constraint. , restore the processing order of the workpiece, and then sort it according to the start time of each operation, where Corresponding to the start time of each operation, Return the optimal scheduling solution corresponding to the start time of each operation .
[0230] The present embodiment is further described below with reference to the accompanying drawings:
[0231] Step 1: Establish a Petri net model of the flexible manufacturing system according to the operation requirements;
[0232] In this example, the production requirements of the flexible manufacturing system are as follows: Figure 5 As shown, the modeling is Figure 6 As shown in the figure, the system can produce 2 kinds of workpieces. Assuming that the batch size of each workpiece is 2, the total number of workpieces in the system is ,Include types of resources, Each workpiece is processed according to a predetermined processing sequence, which is called the processing path of the workpiece.
[0233] A workpiece may have multiple optional processing paths, one of which can be selected during the manufacturing process;
[0234] Workpiece 1 has two optional processing paths, which are as follows after adding virtual processes:
[0235] , ;
[0236] Workpiece 2 has an optional processing path, which becomes:
[0237] ;
[0238] The time requirements of the processing operations are expressed as:
[0239] d 111 =25, d 121 =23, d 122 =20, d 131 =27, d 211 =26, d 221 =21, d 231 =24;
[0240] Represent the workpiece processing route as a sequence consisting of places and transitions;
[0241] The processing route of workpiece 1 is:
[0242] ;
[0243] The processing route of workpiece 2 is:
[0244] ;
[0245] Resource locations are allocated to processing locations according to processing requirements. The allocation relationship is:
[0246] ;
[0247] like Figure 7 As shown in the figure, the delayed Petri net of the library is constructed according to the current flexible manufacturing system processing information:
[0248] ;
[0249] The starting library of the flexible manufacturing system is , the termination library is , processing resources are ,
[0250] Processing time information satisfies the mapping:
[0251] D(p 111 ) =25, D(p 121 ) =23, D(p 122 ) =20, D(p 131 ) =27, D(p 211 ) =26, D(p 221 ) =21, D(p 221 ) =24;
[0252] Resource cost information satisfies mapping:
[0253] ;
[0254] Building a place set , and the transition set , the incidence matrix Pre 、 Post .
[0255] Step 2: Divide the base partition of the Petri net to simplify the state space;
[0256] First, set all transitions of the Petri net to implicit transitions:
[0257] , so the explicit transition set is .
[0258] Then check the implicit transition set , if it contains only implicit transitions A loop consisting of and classify it into explicit transition sets .
[0259] At the same time, it is necessary to ensure that the implicit transition sequence is non-cyclic. Repeat the above steps until there is no cycle in this example, and further build the base partition ,in:
[0260] , .
[0261] Known base partition , Place Delay Petri Net , assuming the system is initially identified as , the system initial processing time information is .
[0262] For status , which fires a combined event The reachable state is , , , according to the combined event , The front place is the initial place, no operation is required, search The resources consumed by the front-end resource library are r 1. Search The preceding activity library is known in the resource r 1 spends 25 units of processing time, and gets ;
[0263] Re-fire the combined event The reachable state is , search The resources consumed by the front-end resource library are r 3. Search The preceding activity library is known in the resource r 3 spends 20 units of processing time, and gets ;
[0264] Find t 1e The resources consumed by the front-end resource library are r 4. Search t 1e The preceding activity library is known in the resource r 4 spends 27 units of processing time, and we get .
[0265] Fire combined events The reachable state is , The front place is the initial place, no operation is required, search The resources consumed by the front-end resource library are r 4. Search The preceding activity library is known in the resource r 4 spends 26 units of processing time, because r The capacity of 4 is 2, which can perform two operations at the same time, so .
[0266] Repeat the above steps in combination with the beam search algorithm to partially expand the search of the partial space of base reachable markers.
[0267] Step 3: Use the improved simulated annealing algorithm combined with the generative filter beam search algorithm to optimize resource allocation and scheduling integration;
[0268] Place Delay Petri Net ,like Figure 7 shown.
[0269] right Figure 7 Petri Nets in , the initial identifier is , the system initial processing time information is , termination mark .
[0270] 4.1) First set the total cost , penalty coefficient is 0.8, the neighborhood adjustment coefficient The attenuation factor is 0.02. , initial temperature , termination temperature , the Markov chain length ;
[0271] 4.2) Randomly generate initial resource allocation plan , build its corresponding Petri net system ;
[0272] 4.3) Evaluating the fitness function of the initial configuration solution
[0273] ,
[0274] The corresponding processing times on the machines are:
[0275] ,
[0276] ,
[0277] ,
[0278] ,
[0279] The maximum completion time of the beam search algorithm in the Petri net-based reachable graph space is ,
[0280] is the penalty function;
[0281] 4.4) Check the current temperature Is it less than If yes, go to step 4.5), otherwise return and , terminate the iteration;
[0282] 4.5) Check whether the current number of iterations reaches the Markov chain length If yes, go to step 4.9) otherwise go to step 4.6);
[0283] 4.6) Based on the current solution , randomly adopt three strategies to generate new neighborhood solutions :
[0284] Strategy 1: Randomly select a resource , adjust its quantity ;
[0285] Strategy 2: Make the resource with the longest usage time in the scheduling result The number of ;
[0286] Strategy 3: Minimize the resource usage time in the scheduling result The number of ;
[0287] If resources The number of is reduced by 1, and a new solution is obtained. .
[0288] 4.7) Evaluate the fitness function of the new solution
[0289] ,
[0290] The corresponding processing times on the machines are:
[0291] ,
[0292] ,
[0293] ,
[0294] ;
[0295] 4.8) If , then accept the new solution: .
[0296] like , then with probability Accept the new solution, now there is , then accept the new solution; return to step 4.5);
[0297] 4.9) Calculate the ratio of the number of all accepted solutions to the total number of generated solutions at the current temperature, i.e. the acceptance rate , update temperature ,like ,but ,like ,but ,like ,but ;
[0298] 4.10) Adjust the neighborhood search range according to temperature ;
[0299] 4.11) Return to step 4.4);
[0300] After the iteration, there is , the total cost is 1320, which is the optimal resource allocation scheme for the flexible manufacturing system in the embodiment. The maximum completion time of the corresponding scheduling scheme under this scheme is . Use the improved simulated annealing algorithm combined with the generated filter beam search algorithm to optimize the resource allocation and scheduling integration process. Figure 8 shown.
[0301] Step 4: Obtain the optimal scheduling plan and output it;
[0302] For the optimal solution The corresponding maximum completion time is , according to the termination status , the system termination mark and processing time information are , the processing time on the machine is:
[0303] ,
[0304] ,
[0305] ,
[0306] ,
[0307] According to its corresponding mapping You can search for the last state and saved process information, including ,
[0308] ,
[0309] ,
[0310] ,
[0311] According to the processing time in R Restore the operation of the corresponding workpiece , that is, i The first j The process is carried out on the corresponding machine R Processing is performed on the workpiece, and then sorted according to the start time of each operation. The operation sequence of the workpiece after restoration is The scheduling results of the flexible manufacturing system are as follows: Figure 9 shown.
[0312] This embodiment first models the processing requirements of the flexible manufacturing system as a Petri net and constructs a task state transition model. Then, a simulated annealing algorithm is used to optimize the resource allocation plan and generate a feasible resource allocation plan while satisfying the budget constraint. Next, a beam search algorithm is used to search the reachable space of the Petri net to determine the optimal scheduling plan that meets the processing requirements. Finally, a Gantt chart is generated based on the scheduling plan to intuitively present the task allocation and execution sequence.
[0313] Example 2
[0314] See also Figure 2 , the FMS system scheduling and resource allocation optimization system based on Petri nets includes:
[0315] The model building module is used to build a Petri net model of the flexible manufacturing system according to production requirements. The Petri net model of the flexible manufacturing system includes a resource set, a workpiece type set, a processing path set, and the relationship between the operation library and the resource library. It also defines the dynamic behavior of the system through initial identification and state transition formulas.
[0316] Base partitioning module, used to divide the transition set of the Petri net into base partitions and construct a base reachability graph based on the base partitions;
[0317] The resource allocation and scheduling integrated optimization module is used to optimize resource allocation and scheduling in a basis reachable graph using an improved simulated annealing algorithm combined with a generative filter beam search algorithm to obtain the optimized resource allocation plan and machine processing time.
[0318] The final scheduling result generation module is used to generate the final scheduling result based on the optimized resource allocation plan and machine processing time.
[0319] Example 3
[0320] See also Figure 3 An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a Petri net-based FMS system scheduling and resource allocation optimization method is implemented.
[0321] Example 4
[0322] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, a Petri net-based FMS system scheduling and resource allocation optimization method is provided.
[0323] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, read-only optical disks, optical storage devices, etc.) containing computer-usable program code.
[0324] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0325] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0326] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the specific implementations of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be included in the scope of protection of the present invention.
Claims
1. The FMS system scheduling and resource allocation optimization method based on Petri net is characterized by: The following steps are involved: Allocate the resources of the flexible manufacturing system according to the production requirements of the flexible manufacturing system, obtain the current processing information of the flexible manufacturing system, and establish a Petri net model of the flexible manufacturing system based on the current processing information of the flexible manufacturing system; Divide the transition set of the Petri net into base partitions and construct a base reachability graph based on the base partitions; An improved simulated annealing algorithm combined with a generative filter beam search algorithm is used to perform integrated optimization of resource allocation and scheduling in a base reachable graph to obtain an optimized resource allocation plan and machine processing time. The improved simulated annealing algorithm includes the following steps: Step 1. Set the initial temperature , cooling factor , neighborhood adjustment coefficient , penalty coefficient , termination temperature , the Markov chain length ; Step 2: Randomly generate an initial resource allocation plan , W(r) is the initial configuration quantity of each resource r, 1, 2, ..., q is the type of resource r, and the Petri net system corresponding to the initial resource configuration scheme is constructed ( N,M 0), N For Petri nets, M 0 is the initial identifier of the Petri net; Step 3: Evaluate the fitness function of the initial configuration solution , and the corresponding processing time on the machine ,in is the maximum completion time of the beam search algorithm in the Petri net-based reachable graph space. is the penalty function; ,in, is the penalty function, is the penalty coefficient, max is the maximum function, q is the number of resource types, i is the intermediate variable, For resources, For the current resource allocation plan, v(r i ) Indicates the cost of configuring resources. is the total cost that can be controlled; Step 4. Check the current temperature Is it less than the termination temperature? If yes, go to step 5, otherwise output the resource allocation plan And the corresponding processing time on the machine , terminate the iteration; Step 5: Check whether the current number of iterations reaches the Markov chain length If yes, go to step 9, otherwise go to step 6; Step 6: Based on the current solution , randomly adopt one of the four neighborhood search strategies to generate a new neighborhood solution : Step 7: Evaluate the new neighborhood solution The fitness function ,in is the fitness function of the new solution, The beam search algorithm for the new solution searches for the maximum completion time of the scheduling in the Petri net-based reachable graph space. is the penalty function of the new solution; Step 8: If , then accept the new solution: ;like , then with probability Accept the new solution; return to step 5; Step 9: Calculate the acceptance rate of the current solution , using the adaptive temperature adjustment mechanism to update the temperature; Step 10: Using the adaptive neighborhood search range mechanism to adjust the neighborhood search range; Step 11. Return to step 4 to continue checking the current temperature Is it less than the termination temperature? If yes, go to step 5, otherwise output the resource allocation plan And the corresponding processing time on the machine , terminate the iteration; According to the optimized resource allocation plan and machine processing time, the operations of all workpieces are sorted on the time axis according to the process start time to generate the final scheduling result.
2. The Petri net-based FMS system scheduling and resource allocation optimization method according to claim 1 is characterized in that: The generation of the filter beam search algorithm comprises the following steps: Combining Petri net states and machine processing time into extended states in a base reachability graph , where M is the Petri net state identifier and R is the machine processing time; Based on extended state Search for a path from the initial state to the final identification condition in the base reachable graph. The cost estimation heuristic function of the path is: ,in, represents the maximum completion time from the initial mark to the final mark, Indicates the maximum completion time from the initial mark to the current mark, Indicates the minimum processing time of the remaining steps from the current mark to the final mark; The processing time matrix is updated by sorting the event list and detecting resource idle time conflicts.
3. The Petri net-based FMS system scheduling and resource allocation optimization method according to claim 2, characterized in that: Step 3 includes the following steps: Step 3.1: Given the target state M f , initialize the global beam width and local beam width And construct the initial state of the Petri net under the current resource allocation scheme Add the storage list LIST; M0 is the initial identifier of the Petri net, and R0 is the initial processing time on the machine; Step 3.2: Check if the LIST list is empty. If not, proceed to step 3.
3. If yes, proceed to step 3.
9. Step 3.3: Get the first extended state from the LIST list ;The state consists of an identifier M and the corresponding machine processing time R; Step 3.4: If Then return R and maximum completion time , and terminate the search; Step 3.5, Calculate all Down , for all , there are combined events , find the set of enabled transitions; T E is an explicit transition set, t is a single explicit transition, represents an implicit transition sequence, represents the minimum set of explanation vectors that make explicit transition t activated under the mark M; Step 3.6: For each The enabled transition triggers the combined event to produce the subsequent state , In state M, a combination of events The new state generated, is the processing time on the machine corresponding to the new state, and the maximum completion time from the initial mark to the current mark is calculated , the minimum processing time of the remaining steps from the current marking to the final marking and maximum completion time ; Step 3.7: Add the successor state to the temporary list TEMP If the temporary list TEMP There is a state that is the same as the new state currently generated, keep Minimal state; Step 3.8: Rearrange in non-descending order of maximum completion time value TEMP List, take TEMP Before the list Nodes are put into the global list GLOBAL , clear TEMP List and return to step 3.2; Step 3.9: Rearrange in ascending order of maximum completion time value GLOBAL In the list, if there are states with the same maximum completion time value, the latest expanded state is placed at the top of the states with the same maximum completion time value; Step 3.10, Clear List, take GLOBAL First in list Nodes are placed List, return to step 3.
2.
4. The Petri net-based FMS system scheduling and resource allocation optimization method according to claim 3 is characterized in that: Step 3.6 is as follows: Step 3.6.1, Initialization: , is the maximum completion time from the initial mark to the current mark, is the status M By combining events The new state generated, is the processing time on the machine corresponding to the new state, and the idle time on the machine ; Step 3.6.2: For the arrival state Combination of events All changes in the selected front library p Corresponding resources ; Step 3.6.3, initialize the event list EVENT to be empty, the counter ; Step 3.6.4: For each Processing time interval , the left endpoint of the interval and the right endpoint of the interval Mark them as start and end respectively and add them to the EVENT list. Sort in ascending order; Step 3.6.5: Take the first event in the EVENT list and proceed to step 3.6.
6. If the EVENT list is empty, proceed to step 3.6.
8. Step 3.6.6, if the event is marked as start, then Count+1, if , record the time corresponding to the current event as the overload start time , go to step 3.6.5; For each resource capacity; Step 3.6.7: If the event is marked as end, it already exists and , then Count-1, record the time corresponding to the current event as the overload end time , and order , go to step 3.6.5; Step 3.6.8, from Select the one that meets the conditions ,and , ,renew ; For p associated time delays; Step 3.6.9, return .
5. The Petri net-based FMS system scheduling and resource allocation optimization method according to claim 1, characterized in that: In step 6, one of the four neighborhood search strategies is randomly used to generate a new neighborhood solution. The four neighborhood search strategies in include: Strategy 1: Randomly select a resource , for resources Adjust the neighborhood search range by the number of ; Strategy 2: Make the resource with the longest usage time in the scheduling result Increase the number of neighborhood search ranges ; Strategy 3: Minimize the resource usage time in the scheduling result Reduce the number of neighborhood search ranges ; Strategy 4: Make the workpiece with the longest waiting time in the scheduling result correspond to the resource Increase the number of neighborhood search ranges .
6. The Petri net-based FMS system scheduling and resource allocation optimization method according to claim 1, characterized in that: The adaptive temperature adjustment mechanism in updating the temperature using the adaptive temperature adjustment mechanism described in step 9 is: ,in, To update the temperature, is the current temperature, is the temperature drop coefficient, is the acceptance rate function; The adaptive neighborhood search range mechanism for adjusting the neighborhood search range by using the adaptive neighborhood search range mechanism in step 10 is: ,in, is the neighborhood search range, is the neighborhood adjustment coefficient, and T is the current temperature.
7. A Petri net-based FMS system scheduling and resource allocation optimization system, using the Petri net-based FMS system scheduling and resource allocation optimization method according to any one of claims 1 to 6, characterized in that: include: A model building module is used to build a Petri net model of the flexible manufacturing system according to production requirements; the Petri net model of the flexible manufacturing system includes a resource set, a workpiece type set, a processing path set, and the relationship between the operation library and the resource library, and defines the dynamic behavior of the system through initial identification and state transition formula; Base partitioning module, used to divide the transition set of the Petri net into base partitions and construct a base reachability graph based on the base partitions; The resource allocation and scheduling integrated optimization module is used to optimize resource allocation and scheduling in a basis reachable graph using an improved simulated annealing algorithm combined with a generative filter beam search algorithm to obtain the optimized resource allocation plan and machine processing time. The final scheduling result generation module is used to generate the final scheduling result based on the optimized resource allocation plan and machine processing time.
8. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for optimizing FMS system scheduling and resource allocation based on Petri nets as described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the Petri net-based FMS system scheduling and resource allocation optimization method described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Flexible manufacturing system scheduling method and device based on Petri net base reachable graph
CN118859860A