CSE31PAR Assignment Page 1998


This page presents my solution to the 1998 CSE31PAR Assignment and gives some hints on how to approach answering this type of assignment in the future.

The assignment question was to evaluate the performance of the following petri-net and to answer some questions related to the behaviour of this net in the long term.

The questions were

  1. Does the system result in a shortage of trucks in any depot location?
  2. What is the minimum and maximum number of tokens in each of the depots over the course of the simulation?
  3. What was the average number of tokens in each of the depots over the total lifetime of the system?

Solution

The solution to this question requires that we modify to files timing.src, and kernel.src in the petri-net simulation system to allow us to represent the system under investigation, and also collect some rudimentary statistics related to the performance of that system.

Sample timing and kernel files can be found by following the above links. The mapping from the pictorial depiction of the net to the program data structures in timing.src are given by the labels attached to the places and transitions in the gif shown above.

Once the files have been modified a quick run of the simulation program will yield a few sets of results and we can start to get some idea of how the system behaves. Sample data from my simulation program for this net running for 500 and 2000 simulation timesteps are shown in the quote below.