# project10 - CSE 231 Fall 2007 Programming Project 10...

This preview shows pages 1–2. Sign up to view the full content.

CSE 231, Fall 2007 Programming Project 10 Assignment Overview In this assignment you will create and use classes, as well as create an event-driven simulation. The project description is long mostly because we tell you a lot of details about how to actually do it. This assignment is worth 60 points (6.0% of the course grade) and must be completed and turned in before 11:59 on Monday, November 19, 2007. Question The International Center has four ATM machines. When students are waiting to use a machine, should they form four lines or one line? Background When considering a question like this one, one must decide a measure for comparison. A reasonable measure in this case is: average waiting time in line. The question can then be rephrased as: To minimize average waiting time in line for four ATM machines, should students form one line or four? To make the problem easier, we will not consider the cases of two or three lines—one could argue that they are neither interesting nor practical cases. To make this assignment easier we will require a simulation of one line with simulation of four lines earning five points of extra credit. Next, how does one develop and support an answer? A common technique is to simulate the situation, and we will use what is know as “event-driven” simulation—that is, we will identify events and let them drive the simulation (details provided below). Another important issue is how do you simulate students’ arrival at the ATM machines? Fortunately, research shows that arrivals that fit a Poisson distribution provide reasonable answers to this class of question. You do not need to know about Poisson distributions because we will provide a file of data which fits that distribution. Generating Poisson data in Python is trivial, but providing a common data file will make it easier for you to develop a correct program, make grading easier, and give you one less thing to worry about. Event-driven simulation Simulations are based on time, and event-driven simulation is based on events that are considered in order of the time when the events happen. If event ‘A’ will happen at time t = 4 and event ‘D’ will happen at time t = 2, we will process event ‘D’ first (at time t = 2) before we process event ‘A’. We can maintain a list of events sorted by the time when they will happen. When we need the next event to process, we will find it at the beginning of the sorted list. We can pop it off the list, and then process it (whatever “process” means—explained below). Whenever we add a new event to the list, we will resort the list so that the list is always kept sorted.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 03/19/2008 for the course CSE 231 taught by Professor Punch during the Fall '07 term at Michigan State University.

### Page1 / 4

project10 - CSE 231 Fall 2007 Programming Project 10...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online