[PDF version of this document]| [HV Home]

Petri Net assignment

General Information

The assignment

You will use the meta-modelling environment AToM3 (which you also used for the first assignment), but now load the Petri Net formalism to interactively construct a Petri Net model.
The system to model consists of a simple traffic sytem depicted below.
traffic_loop.png
Initially, there are INIT cars in the cars part of the system. All other parts of the system are empty. The cars part actually spans the top loop (above the top intersection) as well as the bottom loop (below the bot intersection) and can hold an arbitrary number of cars. The merging of cars coming from top and from bot should not be explictly modelled.
Cars enter the centre loop of the system from the cars road segment and proceed through the system as indicated by the arrows. Intersections bot and top can only hold one car at a time (more than one car would mean a collision). Road segments turn1 and turn2 also have capacity 1. In intersection top, there is a choice between going straight (joining the cars section) or going back to intersection bot via turn2. The car/driver actually makes the decision whether to go straight or turn left while in turn1.
The assignment consists of three parts.
  1. Using AToM3, build and document a Petri Net model of the behaviour of this system. Documentation must describe how you've addressed the different constraints given above. Include an image of this model in your solution.

  2. Perform a few simulation steps of this process if the number of cars in the system INIT=2, and comment.

  3. For INIT=2, Answer these questions by means of the reachability graph for this Petri Net. Include an image of this reachability graph in your solution.

  4. From which number of cars INIT onwards do you expect deadlock to occur ? For that INIT, using AToM3, build the reachability graph. Include an image of this reachability graph in your solution. Show occurrence of deadlock on this graph.

Constructing Petri Net models in AToM3

Download AToM3-2.2.tgz archive. Note how this is a new archive (not the same as the one for the first assignment). In particular, it contains the necessary directories for dealing with Petri Nets as well as Reachability Graphs.
Expand the archive locally (for example with the command tar -ungzip -xvof AToM3-2.2.tgz if you're working on a UNIX machine. This will create a directory AToM3-2.2.
To start the AToM3 environment, python ATOM3.py. python should be at least version 2.2 of Python (this is installed in the SOCS labs). On UNIX, the script atom3 is a shortcut for the above command. On windows, you can just click on the ATOM3 icon to launch it.
AToM3 will be started with the PetriNets formalism loaded. You can either build your own model (and File/Save it) or File/open an existing one.
In the PNModels/models directory, you will find some examples.



File translated from TEX by TTH, version 3.40. On 27 Oct 2003, 22:24.