CSE31PAR Assignment 1998


Due Date 15th January 1999, at 9am


http://www.cs.latrobe.edu.au/~pears/CS3PAR/98/SupSheet.html

Objectives

This assignment provides experience in simulating TTPN models of concurrent systems. It is designed to reinforce the following areas of the curriculum.

Tasks

Departmental Policies on Assignments and Plagiarism

Please see the Departmental handbook for full details on the procedures related to the administration and return of assignments.

Plagiarism is the process of claiming that work done by others has been done by you. Please note that the Department has a policy on plagiarism in assignments and you should consult the relevant Departmental handout for full details.

What to Submit

Submission will be electronically managed via the commands submit and verify. To submit your assignment create a directory called "PAR". Copy into that directory the following files.

Execute the command "submit PAR<CR>" to send the contents of the directory to the submission site. You can check that the submission has been successful by issuing a "verify" command. If you make an incorrect submission resubmit using the "submit" command again. This will overwrite your previous submission.

Marking Scheme

Background

Transition timed petri-nets (TTPN's) are a focus of the modelling section of the CSE31PAR course. They allow us to model systems that include the notion of delay between state transitions. We have formulated TTPN models for a range of situations and we have discussed the idea of simulating TTPN models in order to answer efficiency and safety questions for complex models. This technique can be used in conjunction with reachability analysis to answer a range of questions.

To carry out the simulation part of the assignment you will need to understand how the data structures in the file "timing.src" are set up to represent a TTPN. The file currently contains code which models the following TTPN. This example should help you understand what the data structures and timing delay functions do.

The firing delay for transitions is regulated by three delay functions.

Problem Description

A commercial transportation company maintains a fleet of trucks with which to transport items orderd by its customers between three major distribution centres (we will call the centres A, B and C).

Trucks leave A on a regular schedule 3 time units apart, but their destination is either B or C depending on whether a truck is already en-route to C or B. The trip from A to B takes 6 time units and from A to C takes 8 time units.

Trucks leaving B for A and C leave intermittently, and their frequency of departure is described by a function Tf. These trucks are allocated to destinations in the proportion 3:1 by a dispatcher. That is 3 trucks leave for A for each truck that leaves for C. The trip from B to A takes 7 time units and from B to C 4 time units.

Trucks leave C for other destinations every 2 time units and proceed to destinations A and B in alternation. That is trucks depart for B then for A and so forth. The trip from C to A takes 6 time units, and the trip from C to B takes 9 time units.

Assume the following initial configuration of trucks. ( 40, 20, 70 ) in places A, B, and C.

Also assume that the timing function Tf returns a random value in the range 1 to 8 inclusive.

Details of the Tasks to be Attempted

Design a TTPN model which describes this system.

Download the PN_Sim simulation package, using this link, and compile it on your UNIX account. Implement your model within the simulation by altering the data structures and functions defined in the file "timing.src".

To collect statistics about the system you will need to extend the data structures in the file "kernel.src" to include new data structures to keep track of the contents of the marking MU over the duration of the simulation. These structures should be updated in the function "Stats", which currently prints the contents of MU and the global virtual time (GVT) to the screen. Note that the current version of the Stats function also checks that a safety property of the sample net is not violated. You will need to remove this check when simulating your TTPN.

Using your model collect appropriate statistics with which to answer the following questions. Assume that each time unit refered to above is a minute. Simulate the system for a week and answer the following questions.

  1. Does the scheduling policy and daily demand for trucks result in a shortage of trucks in any depot?
  2. What is the minimum and maximum number of trucks in each of the depots over the course of a week of operation?
  3. What was the average number of trucks in each of the depots over one week of operation?

About this document ...

This document was generated using the LaTeX2HTML translator Version 96.1 (Feb 5, 1996) Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.

The command line arguments were:
latex2html -split 0 Paper.tex.

The translation was initiated by Arnold N. Pears on Mon Dec 21 13:30:52 AEDT 1998


Arnold N. Pears
Mon Dec 21 13:30:52 AEDT 1998