petri nets by barkatllah

16

Click here to load reader

Upload: barkat-ullah

Post on 21-Jun-2015

213 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Petri nets by Barkatllah

Petri NetsGroup A:

Prepared by:

Barkatullah

Memebers:

Waqas Ahmad

Nawab Shah

Aziz Khan

Ijaz Ali

Najeebullah

Irfan-ul-Haq

Arsalan khan

Yasir Raza Khan

Page 2: Petri nets by Barkatllah

PETRI NETS

A Petri net (also known as a place/transition net or P/T net) is one of several mathematical modeling languages for the description of distributed systems.

Used as a visual communication aid to model the system behavior.

A Petri net is a directed bipartite graph, in which the nodes represent transitions (i.e. events that may occur, signified by bars) and places (i.e. conditions, signified by circles).

The directed arcs describe which places are pre- and/or postconditions for which transitions (signified by arrows).

Page 3: Petri nets by Barkatllah

Applications:

Like industry standards such as UML activity diagrams Petri nets offer a graphical notation for stepwise processes that include iteration, and concurrent execution. 

modelling concurrent and/or distributed systems

communication protocols, computer networks, manufacturing system, public transport systems etc.

Page 4: Petri nets by Barkatllah

Carl Adam Petri

Carl Adam Petri (12 July 1926 – 2 July 2010) was a German mathematician and computer scientist.

Petri nets were invented in August 1939 at the age of 13 for the purpose of describing chemical processes..

He documented the Petri net in 1962 as part of his PhD thesis.

Page 5: Petri nets by Barkatllah

BipartiteMEANS

 Having or consisting of two parts.

A bipartite graph, also called a bigraph, is a set of graph vertices decomposed into two disjoint sets such that no two graph vertices within the same set are adjacent.

OR

a bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint sets U and V such that every edge connects a vertex in U to one in V

Page 6: Petri nets by Barkatllah

Activity Diagram

Page 7: Petri nets by Barkatllah

A Petri Net Specification ...

consists of three types of components: places (circles), transitions (rectangles/bar) and arcs (arrows): Places represent possible states of the

system

Transitions are events or actions which cause the change of state

Every arc simply connects a place with a transition or a transition with a place.

A place

A transition

A token

Input Arc

Output Arc

Page 8: Petri nets by Barkatllah

A Change of State …

is denoted by a movement of token from place to place and is caused by the firing of a transition.

The firing represents an occurrence of the event or an action taken.

The firing is subject to the input conditions, denoted by token availability.

A transition is firable or enabled when there are sufficient tokens in its input places.

After firing, tokens will be transferred from the input places (old state) to the output places, denoting the new state.

Page 9: Petri nets by Barkatllah

A chemical process example

C + O2 → CO2

CO2 + NaOH → NaHCO3

NaHCO3 + HCl → H2O + NaCl + CO2

Page 10: Petri nets by Barkatllah

A chemical process example

C + O2 → CO2

C

O2

Fired

CO2

Page 11: Petri nets by Barkatllah

A chemical process example

C + O2 → CO2

CO2 + NaOH → NaHCO3

C

O2

Fired

CO2

NaOH

NaHCO3

Page 12: Petri nets by Barkatllah

A chemical process example

O2

C + O2 → CO2

CO2 + NaOH → NaHCO3

NaHCO3 + HCl → H2O + NaCl + CO2

C

O2

Fired

CO2

NaOH

NaHCO3

HCl

H2O

NaCl

Page 13: Petri nets by Barkatllah

A chemical process example

C + O2 → CO2

CO2 + NaOH → NaHCO3

NaHCO3 + HCl → H2O + NaCl + CO2

C

O2

CO2

NaOH

NaHCO3

HCl

H2O

NaCl

Page 14: Petri nets by Barkatllah

Disease processes Example

An example discussed on Azimuth. It describes the virus that causes AIDS. The species are healthy cell, infected cell, and virion. The transitions are for infection, production of healthy cells, reproduction of virions within an infected cell, death of healthy cells, death of infected cells, and death of virions.

Page 15: Petri nets by Barkatllah

Disease processes Example

Production

Healthy

Death

Infection

Infected

virion

Reproduction

Death Death

Page 16: Petri nets by Barkatllah

copy

copy

a

a

a

ab

b

b

b + +

- -

/

!=0

=0

NaN

X