Smart selection from petri net modeling tools for fast developing a manufacturing system

Abstract Petri net (PN) is a well-known graphical and mathematical model that can be used to describe a system quickly and dynamically. Over the last decade, it has provided many applications for academia research and industrial practice, especially, for the system verification and performance evaluation. Compared with other system models, the PN model is easy to implement. Therefore, it can be recommended as an effective way for people to study the model checking and validation. For the purposes of reducing time span to get familiar with PN tools, it is necessary to have an informative guide, providing general information about a PN software tool for system developers. This paper aims to review HiPS, PIPE, and WoPeD tools which are simple, lightweight, and free of charge. Our proposed approach also compares their strengths and limitations with each other to help the system developers determine a suitable PN software tool and shorten the time to markets for their products. Thus, it is truly beneficial to fast develop a manufacturing system.


PUBLIC INTEREST STATEMENT
Petri nets are a graphical and mathematical model widely applied in the field of systems engineering. It is a promising tool for describing information systems that are characteristic of concurrency, parallelism, distribution, nondeterminism, probability, time, fuzziness, and so on. Due to a graphical model, Petri nets can be used to act as a visualization aid similar to flowcharts. However, the flowcharts do not have all abovementioned characteristics. In this article, the manufacturing processes are modelled by using Petri net tools for the purpose of optimizing and reducing manufacturing costs. Meanwhile, three Petri net simulation software tools, namely, HiPS, PIPE, and WoPeD, are open sources, which are free of charge and easy to use. Thus, it is the main reason for modeling and analyzing the smart manufacturing systems by using Petri nets from the view-points of practical applications.

Introduction
A skillful system developer always knows that the most important quality is to functionally keep correct and to save some resources. Thus, the workflow processes can run smoothly. It is a big risk for manufacturing companies to just put a software/hardware system into practice without any verification procedure (Kalistratov, 2019). The most effective solution to this issue is model simulation. Model simulation allows us to obtain safer systems and perform program testing and to minimize the cost and extra time span (Consuelo, 2020). Therefore, it can help us protect companies' resources and business. Additionally, developing correct systems is also a vital task as it helps us enhance the performance and eliminate the bugs inside, which can be performed well through model simulation (Bakri et al., 2021). Obviously, the simulation tools have made their great contributions to software engineering or systems engineering.
Currently, some simulation tools use Petri net (PN) theory as a basis for the discrete event systems. PN is a graphical and mathematical model, which offers several characteristics of a system, including concurrent, asynchronous, distributed, parallel, nondeterministic, stochastic features, and so on (Perez-Palacin et al., 2019). It can be considered as a great modeling technique, which was developed by Dr. Carl Adam Petri in 1962 (Brauer & Reisig, 2009). Since then, a variety of systems have been developed based on PN theory (Souravlas and Roumeliotis, 2015;Chakraborty, 2019). It allows the system developers to simulate their systems for analysis and verification. Thus, they can deal with the behavioral and structural properties of the PN model. Moreover, Petri nets have been extended to have colored, timed, fuzzy, and hierarchical features (Hou et al., 2014;Lv et al., 2013). This leads to the establishment and development of various PN simulators to serve as the uprising demands for the integrated functions. However, the downside of this trend is that PN tool users might find it hard to select a suitable one.
To solve the above-stated problem, this paper aims to survey three PN software tools in common use, namely, HiPS, PIPE, and WoPeD, which are graphical PN simulators designed to be friendly and easy to use (Pla, et al., Jun. 2014). Furthermore, they are all distributed online without any charge. These benefits make the trio become recommendable to any researcher or system developer intending to use these simulators. However, each one has its own advantages and disadvantages, as well as different capabilities of the specific use case.
Although there have already been some works comparing different PN tools, for example, the works by references (Osman & Harrison, 2019;Thong & Ameedeen, 2014), none of them discussed the differences among HiPS, PIPE, and WoPeD. Our main goal is to clarify their unknown properties, and to help users get a clear idea about their strengths. For these reasons, we not only compare three tools based on their specialties and features available, but also conduct practical experiments to present their behavioral properties of one PN model. One chosen example is 1-wire search algorithm (Maxim Integrated Inc, 2018), which has been applied in a wide range of products manufactured by Maxim Integrated Corporation, so that the system developer can fast determine the PN tool of interest.
The remainder of this paper is organized as follows: Section 2 presents the definitions of important terms, the PN tools, and related work. Our proposed approach is illustrated in Section 3. Section 4 provides the main results with five comparison aspects. Finally, the remarkable conclusion is given in Section 5.

