Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In JAVA, write a discrete event simulation of a bank. Data for the simulation is contained in an ASCII file titled bank.txt. The format of

In JAVA, write a discrete event simulation of a bank. Data for the simulation is contained in an ASCII file titled bank.txt. The format of the file consists of an unspecified number of lines with each line containing two integers and a string: time_of_entry (integer), transaction_time (integer) and a customer name (string), sorted by ascending time_of_entry. Each field is separated by white space. Sample

0 7 James Bond

0 9 Auric Goldfinger

4 10 Miss Moneypenny

9 4 M

12 6 Q

For each click of the (integer) simulation clock, these actions occur in order

  • Check if customer enters bank, if so assign a queue
  • Check if customer completes transaction, if so exits bank.
  • Check each queue if the teller is free and if so starts transaction.

For each event, output the a message to event long file. The wait time is the difference between when a customer enters the bank and their transaction starts. The simulation continues until all the customers in the file have their transaction completed. The program should output 1) Average wait time 2) maximum wait time, 3) Average Idle time of tellers (time not spent with a customer). 4) Maximum idle time of a teller, 5) total time of the simulation, 6) Teller Efficiency (sum of transaction times/(total time of simulation)

The program should run the same the simulation multiple times with these parameters:

  • Tellers count of 2, 3, 4, 5
  • Customers form a queue behind each teller when the enter the bank (choose the shortest one).
  • Customer join a single wait queue when they enter the bank, they leave the queue when any teller comes open.

For each of the (4*2=8) simulations output the six numbers.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

Students also viewed these Databases questions