Petri net
A Petri net, also known as a place/transition net (PT net), is one of several mathematical modeling languages for the description of distributed systems. It is a class of discrete event dynamic system. A Petri net is a directed bipartite graph that has two types of elements: places and transitions. Place elements are depicted as white circles and transition elements are depicted as rectangles. A place can contain any number of tokens, depicted as black circles. A transition is enabled if all places connected to it as inputs contain at least one token. Like industry standards such as UML activity diagrams, Business Process Model and Notation, and event-driven process chains, Petri nets offer... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
A Petri net, also known as a place/transition net (PT net), is one of several mathematical modeling languages for the description of distributed systems. It is a class of discrete event dynamic system. A Petri net is a directed bipartite graph that has two types of elements: places and transitions. Place elements are depicted as white circles and transition elements are depicted as rectangles. A place can contain any number of tokens, depicted as black circles. A transition is enabled if all places connected to it as inputs contain at least one token. Like industry standards such as UML activity diagrams, Business Process Model and Notation, and event-driven process chains, Petri nets offer a graphical notation for stepwise processes that include choice, iteration, and concurrent execution. Unlike these standards, Petri nets have an exact mathematical definition of their execution semantics, with a well-developed mathematical theory for process analysis. Definition 1. A net is a tuple N = (P, T, F) where and are disjoint finite sets of places and transitions, respectively. F \subseteq (P \times T) \cup (T \times P) is a set of (directed) arcs (or flow relations). Definition 2. Given a net N = (P, T, F), a configuration is a set C so that . Definition 3. An elementary net is a net of the form EN = (N, C) where N = (P, T, F) is a net. C is such that is a configuration. Definition 4. A Petri net is a net of the form PN = (N, M, W), which extends the elementary net so that N = (P, T, F) is a net. is a place multiset, where Z is a countable set. M extends the concept of configuration and is commonly described with reference to Petri net diagrams as a marking. is an arc multiset, so that the count (or weight) for each arc is a measure of the arc multiplicity. If a Petri net is equivalent to an elementary net, then Z can be the countable set {0,1} and those elements in P that map to 1 under M form a configuration. Similarly, if a Petri net is not an elementary net, then the multiset M can be interpreted as representing a non-singleton set of configurations. In this respect, M extends the concept of configuration for elementary nets to Petri nets. In the diagram of a Petri net (see top figure right), places are conventionally depicted with circles, transitions with long narrow rectangles and arcs as one-way arrows that show connections of places to transitions or transitions to places. If the diagram were of an elementary net, then those places in a configuration would be conventionally depicted as circles, where each circle encompasses a single dot called a token. In the given diagram of a Petri net (see right), the place circles may encompass more than one token to show the number of times a place appears in a configuration. The configuration of tokens distributed over an entire Petri net diagram is called a marking. In the top figure (see right), the place p 1 is an input place of transition t; whereas, the place p 2 is an output place to the same transition. Let PN 0 (top figure) be a Petri net with a marking configured M 0 , and PN 1 (bottom figure) be a Petri net with a marking configured M 1 . The configuration of PN 0 enables transition t through the property that all input places have sufficient number of tokens (shown in the figures as dots) "equal to or greater" than the multiplicities on their respective arcs to t. Once and only once a transition is enabled will the transition fire. In this example, the firing of transition t generates a map that has the marking configured M 1 in the image of M 0 and results in Petri net PN 1 , seen in the bottom figure. In the diagram, the firing rule for a transition can be characterised by subtracting a number of tokens from its input places equal to the multiplicity of the respective input arcs and accumulating a new number of tokens at the output places equal to the multiplicity of the respective output arcs. Remark 1. The precise meaning of "equal to or greater" will depend on the precise algebraic properties of addition being applied on Z in the firing rule, where subtle variations on the algebraic properties can lead to other classes of Petri nets; for example, algebraic Petri nets. The following formal definition is loosely based on . Many alternative definitions exist. The flow relation is the set of arcs: F = \{ (x,y) \mid W(x,y) > 0 \} . In many textbooks, arcs can only have multiplicity 1. These texts often define Petri nets using F instead of W. When using this convention, a Petri net graph is a bipartite directed graph (S \cup T, F) with node partitions S and T. The preset of a transition t is the set of its input places: {}^{\bullet}t = \{ s \in S \mid W(s,t) > 0 \} ; its postset is the set of its output places: t^{\bullet} = \{ s \in S \mid W(t,s) > 0 \} . Definitions of pre- and postsets of places are analogous. A marking of a Petri net (graph) is a multiset of its places, i.e., a mapping M: S \to \mathbb{N} . We say the marking assigns to each place a number of tokens. A Petri net (called marked Petri net by some, see above) is a 4-tuple (S,T,W,M_0) , where (S,T,W) is a Petri net graph; M_0 is the initial marking, a marking of the Petri net graph. For a (marked) Petri net N=(S,T,W,M_0) , we are interested in the firings that can be performed starting with the initial marking M_0 . Its set of reachable markings is the set R(N) \ \stackrel{D}{=}\ \left\{ M' \Bigg| M_0 \xrightarrow[(S,T,W)]{*} M' \right\} The reachability graph of is the transition relation \underset{G}{\longrightarrow} restricted to its reachable markings R(N) . It is the state space of the net. A firing sequence for a Petri net with graph and initial marking M_0 is a sequence of transitions \vec \sigma = \langle t_{1} \cdots t_{n} \rangle such that M_0 \underset{G,t_{1}}{\longrightarrow} M_1 \wedge \cdots \wedge M_{n-1} \underset{G,t_{n}}{\longrightarrow} M_n . The set of firing sequences is denoted as L(N) . W^- , defined by \forall s,t: W^-[s,t] = W(s,t) W^+ , defined by \forall s,t: W^+[s,t] = W(t,s). Then their difference W^T = - W^- + W^+ can be used to describe the reachable markings in terms of matrix multiplication, as follows. For any sequence of transitions , write o(w) for the vector that maps every transition to its number of occurrences in . Then, we have R(N) = \{ M \mid \exists w:\ w \text{ is a firing sequence of } N\ \text{ and }\ M = M_0 + W^T \cdot o(w) \} . It must be required that is a firing sequence; allowing arbitrary sequences of transitions will generally produce a larger set. W^{-}=\begin{bmatrix} * & t1 & t2 \\ p1 & 1 & 0 \\ p2 & 0 & 1 \\ p3 & 0 & 1 \\ p4 & 0 & 0 \end{bmatrix}, \ W^{+}=\begin{bmatrix} * & t1 & t2 \\ p1 & 0 & 1 \\ p2 & 1 & 0 \\ p3 & 1& 0 \\ p4 & 0 & 1 \end{bmatrix}, \ W^T=\begin{bmatrix} * & t1 & t2 \\ p1 & -1 & 1 \\ p2 & 1 & -1 \\ p3 & 1 & -1 \\ p4 & 0 & 1 \end{bmatrix} M_{0}=\begin{bmatrix} 1 & 0 & 2 & 1 \end{bmatrix} Petri nets can be described as having different degrees of liveness L_1 - L_4 . A Petri net N=(S, T, W, M_0) is called L_k -live if and only if all of its transitions are L_k -live, where a transition is dead (or L_0 -live), if it can never fire, i.e. it is not in any firing sequence in L(N) L_1 -live (potentially fireable), if and only if it may fire, i.e. it is in some firing sequence in L(N) L_2 -live if it can fire arbitrarily often, i.e. if for every positive integer , it occurs at least times in some firing sequence in L(N) L_3 -live if it can fire infinitely often, i.e. if there is some fixed (necessarily infinite) firing sequence in which for every positive integer , the transition L_3 occurs at least times, L_4 -live (live) if, from any reachable marking, it is possible to reach a marking where the transition can fire, i.e., for any marking M' in R(N) , the transition is L_1 -live in the Petri net N' = (S, T, W, M') Note that these are increasingly stringent requirements: L_{j+1} -liveness implies L_j -liveness, for \textstyle{j \in {1,2,3}} . ==Discrete, continuous, and hybrid Petri nets== As well as for discrete events, there are Petri nets for continuous and hybrid discrete-continuous processes that are useful in discrete, continuous and hybrid control theory, and related to discrete, continuous and hybrid automata. ==Extensions== There are many extensions to Petri nets. Some of them are completely backwards-compatible (e.g. coloured Petri nets) with the original Petri net, some add properties that cannot be modelled in the original Petri net formalism (e.g. timed Petri nets). Although backwards-compatible models do not extend the computational power of Petri nets, they may have more succinct representations and may be more convenient for modeling. Extensions that cannot be transformed into Petri nets are sometimes very powerful, but usually lack the full range of mathematical tools available to analyse ordinary Petri nets. The term high-level Petri net is used for many Petri net formalisms that extend the basic P/T net formalism; this includes coloured Petri nets, hierarchical Petri nets such as Nets within Nets, and all other extensions sketched in this section. The term is also used specifically for the type of coloured nets supported by CPN Tools. A short list of possible extensions follows: Additional types of arcs; two common types are a reset arc does not impose a precondition on firing, and empties the place when the transition fires; this makes reachability undecidable, while some other properties, such as termination, remain decidable; an inhibitor arc imposes the precondition that the transition may only fire when the place is empty; this allows arbitrary computations on numbers of tokens to be expressed, which makes the formalism Turing complete and implies existence of a universal net. In a standard Petri net, tokens are indistinguishable. In a coloured Petri net, every token has a value. In popular tools for coloured Petri nets such as CPN Tools, the values of tokens are typed, and can be tested (using guard expressions) and manipulated with a functional programming language. A subsidiary of coloured Petri nets are the well-formed Petri nets, where the arc and guard expressions are restricted to make it easier to analyse the net. Another popular extension of Petri nets is hierarchy; this in the form of different views supporting levels of refinement and abstraction was studied by Fehling. Another form of hierarchy is found in so-called object Petri nets or object systems where a Petri net can contain Petri nets as its tokens inducing a hierarchy of nested Petri nets that communicate by synchronisation of transitions on different levels. See for an informal introduction to object Petri nets. A vector addition system with states (VASS) is an equivalent formalism to Petri nets. However, it can be superficially viewed as a generalisation of Petri nets. Consider a finite-state automaton where each transition is labelled by a transition from the Petri net. The Petri net is then synchronised with the finite-state automaton, i.e., a transition in the automaton is taken at the same time as the corresponding transition in the Petri net. It is only possible to take a transition in the automaton if the corresponding transition in the Petri net is enabled, and it is only possible to fire a transition in the Petri net if there is a transition from the current state in the automaton labelled by it. (The definition of VASS is usually formulated slightly differently.) Prioritised Petri nets add priorities to transitions, whereby a transition cannot fire, if a higher-priority transition is enabled (i.e. can fire). Thus, transitions are in priority groups, and e.g. priority group 3 can only fire if all transitions are disabled in groups 1 and 2. Within a priority group, firing is still non-deterministic. The non-deterministic property has been a very valuable one, as it lets the user abstract a large number of properties (depending on what the net is used for). In certain cases, however, the need arises to also model the timing, not only the structure of a model. For these cases, timed Petri nets have evolved, where there are transitions that are timed, and possibly transitions which are not timed (if there are, transitions that are not timed have a higher priority than timed ones). A subsidiary of timed Petri nets are the stochastic Petri nets that add nondeterministic time through adjustable randomness of the transitions. The exponential random distribution is usually used to 'time' these nets. In this case, the nets' reachability graph can be used as a continuous time Markov chain (CTMC). Dualistic Petri Nets (dP-Nets) is a Petri Net extension developed by E. Dawis, et al. to better represent real-world process. dP-Nets balance the duality of change/no-change, action/passivity, (transformation) time/space, etc., between the bipartite Petri Net constructs of transformation and place resulting in the unique characteristic of transformation marking, i.e., when the transformation is "working" it is marked. This allows for the transformation to fire (or be marked) multiple times representing the real-world behavior of process throughput. Marking of the transformation assumes that transformation time must be greater than zero. A zero transformation time used in many typical Petri Nets may be mathematically appealing but impractical in representing real-world processes. dP-Nets also exploit the power of Petri Nets' hierarchical abstraction to depict process architecture. Complex process systems are modeled as a series of simpler nets interconnected through various levels of hierarchical abstraction. The process architecture of a packet switch is demonstrated in, where development requirements are organized around the structure of the designed system. There are many more extensions to Petri nets, however, it is important to keep in mind, that as the complexity of the net increases in terms of extended properties, the harder it is to use standard tools to evaluate certain properties of the net. For this reason, it is a good idea to use the most simple net type possible for a given modelling task. In a state machine (SM), every transition has one incoming arc, and one outgoing arc, and all markings have exactly one token. As a consequence, there can not be concurrency, but there can be conflict (i.e. nondeterminism): mathematically, \forall t\in T: |t^\bullet|=|{}^\bullet t|=1 In a marked graph (MG), every place has one incoming arc, and one outgoing arc. This means, that there can not be conflict, but there can be concurrency: mathematically, \forall s\in S: |s^\bullet|=|{}^\bullet s|=1 In a free choice net (FC), every arc from a place to a transition is either the only arc from that place or the only arc to that transition, i.e. there can be both concurrency and conflict, but not at the same time: mathematically, \forall s\in S: (|s^\bullet|\leq 1) \vee ({}^\bullet (s^\bullet)=\{s\}) Extended free choice (EFC) – a Petri net that can be transformed into an FC. In an asymmetric choice net (AC), concurrency and conflict (in sum, confusion) may occur, but not symmetrically: mathematically, \forall s_1,s_2\in S: (s_1{}^\bullet \cap s_2{}^\bullet\neq \emptyset) \to [(s_1{}^\bullet\subseteq s_2{}^\bullet) \vee (s_2{}^\bullet\subseteq s_1{}^\bullet)] ==Workflow nets== Workflow nets (WF-nets) are a subclass of Petri nets intending to model the workflow of process activities. The WF-net transitions are assigned to tasks or activities, and places are assigned to the pre/post conditions. The WF-nets have additional structural and operational requirements, mainly the addition of a single input (source) place with no previous transitions, and output place (sink) with no following transitions. Accordingly, start and termination markings can be defined that represent the process status. WF-nets have the soundness property, indicating that a process with a start marking of k tokens in its source place, can reach the termination state marking with k tokens in its sink place (defined as k-sound WF-net). Additionally, all the transitions in the process could fire (i.e., for each transition there is a reachable state in which the transition is enabled). A general sound (G-sound) WF-net is defined as being k-sound for every k > 0. A directed path in the Petri net is defined as the sequence of nodes (places and transitions) linked by the directed arcs. An elementary path includes every node in the sequence only once. A well-handled Petri net is a net in which there are no fully distinct elementary paths between a place and a transition (or transition and a place), i.e., if there are two paths between the pair of nodes then these paths share a node. An acyclic well-handled WF-net is sound (G-sound). Extended WF-net is a Petri net that is composed of a WF-net with additional transition t (feedback transition). The sink place is connected as the input place of transition t and the source place as its output place. Firing of the transition causes iteration of the process (Note, the extended WF-net is not a WF-net). WRI (Well-handled with Regular Iteration) WF-net, is an extended acyclic well-handled WF-net. WRI-WF-net can be built as composition of nets, i.e., replacing a transition within a WRI-WF-net with a subnet which is a WRI-WF-net. The result is also WRI-WF-net. WRI-WF-nets are G-sound, therefore by using only WRI-WF-net building blocks, one can get WF-nets that are G-sound by construction. The design structure matrix (DSM) can model process relations, and be utilized for process planning. The DSM-nets are realization of DSM-based plans into workflow processes by Petri nets, and are equivalent to WRI-WF-nets. The DSM-net construction process ensures the soundness property of the resulting net. ==Other models of concurrency== Other ways of modelling concurrent computation have been proposed, including vector addition systems, communicating finite-state machines, Kahn process networks, process algebra, the actor model, and trace theory. Different models provide tradeoffs of concepts such as compositionality, modularity, and locality. An approach to relating some of these models of concurrency is proposed in the chapter by Winskel and Nielsen. ==Further reading==
Cite this
"Petri net". 1786378421. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1368716844 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy