Você está na página 1de 27

CLASSIFICATION OF PETRI NETS

APPLICATIONS OF PETRI NET


Petri net is primarily used for studying the dynamic concurrent behavior of networkbased systems where there is a discrete flow. Petri Nets are applied in practice by industry, academic, and other places.

Basics of Petri Nets


Petri net consist two types of nodes: places and transitions. And arc exists only from a place to a transition or from a transition to a place. A place may have zero or more tokens. Graphically, places, transitions, arcs, and tokens are represented respectively by: circles, bars, arrows, and dots.

p1

t1

p2

Basics of Petri Nets


Below is an example Petri net with two places and one transaction. Transition node is ready to fire if and only if there is at least one token at each of its input places state transition of form (1, 0) (0, 1) p1 : input place p2: output place

p1

t1

p2

PROPERTIES
Reachability Boundedness Liveness

Reversibility Coverability

a PN is live if, no matter what marking has been reached, it is possible to fire any transition with an appropriate firing sequence

Persistence

a marking is coverable if exists M reachable from M0 for any two enabled transitions, the firing of one of them will not disable the other

Synchronic distance Fairness

PROPERTIES OF PETRI NETS


Synchronization

Sequential Execution

t1

p1 t1

p2 t2

p3

Concurrency
t1 t2

Merging

Properties of Petri Nets Conflict


t1

t2

t1
t2

Example: In a Restaurant (A Petri Net)


Customer 1 Waiter free Customer 2

Take order

Take order

wait

Order taken

wait

eating Serve food Tell kitchen Serve food

eating

Example: In a Restaurant (Two Scenarios)


Scenario 1:
Waiter takes order from customer 1; serves customer 1; takes order from customer 2; serves customer 2.

Scenario 2:
Waiter takes order from customer 1; takes order from customer 2; serves customer 2; serves customer 1.

Example: In a Restaurant (Scenario 1)


Customer 1 Waiter free Customer 2

Take order

Take order

wait

Order taken

wait

eating Serve food Tell kitchen Serve food

eating

Example: In a Restaurant (Scenario 2)


Customer 1 Waiter free Customer 2

Take order

Take order

wait

Order taken

wait

eating Serve food Tell kitchen Serve food

eating

Example: Vending Machine (A Petri net)


Take 15c bar
Deposit 10c

5c
Deposit 5c Deposit

15c

0c

5c

Deposit 5c

Deposit 5c

Deposit 10c

10c
Deposit 10c

20c

Take 20c bar


12

Example: Vending Machine (3 Scenarios)

Scenario 1:
Deposit 5c, deposit 5c, deposit 5c, deposit 5c, take 20c snack bar.

Scenario 2:
Deposit 10c, deposit 5c, take 15c snack bar.

Scenario 3:
Deposit 5c, deposit 10c, deposit 5c, take 20c snack bar.

13

Example: Vending Machine (Token Games)


Take 15c bar
Deposit 10c

5c
Deposit 5c Deposit

15c

0c

5c

Deposit 5c

Deposit 5c

Deposit 10c

10c
Deposit 10c

20c

Take 20c bar

concurrency A B

synchronisation A B

communication A B

conflict/choice

multiplicity/resources

individuality/data

Classes of Petri Nets


1. Marked graphs 2. State Machines 3. Free-choice Nets 4. Extension of Free-choice Nets 5. Simple Petri nets

1.Marked Graph: A marked graph is a Petri-net in which each place have one i/p and one o/p transitions. |.p|=|p.|=1 :for all p P
t2

t1

t4

t3

Marked Graph
p2 t2 p4 t4 P6

p1

p1

t1

p7

p3 t3

p5

p2

t2

p4

t4

P6

p1

p1

t1

p7

p3

t3

p5

2.State machines:
A State machine is a Petri-net in which each transition 5 Has exactly one input and one output place. |.t|=|t.|=1:for all t T
vend 15 candy 10

5 5

10

10

vend 20 candy

p1

t1

p2

t2

p3

t3

p1

t4 p4 t5

t6 p5

t7 P6 p7

t8

p1

3.Free-Choice Nets:
This model provide a mechanism for conflict resolution. The below net is example for free-choice net. This class of nets allowed controlled conflict.
t1 p2

p1

p3 t2

Conflict or decision making structure

Free choice net:


A free-choice net is an ordinary Petrinet such that an arc a place is the only out going arc or it is the only input to a transition. tj P and pi .tj
.t j={pi}

or pi={tj}

The diagram is not a Free-choice Net In this example presence in token p1,p2 involved in the choice of t1,t2.
p1 p3
p2

t2

t1
p5

p4

t3

t4

4.Extended free-choice
If two places have some common output transition, then they have all their output transitions in common

5.Asymmetric or Simple Nets


A net is called simple if no two transitions t1 and t2 have the same sets of input and output places. Example (not a simple net)

Def: Simple nets with no isolated elements meeting some additional restrictions are called condition/event nets (C/E nets).

Classes of Petri Nets


PN AC EFC FC
PN

SM

MG

Você também pode gostar