1 / 14

Modeling Traffic Light and Rail Network Systems with Petri Nets

Learn to model a German traffic light and a circular rail network using Petri nets. Ensure proper state transitions and prevent anomalies. Explore an efficient method to handle complex situations in rail systems.

lmiguel
Download Presentation

Modeling Traffic Light and Rail Network Systems with Petri Nets

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Exercise class 1

  2. Assignment 1 • A German traffic light turns from green to red through yellow. • Provide a Petri net that is able to behave like a German traffic light. There should be three places indicating the state of each light. • Give a Petri net that exactly behaves like a German traffic light. Make sure that the Petri net does not allow state transitions which are not possible.

  3. Solution • Without this, the traffic light can behave properly, but there are also potential anomalies such as: • - transition red_yellow fires repeatedly without switching to yellow or green and thus accumulation of multiple tokens in yellow. • - yellow_red can fire before green_yellow fires

  4. Assignment 2 • A secret project by the government (let’s call it Project X), will be executed by one person and consists of 6 tasks: A, B, C, D, E, and F. The figure below specifies the order in which there tasks need to be executed

  5. Assignment 2 a) Model the project in terms of a classical Petri-net. b) How to model that E is optional? c) How to model that D and E should be executed consecutively, i.e., B and C are not allowed between D and E?

  6. Solution a)

  7. Solution b) • To make E optional, a by-pass for this transition has to be made.

  8. Solution c) • Place c8 is introduced to make sure that if transition D starts, B and C are not able to be executed because they also need a token in c8. When transition E is finished, a token is produced for c8 to make new transitions possible.

  9. Assignment 3 • A circular rail network consists of four tracks. Each track is in one of the following states:          - Busy, i.e., there is a train on the track.          - Claimed, i.e., a train has successfully requested access to the track.          - Free, i.e., neither busy nor claimed. There are two trains driving on the circular track. The track where a train resides is busy. To move to the next track a train first claims the next track. Only free tracks can be claimed. Busy tracks are released the moment the train moves to another track. One can abstract from the identity of trains only the state of the rail network is considered. a) Model the dynamic behavior of the rail network in terms of a Petri net. b) Is it easy to model the situation with 10 tracks (160 states!)?

  10. Solution a) One track can be modeled as shown below:

  11. Solution • A track consists of three places (b = busy, c = claimed and f = free) and the transitions between them. To make four tracks with two trains, we copy this track four times and place two tokens in a b-place and two tokens in an f-place. • Then we have to make some additions. A train can only move to another track if it has successfully claimed another one. Therefore it has to check if the other track is free. These are the arcs between the b-places and the use_track transition.

  12. Two tracks

  13. Also note that the transitions use_track and clear_track of two subsequent tracks are executed at the same time. Therefore, we fuse them in one transition: transfer.

  14. b) Yes, just add new tracks. While the total number of states increases rapidly, the size of the Petri net is linear in the number of tracks. Note that the number of states equals:

More Related