0% found this document useful (0 votes)
45 views20 pages

Petrinet Final

This document provides a synopsis for a student project on system designing using Petri nets. It introduces Petri nets as a tool for modeling concurrent and asynchronous systems. The synopsis describes modeling various activities like parallel, conflicting, and sequential activities using Petri nets. It discusses behavioral properties of reachability, safeness, and liveness. Types of Petri nets covered include timed Petri nets, hierarchical nets, and colored Petri nets. The synopsis concludes that Petri nets can be applied to diverse areas like software architecture, distributed systems, and protocol verification.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views20 pages

Petrinet Final

This document provides a synopsis for a student project on system designing using Petri nets. It introduces Petri nets as a tool for modeling concurrent and asynchronous systems. The synopsis describes modeling various activities like parallel, conflicting, and sequential activities using Petri nets. It discusses behavioral properties of reachability, safeness, and liveness. Types of Petri nets covered include timed Petri nets, hierarchical nets, and colored Petri nets. The synopsis concludes that Petri nets can be applied to diverse areas like software architecture, distributed systems, and protocol verification.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

System Designing Using Petri Nets

GURU NANAK INSTITUTE OF TECHNOLOGY

157/ F NILGUNJ ROAD , PANIHATI , SODEPUR , K OLKATA – 114


A FFILIATED TO MAULANA ABUL KALAM AZAD UNIVERSITY OF
TECHNOLOGY

PROJECT SYNOPSIS ON

SYSTEM DESIGNING USING PETRI NETS

Under the Guidance of


Ms. Suparna Karmakar
Assistant Professor

DEPARTMENT OF INFORMATION TECHNOLOGY

GURUNANAK INSTITUTE OF TECHNOLOGY

Submitted by
1. Ekta Kumari 14300212008
2. Pramiti Das 14300212010
3. Rishiraj Sengupta 14300212012

1
CERTIFICATE

This is to certify that the project work titled “SYSTEM DESIGNING USING PETRI
NETS” has been carried out by the following students of Department of Information
Technology under my supervision for the partial fulfillment of requirement of Degree of
Bachelor of Technology (B-Tech) in Information Technology department of Guru Nanak
Institute of Technology affiliated to Maulana Abul Kalam Azad University of Technology
during the academic year 2015-2016.

Ekta Kumari (14300212008)


Pramiti Das(14300212010)
Rishiraj Sengupta(14300212012)

Head of Department Project Supervisor


Ms Baisakhi Das Ms Suparna Karmakar
Head of Department Assistant Professor
(Department of Information Technology) (Department of Information Technology)

Invigilator:

2
ACKNOWLEDGEMENT

We acknowledge our sincere gratitude to the project coordinator Ms.Suparna Karmakar, GNIT,
Kolkata who helped a lot to improve our knowledge in the worked Project. We are extremely
thankful to her for the valuable guidance, helping attitude even in her very busy schedule and
utmost desire to help students for research projects. It has inspired us to come a long way in this
direction. We are thankful to everyone who has helped us a lot to pursue this project work in
college as without their support we could not have get in to the realities. We would like to
express our gratitude to all people who have helped us, directly or indirectly, to make this project
work a success. Finally, I would like to express our gratitude to Ms.Suparna Karmakar for her
guidance during the design and documentation work. Without her enthusiastic and generic help
and inspiration, the project work would never have been a success.
Thank You.

Ekta Kumari (14300212008) ----------------------------------

Pramiti Das (14300212010) ----------------------------------

Rishiraj Sengupta (14300212012) ----------------------------------

3
TABLE OF CONTENT
Abstract
Introduction
Formal Definition of Petri Nets
Transition Firing Rule
Modelling of various activity using Petri Nets Model
 Parallel activity
 Conflict activity
 Sequential activity
 Mutual exclusive

Behavioral properties
 Reachability
 Safeness
 Liveness

Producer Consumer problem

Types of petri nets

 Timed Petri Nets


 Hierarchial Nets
 Colored Petri Nets

Future Scope
Conclusions
References

4
ABSTRACT

The main objective of designing system using petri nets is to present some analysis techniques
for the real time systems. In order to model clearly the synchronization involved in these system,
an extended timed petri nets model is used. Petri nets can be applied to areas as diverse as
software architecture,distributed system design,protocol verification etc. This paper is dedicated
to the Petri Nets techniques used in the Information System Design process. The specification
and verification of an information system in Petri Nets notion are described.

