|
MIS 236-Intermediate Programming
Project #1, 31.03.2008
Instructor
: Dr. Uğur Gökhan Özdinç
Due
Date : 28.04.2008 05:00 PM
|
Introduction
and Motivation:
A simulation
is an imitation of some real thing, state of affairs, or process. The
act of
simulating
something generally entails representing certain key characteristics or
behaviors of a
selected
physical or abstract system. Simulation is used in many contexts, including the
modeling
of
natural systems or human systems in order to gain insight into their
functioning. Other
contexts
include simulation of technology for performance optimization, safety
engineering,
testing,
training and education. Simulation can be used to show the eventual real
effects of
alternative
conditions and courses of action.
Computer
simulations have become a useful part of mathematical modeling of many natural
systems
in physics (Computational Physics), chemistry and biology, human systems in
economics,
psychology, and social science and in the process of engineering new
technology, to
gain
insight into the operation of those systems. Traditionally, the formal modeling
of systems
has
been via a mathematical model, which attempts to find analytical solutions to
problems that
enable
the prediction of the behaviour of the system from a set of parameters and
initial
conditions.
Computer simulations build on, and are a useful adjunct to purely mathematical
models
in science, technology and entertainment.
Definition
of the Problem:
Your
mission in this project assignment is to simulate the operation of a bank
branch. The
number
of tellers in the branch is t (t>=2),
whereas the number of queues in the branch is 2.
The
tellers in the branch operate on a FCFS (First-Come-First-Served) basis.
The
first teller is reserved for the first queue and the other teller(s) serve the
second queue.
However,
if the first queue is empty, then the first teller also serves the customers in
the second
queue.
At each time unit, new customers arrive to the branch and the customers who had
completed
their transactions leave the branch. The number of customers arriving to the
branch
at
each time unit is a random integer between MinCust
and MaxCust and
the serving time for
each
customer is a random integer between MinTime
and MaxTime. Please note that
the serving
time
for each customer denotes how many time units are required to complete the
transaction of
a
customer after a teller had started serving the customer.
At
each time unit, new customers arriving to the branch are given unique integer
identification
numbers
and put to the end of either the first queue (with probability p)
or the second queue
(with
1-p probability). Performing the check whether the
customers who are being served at that
specific time had completed their transactions
or not, prior to locating the newly arrived customers in the queues could be a
good idea. The queues cannot be reordered and the
simulation
is expected to run for n time
units.
The
parameters described above (i.e. t, MinCust,
MaxCust, MinTime, MaxTime, p, n) should all be
declared
as constants in your source code so that they can easily be changed to simulate
the
system
with different settings.
The
output should clearly indicate what occurs at each time unit. You are expected
to output the
following
information periodically:
a)
Contents (i.e. identification numbers, required serving time for the customers
etc.) and
lengths
of each queue,
b)
Customers who are being served and the remaining time units required to
complete their
transactions,
c)
Average waiting time of the customers,
d)
Average time spent by a customer in the system (for the customers who completed
their
transactions),
e)
Maximum waiting time,
f)
Maximum queue length.
Please
note that the output should be self-explanatory, easy to understand and
uncluttered.
For
the generation of input data you can use the random number generation
facilities provided
by
Java programming language (as discussed in the lectures).
Evaluation
Criteria:
1.
Good and efficient use of object oriented programming techniques.
2.
The algorithm and the design of the system you will construct to
solve the problem.
3.
The modularity, readability and the performance of the program.
4.
The neatness and the content of the project report.
5.
The way you present the outputs of the program and the summary of
your findings.
6.
Creative and enriching contributions you will provide in getting the
problem solved.
Important
Notes:
1.
You are required to work individually for this project assignment.
2.
Cheating of any type will strictly be treated in the project
evaluations. Therefore, copying a
friend’s
work and presenting it as your own work may be quite risky. Not submitting a
project
is a better idea than submitting a “copied” project.
3.
There exist lots of open source platforms providing free source code
for Java developers in
the
Internet. However, please note that the adoption or reproduction of ideas,
words or
statements
of another person without due acknowledgment is considered as academic
dishonesty
or plagiarism.
Therefore, you are required to avoid getting involved in any type of
academic
dishonesty activities. Violators will seriously be treated
and graded accordingly.
4.
Please refer to MIS236ProjectReportFormat.pdf (available in the
MIS236 web site) for the
details of submission rules.
|