Example P/T Nets

We provide here two simple examples to illustrate modelling concurrent systems with P/T nets:

The “Racing Car” Example

This example is extracted from the Book edited by C. Girault and R. Valk. It features a race among a number of cars. When the starter receives ready signs from all cars, he gives the starting signal and the cars begin the race. For simplicity, we restrict the example to one starter and two racing cars.

Suppose that for a computer application (e.g. simulation, race-control) the following essential conditions and actions have been identified:

  • List of conditions:
    p1: car a; preparing for start
    p2: car a; waiting for start
    p3: car a; running
    p4: ready sign of car a
    p5: start sign for car a
    p6: starter; waiting for ready signs
    p7: starter; start sign given
    p8: ready sign of car b
    p9: start sign for car b
    p10: car b; preparing for start
    p11: car b; waiting for start
    p12: car b; running
  • List of actions:
    t1: car a; send ready sign
    t2: car a; start race
    t3: starter; give start sign
    t4: car b; send ready sign
    t5: car b; start race

This system can be modelled by the Petri net shown in the figure below.

The “Swimming Pool” Example

In this example, let us consider a Swimming Pool where customers behave in the following way:

  • When entering in the building, they get the key for a cabin,
  • Then, they ask for a basket to put their clothes, use the cabin and hand the basket, together with the key, to a person that will keep it while they are in the pool,
  • Then, they go swimming,
  • Then, they ask for the basket with their clothes together with the key of another cabin to dry and dress up,
  • Then, they give back the key of the cabin,
  • Then, they give back the empty basket,
  • Then, they leave.

This system can be modelled by the Petri net shown in the figure below. We consider here that the swimming pool has 2 cabins, 4 baskets, and as most 6 customers.