List of places from Figure 4 .
This chapter puts forward characteristics of selected issues of manufacturing processes planning using the Petri networks technique. It includes references to the extensive literature concerning the use of Petri networks in computer aided planning of discrete production processes. Diversity of these problems is high as it refers both to the methods of modeling and simulation of the course of manufacturing processes, the issue of optimizing these processes and production systems, representation of knowledge on production parts of equipment and integration of planning and production activities in general. The work puts forward example use of a temporary, priority Petri network for modeling and optimizing production systems and manufacturing operations as well as an example of fuzzy interference using the Petri network mechanism.
- modeling production systems
- representation of knowledge
- time-priority Petri nets
The objective of modeling a manufacturing process is mostly utilitarian with aspects such as support of its planning, ensuring optimizing or providing environment for automation of its planning. Its cognitive aspect is also of importance as building a model forces a planner to track the entire issue of generating a process plan. The main components of a production process description include: a description of the stereo-metric structure (stereo-structure), a description of the time structure (chrono-structure), a specification of processing conditions and a description of the factors of ensuring reliability of processing. Stereo-structure involves characteristics related to dimensional production chains, spatial arrangement and connection with movement of working units of the machine tool. Chrono-structure involves characteristics related to structural components of operation time and the sequence of these components. Chrono-structure of a complex, multi-tool machining processes involves the following components: specification of simple operations completed on individual features; assigning simple operations to complex operations; distribution of operations into complex operations and defining a reasonable sequence of complex operations.
A simple operation understood as processing one feature with one tool is a basic component of the operations chrono-structure. A complex operation means a group of simple operations completed using one tool without replacing it, changing the position of the processed part and without re-mounting, even a partial one. Complex operations are combined in sequences on rising hierarchy levels. Borders of these sequences are set by: change of a tool, change of the parts processing position within the reference frame of the machine tool, re-mounting, change of reference frame and, on a higher level of production process, division into roughing and precise processing.
A manufacturing operation might be defined as a cause-and-effect process including three basic subgroups:
Passive (static) including current statuses of features, tools, status of the machine tool’s auxiliary assemblies such as tailstock sleeve, steady rest, turntable, pallet changer, position of tool head as well as selected manufacturing datum and clamping methods;
Active (dynamic) including operations, changes of tools, movement of auxiliary units, re-clamping, and so on;
Decision-making, including events, the nature of which is not temporary, but informative such as releasing the opportunity of changing a tool, forcing a change in the table’s position, and so on.
A description of the chrono-structure might be made by defining organization and concurrency relations on sets of components of the aforementioned subgroups. If the first of the subgroups is treated as a set of conditions and the other two as a set of events, and flow relation is described on these two sets, the result is a directed bipartite graph structure—a base of the Petri network.
Topological characteristics of a bipartite directed graph that the Petri network is allowed for modeling various logical, cause and effect, time, attribute, linguistic, semantic, geometrical and other relations. Such relations are considered both at the stage of planning a production process and at the stage of implementing it. Therefore, an interest in the methodology of Petri networks for the purpose of planning manufacturing processes grew as early as in the second half of the 1980s . The first attempts to use the Petri network in planning manufacturing processes were related to connecting the production process plan to conditions resulting from the production department’s potential. Therefore, their basic use in construction of machines consisted of modeling of production systems, mostly the flexible manufacturing system (FMS). A comprehensive review of use of Petri networks in planning manufacturing processes by 1992 is put forward in this work .
This period was followed by a range of significant applications of Petri networks in modeling discrete manufacturing processes. The team of Kiritsis has showed particular interest in this issue [3, 4, 5, 6, 7, 8, 9, 10]. The published works analyzed the opportunities of classifying operations in the process of production, representation of alternative courses of manufacturing process and dynamic planning of processes. The complete approach in the 1990s has also been put forward by the duo of Horvát and Rudas [11, 12, 13, 14]. It involved both acquisition of knowledge and modeling the structure of the manufacturing process as well as evaluation of the generated Petri network. The authors aimed at developing a knowledge-based manufacturing process modeling methodology. In the same period, the use of Petri networks was forecast for two purposes: modeling knowledge related to selection and classifying operations and flexible representation of the sequence of operations [15, 16].
Today, it might be stated that this modeling technique has become the most popular one in FMS modeling, scheduling production , controlling and management of manufacturing processes in FMS. Stochastic Petri networks are used for considering the random nature of some events . Preventive detection of locks is one of the FMS model’s main functions .
The issue of flow of objects through the manufacturing process remains in between planning of the manufacturing process and the measures necessary to implement it. The Petri networks methodology is also used here. The work  considering the issue of estimating the upper and lower limit of time and cost of completing a production series of a given part in certain workshop conditions is essential here. An opportunity of variant course of individual processes for individual parts of a production batch is assumed. A more efficient model was obtained—compared to the traditional approach based on determining critical path—with regard to the availability of production tools and machinery.
The most expanded Petri network classes in manufacturing are used in the work  for the purpose of loading machinery in FMS. Based on of hybrid Petri networks , which are fuzzy neural Petri networks, their language was expanded by adding color attributes, inhibitory arcs and time function. According to the authors, the ENhanced Fuzzy Neural Petri Net (ENFNPN) gives extraordinary opportunities of flexible modeling perfectly corresponding to FMS, allowing for modeling and processing knowledge at the expert system level.
Multi-axis machine tools with a larger number of machine units currently play an increasingly significant role in machine processing. The effective use of such machine tools is strictly determined with maximizing concurrency, which is reflected by an optimum chrono-structure of operations. In order to optimize the chrono-structure of a concurrent operation, it is necessary to define subsets of operations that might be conducted simultaneously and to define the optimum relation of preferences, taking into account the division along with a range of various conditions and limitations. It is not a trivial task; hence, it is preferable to use a correctly adapted computer aided process planning (CAPP) class system and planning methodology.
Process specification language (PSL) is the most complex project in modeling and analysis of manufacturing processes using the Petri network technique. The works on this project, which were coordinated by the National Institute of Standards and Technology (NIST) aimed at developing an international standard of a description language for all aspects of manufacturing process completion . Petri network class called the Compact Process Planning net (CPP-net) is the technical representation of PSL concept. Formally, CPP-net is an organized set of four components (P, T, E, M0); it is therefore a base Petri network. A set of P locations in CPP-net includes three subsets: control locations, input locations and locations representing limits. Components of T set represent tasks to be performed, conditioned by the E flow relation. A feasibility graph is developed based on the Petri network. It presents all the possible transition sequences in CPP-net corresponding to possible courses of the process. A large proportion of this course is irrational. Therefore, the subsequent stage includes a heuristic method to eliminate the courses that are not compliant with certain assumptions resulting from correctness of the production process . It allows to significantly reduce the number of possible variants of the course of the process.
2. Generative process planning
Basically, there are two various approaches to plan a process in CAPP systems: generative (GCAPP) and variant (VCAPP). Differences are significant and are also reflected in models of manufacturing processes. An intermediate approach, also called a hybrid one, is also customary, but its description cannot be easily formalized. Generative planning consists of drawing up the process using individual features, to synthesis of tasks on an increasingly higher level: a complex operation, mounting, operation, processing stage, manufacturing process. The generative approach is used if manufactured machine parts significantly differ from each other and groups of parts with manufacturing similarities cannot be identified. The process model in GCAPP is generated gradually as progress is made in planning it. A generated model has a dispersed nature; however, it includes modules with a previously defined structure. It is then necessary to determine the number of modules of a certain type and classify them. Figure 1 presents the general structure of such models.
The Petri network language class used for building the model has the following form:
The conditions of preparing transition
Eq. (2) applies in cases where only one transition meets the feasibility conditions. If two or more transitions meet the feasibility conditions, only one of them—the highest priority one—is completed. Other transitions are ranked in next iteration of the simulations process.
The interdependence between M current status and M’ status directly resulting from it has been defined as follows:
The aforementioned class is therefore a temporary Petri network with a binary marking function and inhibitor arcs. Inhibitor arcs make the model simpler, more transparent, therefore, easier to build and analyze. The suggested module structure allows for automation in generating the model. Modules for replacement of tools in the number of tools used for the process control the need to replace a tool. Topologically identical modules of control of calling the Workpiece Coordinate System (WCS) should be identified as the position required by the production process and the orientation of a processed object in a machine coordinate system. A module of complex operations is the core of the model. Each transition in the module calls a tool and WCS for the subsequent complex operation. A subsequent module is a sequence of operations conducted using the same tool on subsequent features. The modules is an area for structural optimization of the process by way of minimizing the number of tool changes. The model is supplemented by modules classifying simple operations for individual features. A marker on the last item of a module means ending processing of a given feature.
The aforementioned issue of optimizing the structure of multi-tool production operations might be solved using two simple heuristics: give preference to the tool that might currently process the largest possible number of areas and give preference to the tool that might currently complete all the operations that have been assigned to it. The suggested approach allows for a satisfying sequence of simple operations with a small number or iterations equal to the number of tools used. It is an optimal sequence in more than 95% cases. In order to appreciate the benefits of this method, one can compare it to the full browsing algorithm. The advantages of this method also include a very simple method of transferring its results in the form of an organized sequence of complex operations to a formal network model.
The sequence of processing individual features might be conditional on their technological nature. An opportunity to automatically classify the conducted operations then requires initiating the optimizing procedure. A function of priorities assigned to each transition is used for this purpose. Example use of this method based on genetic algorithm is shown in the work .
3. Variant process planning
Variant process planning consists of completing a certain scheme of indexing a designed part, which allows to find the most structurally and manufacturing similar component and take over its manufacturing process it with an insignificant number of adjustments. Such approach to process design shows its benefits when it is possible to classify manufactured machine parts in groups of parts, which are structurally and manufacturing similar. VCAPP is therefore closely linked to the group technology of machines and use of flexible manufacturing cells.
The effective use of flexible, robotized manufacturing cells is guaranteed by completion in such group technology idea systems. Hence, similarity of the machine parts processed there should be considered both at the stage of design, equipment and software configuration and during everyday use of the production cells. The Group Technology (GT) method has reached its mature form at the beginning of the 1990s . Currently, GT is considered as a concept of production, in which production resource is functionally grouped in production cells for the purpose of processing machine parts with similar features in order to achieve a high level of production reproducibility and artificially extend the size of a production batch. GT is related to the cellular production  concept, which means production both in flexible manufacturing cells and in autonomous flex-cell. GT therefore involves a range of various operations of a design, production and organizational nature, which requires coherence and synchronization. Many of them, such as determining production similarity of machine parts, grouping and classification of machine parts, variant design, parametric programming of computer numerical control (CNC) machine tools, developing group manufacturing processes, designing group processing equipment, configuration of manufacturing cells  and the issue of planning and controlling the manufacturing process are still readily raised subject of development works.
Technical implementations of VCAPP systems most frequently include one of the two solutions: building a system based on finding a similar part of a previously manufactured machine part and adopting its production process plan or developing a group production process for the so-called synthetic representative of the group. In both cases, it is possible to use a process model developed in the Petri network technique; however, the second method is more natural in using its potential.
Feature precedence network (FPN) defined as a directed graph representing precedences that result from limitations imposed by the features is a precondition for designing a correct manufacturing operation. For complex parts, with a large number of processed features and relations between them, FPN might be very complex and very difficult to manually process. In [26, 27] has developed a system generating FPN based on the analysis of interactions between the features and verification of FPN using the Petri network model. The developed structure involves generating features by way of mapping from CAD system, analysis of interactions between the features and an algorithm automatically creating a Petri network corresponding to a given FPN. An analysis of interaction between the features involves comparing each pair of features with reference to the defined set of rules. These rules include heuristic preferences of processing sequence, which guarantee its effectiveness. The rules take geometric, production and economic factors into account.
In case of variant approach to production process design FPN represents a model developed for the synthetic representative of a given group of machines. The synthetic representative represents an abstract object that includes all types of features that can be found in the group of parts with production similarities. The process model should allow for an explicit definition of a processing task only by way of correct positioning of initial marking vector M0. The sequence of processing individual features is defined based on the FPN. Subsequent, structurally unified modules of the model supplement the remaining functions of the model. The work  elaborates on this issue and gives an example of the variant approach for axially symmetrical parts.
4. Modeling and optimizing production systems
As it has been mentioned in Section 1, modeling, simulation and controlling the production process in automated, robotized, discrete production systems is the main area of using the Petri network technique in production. The systems are typical examples of asynchronous concurrent systems. The problem of management of limited resources, classifying tasks and auto-diagnosis in such systems is a very complex issue and requires optimizing procedures both at the stage of design and during use. Building a model of a designed production systems allows to avoid a range of conceptual errors and facilitate modifications of a project. Simulation techniques implemented on abstract models allow to optimize the operation of a system, define its potential efficiency, identify any bottlenecks and define the actual utilization rate on production resource. Simulation of models developed in the Petri network technique allows to generate a network availability graph and, consequently, at the stage of using the system, to avoid downtime, diagnose the system and facilitate making correct decisions.
The following organized eight items are the appropriate class of Petri networks for the aforementioned tasks:
In this case, the conditions of preparing transition t for firing have the following form:
It is essential to remember that multiplicity of flow through the arc is assigned to both ordinary arcs assigned to E flow relation and to inhibitor arcs. Assigning multiplicity to inhibitor arcs—which is not a frequent case—allows for giving up another element: function of locations capacity. Inhibitor arcs might be used for controlling flow of markers, for instance, to avoid overflow of intra-operation buffers. Appropriate software of this class of Petri networks is an intuitive, flexible tool of modeling and simulation for an engineer. A lack of opportunity to generate random events, allowed by stochastic Petri networks is a certain limitation of the aforementioned Petri network class .
Software processing PN2 class might be easily supplemented with a function optimizing the production system. The following example uses the genetic algorithm to find optimum priorities for individual transitions. The chromosome of each solution includes just as many genes as is found in the sum of transitions ( Figure 2 ). Each of the genes is represented as a number between [0, 1], which corresponds to the priority value for the appropriate transition. The reproduction process for a new descendant includes random appropriate gene of their parents or, with certain low probability, the value of the gene is drawn from the range [0, 1], which corresponds to the mutation process. Details of the suggested algorithm have been put forward in the works [28, 29]. Figure 2 shows an example of optimum chromosome for the production system presented in the further part.
The number of produced parts, the total number of order completion or, for example, the number of measured parts might be used as an optimization criterion. The last example refers to a situation, in which production efficiency is satisfying, there is a production margin, so the manufacturer places more emphasis on improving production quality. It can be indirectly completed by attaching higher priority to transitions serving the measurement station.
The following example presents a production system model ( Figure 3 ) with two lathes CNC (L1, L2), two drill-tap machining centers (M1, M2), two industrial robots (R1, R2), an input transporter (IN) and an output transporter (OUT), a measurement station (MS) and an intra-operation buffer. It has been designed for the purpose of processing rear axle guide pins—right (
Figure 4 presents Petri network for a robotized production system of processing rear axle guide pins. Marking the network corresponds to the production launch status. Only one transition (t1) is possible in this status. The green spot means that it has at least one marker. M0(p30) = 4 should be set to ensure correct course of simulation. Arc multiplicity function has been used for solving two problems: control of intra-operation buffer overflow and loading and unloading M1. The buffer allows for storing up to five parts, therefore i(3, 12) and i(3, 22) inhibitor arcs have the multiplicity of 5, which results in blocking 12 and 22 transitions if p3 has 5 markers. Position 5 aims at preventing simultaneous access to buffers of R1 and R2 robots. The i(31, 30) inhibitor arc, on the other hand, prevents loading non-processing parts to M1 before all processed parts are unloaded. Multiplicity of 4th p31→t31 arc allows to start processing only when M1 includes a set of four parts. After completing t31 four markers are transferred to p32 and the unloading stage begins. Processed parts might be transferred to the input transporter (t32, t42) directly, or to the measurement station first, provided that it is expecting parts for measurement. The network topology ensures that parts processed at M1 and M2 are transferred for measurement. It is ensured by the marker flowing in the loop p51→t51→p52→t52→p53→t53→p61→t61→p62→t62→p63→t63→p51.
Table 1 puts forward a description of module locations, whereas a description of transition of the presented model is put forward by Figure 5 . The figure is an example of visualizing transformation results with a spreadsheet. Subchapter 6 puts forward the opportunities to integrate specialist software for Petri networks with other software packages.
5. Petri networks as a manufacturing knowledge representation method
Contemporary CAPP systems have the architecture of expert systems . Systems based on rules prevail among knowledge representation methods applied in expert systems. Petri networks do not constitute a turning point here. They are only another variant of the rule method. However, it is a ready carrier of knowledge with a large potential of expanding its capabilities, flexible as frames, able to capture the context to the extent not smaller than semantic networks, allowing for intelligent inference by way of introducing fuzzy rules. An advanced suggestion for using Petri networks for knowledge representation in CAPP systems has been put forward in the work , the authors of which present characteristics of the component of a rule approach to knowledge representation and an approach based on Petri network. Multilateral usefulness of Petri networks at various stages of building and using expert systems should be noted. Starting from a knowledge acquisition system [22, 30], to knowledge representation in a knowledge database [31, 32], user interface handling , inference mechanism [32, 34] to knowledge validation , the Petri network technique is helpful in all of these aspects.
Knowledge engineers most frequently use the structural formalism of knowledge representation based on the Petri network technique. Logical Petri Net (LPN) allows for easy modeling and verification of knowledge. The work  puts forward a fuzzy inference algorithm and a backward propagation algorithm for Adaptive Fuzzy Petri Network (AFPN). AFPN might be a finished platform for an expert system allowing for knowledge acquisition based on a teaching set.
The following example uses a maximally simplified version of AFPN, which still is a logical fuzzy Petri network (Eq.(6)) in the form of organized five units:
6. Petri networks in computer integration manufacturing
Computer integration manufacturing (CIM) involves the integration of technical systems of constructing a product, planning a manufacturing process, technical preparation of production, programming CNC equipment, manufacturing, assembly, ensuring quality control, monitoring  and testing a product with facility and organizational systems of planning and controlling production in a company. Such integration should be implemented based on a shared, coherent system of databases: structural ones, ones for manufacturing processes, resource of production and transport, tools, processing and measuring equipment. Possible scope of modeling using the Petri network technique with respect to issues related to computer integration of manufacturing is very broad nowadays. The use of graphic tools such as the Update Petri Nets (UPN) class  based on Color Petri Networks (CPN) might be used as an example. UPN applications are systems based on rules, integrating control of information flow between CAD, CAPP, resources management and production flow.
A data exchange system between individual modules is a prerequisite for integration. It is still the weakest link of the contemporary computer integration systems. Currently, the bottleneck of integration might be removed, after introducing and popularization of the Automation Markup Language (AML). IEC 62714  project available since 2014 is a solution for data exchange concentrating on the area of industrial automation. The document defines AML data exchange format based on Extensible Markup Language (XML) scheme data format. It has been developed to support data exchange for heterogeneous engineering tools in the environment of automated production resource. The objective of AML is to combine engineering tools of various fields, that is, mechanical engineering, workshop design, electric engineering, production process design, controlling course of production, development of human machine interface (HMI), programmable logic controller (PLC) programming, programming CNC machine tools and industrial robots, and so on. AML might describe both physical and logical aspects of all components of a production system, their topology, geometry, kinematics, logics of control, and represent the links and hierarchy of all objects considered. It should be emphasized that XML format serving as a base for AML language has been developed since 1990, mostly as a spontaneous initiative of engineers dissatisfied with previously offered solutions, including standard for the exchange of product model data (STEP). The success of XML format is a result of flexibility of the language, ease of defining complex data structures, lack of barriers in other suggested solutions, its alphanumeric character, ease of control and direct analysis, open and intuitive character. Solutions have been put forward for several years, also in the form of standards, presenting data representation for the Petri network model in a format based on the Petri Net Markup Language (PNML) . PNML has been introduced as a data exchange format for all Petri network classes. All of this is a fundamental premise for formulating a favorable forecast for acceptance and quick popularization of AML language as a data exchange language in industrial automation and its environment.
Figure 8 shows a scheme of an integrated production unit design system, taking into account data exchange streams and main functions of individual modules. Attention should be drawn to the role of a spreadsheet with active macro application option, which allows to compile input data for computer aided design (CAD) and computer aided manufacturing (CAM) systems and control their correctness, completeness, consistency and adherence with the allowed range. Diagnostics of data is a significant element that influences comfort of using the design system. Full integration of a spreadsheet with popular CAD systems is possible nowadays, which significantly facilitates structural designing and drawing up documentation in the form of drawings. At the same time, a spreadsheet allows for drawing up a data file for a parametrized program of processing a selected class of produced machine parts by using related data sheets. An Excel Macro-Enable Workbook (XLSM) format file allows to use macros, that is, command sequences that might be used for the automation of completed functions in a spreadsheet. A 3D model is made by preparing a drawing in CAD program, which is integrally linked to the data included in the spreadsheet’s data file. Then, 2D documentation is made based on such model, if it is necessary. The code generated in a spreadsheet has a simple structure in the form of a list of R-parameters plus the name of a processed part. These are input data for CAM system and/or the numerical control system of the machine tool, where parametric programs related to the aforementioned list of variable parameters are archived. Aside from formal verification of the controlling program’s form, processing in CAM aims at providing a simulation of processing. Aside from confirming correctness of programmed trajectories of a machine’s movement, the simulation made provides an exact completion time for individual processing operations. The results are exported to the Petri Nets Modeler (PNM) package, which allows for exact time simulation of a production unit’s work. A list of Petri network model transitions in XML format are again transferred to the spreadsheet, thus closing the process chain. It includes a list of transitions with their completion times and a number of repetitions in a given period. A spreadsheet allows to easily obtain a clearly structured document presenting, for example, utilization rate on production resource ( Figure 5 ).
PNM package is a key module of the presented design system. Its objective consists of computer simulation, modeling and optimizing of both individual and group processes of production, dedicated to autonomous flex-cells, multi-machine tool stations and robotized manufacturing systems.
Both the very process of planning manufacturing processes and the structure of the manufacturing processes require applying a conditional-event mechanism that is naturally represented in the Petri networks technique. This chapter briefly outlines the broad opportunities of applying this technique to design of discrete production processes. The period 1990s are the most intense development period of Petri networks technology. We are currently at the stage of applying already mature programming tools, increasingly frequently integrated in heterogeneous planning systems. The greatest advantages of Petri networks technique visible and acknowledged by engineers include: an opportunity to generate models with various levels of detail, graphic user interface at the stage of acquisition, verification and processing a model, ease of modification and expansion of a model using its hierarchical and block character. The fact that each model contains production knowledge is the greatest advantage of applying modeling techniques in the planning of production processes. Hence, the premises for automation of the design process, at least in the area of implementing routine works. An engineer’s intellectual efforts might therefore be aimed at introducing innovative solutions and improvements.