5
INTRODUCTION

Information systems are complex articrafts like airplanes and power plants. Because
society heavily depends on Information System, the system is developed very carefully. This
project synopsis focuses on an essential part of development of information system: the
architecture of the system. We describe architectures using high level Petri Nets. An architecture
is used by the potential users to understand the systems, by programmer who have to construct
parts of it and by persons who have to deploy and maintain the system when it is built. An
important role of an architecture is that it can be used to verify and validate properties of the
system. This process modeling technique was developed in 1962 and its theory and applications
are still being developed further. We use a small part of Petri nets theory, however some parts we
use are quite new. An important part of an architecture can be described by the diagram
techniques of Petri Nets.

Information systems can be characterized by their functions: the generation, presentation,


interpretation, transformation, transportation and storage of information. Information systems are
becoming strong and society is strongly dependent on that. This implies that it becomes more and
more important to develop information system in a systematic and controlled way. The
information system we focus on require many person-years of development so the only way to
develop these systems in a reasonable time is to develop them by team work. This requires a
strong coordination mechanism which allows to divide a system into components that can be
developed in isolation and that are relatively easy to assemble.

Petri nets are a promising tool for describing and studying systems that are
characterized as being concurrent, asynchronous, distributed, parallel, nondeterministic, and/or
stochastic. Petri Nets offer a formalism for modeling concurrent systems, first defined by Carl
Adam Petri in 1962. Petri nets were introduced by C.A. Petri in his Ph.D. Dissertation:
”Kommunikation mit Automaten.” , Institut für Instrumentelle Mathematik, Bonn, 1962. They
are particularly useful for modeling systems with concurrent and asynchronous processing. Petri
nets have been used to model various kinds of dynamic event-driven systems like computers
networks , communication systems( [6] Wang 2006), manufacturing plants ( [2]Venkatesh, Zhou
and Caudill 1994;), command and control systems , real-time computing systems ([3]Mandrioli
and Morzenti 1996;), logistic networks ([4] Landeghem and Bobeanu 2002), and workflows ([5]
Aalst and Hee 2000; Lin, Tian and Wei 2002) to mention only a few important examples.

6
FORMAL DEFINITION OF PETRI NETS
In [1] Petri net is formally defined as a 5-tuple N = (P, T, I, O, M0),

where

(1) P = {p1, p2, …, pm} is a finite set of places;

(2) T = {t1, t2, …, tn} is a finite set of transitions, P ∪ T ≠ ∅, and P ∩ T = ∅;

(3) I: P × T → N is an input function that defines directed arcs from places to


transitions, where N is a set of nonnegative integers;

(4) O: T × P → N is an output function that defines directed arcs from transitions to


places;

(5) M0: P → N is the initial marking.

A Petri net is a particular kind of bipartite directed graphs populated by three types of objects.
These objects are places, transitions, and directed arcs. Directed arcs connect places to transitions
or transitions to places. In its simplest form, a Petri net can be represented by a transition together
with an input place and an output place. This elementary net may be used to represent various
aspects of the modeled systems. For example, a transition and its input place and output place can
be used to represent a data processing event, its input data and output data, respectively, in a data
processing system. In order to study the dynamic behavior of a Petri net modeled system in terms
of its states and state changes, each place may potentially hold either none or a positive number
of tokens. Tokens are a primitive concept for Petri nets in addition to places and transitions. The
presence or absence of a token in a place can indicate whether a condition associated with this
place is true or false

7
TRANSITION FIRING RULE
In[1] order to stimulate the dynamic behavior of the system, a state or marking of a petri nets is
changed according to the following transition firing rules:

1. A transition t is said to be enabled if each input place , p of t is marked with atleast


w(p,t)tokens, where w(p,t) is weight of the arc from p to t.

2. An enabled transition may or may not fire(depending on whether or not the event actually
takes place).

3. A firing of an enabled transition t removes w(p,t) tokens from each input place p to t and
w(t,p)tokens to each output place p to t, where (t,p) is the weight of arc from t to p.

Fig 1

Fig 2

8
MODELLING OF VARIOUS ACTIVITY USING PETRI
NET MODEL
 Parallel Activity: In the PN if transitions t1 and t2 are enabled simultaneously; the
