**Timed Petri Nets**

22 Petri Nets

[43] McMillan, K. [1995]. A technique of a state space search based on unfolding, *Formal*

[44] Moriya, E. [1973]. Associate languages and derivational complexity of formal grammars

[45] Murata, T. [1989]. Petri nets: Properties, analysis and applications, *Proceedings of the IEEE*

[46] Peterson, J. [1976]. Computation sequence sets, *J. Computer and System Sciences* 13: 1–24. [47] Peterson, J. [1981]. *Petri net theory and modeling of systems*, Prentice-Hall, Englewood

[51] Rozenberg, G. [1976]. More on ET0L systems versus random context grammars, *IPL*

[52] Rozenberg, G. & Salomaa, A. (eds) [1997]. *Handbook of formal languages*, Vol. 1–3, Springer. [53] Rozenberg, G. & Vermeir, D. [1978a]. On ET0L systems of finite index, *Inf. Contr.*

[54] Rozenberg, G. & Vermeir, D. [1978b]. On the effect of the finite index restriction on several

[55] Rozenberg, G. & Vermeir, D. [1978c]. On the effect of the finite index restriction on several families of grammars; Part 2: context dependent systems and grammars, *Foundations of*

[56] Selamat, M. & Turaev, S. [2010]. Grammars controlled by petri nets with place capacities, *2010 International Conference on Computer Research and Development*, pp. 51–55. [57] Starke, P. [1978]. Free Petri net languages, *Mathematical Foundations of Computer Science*

[59] Stiebe, R. & Turaev, S. [2009a]. Capacity bounded grammars, *Journal of Automata,*

[60] Stiebe, R. & Turaev, S. [2009b]. Capacity bounded grammars and Petri nets, *EPTCS*

[61] Stiebe, R. & Turaev, S. [2009c]. Capacity bounded grammars and Petri nets, *in* J. Dassow, G. Pighizzini & B. Truthe (eds), *Eleventh International Workshop on Descriptional Complexity*

[62] Turaev, S. [2007]. Petri net controlled grammars, *Third Doctoral Workshop on Mathematical and Engineering Methods in Computer Science, MEMICS 2007*, Znojmo,

[63] Turaev, S., Krassovitskiy, A., Othman, M. & Selamat, M. [2011]. Parsing algorithms for grammars with regulated rewriting, *in* A. Zaharim, K. Sopian, N. Mostorakis & V. Mladenov (eds), *Recent Researches in Applied Informatics and Remote Sensing. The 11th WSEAS International Conference on APPLIED COMPUTER SCIENCE*, pp. 103–109. [64] Turaev, S., Krassovitskiy, A., Othman, M. & Selamat, M. [2012]. Parsing algorithms for regulated grammars, *Mathematical Models & Methods in Applied Science* . (to appear). [65] Zetzsche, G. [2009]. Erasing in petri net languages and matrix grammars, *Proceedings of the 13th International Conference on Developments in Language Theory*, DLT '09,

[48] Paun, G. [1977]. On the index of grammars and languages, ˇ *Inf. Contr.* 35: 259–266. [49] Paun, G. [1979]. On the family of finite index matrix languages, ˇ *JCSS* 18(3): 267–280. [50] Reisig, W. & Rozenberg, G. (eds) [1998]. *Lectures on Petri Nets I: Basic Models*, Vol. 1491 of

*Methods in System Design* 6(1): 45–65.

358 Petri Nets – Manufacturing and Computer Science

77(4): 541–580.

*LNCS*, Springer, Berlin.

Cliffs, NJ.

5(4): 102–106.

38: 103–133.

3: 193–203.

and languages, *Information and Control* 22: 139–162.

families of grammars, *Inf. Contr.* 39: 284–302.

*1978*, Vol. 64 of *LNCS*, Springer, Berlin, pp. 506–515.

*of Formal Systems, Magdeburg, Germany*, pp. 247–258.

Czechia, pp. 233–240. ISBN 978-80-7355-077-6.

Springer-Verlag, Berlin, Heidelberg, pp. 490–501.

*Languages and Combinatorics* 15(1/2): 175–194.

[58] Starke, P. [1980]. *Petri-Netze*, Deutscher Verlag der Wissenschaften.

*Control Engineering* 3(3): 126–142.

José Reinaldo Silva and Pedro M. G. del Foyo

Additional information is available at the end of the chapter

http://dx.doi.org/10.5772/50117

**1. Introduction**

In the early 60's a young researcher in Darmstadt looked for a good representation for communicating systems processes that were mathematically sound and had, at the same time, a visual intuitive flavor. This event marked the beginning of a schematic approach that become very important to the modeling of distributed systems in several and distinct areas of knowledge, from Engineering to biologic systems. Carl Adam Petri presented in 1962 his PHD which included the first definition of what is called today a Petri Net. Since its creation Petri Nets evolved from a sound representation to discrete dynamic systems into a general schemata, capable to represent knowledge about processes and (discrete and distributed) systems according to their internal relations and not to their work domain. Among other advantages, that feature opens the possibility to reuse some experiences acquired in the design of known and well tested systems while treating new challenges.