Literature review
This Section first presents the definitions of PN theory, including its basic properties and analysis methods. Then three PN tools regarding HiPS, PIPE, and WoPeD are briefly presented.

Petri net theory
A basic PN is a bipartite graph with two elements, namely, place and transition that are connected by a directional arc (Shen et al., 2018).
A Petri net structure PN = (P, T, F, W) without any specific initial marking is denoted by PN. A Petri net with the given initial marking is denoted by (PN, M 0 ). A Petri net is ordinary if all arc weights are 1's. A state machine is a Petri net in which every transition has exactly one incoming arc and one outgoing arc. A transition t is said to be enabled if each input place p of t is marked with at least w(p,t) tokens, where w(p,t) denotes the weight of an arc from p to t. An enabled transition may or may not fire, depending on whether the event occurs or not.
Definition 2: Behavioral properties of PN are referred to as initial marking-dependent properties, including the following properties (Shen et al., 2018): (1) Reachability: M ∈ R(M 0 ). M = A T x + M 0 , where A denotes an incidence matrix; M 0 denotes initial marking; M denotes final marking; x denotes a transition firing vector.
(7) Synchronic Distance: It means a metric closely related to a degree of mutual dependence between two events, i.e. synchronic distance between two transitions t 1 and t 2 , denoted as d 12 = max{σ(t 1 )-σ(t 2 )}.
Definition 3: Structural properties of PN are referred to as initial marking-independent properties, including the following properties (Shen et al., 2018): (1) Structural Liveness: A PN is said to be structurally live if there exists a live initial marking in PN.
(2) Controllability: If a Petri net PN with m places is completely controllable, then Rank | A | = m.
Definition 4: The analysis methods of Petri nets are classified into the following two groups: (1) Coverability Tree: Given a Petri net (PN, M 0 ), from the initial marking M 0 , we can obtain as many "new" markings as the number of enabled transitions. From each new marking, we can again reach more markings. This process results in a tree-presentation of the markings.
(2) Incidence Matrix and State Equation: Incidence Matrix: For a PN with n transitions and m places, the incidence matrix A = [a ịj ] is an n x m matrix of integers and its typically entry is given by Þ is the weight of the arc from transition i to its output place j and where a À ij ¼ w i; j ð Þ is the weight of the arc from its input place i to transition j.

State Equation:
A marking M k can be written as an m x 1 column vector, M k ¼ M kÀ 1 þ A T u k , where k = 1, 2, . . . and u k is an n x 1 column vector of k th transition firing.
Suppose that a destination marking is reachable from M 0 through a transition firing sequence u 1 ; u 2 ; . . . ; u d f g: Writing the state equation for i = 1, 2, . . ., d and summing them up, we obtain M d ¼

HiPS, PIPE, and WoPeD
Hierarchical Petri net Simulator (HiPS) is a Petri net tool implemented in C# and C++ on the.NET framework. The tool has been designed to advance operational ability and to improve the execution speed by applying multi-threading into the system. HiPS has an intuitive Graphical User Interface (GUI) which supports hierarchical models and can be used to analyze the behavioral and structural properties of a Petri net by generating the state spaces through multi-threading (Harie et al., 2017). The work by Kavi et al. introduced C2 Petri, which employs multi-threading to create Petri nets simulations (Zhang, 2016). However, there remain limited capabilities for now. (PIPE) is an open source and platform-independent software system for modelling and analyzing Petri nets. This tool is implemented in Java to achieve the independence from different platforms. The designers also created a good-looking and handy GUI that allows users to handle Petri nets with the XML/PNML interchange format. Ultimately, PIPE offers a full suite of analysis modules which allows users to check the behavioral properties, to perform data statistics, and to conduct PN comparison and classification (Bonet et al., 2017). (WoPeD) is also a Java-based software tool like PIPE for PN modeling and analysis. In the WoPeD editor, users can create, modify, and export PNs which are like a workflow; and create hierarchical sub-processes to deal with huge system models. Moreover, it also allows users to modify the model's resources with parameters like objects, roles, and groups on a graphical editor. Finally, WoPeD supports the conversion function between two common models (Freytag & Sänger, 2014).