firing of one of them does not modify the state of the other. The activities modelled by the
two transitions run concurrently. In reliability modelling, the PN can represent two
components C1 and C2 I parallel redundancy. In this case, places p1 and p3 represent
the working as shown in fig 3.

Fig 3

 Conflict Activity. : In [6] transitions t1 and t2 are in conflict in Figure 4. Both are
enabled but the firing of any transition leads to the disabling of the other transition. Such
a situation will arise, for example, when a machine has to choose among part types or a
part has to choose among several machines. The resulting conflict may be resolved in a
purely non-deterministic way or in a probabilistic way, by assigning appropriate
probabilities to the conflicting transitions

Fig 4

9
 Sequential Activity: In sequential activity a transition is fired after another one. No
two transitions are fired concurrently. If transition t1 and t2 are enable simultaneously
then one is fired after the other as shown in fig 5.

Fig 5

 Mutually Exclusive: In [6] two processes are mutually exclusive if they cannot be
performed at the same time due to constraints on the usage of shared resources. Figure 6
shows this structure. For example, a robot may be shared by two machines for loading
and unloading. Two such structures are parallel mutual exclusion and sequential mutual
exclusion

Fig 6

10
BEHAVIORAL PROPERTIES
As a mathematical tool, Petri nets possess a number of properties. These properties, when
interpreted in the context of the modeled system, allow the system designer to identify the
presence or absence of the application domain specific functional properties of the system under
design. Two types of properties can be distinguished, behavioral and structural ones. The
behavioral properties are these which depend on the initial state or marking of a Petri net. The
structural properties, on the other hand, do not depend on the initial marking of a Petri net. They
depend on the topology, or net structure, of a Petri net. Here we provide an overview of some of
the most important, from the practical point of view, behavioral properties. They are reachability,
safeness, and liveness.

Reachability: An important issue in [1] designing event-driven systems is whether a system


can reach a specific state, or exhibit a particular functional behavior. In general, the question is
whether the system modeled with a Petri net exhibits all desirable properties as specified in the
requirement specification, and no undesirable ones.

In order to find out whether the modeled system can reach a specific state as a result of a required
functional behavior, it is necessary to find such a transition firing sequence which would
transform a marking M0 to Mi, where Mi represents the specific state, and the firing sequence
represents the required functional behavior. It should be noted that a real system may reach a
given state as a result of exhibiting different permissible patterns of functional behavior, which
would transform M0 to the required Mi. The existence in the Petri net model of additional
sequences of transition firings which transform M0 to Mi indicates that the Petri net model may
not exactly reflect the structure and dynamics of the underlying system. This may also indicate
the presence of unanticipated facets of the functional behavior of the real system, provided that
the Petri net model accurately reflects the underlying system requirement specification. A
marking Mi is said to be reachable from a marking M0 if there exists a sequence of transitions
firings which transforms a marking M0 to Mi as shown in fig 7. A marking M1 is said to be
immediately reachable from M0 if firing an enabled transition in M0 results in M1.

Fig 7

11
Safeness(or Boundedness): In a Petri net, places are often used to represent information
storage areas in communication and computer systems, product and tool storage areas in
manufacturing systems, etc. It is important to be able to determine whether proposed control
strategies prevent from the overflows of these storage areas. The Petri net property which helps to
identify the existence of overflows in the modeled system is the concept of boundedness.

A place p is said to be k-bounded if the number of tokens in p is always less than or equal to k (k
is a non-negative integer number) for every marking M reachable from the initial marking M0,
i.e., M ∈ R(M0). It is safe if it is 1-bounded. A Petri net N = (P, T, I, O, M0) is k-bounded (safe) if
each place in P is k-bounded (safe).

Fig 8

Liveness: The concept of liveness is closely related to the deadlock situation, which has been
situated extensively in the context of computer operating systems. A Petri net modeling a
deadlock-free system must be live. This implies that for any reachable marking M, it is ultimately
possible to fire any transition in the net by progressing through some firing sequence. This
requirement, however, might be too strict to represent some real systems or scenarios that exhibit
deadlock-free behavior. For instance, the initialization of a system can be modeled by a transition
(or a set of transitions) which fire a finite number of times. After initialization, the system may
exhibit a deadlock-free behavior, although the Petri net representing this system is no longer live
as specified above. For this reason, different levels of liveness for transition t and marking M0
were defined. Refer to ([1] Murata 1989) for details.

12
Fig 9

Producer and Consumer Problem: A producer produces objects that are put into a buffer
from which can be removed and consumed by a consumer. The consuming process must be in
sequence with respect to the production process. The PN solution to this problem is reported in
Figure 10. A token in p1 means that the producer is ready to produce. By firing t1 and t2 an
object is produced (a token is put in the buffer p5) and the producer is ready again. If the
consumer is ready to consume (token in p3) and an object is in the buffer, transition t3 can fire
removing one token from p5

In the PN of Figure 10 the production and the accumulation of objects in the buffer is unbounded.
A more realistic situation is obtained by considering a buffer of limited capacity. The
corresponding PN is reported in Figure 7. Place p6 models the free buffer positions and place p5
the filled buffer positions; the number of tokens in p5 and p6 is constant and represents the total
available buffer positions. If a single token is assigned to p6 in the initial marking, we model the
situation in which the producer cannot further produce until the consumer has consumed the
object in the buffer (a strictly sequential ordering of activities)

Fig 10

13
TYPES OF PETRI NETS
Timed Petri Nets
Petri nets can be extended with a concept of time. Timed Petri nets can be used to investigate:
. the correctness of the desired functionality, absence of deadlocks, etc.
. performance of the modeled system, which allows to remove bottlenecks, predict mean waiting
times and average throughput, compare different strategies.

In timed Petri nets each token gets a time stamp telling when this token can be used. We can
specify either fixed or interval delays (i.e., random delays where values are taken from some
interval) for transitions. Let R+ be the set of all non-negative real numbers. For the time set we
will write Q, which is normally either R+ or N.

Definition: A timed Petri net is a tuple N = hP; T; F; min;_max, where:


. P and T are two disjoint non-empty finite sets of places and transitions respectively;
. F : (P X T) U(T X P) -> N is a weight function;
. min;_max : T -> Q are functions for the minimal and the maximal delays of transitions,
satisfying min(t) <=max(t) for any t (subset of) T.

Fig 11

14
HIERARCHICAL PETRI NETS
Most software systems can be regarded as components, which are built from other (smaller)
components. Every component has an interface stating how other components can communicate
with it. It is only at the highest level that we have components that do not communicate with
other components. These components can be seen as ordinary Petri nets. Component technology
induces hierarchical modeling, since the components that we use are themselves built from (sub)
components and so on. Petri nets with hierarchy is the formalism that we shall use for modeling
components. Here we will limit ourselves to hierarchical classical nets; in the sections to come
we will meet .colored. nets with hierarchy. These nets are used to define components

A hierarchical net ‘H’ in following figure contains the subnet ‘U’ with pins ‘x y’ and ‘z’ that has been
;

installed into ‘H’ by connecting pin ‘x’ to place ‘p’, pin ‘y’ to place ‘q’ and pin ‘z’ to outer pin ‘w’.

Fig 12