In the conventional approach, the key issue for modeling is the partial ordering among constituent events and the properties that arise from the arrangement of state and transitions once some basic interpretation rules are preserved. Such representation can respond from several systems of practical use where the foundation for analysis is based in reachability and other property analysis. However, there are some cases where such approach is not enough to represent processes completely, for instance, when the assumption that all transitions can fire instantaneously is no longer a good approximation. In such cases a time delay can be associated to firing transitions. This is absolutely equivalent (in a broader sense) to say that firing pre-conditions must hold for a time delay before the firing is completed. The first approach is called T-time Petri Net and the second P-time Petri Nets.

Thus, what we have in conclusion is that even in a hypothesis that we should consider only firing pre-conditions1 [31][19] a time delay is associated with a transition location and consequently to its firing. Several applications in manufacturing, business, workflow and

<sup>1</sup> In many text books and review articles the enabling condition is presented using only firing pre-conditions as a requirement. This can be justified since the use of this week firing condition is sufficient if a complete net, that is, that includes its dual part, is used

©2012 Silva and del Foyo, licensee InTech. This is an open access chapter distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. ©2012 Silva and del Foyo, licensee InTech. This is a paper distributed under the terms of the Creative CommonsAttribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

other processes can use this approach to represent processes in a more realistic way. It is also true tat even with a simple approach a strong representation power can be derived, including the possibility to make some direct performance analysis [29][42]. This is called a time slice or a time interval approach. In general, this augmented nets with time delay (P-time, T-time or even both) are called Timed Petri Nets2.

Definition 1. [Petri Net] A Petri net structure is a directed weighted bipartite graph

where

to places

simple Petri Net.

*P* is the finite set of places, *P* � ∅ *T* is the finite set of transitions, *T* � ∅

positive integer greater than zero.

behavior of the modeled system.

*w* : *A* → {1, 2, 3, . . .} is the weight function on the arcs.

**Figure 1.** A marked Petri net and it respective marking vector M

Fig. 1 for instance we have *Pre*(*b*1, *a*3) = 1 and *Pos*(*b*3, *a*3) = 3.

*N* = (*P*, *T*, *A*, *w*)

Timed Petri Nets 361

*A* ⊆ (*P* × *T*) ∪ (*T* × *P*) is the set of arcs from places to transitions and from transitions

We will normally represent the set of places by *P* = {*p*1, *p*2,..., *pn*} and the set of transitions *T* = {*t*1, *t*2,..., *tm*} where |*P*| = *n* and |*T*| = *m* are the cardinality of the respective sets. A typical arc is of the form (*pi*, *tj*) or (*tj*, *pi*) according to arc direction, where its weight *w* is a

Definition 2. [Marked Petri Net] A marked Petri net is a five-tuple (*P*, *T*, *A*, *w*, *M*) where

Thus, a marking is a row vector with |*P*| elements. Figure 1 shows a possible marking for a

The relational functions *Pre*, *Pos* : *P* × *T* → **N** are defined to obtain the number of tokens in places *pi*, *pj* which are preconditions or postconditions of a transition *t* ∈ *T*, that is, there exists arcs (*pi*, *t*),(*pj*, *t*) ∈ *A* for the *Pre* function or (*t*, *pi*),(*t*, *pj*) ∈ *A* for the *Pos* function. In

Using Petri nets to model systems imply in associate net elements (places or transitions) to some components and actions of the modeled system, turning out in what is called "labeled" or "interpreted" nets. The evolution of marking in a labeled Petri nets describes the dynamic

(*P*, *<sup>T</sup>*, *<sup>A</sup>*, *<sup>w</sup>*) is a Petri Net and *<sup>M</sup>* is a marking, defined as a mapping *<sup>M</sup>* : *<sup>P</sup>* <sup>→</sup> **<sup>N</sup>**<sup>+</sup>

There are also cases where it is necessary to use more than time delays. In such cases the time is among the variables that describes the state (a set of places in Petri Nets). Notice that raising the number of variables that characterize a state would make untreatable the enumeration of a net state space. Therefore, a more direct approach is adopted, where each transition is associated to a time interval *tmin* and *tmax* where the first would stand for the minimal waiting time since the enabling until a firing can occur. Similarly, *tmax* stands for the maximum waiting time allowed since enabling up to a firing.

If the time used in the model is a real number, then we call that a Time Petri Net. It should be also noticed that if *tmin* = *tmax* the situation is reduced to the previous one where a deterministic time interval is associated to a transition. Thus, Time Petri Net is the more general model which can be used to model real time systems in several work domains, from electronic and mechatronic systems to logistic a business domains.

In this chapter we focus in the timed systems and its application which are briefly described in section 2. In section 3 we will present a perspective and demand for a framework to model, analysis and simulation of timed (and time) systems mentioning the open discussion about algorithms and approaches to represent the state space. That discussion will be oriented by the recent advances to establish a standard to Petri Nets in general that includes Timed and Time Petri Nets as a extension. Such standard is presented in ISO/IEC 15.909 proposal launched for the first time in 2004. A short presentation of what could be a general formalization to Time Petri Nets is done in section 4. Concluding remarks are in section 5.
