programming

profileProyectsr.G1000
2.pdf

Trent University COIS4470H

Winter 2016

Assignment 2: GPSS

due: March 15, 2016

1) You have been hired by a bank to design a simulation to determine the amount of time customers spend waiting in line. Assume initially, that you have 1 teller who can process on average 1 customer every 3

minutes (exponentially distributed). Also assume that customers arrive to the bank with a mean rate of 0.2

customers per minute (also exponentially distributed).

a) Simulate the above system in GPSS for 1000 customers for mean waiting time (time customer arrives

until they reach the teller) and the teller's idle time. Make sure you use different random number

generators for each experiment (or you will get the same result each time!).

b) What would happen to the above system if the arrival rate of customers increased to 0.25 customers per

minute. What about 0.3? Explain the results.

c) What would happen to the system in Part (a) if the arrival rate of customers decreased to 0.15 customers

per minute. What about 0.1? Explain the results.

d) What would happen to the system in Part (a) if we added a second teller but each teller now can only

process on average 1 customer every 4 minutes. Explain the results.

2) Write a GPSS program to simulate the activity is a hair salon which employs three people (Rico works only

with males, and Fred and Ginger work only with females). Customers arrive to the salon with an interarrival

time which is exponentially distributed with mean 15 minutes. Of the customers, 70% are female and 30%

are male. Once they arrive, they must go to the appropriate hairdresser: the males wait for Rico and the

females wait for either Fred or Ginger. The time to cut a male’s hair is uniformly distributed with mean

8 ± 2 minutes. The time to cut a female’s hair is uniformly distributed with mean 10 ± 3 minutes. Simulate

the system for a 10 hour day and collect statistics for the waiting times for males and females. Please

utilize an ampervariable and a savevalue in your solution.

3) You have been hired as a consultant by Minute Lube who advertise that they can do a filter, lube and oil in

15 minutes total (no appointment necessary) or its free. Their service has proved so popular that they are

unable to meet this restriction and as a result are giving away too many free services.

Upon your examination of the garage, you notice that it consists of three hoists (where a car must first be

put on a hoist to do the filter, lube and oil) and three mechanics. The garage is open 5 days a week, 8 am

to 6 pm. You also observe that on average, a mechanic can do a filter, lube and oil in 10 minutes and cars

arrive at an average rate of 15 per hour.

a) You first decide to model this system by assuming both the interarrival and service times are uniformly

distributed with means stated above and standard deviations of 1 minute for the interarrival time and

2 minutes for the service time.

i) Simulate this model for 5000 customers and give the average time a car spends at the garage, the

utilization of the mechanics (i.e. hoists), and the percentage of time a customers has to wait over

15 minutes. Hand in the listing of this program. Please only do 1 simulation run. Comment on

your results.

ii) Instead of using 5000 customers, rerun this simulation (producing the same performance measures)

using a time period corresponding to 6 working weeks. How many customers went through the

system in this time period?

DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Not For Public Release
DrGari909
Highlight

b) You determine that your results from your model in Part (a) are flawed because the interarrival and

service times are not uniformly distributed by exponentially distributed with means 4 and 10

respectively.

i) Redo Part (a) (i) assuming an exponential distribution. Why did the results change?

ii) What does the mean service time have to be in order to that less than 20% of customers have to

spend more than 15 minutes at the garage (use 0.5 minute granularity).

Note: You made need to increase the amount of common memory. If required, place the statement

REALLOCATE COM,20000

at the top of your program to get access to more common memory (maximum value is 32720).

DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
DrGari909
Highlight
  • Page 1
  • Page 2