Related work
Z. Li, M. Zhou, and N. Wu proposed a deadlock-free scheduling algorithm for the automated manufacturing systems, combining deadlock control strategies with hybrid heuristic search (Ekmekci et al., 2016;Li et al., 2019). The deadlock control strategy prevents the siphon from being empty by installing a central place and associated arcs to each of the minimal siphons. The hybrid heuristic search is based on the state space exploration and therefore it encounters the problem of state space explosion. To reduce the state space explosion, the search space is limited in the local search window. They developed a deadlock-free heuristic search algorithm by embedding the deadlock avoidance strategy in the search processes.
G. Mejía, J. P. Caballero-Villalobos, and C. Montoya proposed a concept of siphon based on PN theory to avoid deadlocks from the flexible manufacturing system (FMS) (Dwyer et al., 2020). They proposed a controllable siphon-based algorithm and established a deadlock prevention strategy.

Proposed approach
In this Section, our proposed approach aims to compare HiPS, PIPE, and WoPeD in detail. Three tools are discussed in several aspects required for performance evaluation, and we can make a smart selection from the three PN tools.

PN software installation
First, we are required to activate the system programs. All of them are freely distributed on sourceforge.net, i.e. a web-based service that provides software system developers with a centralized online location to control and manage free and opensource software projects. The tested versions are HiPS1.1.12, PIPE4.3.0 and WoPeD3.2.0. For HiPS and WoPeD, it is necessary to run the setup files to install the software systems on the machine. However, PIPE is an instant program as we only need to run the.bat launching file to open the editor. Then, the general information of three tools from their self-introduction utilities regarding the development characteristics, compatible environment, and the types of Petri net supported, is all included.

Feature comparison
It is important that a software interface and its simulation results are simple and easy to understand. From the interfaces of PN tools, their integrated features are placed for comparison, divided into two categories, namely, model editing with simulation features and model analysis features.
For the editing with simulation features, Table 1 describes the basic tools required for PN simulators and the one which is supported by the software systems among HiPS, PIPE, and WoPeD. The features which are available to users in the tested versions are all marked as "X", while a blank box denotes the feature unsupported. In total, nearly 20 features are used to verify their presence in the software, as a demonstration of the quality of the user interface. They are the file operators, workspace editors, net drawing tools, and simulation options.
Tables 2 and 3 are constructed for the analysis modules available, as they are essential for model checking and verification. As we aim to compare the performance of the simulators, the analysis tools investigated are only related to the behavioral and structural properties, together with two analysis methods. The detailed description of these properties and methods has been presented in Section 2.1. The last row in Table 2 indicates whether the tools possess enhanced analysis features or not, like net classification. For the basic feature comparison, we also use X marks to denote the modules covered by the observed version of each software tool.

Performance comparison by case study
To give the readers a visualized experience in recommending PN tools, one common algorithm has been employed for constructing PN models, which are further used for performance comparison. Formally and easily conducting experiments is favorable to the demonstration for PN tool users. Hence, we promote this algorithm to result in ordinary state machines after transformation. The advantages of an ordinary state machine are that they are easy to manage and the total number of tokens remains unchanged in the entire processes.
The 1-wire search algorithm (Maxim Integrated Inc, 2018) was defined and provided by Maxim Integrated corporation for application in their 1-wire device family, i.e., DS2483, DS18B20, and DS1482. 1-wire is a device communication protocol designed by Dallas Semiconductor Corporation, defined as multiple devices which can share the same bus on one line for transmitting and receiving signals. Thus, each device on the bus must be assigned a unique address. Thus, each Maxim's 1-wire device has a 64bit unique registration number in read-only-memory (ROM) which is used to navigate them by a 1-wire master in a 1-wire network. If the number of the device's ROMs is unknown, then they can be found by using the 1-wire search algorithm. The 1-wire search algorithm considered a binary tree whose branches are followed until a device's ROM number is found as a leaf. The search procedure continues until all devices participating are discovered (Maxim Integrated Inc, 2018), which is then transformed into a Petri net model serving as a case study. Because this algorithm required multiple procedures in search of multiple loops to exactly find every device on the shared bus, the equivalent Petri net model is complicated, but it remains as a state machine. Hence, we qualify this model as a good candidate to test the exactness of the simulator.
From the above-stated algorithm, we use the flowchart-to-Petri-net transformation scheme (Shen et al., 2018) to obtain Petri nets for simulation, which are known as ordinary state machines. Figures 1, 2, and 3 represent the transformed 1-wire search Petri nets drawn by HiPS, PIPE, and WoPeD, respectively. Regarding the models for 1-wire search algorithm, only HiPS and WoPeD support hierarchical modeling. Therefore, we can break the bulky net into another sub-page. In contrast, the model is displayed totally in just one page by PIPE simulator, which might cause confusion in tracking the Petri net.
With these models, we perform simulations with the analysis module of each PN tool. Hereby, all PN tools must be able to precisely deal with the basic PN models. Every property checking tool for behavioral and structural properties is required to accurately return results, and the modules for analysis methods can exactly provide reports about the Petri net verified. All the tools must also be stable in the whole experiment. These sorts of qualities can be checked and compared from the basic analysis modules activated. As the number of features provided by these tools is too huge and we are unable to cover everything, only the noticeable outcome is given in the last part of the results. The result first provides a test report regarding the achievement from the tool with supporting most analysis modules, and then make a comparison for the similarities and differences among three simulators. These works can give a clear point of view about their quality and the distinction among them. The resulting comparison might become valuable fundamentals to determine the appropriate software tool for PN tool users according to their desires.

Main results
In this Section, the general information about HiPS, PIPE, and WoPeD is first presented in Table 1. The next Sub-sections show the resulting comparison in editing, simulation, and analysis features. Last, from the simulation experiment, some significant statements regarding the software performance on three Petri net models are provided, giving a recommendation on tool selection for users.

Main findings of the present study
Some general facts regarding the licensed years, developing language, operating system, and types of Petri net supported are shown in Table 1.
Among three PN tools, HiPS has been licensed and developed later. However, compared to other two software tools, PIPE and WoPeD, developed in Java language, it supports fewer operating systems and types of Petri net. For a higher version of HiPS, HiPS 2 does support colored Petri net.

Comparison with other studies
In this Sub-section, the features offered by the PN tools are compared with one another, as shown in Table 2. As a PN tool recommendation, all the PN tools have graphical editors and interactive simulators which are quite readable and easy to handle.
Meanwhile, among the trio, HiPS seems to support fewer options for users than other two competitors. The biggest inconvenience about HiPS is that it does not support manual simulation for all types of PN. Regarding PIPE and WoPeD, the weakness of PIPE is the lack of hierarchical modeling as stated before, while the problem for WoPeD is that the arc weight cannot be modified and always remains 1. However, PIPE and WoPeD have their own additional editing tools, like inhibitor arc for PIPE and multiple windows for WoPeD.

Implification and explanation of findings
The features available to model analysis are considered as a key factor for Petri net tool selection. The modules available for analyzing the behavioral properties, structural properties, and analysis methods are presented in Table 3. Obviously, three PN tools do not support analyzers for coverability, persistence, structural liveness, and controllability.  In contrast to editor and simulator supported, HiPS provides significant greater quantity of basic analysis tools than PIPE and WoPeD. Two Java-developed software systems only allow users to verify a few essential properties such as reachability, boundedness, liveness, and coverability tree. However, they do support tools for analyzing other noticeable characteristics. WoPeD can do capacity planning and quantitative simulation, as well as edit and visualize process metrics with their relation to the process graph. PIPE, as opensource software, not only provides a suite of analysis modules, but also allows users to install other packages, including system developersupported and user-defined modules, into the suite. Consequently, the verification potential in PIPE is higher than that in HiPS. Some interesting modules in PIPE are net classification, comparison, minimal siphons and minimal traps, and response time analysis.
Thus, each PN tool has its own applicability in each use case. Yet, HiPS has been proved that it is the best choice of PN simulator regarding sufficient analysis modules, which is simple and adequate.

Strengths and limitations
With regards to observing the capability of HiPS, PIPE, and WoPeD in practical simulation, the trio conducted one experiment to reveal their effective performance. The results and related comparison are presented hereafter. From the comparative study in Section 4.3, HiPS is the simulator supporting with most features analysis, and its overall results are chosen to display as a table in the corresponding use case. Then, the results from PIPE and WoPeD are compared with HiPS's outcome to show their similarity and contrast among them.

