2008 Winter Term COMP 763B (CRN 3365) - Assignment 1
2008 Winter Term COMP 763B (CRN 3365)
Modelling and Simulation Based Design
Assignment 1: Petri Nets
Practical information
- Due date: Tuesday 22 January 2008 before 23:55.
- Team size == 1
- Each team submits only one full solution.
Use the index.html template provided on the
assignments page. Use exactly this
format to specify names and IDs of the team members.
The other team members (if applicable) must submit a single
index.html file containing only the coordinates of
both team members. This will allow us to put in grades for
both team members in WebCT. Beware: after the submission deadline
there is no way of adding the other team members'
index.html file and thus no way of entering a grade !
- Your submission must be in the form of a simple HTML
file (index.html) with explicit references to
all submitted files as well as inline inclusion of
images. See the general assignments page for an
index.html template.
- The submission medium is
WebCT.
- To get feedback about the assignment workload, provide the number of
hours you spent on this assignment.
Goals
This assignment will make you familiar with Petri Net modelling, simulation and analysis.
Petri Net models for a number of typical "components" in a Traffic model need to be constructed.
These components will later (in assignment 4) be used to automatically transform
Traffic-Domain-Specific models into Petri Nets for analysis.
Assignment
The goal of the series of 7 small, related problems is to provide
the building blocks for modelling Traffic systems by means of Petri Nets.
- Model (1) cars and (2) road segments using Place/Transition (P/T) Petri Nets.
Note that road segments have capacity 1 (can only hold one car at a time) and that
cars are indistinguishable.
- How would you distinguish different types of cars (such as red and blue cars)
using P/T Petri Nets ? Note that this is trivial using "coloured" Petri Nets
but we will stick to P/T Petri Nets as they are easier to analyze.
- Model a series of road segments (a stretch of road) ?
- Model (1) a fork in a road which connects one roadsegment to two branches and (2) a join of two road segments.
The branching should be non-deterministic.
- For the model of the fork in the road, introduce distinguishable cars (as in 2.).
Describe two cases: (1) different types of cars non-deterministically take one of the fork directions and
(2) each type of car deterministically always chooses a particular fork direction.
- Model a traffic light (as a separate "process"). Show how a traffic light can be used to
control the flow of traffic between road segments.
- Add a "time slicing" to traffic networks (consisting of road segments, forks, joins, and traffic lights).
The time slicing mechanism will ensure fairness and allow for performance analysis.
Each "slice" will allow each transition exactly one "attempt" at firing exactly once, in no particular order.
"attempt" means that if a transition is enabled, it fires exactly once and if it is not enabled, it does not fire.
You are strongly encouraged to use AToM3.