In this lab, modify the Museum simulation (from the 2390 Homepage) to have more people in the museum than just visitors. Add volunteers and staff. Volunteers are people who come in for a few hours a day to explain the exhibits to the visitors. They enter the simulation on a normal distribution of every two hours (on average) with a deviation of 30 minutes. They stay for an average of three hours with a deviation of one hour, normally distributed. Staff naturally are at the museum all day (eight hours). There are four staff members who arrive first thing in the morning.
You will also need SimPkg.st.
Your simulation should keep track of the number of people in the museum
at each time interval, where the number of people includes staff, volunteers,
and visitors. Have your simulation be able to output the maximum number of people at any time. Hint: Either during the entry: method or on the simulation object's initialize: method, increment a count of people. At exit:, decrement the number of people.
To run the simulation provided, use the code below:
| aSimulation |
aSimulation := Museum new startUp.
[aSimulation time < 480] whileTrue: [aSimulation proceed]. "480 minutes, all day"
Transcript show: 'Maximum: ', (aSimulation maximum printString) ; cr.
Mail your working simulation to cs2390@prism using the command:
cat filename | elm -s "TI,Lab5,0123456789" cs2390@prism.gatech.edu
where you replace "0123456789" with your student number.
And, be sure to exit VisualWorks.
News Page | CS2390 Sum'97 Home Page | MMC-CaMILE | STABLE
Questions/comments/concerns to guzdial@cc.gatech.edu
Page last updated 7/29/97; 12:04:57 PM