1-wire search
The behavioral properties, structural properties, and analysis methods for 1-wire search are summarized in Table 4.
In Table 4, the 1-wire search net satisfies almost all the properties of Petri nets through HiPS's analysis, as its nature is an ordinary state machine. However, liveness returns a deadlock when the token reaches place P29 after firing transition T38, which is not exact because the token cannot move anymore just due to its staying at the terminal. Deadlock checking is an important task for PN analysis because this has been viewed as a huge problem for many resource allocation systems over the last decade (Barylska et al., 2020;Helouet & Kecir, 2020). Hence, this kind of result needs to be avoided to improve the reliability of the analysis stage. To do that, we can simply add a computation node N40 corresponding to transition T40 between the start and the final places. The additional node, i.e. transition, represents the restart of a process, assuring that it can run repeatedly without standoff state. Another issue is that the reversibility calculating module takes a huge amount of time, so this feature needs to be improved in the future release of the software tool. The FC/AC Liveness/Safeness Checker module is suffered from a transparent appearance (Davison et al., 2020). Apart from that, the reduction rules are helpful features as they assist users in automatically decreasing the complexity of the PN model.
For PIPE and WoPeD, these simulators also produce the same results as HiPS in reachability, boundedness, T-invariant, and S-invariant. The identical outcomes among HiPS, PIPE, and WoPeD mutually show the accuracy in their computation. PIPE also experienced one deadlock in the sink place, and this problem can also be solved by an additional transition T40 like HiPS. However, by WoPeD, as this tool is designed for the workflow-like PNs, the deadlock in the sink place is automatically eliminated. Thus, the result from the net by WoPeD is liveness, which is deadlock free. Otherwise, both PIPE and WoPeD provide a user-friendly interface representing coverability tree, together with other enhanced analyzers which enable users to feel more confident in the validity of the PN.
The similar reports in the 1-wire search case are also retrieved by PIPE and WoPeD. There is only one noticeable phenomenon related to WoPeD's behavior as we observe from the experiment. The incident is that due to bulky size of the net, when we open a property-editing window for a transition near the net's bottom, it might appear outside the desktop screen. This bug causes the editor blocked from other actions, which is like a functioning stop. One temporarily solution to resolving this problem is resizing the net in the workspace to be smaller so that we can get the editor appearing inside the screen.

PN tool recommendation
One case study has proved that three tools are able to accurately perform their analysis modules available to simple PNs, despite some minor limitations. Regarding the strengths and weaknesses of each tool, we provide some reasonable clues about suitable options for PN tool users.
HiPS's disadvantages include the lack of supporting operating system, editing tools, and simulation functions in comparison with PIPE and WoPeD. However, it outweighs two Java programmed software systems in the basic analysis aspect. Therefore, we recommend HiPS for people starting to study the properties and analysis methods of PNs, which required an easy-to-use and adequate supporting tool. Nevertheless, the reversibility checking module is not approved due to its poor performance.
On the other hand, PIPE and WoPeD are great but simple software tools for PN designation and testing, thanks to their convenient drawing and simulation components. In addition, users beginning to be familiar with ordinary PNs can also enhance their skills and proficiency with other PN classes, characteristics, and verification methodologies through the extended options supported by these simulators.
Last but not the least, HiPS, PIPE, and WoPeD usage can always be combined to achieve higher efficiency in the study of PN tools. To illustrate an example, we can use PIPE or WoPeD to first simulate the behaviors of a PN model. Thus, three tools might be applied together to analyze every single characteristic of that net for more information and to verify the correctness of the system developed.

Conclusion
In this paper, the utilities of HiPS, PIPE and WoPeD have been completely surveyed for PN tool users. As computer simulation can obtain safer systems, perform program testing, and minimize the manufacturing cost and extra time span, it helps us protect companies' resources and business. Most importantly, fast developing some manufacturing systems is also a vital task because it can enhance the system performance and eliminate the bugs inside, which are performed well through model simulation. Consequently, the simulation tools have made their great contributions in the field of systems engineering.
The contributions of this work include the following items: (1) It provides users with the general information about three practical simulators based on PN theory.
(2) Some experiments were conducted to examine their strengths and limitations depending on their use case. HiPS has shown its benefits in analyzing PN basic properties. On the other hand, PIPE and WoPeD have presented their favors to PN design and simulation, as well as their potential functions for system verification and performance evaluation.
(3) The suitable simulator for PN tool users can be recommended, giving a clear idea about how the tools should be appropriately applied based on their own advantages. In consequence, these three PN simulation tools have their own potentials for assisting users in quickly managing PN properties for the flexible manufacturing system development.
(4) The well-known 1-wire search algorithm was illustrated to clearly identify the strengths and limitations of the three PN tools.

Future direction
Our future research on this topic will provide deeper information about the analysis modules for PIPE and WoPeD together with exploiting HiPS 2 usage. In other words, if we can determine their more practical applications, we will gain more experiences in the smart selection from the three PN modeling tools. In addition to these three PN simulation tools, more PN-related ones will be further explored.