Definition: A hierarchical net C is a pair (E,R), where E is its interface and a 4-tuple
R = (D,P,f,M) is the decomposition,
where
D is a set of subnets,
P a set of places,
f ( U ( Ed | d ( D)-> (P U EC) )is a function telling which pin of which subnet
is connected to which place or pin of C and M ( bag
P an initial marking

15
COLORED PETRI NETS
In classical Petri nets, we consider flows of tangible and information objects, but we abstract
from their actual properties. If we want to consider the latter, we have to extend our model, thus
arriving at colored nets. Introduced by Kurt Jensen in ([8]Jensen 1981), a Colored Petri Net
(CPN) has its each token attached with a color, indicating the identity of the token. Moreover,
each place and each transition has attached a set of colors. A transition can fire with respect to
each of its colors. By firing a transition, tokens are removed from the input places and added to
the output places in the same way as that in original Petri nets, except that a functional
dependency is specified between the color of the transition firing and the colors of the involved
tokens . In colored nets, tokens have values (called colors for historical reasons). The token
values may have several types (e.g. numbers, strings, booleans). We assume the existence of a set
T of types (note that T is thus a set of sets of values).We will type places, i.e. connect types to
them, so a place p typed with A will only contain tokens of type A. Our set T also contains the
one-point type 1, which has the value * as its only element. A classical Petri net is a colored net
with all places typed with 1.

A marking for a colored net, like the marking for classical nets, records the tokens in the places.
A token in place, say, p posesses a value of type T:p. A place is marked with several tokens, so
the marking of a single place is an element of bag:(T:p). Finally, the marking of the whole net
can be modeled as an element of a dependent product.

16
FUTURE SCOPE
The development of Petri nets has been, to a large extent, motivated by the need to model the
industrial systems. Ordinary Petri nets are not always sufficient to represent and analyze complex
industrial and other systems. This prompted the development of new classes of nets, some of
which are introduced briefly in this section.

Tokens in the ordinary nets have no identity. This posess some problems for modeling systems
such as manufacturing and communication systems, which require the physical resources or
messages, if represented by tokens, to have identity.Without this identity, it is impossible to trace
the flow of different resources or messages in the system. A potential solution is to construct a
model in such a way that the flow of each resource or message is associated with a dedicated
subnet.Since the resources or messages share, in most cases, the same system, all these subnets
are identical. This approach increases the graphical complexity of the model. In order to address
this issue, Petri nets which allow for tokens to have distinct identity were proposed.
These nets, referred to as high-level Petri nets, including

 predicate-transition nets [7]


 colored nets
 nets with individual tokens

The recognition of the need for the qualitative specification of the industrial control, as well as
the need for representing approximate and uncertain information has led to the development
of various types of fuzzy Petri nets which work on If- then condition.

17
CONCLUSION
The Petri net has been defined as a model for systems exhibiting concurrent asynchronous
activities.The major factors that might affect it’s acceptance are concerns regarding the modeling
power and decision power of the model. Although Petri Nets are not only models of
asynchronous concurrent systems , they are equivalent to or include most other models . In
addition they have a certain clearness and cleanness which permits a simple and natural
representation of many systems.

Thus they have gained increasing acceptance in the last decade, and their use is growing. A major
modeling system must provide more than simply a convenient representation system, however. It
must also provide analysis procedures that can be used to determine properties of the modeled
system through the model. Some such analysis procedures for Petri nets do exist, allowing the
analysis of systems for boundedness, conservation, coverability, and reachability of a marking.
However, other properties, such as inclusion or equivalence of two Petri nets, have been shown to
be undecidable. Even though problems such as reachability may be decidable, complexity results
tend to indicate that these problems may be intractable, requiring too much computational time
and space to be practical. Any significant extension of the Petri net model tends to be equivalent
to a Turing machine, and hence analysis of these extensions is not possible due to decidability
problems. The subclasses which have been examined have good decision properties, but may be
too limited for useful modeling. On this topic as on many others relating to Petri nets, much work
remains to be done.

18
REFERENCES
[1] Tadao Murata.”Petri Net :Properties ,Analysis and Applications”,by Proceedings of the
IEEE,77,NO.4,April 1989.

[2]Venkatesh,K.,Kaighobadi,M.,Zhou,M.,C.,and Caudill,R.,”Augmented Timed Petri Nets for


modeling of robotic systems with breakdowns,”Journal of Manufacturing Systems,1994

[3] Mandrioli, D., A. Morzenti, M. Pezze, P. Pietro S. and S. Silva. 1996.” A Petri net and logic
approach to the specification and verification of real time systems”. In: Formal Methods for Real
Time Computing (C. Heitmeyer and D. Mandrioli eds), John Wiley & Sons Ltd.

[4] van Landeghem, Rik and Carmen-Veronica Bobeanu. 2002.” Formal modeling of supply
chain: an incremental approach using Petri nets”. 14th European Simulations Symposium and
Exhibition Dresden, Germany.

[5] van der Aalst, Wil, and Kees van Hee. 2000. Workflow Management: Models, Methods, and
Systems. Massachusetts: MIT Press.

[6] Jiacun Wang.” Petri Nets for Dynamic Event-Driven System Modeling”, in: Handbook of
Dynamic System Modeling, Ed: Paul Fishwick, CRC Press, 2007.

[7] H.J.Genrich and K.1.autenbach.”System modelling with high level Petri Nets”,theoretical
computer science.,vol.13,pp,109-136,1991

[8]Kurt Jensen.”Coloured Petri Nets and the invariant method”,Theoretical Computer


Science(14) 1981 317-336,1981.

19

You might also like