Method and System for Establishing Colored Petri Net Model of Manufacturing System Based on PDDL Language
By updating the PDDL language and design conversion rules, the PDDL model is transformed into a nonferrous Petri network model, which solves the problem of difficulty in establishing a nonferrous Petri network in complex manufacturing systems, improves modeling efficiency and readability, and lays the foundation for subsequent scheduling.
Patent Information
- Application Number
- CN202510221171.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-02-27
AI Technical Summary
It is difficult to effectively establish a non-ferrous Petri network model for complex manufacturing systems in the prior art, especially when the PDDL model is automatically converted into a Petri network, it cannot be applied to generate a non-ferrous Petri network.
By updating the PDDL language, describing the resources and tasks of the manufacturing system, and designing the conversion rules of the PDDL language and non-ferrous Petri Net, the objects, initials, goals, predicates, actions and types in the PDDL model are converted into libraries, changes and directed arcs of the non-ferrous Petri Net, and the manufacturing system non-ferrous Petri Net model is generated.
It improves the readability of Petri network, simplifies the modeling process, improves modeling efficiency, reduces errors and ambiguities in the modeling process, and lays the foundation for subsequent scheduling of non-ferrous Petri networks.
Smart Images

Figure CN119718336B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of scheduling, and particularly to the establishment of a colored Petri net model of a manufacturing system based on the PDDL language. Background Art
[0002] The Planning Domain Definition Language (PDDL) is a language model close to natural language. Using PDDL to establish a planning domain model for a manufacturing system and presenting it in text format is more understandable for humans. However, establishing a Petri net model for a complex system will make the network structure extremely large, reducing readability and making it difficult to understand and manage. Li et al. [Li X, Luo J, Li J, et al. Parallel Petri Netsmodeling method of manufacturing system based on the improved PDDL[C]. 2022IEEE International Conference on Networking, Sensing and Control (ICNSC).Shanghai, China, 2022: 1-6.] extended the semantics of the planning domain definition language and designed a singleton type to simplify the structure of the Petri net. However, in a complex manufacturing system, the Petri net model automatically generated using this method is still very large.
[0003] To improve the readability of manufacturing system modeling, a colored Petri net is used to model the manufacturing system. By organizing the structure and behavior of the system through colors, the operation and usage of the manufacturing system can be understood. However, the method proposed by Li et al. for automatically converting the PDDL model into a Petri net is not applicable to the case of generating a colored Petri net. Summary of the Invention
[0004] The purpose of the present invention is to solve the problems in the prior art.
[0005] The technical solution adopted by the present invention to solve its technical problems is: to provide a method for establishing a colored Petri net model of a manufacturing system based on the PDDL language, including the following steps:
[0006] Update the PDDL language, use the updated PDDL language to describe the resources and tasks of the manufacturing system, and generate a PDDL model of the manufacturing system;
[0007] Design the conversion rules between the PDDL language and the colored Petri net, and convert the objects, initial state, goal, predicates, actions, and types in the PDDL model into places, transitions, and directed arcs of the colored Petri net to generate the colored Petri net model of the manufacturing system;
[0008] Preferably, the updated PDDL language includes:
[0009] Combine the types and states of objects into the attributes of objects. The type of an object is represented by int sort, and the state of an object is represented by int process or bool state. Among them, int process is used to represent which processing state the workpiece is in the manufacturing system, and bool state is used to represent the loaded and unloaded states of the automatic guided vehicle (AGV) in the manufacturing system; The set of all attributes is called the object class, denoted as ;
[0010] Add constraints on the attributes of predicates in primitive actions by the object class;
[0011] Use the symbol < > to represent the attributes of the object class in the current primitive action, and this symbol will constrain the predicates in the preconditions or effects of the action.
[0012] Preferably, the conversion rules between the PDDL language and the colored Petri net include:
[0013] Convert the predicates of the PDDL language into non-action places of the colored Petri net;
[0014] Convert the actions of the PDDL language into a combination of action places and transitions in the colored Petri net.
[0015] Preferably, the conversion of the predicates of the PDDL language into non-action places of the colored Petri net includes:
[0016] Given a primitive action, the colors of the non-action places corresponding to all predicates in its preconditions are the object class attributes in the preconditions of this action;
[0017] Given a primitive action, the colors of the non-action places corresponding to all predicates in its effects are the object class attributes in the effects of this action.
[0018] Preferably, the conversion of the actions of the PDDL language into a combination of action places and transitions in the colored Petri net includes:
[0019] Convert each primitive action into an action place, and define the precondition and effect as an input transition and an output transition respectively; the meaning of the input transition is the same as the meaning of the precondition in the primitive action, indicating that the current action starts to execute; the meaning of the output transition is the same as the meaning of the effect in the primitive action, indicating the end of the current action.
[0020] The color of the action place and the input transition is the attribute of the object class of the precondition, and the color of the output transition is the attribute of the object class of the effect.
[0021] Preferably, the conversion rules between the PDDL language and the colored Petri net further include:
[0022] In a primitive action, for the predicates in its precondition, if the predicate is modified by "at start" and the color of the non-action place corresponding to the predicate corresponds to the color of the input transition of the primitive action, then these non-action places correspond to the input places of the input transition of the primitive action; if the predicate is modified by "at end" and the color of the non-action place corresponding to the predicate corresponds to the color of the input transition of the primitive action, then these non-action places correspond to the input places of the output transition of the primitive action.
[0023] In a primitive action, for the predicates in the effect, if it is modified by "at start" and the color of the non-action place corresponding to the predicate corresponds to the color of the input transition of the primitive action, then these non-action places correspond to the output places of the input transition of the primitive action; if the predicate is modified by "at end" and the color of the non-action place corresponding to the predicate corresponds to the color of the input transition of the primitive action, then these non-action places correspond to the output places of the output transition of the primitive action.
[0024] Preferably, the scheduling based on the colored Petri net model of the manufacturing system includes:
[0025] Obtain the initial state information of the manufacturing system and describe it in the initialization of the problem file in PDDL. By setting the predicate to true, convert it into the token number in the corresponding Petri net place.
[0026] The flag indicating the completion of the task of the manufacturing system consists of multiple predicates. Only when all predicates are set to true, the task of the system is marked as completed, corresponding to the token number in the corresponding place in the colored Petri net.
[0027] The present invention also provides a system for establishing a colored Petri net model of a manufacturing system based on the PDDL language, including:
[0028] A PDDL model generation module updates the PDDL language, uses the updated PDDL language to describe the resources and tasks of the manufacturing system, and generates a PDDL model of the manufacturing system.
[0029] Colored Petri net model generation module, which designs the conversion rules between PDDL language and colored Petri net, and converts the elements of objects, initial states, goals, predicates, actions and types in the PDDL model into places, transitions and directed arcs of the colored Petri net, so as to generate the colored Petri net model of the manufacturing system.
[0030] The present invention has the following beneficial effects:
[0031] (1) The present invention uses the PDDL model to describe the manufacturing system and designs conversion rules to generate a colored Petri net model to improve the readability of the Petri net; the advantage of using PDDL to establish a Petri net model compared with manual establishment is that it simplifies the modeling process and improves the modeling efficiency; the PDDL language provides a more intuitive and easy-to-understand description method, which helps to reduce errors and ambiguities in the modeling process;
[0032] (2) The present invention expands the PDDL syntax and designs the conversion rules for automatically converting PDDL into a colored Petri net to improve the modeling efficiency; the PDDL model is automatically converted into a colored Petri net through the designed conversion algorithm, laying a foundation for the subsequent scheduling of the colored Petri net.
[0033] The following further elaborates on the present invention in detail in conjunction with the accompanying drawings and embodiments, but the present invention is not limited to the embodiments. Description of the Drawings
[0034] Figure 1 It is the method step diagram of the embodiment of the present invention;
[0035] Figure 2 It is the processing Petri net of two types of workpieces obtained by the prior art;
[0036] Figure 3 It is the schematic diagram of converting the PDDL primitive action of the embodiment of the present invention into an action place and input and output transitions;
[0037] Figure 4 It is the schematic diagram of converting the PDDL "move" primitive action of the embodiment of the present invention into a Petri net subnet;
[0038] Figure 5 It is the processing colored Petri net of two types of workpieces obtained by the embodiment of the present invention;
[0039] Figure 6 It is the robot manufacturing system of the embodiment of the present invention;
[0040] Figure 7 It is the mobile road network of the robot manufacturing system of the embodiment of the present invention;
[0041] Figure 8 The place and transition generation format of the robot manufacturing system according to the embodiment of the present invention;
[0042] Figure 9 The Petri net visualization schematic diagram of the robot manufacturing system according to the embodiment of the present invention;
[0043] Figure 10 The system structure diagram according to the embodiment of the present invention. Detailed implementation manners
[0044] Refer to Figure 1 As shown, it is the method step diagram according to the embodiment of the present invention, including the following steps:
[0045] S101, update the PDDL language, use the updated PDDL language to describe the resources and tasks of the manufacturing system, and generate a manufacturing system PDDL model;
[0046] S102, design the conversion rules between the PDDL language and the colored Petri net, and convert the objects, initial, target, predicates, actions and types in the PDDL model into the places, transitions and directed arcs of the colored Petri net to generate a colored Petri net model of the manufacturing system.
[0047] Example 1, taking a certain manufacturing system as an example, there are two different types of workpieces workpiece1 = 1 and workpiece2 = 1 that need to be processed at a processing station. Through the prior art, a Petri net model can be established, as Figure 2 shown, where the tokens in the places and represent the positions of the workpieces, the places and represent workpiece processing, and the place represents the processing station. From this, it can be observed that as the types of workpieces increase, the scale of the Petri net also gradually increases, ultimately making the network redundant and complex.
[0048] Therefore, the embodiment of the present invention further updates the PDDL syntax on the above basis, and the specific update is as described in Definition 1.
[0049] Definition 1, an object has different types and states, and these types and states are combined into the attributes of the object. The set of all attributes is called the object class (Object category and state), which is represented as , the type of the object is represented by "int sort", and the state of the object is represented by "int process" or "bool state", where "int process" is usually used to indicate which processing state the workpiece is in the manufacturing system, and "bool state" is usually used to indicate the loaded and unloaded states of the AGV in the manufacturing system. Adding an object class constrains the attributes of the predicates in the primitive actions. At the same time, there are corresponding changes in the syntax of the primitive actions. The symbol "< >" represents the attributes of the object class in the current primitive action, and this symbol will constrain the predicates in the preconditions or effects of the action.
[0050] Example 2, based on the above rules, the PDDL syntax representation of a workpiece processing action is as follows:
[0051]
[0052] The PDDL syntax (workpiece type and state) representation of an object part is as follows:
[0053]
[0054] In the primitive action, the object in the precondition is part, where <?part.(sort = 1, process = 1)> indicates that the workpiece is of workpiece type 1 and has been processed for the first time. These attributes are assigned to the predicates in the precondition, that is, (In?partbuffer8), (is_free manchine2). Similarly, the same is true for assigning attributes to the predicates in the effects of the primitive action.
[0055] Based on the above updated PDDL language to describe the resources and tasks of the system, and then design a set of transformation rules to enable the PDDL model to be automatically converted into a Petri net model. The transformation rules include: (1) converting the predicates of the PDDL language into non-action places of the colored Petri net; (2) converting the actions of the PDDL language into a combination of action places and transitions in the colored Petri net.
[0056] (1) Predicates are converted into non-action places. In PDDL, predicates are divided into unary predicates and multi-ary predicates. Among them, the unary predicate (predicate ?obj) represents the state that the object obj is in; the binary predicate (predicate ?obj1 ?obj2) represents the relationship between object 1 and object 2. In a Petri net, it can be represented as a certain place. When a certain state or relationship is satisfied, there is a token in this place. Therefore, predicates can be converted into places in a Petri net, which are called non-action places. Each predicate can be converted into a non-action place. Among them, the object in some predicates in the problem file and domain file of the PDDL model of this embodiment of the invention has been instantiated. The specific rules are as described in Definitions 2 to 3:
[0057] Definition 2, given a primitive action, the color of the non-action places corresponding to all predicates in its precondition is the object class attribute in the precondition of this action.
[0058] Definition 3, given a primitive action, the color of the non-action places corresponding to all predicates in its effect is the object class attribute in the effect of this action.
[0059] Example 3, according to the PDDL syntax of the processing action, for the predicate (In ?part buffer8), "buffer8" represents buffer station 8; "?part" is an object class, representing the type and state of the workpiece. The predicates in the precondition of this primitive action are instantiated into two non-action places: the place is (In ?part buffer8), and the place is (is_free machine2). This primitive action has the constraint attribute "<?part.(sort = 1, process = 1)>" of the "?part" object class. The predicates in the precondition are given corresponding attributes. According to Definition 2, the place and the place are given the color of part.sort1.process1. Similarly, according to Definition 3, the places instantiated from the effect predicates will also be added corresponding colors.
[0060] (2) Actions are converted into a combination of action places and transitions. The primitive actions in the PDDL model are used to describe the behavior of the system, and its execution process takes a certain amount of time. The precondition of an action indicates that the action can only be executed when specific predicate conditions are met, and the execution of the action will affect the value of the predicate. In a Petri net, the triggering of a transition will cause a change in the number of tokens in the place. Therefore, each primitive action is converted into an action place, and the precondition and effect are defined as input and output transitions, as Figure 3As shown, the meaning of the input transition is the same as the meaning of the precondition in the primitive action, that is, the current action starts to execute, while the meaning of the output transition is the same as the meaning of the impact in the primitive action, that is, the end of the current action. The specific rules are as described in Definition 4.
[0061] Definition 4. Given a primitive action, the colors of the action place and the input transition are the attributes of the object class of the precondition, and the color of the output transition is the attribute of the object class of the impact.
[0062] In a primitive action, if the predicate in its precondition is modified by "at start" and the color of the non-action place corresponding to the predicate is the same as the color of the input transition of the primitive action, then these non-action places correspond to the input places of the input transition of the primitive action; if the predicate is modified by "at end" and the color of the non-action place corresponding to the predicate is the same as the color of the input transition of the primitive action, then these non-action places correspond to the input places of the output transition of the primitive action. For the predicate in the impact, if it is modified by "at start" and the color of the non-action place corresponding to the predicate is the same as the color of the input transition of the primitive action, then these non-action places correspond to the output places of the input transition of the primitive action; if the predicate is modified by "at end" and the color of the non-action place corresponding to the predicate is the same as the color of the input transition of the primitive action, then these non-action places correspond to the output places of the output transition of the primitive action.
[0063] Example 4. The PDDL model (instance of the primitive action "move" of the Automated Guided Vehicle, AGV) of a physical system where the AGV moves from station 0 to station 1 is expressed as:
[0064]
[0065] By analyzing the above instance of the primitive action "move" of the AGV, it can be seen that the input parameters of this action are stop0, stop1, and road0; the execution time of this action is 2s. The predicates in the precondition of this action need to meet the conditions, indicating that the AGV must be on stop0 before moving, indicating that road0 must be unoccupied before moving, indicating that stop0 must be the forward station of road0 before moving, indicating that stop1 must be the backward station of road0 after moving. The attributes of the agv object class in the precondition: and , that is, the workpiece carried by the agv is of type 2 and the processing status is 0 and the attributes of the agv's unloaded state. The value of the predicate in the impact of this action, Indicates that after the automatic guided vehicle (AGV) finishes moving, it is on stop1; Indicates that road0 is unoccupied after the movement ends; Indicates that stop1 is the backward station of road0; Indicates that stop0 is the forward station of road0; Attributes of the AGV object class under influence: and , that is, the attributes that the AGV is carrying a workpiece of type 2 and the processing status is 0 and the AGV is unloaded.
[0066] Therefore, convert the primitive actions into action places, convert the predicates in the preconditions and influences into non-action places, assign colors to the places and transitions according to Definitions 2 to 4, and establish the connection relationships between them through the connection rules of action places, non-action places and input and output transitions, and convert them into a Petri net subnet, as Figure 4 shown.
[0067] For the manufacturing system in Example 1, after adding the classes of object types and states to the PDDL model, by restricting the attributes of the predicates in the primitive actions and according to the rules for converting the above PDDL model into a colored Petri net, establish the colored Petri net model of this manufacturing system, as Figure 5 shown, where the two colors of tokens in the place represent two different types of workpieces, and the remaining places and transitions all have corresponding colors.
[0068] The initial state information of the system can be described in the initialization of the problem file in PDDL. By setting the predicates to true, convert them into the number of tokens in the corresponding places of the Petri net. The flag indicating the completion of the system task is also composed of multiple predicates. Only when all predicates are set to true, the task of the system is marked as completed, which also corresponds to the number of tokens in the corresponding places of the Petri net.
[0069] The algorithm for converting the PDDL model of the embodiment of the present invention into a colored Petri net is shown in Algorithm 1.
[0070] Algorithm 1 Conversion of PDDL Model into Colored Petri Net:
[0071]
[0072] Algorithm 1 outlines the process of converting the problem file and domain file in the PDDL model into a colored Petri net structure and initial marking. This algorithm constructs the colored Petri net structure by traversing the predicates and primitive actions, and assigns tokens to the places in the colored Petri by traversing the initial state. Step 1 initializes the elements; Steps 2 - 5 traverse the predicates to create non-action places , and then store the predicates and non-action places into the predicate-place table , so as to subsequently find the corresponding non-action place through the predicate; Step 6-29 traverses the primitive actions to create action places and input / output transitions , , where according to Definition 4, the preconditions and effects of the primitive actions are analyzed to assign colors to the action places and input / output transitions, and the initial marking of the action places is ; Step 11-19 traverses all the predicates in the preconditions of the primitive actions, analyzes the object class attributes of the action preconditions according to Definition 2, maps them to the color set in the colored Petri net, and then finds the corresponding non-action place of this predicate , sets the color of this place to , and establishes the connection relationship between the place and the transition according to whether the predicate of the precondition is modified by "at start" or "at end"; Steps 20-28 traverse all the effect predicates in the primitive actions, analyze the object class attributes of the action effects according to Definition 3, map them to the color set in the colored Petri net, and then finds the corresponding non-action place of this predicate , sets the color of this place to , and then establishes the connection relationship between the place and the transition according to whether the predicate of the effect is modified by "at start" or "at end". Steps 30-32 traverse the predicates in the initial state, find the corresponding non-action place of this predicate in , and the initial marking is .
[0073] Taking the robot manufacturing system as an example, it is described according to the writing rules of PDDL, and a PDDL model is generated. Subsequently, the colored Petri net structure and initial marking of the system are constructed through Algorithm 1 to verify the feasibility of the present invention.
[0074] The robot manufacturing system includes various devices, automated guided vehicles (AGVs), sensors, actuators, manufacturing units, raw materials, and orders. In such a system, competition for resources is common, including competition between devices, path competition between AGVs, and competition for station resources. Different resource allocation methods will result in different production completion times. Under resource constraints and process constraints, how to effectively arrange the order processing sequence, task allocation, and plan the AGV path to minimize the production completion time is a complex optimization scheduling problem. The robot manufacturing system is as Figure 6As shown, it consists of four parts: a feeding unit, a moving unit, a processing unit, and a finished product unit. These units are composed of corresponding resources, and the set of resources is represented as . The system consists of a feeding unit, a finished product unit, four processing units, and three moving units (AGVs). The feeding unit, the finished product unit, and the processing units are all equipped with a robotic arm for picking up workpieces. The feeding unit is provided with a buffer station for storing different types of workpieces to be processed. The finished product unit is provided with three buffer stations for storing different types of processed workpieces. Each processing unit has a buffer station for workpieces to be processed and a buffer station for workpieces that have completed a certain process, totaling four buffer stations for workpieces to be processed and four buffer stations for workpieces that have completed the process. In addition, twelve stations constitute the moving path of the moving unit, as Figure 7 shown.
[0075] The production process of the flexible manufacturing system is as follows: The AGV can only move unidirectionally and can only carry one workpiece at a time; the roads and stations of the road network only allow one AGV; each machine tool can only process one workpiece; each robotic arm only allows picking up one workpiece; the buffer stations in the processing unit, as well as the feeding unit and the finished product unit, allow multiple workpieces; there is no priority between workpieces and AGVs, and there is no preemption situation.
[0076] Taking the robot manufacturing system as an example. The robot manufacturing system processes different types of workpieces according to a specific production process. According to the processing sequence of the workpieces, the workpieces are processed in turn. First, when there is a workpiece to be processed, any idle AGV will move the position of the workpiece, that is, the buffer station or the output station, and the robotic arm grabs the workpiece and loads it onto the AGV. Then, according to the processing flow of the workpiece, the AGV moves to the corresponding processing unit and unloads the workpiece from the robotic arm and places it in the buffer station for workpieces to be processed. Secondly, the robotic arm grabs the workpiece in the buffer station for workpieces to be processed and sends it to the processing machine tool for processing. After processing is completed, the robotic arm places the workpiece in the buffer station for processed workpieces and waits for the AGV to transport it. After repeating the above process, the processing operations of all workpieces are completed, and the AGV transports the workpieces to the finished product unit.
[0077] In the optimized scheduling problem studied, three types of orders are covered, which are respectively labeled as Type I, Type II, and Type III orders. Therefore, the considered flexible manufacturing system includes three production lines for completing the processing tasks of the above orders. The technological processes of each production line are listed in Table 1. Specifically, the th process of the th production line is respectively denoted as , , or , which respectively represent loading operation, unloading operation, processing operation, and handling operation.
[0078] Table 1 - Manufacturing System Process Operations:
[0079]
[0080] Among them, the resource represents the shortest transportation path between stations and is consistent with the connection relationship of stations in the manufacturing system. The time consumption of different process operations is set as follows: The time consumption of both loading and unloading operations is 3 seconds; the single - processing time of machines , , and are 20 seconds, 30 seconds, 35 seconds, and 25 seconds respectively; the time consumption for the AGV to move between adjacent stations is 2 seconds for short - distance and 3 seconds for long - distance. Among them, the long - distance paths are , , , , , and , and the rest of the paths are short - distance paths.
[0081] Create its PDDL problem file and domain file l according to the robot manufacturing system. In the domain file, the types are stop (station), road, buffer (buffer station), and manchine (machine tool). Among them, the objects of the station are: stop0, stop1, stop2, …, stop11, that is, the object stop1 is an object of the stop type. Table 2 gives the types and objects of this system.
[0082] Table 2 - System Types and Objects:
[0083]
[0084] For the objects of the above types, there is no need to distinguish the attributes of the type and the status, so they cannot be declared as object classes. However, during the operation of the system, for AGVs and workpieces, they have different types and statuses, and they will combine many type and status attributes, which need to be distinguished. Therefore, they need to be declared as object classes. In the object class of the workpiece, the attributes of the workpiece include: type, represented by "sort", with an integer data type and a value range of 0 - 2, used to distinguish the types of workpieces; status, represented by "process", with an integer data type and a value range of 0 - 2, used to distinguish the processing status of the workpiece, where 0 means unprocessed, 1 means the first processing operation has been completed, and 2 means the second processing operation has been completed. In the object class of the AGV, the attributes of the AGV include: type, represented by "id", with an integer data type and a value range of 0 - 2, used to distinguish the types of AGVs; status, represented by "agv_part" and "empty", where the data type of "agv_part" is the object class of the workpiece, and the data type of "empty" is a boolean variable, respectively used to indicate whether the AGV is in a loaded state or an empty state. At the same time, the loaded state of the AGV is related to the attributes of the workpiece. The object class is shown in Table 3.
[0085] Table 3 - Object Class Attribute Table:
[0086]
[0087] The descriptions of unary predicates and binary predicates are shown in Table 4, where unary predicates describe the status of objects, and binary predicates describe the corresponding relationships between objects.
[0088] Table 4 - Predicate and Its Meaning Table:
[0089]
[0090] The predicates in the PDDL of the embodiment of the present invention have all been instantiated. The descriptions of primitive actions are composed of predicates. For example (due to limited space, only examples are given here without listing all primitive actions):
[0091] Action a: move0 - 1;
[0092] Meaning: The trolley is either empty or loaded and moves from station 0 to station 1;
[0093] Parameters: stop: stop0, stop1, road: road0;
[0094] Execution time: 2s;
[0095] Preconditions: (at start(In?agv stop0)) (at start(is_empty road0)); (at start(Pre stop0 road0)) (at end(Post stop1 road0)); <?agv.(agv_part.(sort = 2,process = 0))> <?agv.(empty = true)>;
[0096] Effects: (at end(In?agv stop1)) (at end(is_empty road0)); (at end(Poststop1 road0)) (at start(Pre stop0 road0)); <?agv.(agv_part.(sort = 2, process= 0))> <?agv.(empty = true)>。
[0097] Action b: load-1;
[0098] Meaning: Workpieces in processing state 1 of type 2 are loaded from buffer station 1 onto the AGV.
[0099] Parameters: stop: stop1, buffer: buffer1;
[0100] Execution time: 3s;
[0101] Preconditions: (at start(In?agv stop1)) (at start(In?part buffer1)); <?agv.(empty = true)> <?part.(sort = 2, process = 1)>;
[0102] Effects: (at end(In?agv stop1)) <?agv.(agv_part.(srot = 2, process = 1))>。
[0103] Action c: unload-1;
[0104] Meaning: Workpieces in processing state 0 of type 2 are unloaded from the AGV onto buffer station 0.
[0105] Parameters: stop: stop1, buffer: buffer0;
[0106] Execution time: 3s;
[0107] Prerequisite: (at start(In?agv stop1)) <?agv.(agv_part.(sort = 2, process =0))>;
[0108] Effect: (at end(In?agv stop1)) (at end(In?part buffer0)); <?agv.(empty= true)> <?part.(sort = 2, process = 0)>.
[0109] Action: process-1;
[0110] Meaning: Workpieces of type 2 in processing state 0 are processed on machine tool No. 3;
[0111] Parameters: buffer: buffer0 buffer1, manchine: manchine3;
[0112] Execution time: 25s;
[0113] Prerequisite: (at start(In?part buffer0)) (at start(is_free manchine3)); <?part.(sort = 2, process = 0)>;
[0114] Effect: (at end(In?part buffer1)) (at end(is_free manchine3)); <?part.(sort = 2, process = 1)>.
[0115] Meanwhile, the initial state of the system is as follows:
[0116] 1) (In?part buffer2) <1*part.(sort = 0, process = 0)> <1* part.(sort= 1, process = 0)> <1*part.(sort = 2, process = 0)> Among them: It means that workpieces of type 0 in processing state 0, workpieces of type 1 in processing state 0, and workpieces of type 2 in processing state 0 are in buffer station 2, and the number of workpieces is 1 for each;
[0117] 2) (In?agv stop0)<agv.(empty = true)> It means that there is an empty AGV at station 0;
[0118] 3) (In?agv stop1) <agv.(empty = true)> means there is an empty AGV at station 1;
[0119] 4) (In?agv stop11) <agv.(empty = true)> means there is an empty AGV at station 11.
[0120] The target state of the system requires that all processed workpieces be at station 7, i.e., (In?partbuffer7) <1*part.(sort = 0, process =2)> <1*part.(sort = 1, process =2)> <1*part.(sort = 2, process =2)>.
[0121] Put the problem file and domain file of the PDDL model of the robotic manufacturing system into Algorithm 1, and output the Json file of the colored Petri net. This file includes the information of places and transitions, as well as their connection relationships. Their generation formats are as Figure 8 shown. The information of a place consists of "targert", "delay", "capacity", "token", "pre_arcs", and "post_arcs". Among them, "targert" refers to the information of the system task completion, that is, "target": {"sort0.process2.":1} means that when there is a workpiece in the place with the attribute "sort0.process2." and the quantity is 1, the system task is completed. "delay" and "capacity" represent the time delay of the place and the number of tokens that the place can accommodate. "colors" represents the color set of the place, that is, the color is the workpiece attribute. "token" represents the number of tokens at the initial time of the place, in the format of "workpiece attribute: quantity". "pre_arcs" represents the information of the pre-transition of the place and the color correspondence between the place and the transition, that is, "t51": {"sort2.process0.": "sort2.process0."}, which means the pre-transition of the place is and the first "sort2.process0." is the color of the place, and the second "sort2.process0." is the color of the transition. "post_arcs" represents the information of the post-transition of the place and the color correspondence between the place and the transition, that is, "t60": {"sort2.process0.": "sort2.process0."}}, which means the post-transition of the place is , the first "sort2.process0." is the color of the place, and the second "sort2.process0" is the color of the transition. The transition information consists of "colors", "pre_arcs", and "post_arcs". "colors" is the set of colors of the transition, that is, the color is the workpiece attribute. "pre_arcs" represents the input place information of the transition and the color correspondence between the transition and the place, that is, "p10": {"empty.true.": "empty.true."}, indicating that the input place of the transition is , the first "empty.true." is the color of the transition, and the second "empty.true." is the color of the place. "post_arcs" represents the output place information of the transition and the color correspondence between the transition and the place, that is, "p24": {"empty.true.": "empty.true."}, indicating that the output place of the transition is , the first "empty.true." is the color of the transition, and the second "empty.true." is the color of the place.
[0122] Generate the visualization result of the Petri net through the place and transition information as shown in Figure 9 . It can be known from the figure that there are 3 AGVs in the system on the places , and , and there are three workpieces in the place , which are workpieces of type 0 processing state 0, type 1 processing state 0, and type 2 processing state 0 respectively, and the quantity is 1. By sorting out the meanings in the places of the colored Petri net, as shown in Table 5.
[0123] Table 5 - Meanings of Places in the Colored Petri Net of the Manufacturing System:
[0124]
[0125]
[0126]
[0127] Specifically, refer to Figure 10 shown, which is the system structure diagram of the embodiment of the present invention, including:
[0128] The PDDL model generation module 1001 updates the PDDL language, uses the updated PDDL language to describe the resources and tasks of the manufacturing system, and generates the manufacturing system PDDL model;
[0129] The colored Petri net model generation module 1002 designs the conversion rules between the PDDL language and the colored Petri net, and converts the elements of objects, initial state, goal, predicates, actions and types in the PDDL model into places, transitions and directed arcs of the colored Petri net, so as to generate the colored Petri net model of the manufacturing system.
[0130] The colored Petri net model has extensive applications in the modeling, analysis, optimization, simulation, etc. of the manufacturing system, and can effectively improve the design, operation and management levels of the system; moreover, the colored Petri net is more readable than the ordinary Petri net. The present invention expands the PDDL syntax and designs the conversion rules for automatically converting PDDL into a colored Petri net to improve the modeling efficiency of the colored Petri net model; the designed algorithm automatically converts the PDDL model into a colored Petri net, laying a foundation for the subsequent scheduling of the colored Petri net. The advantage of using PDDL to establish a Petri net model in the present invention compared with manual establishment is that it simplifies the modeling process and improves the modeling efficiency. The defined language provides a more intuitive and easy-to-understand description method, which helps to reduce errors and ambiguities in the modeling process.
[0131] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for establishing a colored Petri net model of a manufacturing system based on PDDL language, characterized in that: The following steps are involved: Update the PDDL language, use the updated PDDL language to describe the resources and tasks of the manufacturing system, and generate the PDDL model of the manufacturing system; Design the conversion rules between PDDL language and colored Petri net, convert the objects, initialization, target, predicate, action and type in PDDL model into the places, transitions and directed arcs of colored Petri net, and generate the colored Petri net model of manufacturing system; The updated PDDL language includes: The type and state of an object are combined into the object's attributes. The type of the object is represented by int sort, and the state of the object is represented by int process or bool state. In particular, int process is used to indicate the processing state of the workpiece in the manufacturing system, and bool state is used to indicate the loaded and unloaded states of the automatic guided vehicle (AGV) in the manufacturing system. The collection of all attributes is called an object class, which is represented by (object category and state: int sort, int process, bool state). Add object classes to constrain the attributes of predicates in primitive actions; Use the symbol <> to indicate the attribute of the object class in the current primitive action. This symbol will constrain the predicate of the premise or effect in the action. The conversion rules between the PDDL language and the colored Petri net include: In a primitive action, for the predicate in its premise, if the predicate is modified by "at start", and the color of the non-action places corresponding to the predicate corresponds to the color of the input transition of the primitive action, then these non-action places correspond to the input places of the input transition of the primitive action; if the predicate is modified by "at end", and the color of the non-action places corresponding to the predicate corresponds to the color of the input transition of the primitive action, then these non-action places correspond to the input places of the output transition of the primitive action; In a primitive action, for the predicate in the influence, if it is modified by "at start", and the color of the non-action places corresponding to the predicate corresponds to the color of the primitive action input transition, then these non-action places correspond to the output places of the primitive action input transition; if the predicate is modified by "at end", and the color of the non-action places corresponding to the predicate corresponds to the color of the primitive action input transition, then these non-action places correspond to the output places of the primitive action output transition.
2. The method for establishing a colored Petri net model of a manufacturing system based on PDDL language according to claim 1, characterized in that: The conversion rules between the PDDL language and the colored Petri net include: Convert the predicates of PDDL language into non-action places of colored Petri nets; The actions of PDDL language are converted into the combination of action locations and transitions in colored Petri nets.
3. The method for establishing a colored Petri net model of a manufacturing system based on PDDL language according to claim 2, characterized in that: The method of converting the predicate of the PDDL language into a non-action place of a colored Petri net includes: Given a primitive action, the color of the non-action places corresponding to all predicates in its premise is the object class attribute in the premise of the action; Given a primitive action, the color of the non-action places corresponding to all predicates in its effects is the object class attribute in the action effects.
4. The method for establishing a colored Petri net model of a manufacturing system based on PDDL language according to claim 2, characterized in that: The step of converting the actions in the PDDL language into a combination of action locations and transitions in the colored Petri net includes: Convert each primitive action into an action place, and define the premise and influence as input transition and output transition respectively; the meaning of input transition is the same as the premise in the primitive action, indicating the start of the current action; the meaning of output transition is the same as the influence in the middle of the primitive action, indicating the end of the current action; The colors of the action library and input transitions are the attributes of the prerequisite object class, and the colors of the output transitions are the attributes of the affected object class.
5. The method for establishing a colored Petri net model of a manufacturing system based on PDDL language according to claim 1, characterized in that: The manufacturing system colored Petri net model is used to implement the scheduling of the manufacturing system, and includes the following steps: The initial state information of the manufacturing system is obtained and described in the initialization of the problem file in PDDL. By setting the predicate to true, it is converted into the number of tokens in the corresponding Petri net library. The sign of task completion of the manufacturing system is composed of multiple predicates. Only when all predicates are set to true, the task of the system is marked as completed, corresponding to the number of tokens in the corresponding library in the colored Petri net.
6. A colored Petri net model building system for manufacturing system based on PDDL language, characterized in that: include: The PDDL model generation module updates the PDDL language, uses the updated PDDL language to describe the resources and tasks of the manufacturing system, and generates the PDDL model of the manufacturing system; Colored Petri net model generation module, which designs the conversion rules between PDDL language and colored Petri net, converts the elements of object, initial, target, predicate, action and type in PDDL model into the library, transition and directed arc of colored Petri net, and generates the colored Petri net model of manufacturing system; The updated PDDL language includes: The type and state of an object are combined into the object's attributes. The type of the object is represented by int sort, and the state of the object is represented by int process or bool state. In particular, int process is used to indicate the processing state of the workpiece in the manufacturing system, and bool state is used to indicate the loaded and unloaded states of the automatic guided vehicle (AGV) in the manufacturing system. The collection of all attributes is called an object class, which is represented by (object category and state: int sort, int process, bool state). Add object classes to constrain the attributes of predicates in primitive actions; Use the symbol <> to indicate the attribute of the object class in the current primitive action. This symbol will constrain the predicate of the premise or effect in the action. The conversion rules between the PDDL language and the colored Petri net include: In a primitive action, for the predicate in its premise, if the predicate is modified by "at start", and the color of the non-action places corresponding to the predicate corresponds to the color of the input transition of the primitive action, then these non-action places correspond to the input places of the input transition of the primitive action; if the predicate is modified by "at end", and the color of the non-action places corresponding to the predicate corresponds to the color of the input transition of the primitive action, then these non-action places correspond to the input places of the output transition of the primitive action; In a primitive action, for the predicate in the influence, if it is modified by "at start", and the color of the non-action places corresponding to the predicate corresponds to the color of the primitive action input transition, then these non-action places correspond to the output places of the primitive action input transition; if the predicate is modified by "at end", and the color of the non-action places corresponding to the predicate corresponds to the color of the primitive action input transition, then these non-action places correspond to the output places of the primitive action output transition.