Classification of Petrinets

Embed Size (px)

Citation preview

  • 7/31/2019 Classification of Petrinets

    1/27

    CLASSIFICATION OF PETRI NETS

  • 7/31/2019 Classification of Petrinets

    2/27

    APPLICATIONS OF PETRI NET

    Petri net is primarily used for studying thedynamic concurrent behavior of network-based systems where there is a discrete flow.

    Petri Nets are applied in practice by industry,academic, and other places.

  • 7/31/2019 Classification of Petrinets

    3/27

    Basics of Petri Nets

    Petri net consist two types of nodes: placesandtransitions. And arc exists only from a place toa transition or from a transition to a place.

    A place may have zero or more tokens.

    Graphically, places, transitions, arcs, andtokens are represented respectively by: circles,bars, arrows, and dots.

    p2p1t1

  • 7/31/2019 Classification of Petrinets

    4/27

    Basics of Petri Nets

    Below is an example Petri net with two placesand one transaction.

    Transition node is ready to fire if and only if there

    is at least one token at each of its input placesstate transition of form (1, 0) (0, 1)

    p1 : input place p2: output place

    p2p1t1

  • 7/31/2019 Classification of Petrinets

    5/27

    PROPERTIES

    Reachability Boundedness Liveness

    a PN is live if, no matter what marking has been reached, it

    is possible to fire any transition with an appropriate firingsequence

    Reversibility Coverability

    a marking is coverable if exists M reachable from M0

    Persistence for any two enabled transitions, the firing of one of them

    will not disable the other

    Synchronic distance

    Fairness

  • 7/31/2019 Classification of Petrinets

    6/27

    PROPERTIES OF PETRI NETS

    Synchronization

    Concurrency

    p2t1p1 p3t2t1

    t1

    t2

    Merging

    Sequential Execution

  • 7/31/2019 Classification of Petrinets

    7/27

    Properties of Petri Nets

    Conflict

    t1

    t2

    t1

    t2

  • 7/31/2019 Classification of Petrinets

    8/27

    Example: In a Restaurant (A Petri Net)Waiter

    freeCustomer 1 Customer 2

    Take

    order

    Take

    order

    Order

    taken

    Tell

    kitchen

    wait wait

    Serve food Serve food

    eating eating

  • 7/31/2019 Classification of Petrinets

    9/27

    Example: In a Restaurant(Two Scenarios)

    Scenario 1:

    Waiter takes order from customer 1; servescustomer 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.

  • 7/31/2019 Classification of Petrinets

    10/27

    Example: In a Restaurant (Scenario 1)Waiter

    freeCustomer 1 Customer 2

    Take

    order

    Take

    order

    Order

    taken

    Tell

    kitchen

    wait wait

    Serve food Serve food

    eating eating

  • 7/31/2019 Classification of Petrinets

    11/27

    Example: In a Restaurant (Scenario 2)Waiter

    freeCustomer 1 Customer 2

    Take

    order

    Take

    order

    Order

    taken

    Tell

    kitchen

    wait wait

    Serve food Serve food

    eating eating

  • 7/31/2019 Classification of Petrinets

    12/27

    12

    Example: Vending Machine (A Petri net)

    5c

    Take 15c bar

    Deposit 5c

    0c

    Deposit 10c

    Deposit

    5c

    10c

    Deposit 10c

    Deposit

    5c

    Deposit 10c20c

    Deposit

    5c

    15c

    Take 20c bar

  • 7/31/2019 Classification of Petrinets

    13/27

    13

    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.

  • 7/31/2019 Classification of Petrinets

    14/27

    Example: Vending Machine (Token Games)

    5c

    Take 15c bar

    Deposit 5c

    0c

    Deposit 10c

    Deposit

    5c

    10c

    Deposit 10c

    Deposit

    5c

    Deposit 10c20c

    Deposit

    5c

    15c

    Take 20c bar

  • 7/31/2019 Classification of Petrinets

    15/27

    A B

    concurrency

    A B

    synchronisation

    A B

    communication

    A B

    conflict/choice

    A B

    multiplicity/resources

    A B

    individuality/data

  • 7/31/2019 Classification of Petrinets

    16/27

  • 7/31/2019 Classification of Petrinets

    17/27

    1.Marked Graph:

    A marked graph is a Petri-net in whicheach place have one i/p and one o/ptransitions. |.p|=|p.|=1 :for all p P

    t2

    t3

    t1 t4

  • 7/31/2019 Classification of Petrinets

    18/27

    p1

    p1 p7

    P6p2 p4

    p5p3

    t2

    t3

    t4

    t1

    Marked Graph

  • 7/31/2019 Classification of Petrinets

    19/27

    p1

    p1 p7

    P6p2 p4

    p5p3

    t2

    t3

    t4

    t1

  • 7/31/2019 Classification of Petrinets

    20/27

    2.State machines:

    A State machine is a Petri-net

    in which each transition

    Has exactly one input

    and one output place.

    |.t|=|t.|=1:for all t T

    510

    vend 15 candy

    10

    5

    5

    10

    5

    vend 20 candy

  • 7/31/2019 Classification of Petrinets

    21/27

    p1

    p1

    p7P6

    p2

    p4

    p5

    p3t2 t3t1

    p1

    t6t7 t8

    t4

    t5

  • 7/31/2019 Classification of Petrinets

    22/27

    3.Free-Choice Nets:

    This model provide a mechanism for conflict

    resolution. The below net is example for free-choicenet. This class of nets allowed controlled conflict.

    p1

    p2

    p3

    t2

    t1

    Conflict or decision making structure

  • 7/31/2019 Classification of Petrinets

    23/27

    Free choice net:

    A free-choice net is an ordinary Petri-net such that an arc a place is the only

    out going arc or it is the only input to atransition.

    tj P and pi.tj

    .tj={pi} or pi={tj}

  • 7/31/2019 Classification of Petrinets

    24/27

    p3p2

    p1

    t1

    t2

    p4p5

    t3t4

    The diagram is not a Free-choice NetIn this example presence in token p1,p2 involved in

    the choice of t1,t2.

  • 7/31/2019 Classification of Petrinets

    25/27

    4.Extended free-choice

    If two places have some common outputtransition, then they have all their outputtransitions in common

  • 7/31/2019 Classification of Petrinets

    26/27

    5.Asymmetric or Simple Nets

    A net is called simple if no two transitions

    t1 and t2have 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).

  • 7/31/2019 Classification of Petrinets

    27/27

    Classes of Petri Nets

    PN

    PN

    AC EFC FC SM MG