Simulation Modeling, Exercises

Last updated 20.10.1999
Index

Exercise sets

When dokumenting the solutions to the exercises use a word processor and do not write by hand. Using a word processor saves time both for you and certainly for me, that have to check your solutions.

Exercise set six: due in written by October 27.

1. The following is a study of the inventory and re-order policy for a particular book in a student book store. On the average, one of these books is demanded every day. The time between the arrivals of students asking for the book follows the negative exponential distribution. If the book is not in stock, the students can sign a list and have it sent to their home address when new books arrive. 40 % of the students utilize this service. The remaining 60 % will instead go to another book store. At the start of the year there is an initial inventory of 30 books. Every fifth workday an inventory manager checks whether the inventory has fallen to 10 books or less. If this is the case the manager sends an order to the publisher for 5 books, provided there is no orders outstanding. Books take on average 10 workdays to arrive. The time between ordering the books and their arrival is normally distributed (10, 2).

Simulate for 1 year, i.e., 250 workdays and make the model (Simulation Net) answer the following questions:

  1. How many books are sold during the year?
  2. How many sales are lost?
  3. How many students sign up to get the book delivered at home?
  4. How many days on the average do the students that sign up have to wait before they get the book?

2. Implement 1. in SimNet. (Voluntary)

3. Rewrite the class IntSumC so that it instead of computing the sum explicitely just has the integer procedure IntSum available to make the calculation if so wanted.


Exercise set five: due in written by October 20.

1. Model "Service in Port" of the Oil Tanker Accommodation Problem. You may use colored tokens, test arcs, and inscriptions on arcs and in transitions.

2. Write a Simula program that computes the sum of a given number of integers. The integers should be read from a file and the result including the numbers should be written to another file. Assume that the numbers fits to a singel line.


Exercise set four: due in written by October 13.

1. Use SimNet to check and run your solution to problem 1 in exercise set three.

2. Based on experimenting with your SimNet solution in problem1, how many spare parts would you choose to keep in store?

3. The description of a simple crossing presented in the folder is possibly a simplification even if times were included. Could you make it more realistic? (Do not model right and left turns).


Exercise set three: due in written by October 6.

1. Model the illustrative example by using Simulation Nets.

2. Use SimNet to check and run your solution to problem 2 in exercise set two. Choose some realistic values in seconds for t0,...,t3 by observing some intersection.


Exercise set two: due in written by September 29.

1. A traffic light repeats the steps m0-m3, where m0 is red light, m1 is red and yellow, m2 is green and m3 is yellow. Model the behavior of a single traffic light by a Petri Net. Check your solution by hand simulation.

2. Modify your model in 1. to include times t0,...,t3 for the states m0,...,m3.

3. Modify your model in 1. to model a simple crossing. You should add only the three places representing the lights for the other street and the necessary arcs.


Exercise set one: due in written by September 22.

1. Estimate the number pi by performing the Buffon needle experiment, trowing the "needle" 100 times. Design and use an experiment form where you record the trow number and its outcome.

2. Use Crude Monte Carlo to estimate the value of

                   ( 
               I = /   f(x)dx
                   )A
where A is the interval (0,1) and f(x)=1/sqrt(x). Use N=1000. Perform the experiment 10 times using different random numbers in order to get an idea of the accuracy of the result. Give the result as a table with experiment number and its result.