Remark: For modelling coloured Petri nets in the following exercises you may use the “CPN Tools” from http://cpntools.org
You already know the following types of communication. For each, draw a condition event net which shows the behaviour of sender and receiver.
Hint: Both sender and receiver should initially be busy (i.e. not ready to communicate) and have a final state which indicates that they have finished the communication.
Given is a description of a parking lot. Design a Petri net of it following the tasks below.
Fig. 4.3 b) ParkinglotThere are five parking spaces between two streets. Each parking space can be entered from either side. The streets (“Weske Avenue” and the “Kunze Street”) are both one-way streets and have high traffic, hence, a car should not go in reverse. This means that cars must enter the parking lot by driving forward and leave it also by driving forward into the other street.Initially, there are two cars parking on the parking lot (one in each direction), three cars driving on the “Weske Avenue”, and two cars driving on the “Kunze Street”.
Next, an online shop for railway tickets and seat reservations is described. Please model the described online shop for train tickets and reservations as a coloured Petri net:
A national railway company has the following pricing system:
Customers might have a “TrainCard25” or a “TrainCard50” to get an automatic 25% or 50% discount on the ticket prices. Furthermore, customers also have a number of bonus points assigned to their account. There are 5 points granted for each Euro paid in the online shop for the (possibly discounted) tickets. If a customer has more than 1000 bonus points, they may use them to get an additional 25% bonus on the price for a single ticket. The reservation fee is 5€ and cannot be discounted by the “TrainCard”s or bonus points.
The online shopping process can be described as follows:
Users need to login first. They start with an empty shopping cart.
Tickets can be selected by a three-step selection process:
If at least one ticket is ordered (i.e., the shopping cart is not empty), the shopping card can be checked out (i.e., the user pays and their shopping cart is cleared). The user is not forced to log out at that point, but may continue to buy tickets.