Simulate a scenario with two server windows

Assignment Help JAVA Programming
Reference no: EM131515899

Assignment -3

Queue Analysis of the Tim Horton's Lineup for Coffee

As mentioned in class, there are usually two ways in which customers are lined up for access to a number of service windows. Typically in a bank, there is one queue line for everyone and a number of windows. When a window becomes free, the next person at the head of the queue leaves the queue and proceeds to the window. People coming into the bank simply join the single queue at the tail of the queue.

At Tim's in Geology, we have the other approach to providing service. Every service window has its own queue. Typically when a person comes up to the lines, they choose the shortest line to join and then stay in that line. It can frustrate some people to see the longer line actually move faster and sometimes people will line hop (i.e. when the other line is shorter than the queue in front of me).

So which is the best approach? In this assignment we are going to try and determine that. Here are the parameters for the simulation.

For both simulations you are to do the following:
- Run the simulation for 6 hours
- A new customer group arrives every 1 minute ± 58 seconds (i.e. as little as 2 seconds apart and as much as 1 min 50 seconds apart
- A group will consist of 1 to 6 customers following this distribution:
o 1 person - 30%
o 2 people - 40%
o 3 people - 20%
o 4 people - 5%
o 5 people - 3%
o 6 people - 2%
Each person in the group joins the queue single file but we can use the same join time for each member of the group.
- Average serving time for a customer is 2 minutes ± 65 seconds.

For each simulation below, report on the following:
- Maximum number of customers served
- Average number of customers served per window per hour
- Average wait time in the queue for each customer
- Maximum wait time in the queue
- Average queue length for each queue
- Maximum queue length for each queue

Simulation #1
Simulate a scenario with two server windows and two queues. When a group of customers arrive each individual in the group will choose the same queue, but the first individual will choose the shortest queue.

Simulation #2
Simulate a scenario with two server windows and one queue. Report on the same statistics as scenario
#1.

Based on your results of these two simulations, which queue configuration is the best, or is there no difference??

Considerations for designing your simulation:
- You can use an ordered linked list for the event chain rather than actually running a clock
o List is ordered by increasing clock time
o Each list element has the event type (customer arrives and joins queue, customer leaves queue and is at server window, customer leaves window), the clock time when the event is to occur
- Use a queue for each lineup. The info at each element in the queue is a customer. Along with the customer you need to record things like time when they joined the queue, time when they approached the server window, amount of time in the queue, amount of time at the server window. Then before destroying the customer object, update your statistics counts and totals for final analysis

Consider the following UML to begin your development. It may be incomplete. Document fully any changes or additions you may make to this design:

2301_Figure.jpg

Note: The linked list that supports the CustomerQ must behave as a queue. The linked list that is the EventQueue must be in order of event time, i.e. as you work from the rear to the front of the queue the event time gets smaller. Consider:

54_Figure1.jpg

When you generate the next event of the type pulled off the event queue front and it should occur at 11:35 it must be inserted between the event at 11:30 and the event at 11:49.

Submit all source code files and your data results which include the simulation raw data and the calculated results in a Word doc or pdf.

This assignment is to be accomplished using extreme programming - pair up with someone in the class and using pilot/copilot share the programming/overseeing duties as we discussed in class. It works best if you share the duties even if one of you is a much more adept programmer.

Reference no: EM131515899

Questions Cloud

Analyze distinguish among various transportation documents : This is the company president here in our Hangzhou, China location. Analyze distinguish among the various transportation documents.
What factors were critical in integrating your m&a : Discuss the purpose of performing due diligence for your M&A? What factors were critical in integrating your M&A
Value the bond midcorp has issued : Value the bond Midcorp has issued, with the following characteristics: Par: $1,000. Time to maturity: 28 years. Coupon rate: 7.50 percent.
Amount per capita spending for health care : If this amount increased by 7 percent a year, what would be the amount per capita spending for health care in 14 years?
Simulate a scenario with two server windows : Simulate a scenario with two server windows and two queues. When a group of customers arrive each individual in the group will choose the same queue.
Quantitative information about investment choices : You have decided to gather more quantitative information about each of the investment choices. You have found that, over the long-term
Holder of a portfolio : If you are the holder of a portfolio, when would you feel satisfied that the portfolio is optimum? If you were an investment advisor
Three forks restaurant owners : Henri and Lila who own the Three Forks Restaurant have decided to possibly purchase a home using an FHA or VA product, (since Henri is also a veteran).
Change in price the bond will experience in dollars : You believe that in one year, the yield to maturity will be 8.0 percent. What is the change in price the bond will experience in dollars?

Reviews

len1515899

6/2/2017 4:42:18 PM

Submit all source code files and your data results which include the simulation raw data and the calculated results in a Word doc or pdf. 50 marks – correct implementation of the classes and execution of the code. 30 marks – results and documentation.

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd