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

  Object oriented programming-getting started with classes

Suppose you are car shopping and want to store information about possible choices. Model, and implement an automobile class. Use a UML drawing tool such as Umbrello or Microsoft Visio to create a class diagram. Your class should have at least cons..

  Examine the clocktype class definition

Examine the ClockType class definition. How many attributes does it contain? Assume we have two classes and have instantiated an object from each class. How many copies of each class's attributes and methods exist in the instantiated objects?

  Write a method reversefirstk

Write a method reverseFirstK that accepts an integer k and a queue of integers as parameters and reverses the order of the first k elements of the queue, leaving the other elements in the same relative order.

  Develop a program that implement the seven array methods

Develop a program that Implement the 7 array methods and performs the same thing, but instead use a multi-dimensional array.

  Report the last letter of each word in the string

Write a sequence of Java statements that report the last letter of each word in the string.

  Illustrate how to create a bufferedinputstream

What are Buffered Input / Output Streams and why are they used - write some Java code to illustrate how to create a BufferedInputStream.

  Create a java class named headphones

1. Create a Java class named HeadPhones to represent a headphone set. The class contains:

  How to apply filter in servlet

Can you do this assignment please help int this how to apply filter in servlet create 3 class and show the filter chaining phenomenon..... Show the working program thanks.............

  Representing a topographic map

Consider a grid of size N x N that represents a topographic map. Each tile describes the characteristics of its terrain, which could be of two types: normal or mountainous. ROBBIE the robot must navigate from a starting position (xs, ys) to a goal..

  Loops and files

Convert an algorithm using control structures into Java and write a while loop

  Which statement is true about a non-static inner class

Which statement is true about a non-static inner class? Clicking the closing button on the upper-right corner of a frame generates a(n) _____ event.

  Write a program for sending and receiving a file

Write a program for sending and receiving a file that uses Hamming code for error correction - The encoder should generate file encoded that consists of codewords and should be twice the size of the original dataFile.

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