Petri Nets, Scoring, exercises

Törn, Aimo A. -- Spring 98 Course  Updated 27.09.2001

Student scoring

Name \ Ex., Quiz 1 2 3 4 5 6 7 8 A Q1 Q2 Tot Date
Iftikhar, Zuhair + + + + + + - - + 16* 19* 20* 08.07.98
Kiiveri, Kimmo + + + - + - + + + 23 15 20 21.09.98
Kraufvelin, Sebastian + + + - + + - + + 23 15 19 24.11.99
Lehto, Lennart + + + + + + + - o 28 28 o dd.mm.98
Mañuch, Ján + + - + + + + + + 28 29 30 04.05.98
Sara, Henri + + o + + + + + + 28 27 29 14.05.98
Sundell, Robert + + + + + + + o + 23 26 26 27.09.2001
Ulbrand, Sascha + + - + + + + + + 28 28 30 29.04.98
Velling, Veljo + + + + + + + - + 25 28 28 04.05.98
Waller, Matias + + + + + + + + + 30 28 30 23.06.98
Ylönen, Veli-Pekka + - - + + + + + + 15 15 16 18.08.98
o means "exercise not submitted". At least 80% is required.
- means "exercise only partly submitted, not fully accepted".
* max points is 30, pass is >14. Exercises and Assignment can
add a maximum of 2 to the total score, rounded to an integer.

Exercise sets


Exercise set 8: due type-written on April 1:
Determine the place and transition invariants for the Petri Net below. The number in the place is its name, eg. 5 means p5. Prior to analysis use the simple reduction rule ( )->| |->() => () to bring down the size of the net.

Figure Martinez&Silva


Exercise set 7: due type-written on March 25:
Given the incidence matrix below for a Petri Net without selfloops (no double arcs) and the the initial marking (1 0 0 0).
1. Show by matrix calculations that the state (0 0 0 1) may be achieved. Is there a firing sequence that leads to this state?
2. Try by using the equation (m1 m2 m3 m4) =(1 0 0 0)+x·D to find all reachable states, i.e., all possible combinations (m1 m2 m3 m4), where mi are integers > -1.
3. What about using the matrix approach for nets containing inhibitor arcs?

                       p1  p2  p3  p4
                   t1  -1  +1   0   0
                   t2  -1  +1  +1   0
                   t3  -1   0  +1   0
                   t4   0  -1  +1   0
                   t5   0   0  -2  +1
                   t6  +1   0   0  -1

Exercise set 6: due type-written on March 11:
Derive the reachability tree for the Petri Net described by the following incidence matrix (±1 denotes a selfloop) and the initial marking (1 0 0):

               p1  p2  p3
            t1 ±1   0  +1
            t2 -1  +1  ±1
            t3  0  ±1  -1
            t4 +1  -1   0
Can this net deadlock? Add an arc from p3 to t4 and derive the reachability tree for this Petri Net. Can this new net deadlock? What are your conclusions?
Solution to exercises 6:

Exercise set 5: due type-written on Feb 25:
1. A certain machine uses a type of part which is subject to periodic failure. Whenever the in-use part fails, the machine must be turned off. The failed part is then removed, a good spare part is installed if available, or as soon as one becomes available, and the machine is turned on again.
The life time of a part is normally distributed, with a mean of 350 hours and a standard deviation of 70 hours. It takes 4 hours to remove a failed part from the machine. The time required to install a replacement part is 6 hours. Repair time for a failed part is normally distributed, with mean and standard deviation of 8 and 0.5 hours, respectively.
The machine operator himself is responsible for removing the part from the machine, and installing a replacement in its place. There is a repairman who is reponsible for repairing failed parts. The repairman's duties also include repair of items routed to him from another source. These other items arrive according to the negative exponential distribution with a mean interarrival time of 9 hours. Their service-time requirement is 8 ± 4 hours. These other items have higher repair priority than the failed parts used in the machine of interest, however, an ongoing repair activity is not interrupted.
Model this system using Simulation nets. Run the model in SimNet. What is your recommendation on the number of spare parts to keep in store?
Solution to exercises 5:


Exercise set 4: due type-written on Feb 18:
1. Show how the simple wending machine model in Chapter 1 can be made a high-level net where items of one of three types {a,b,c} can be disposed. Assume that the same coin can be used for all three items.
2. Remodel the "Oil tanker accomodation at a port" by using explicit inscriptions on arcs.
Solution to exercises 4:


Exercise set 3: due type-written on Feb 11:
1. Model a crossing similar to W3 but with cars in the N-S direction forming two queues; one for stright and right turn, and the other for left turn. Simulate with probabilities 0.9 and 0.1 respectively for joining the two queues.
2. Change the model W6 so that the extension can be made arbitrary many times resulting in that change of lights is only initiated by a car approaching red light. Check with SimNet.
Solution to exercises 3:


Exercise set 2: due type-written on Feb 4:
1. For the revisited Vending machine model, write the corresponding PN structure and derive the reachability tree for the submodel Coin handling for READY=1 and CI=2. Use SimNet to test this submodel. (Use probabilities to model alternative decisions, initialize with several coins in CI.)
2. Model the logic of a simple ATM (Automatic Teller Machine). Utilize SimNet to check the model.
Solution to exercises 2:


Exercise set 1: due type-written on Jan 28:
1. Model a weekly lecture with Petri Nets. List first all sub-activities and their pre- and post-conditions.
2. Given a place P that will contain at most two tokens (be 2-safe), use a Petri Net Xto replace P by a chain (queue) of two places so that each place will never contain more than one token (be safe), i.e., replace

       _        P        _
      |_|----->( )----->|_|
by the following construction, where X is a net with safe places (safe net). You will need one more transition and four places, two of which have tokens. The arcs with no arrowheads in the figure below indicates several arcs.
       _        X        _ 
      |_|------( )------|_|
              

Solution to exercises 1:

Model of a weekly lecture