What is the maximum number of customers in the queue

Assignment Help Computer Engineering
Reference no: EM133360715

Question: Designa program that simulates a checkout line at a supermarket. The line is a queue object. Customers (i.e., customer objects) arrive in random integer intervals of from 1 to 4 minutes. Also, each customer is serviced in random integer intervals of from 1 to 4 minutes. Obviously, the rates need to be balanced. If the average arrival rate is larger than the average service rate, the queue will grow infinitely. Even with "balanced" rates, randomness can still cause long lines. Run the supermarket simulation for a 12-hour day (720 minutes), using the following algorithm:

a) Choose a random integer between 1 and 4 to determine the minute at which the first customer arrives

b) At the first customer's arrival time, do the following:

Determine customer's service time (random integer from 1 to 4).

Begin servicing the customer.

Schedule the arrival time of the next customer (random integer 1 to 4 added to the current time).

c) For each minute of the day, consider the following:

If the next customer arrives, proceed as follows:

Say so.

Enqueue the customer.

Schedule the arrival time of the next customer.

If service was completed for the last customer, do the following:

Say so.

Dequeue next customer to be serviced.

Determine customer's service completion time (random integer from 1 to 4 added to the current time).

Now run your simulation for 720 minutes and answer each of the following:

a) What is the maximum number of customers in the queue at any time?

b) What is the longest wait any one customer experiences?

c) What happens if the arrival interval is changed from 1 to 4 minutes to 1 to 3 minutes?

Reference no: EM133360715

Questions Cloud

Do we usually use antibacterial soap : Do we usually use antibacterial soap? Would this influence the outcome of this experiment? How did the number of microbiota change as washing hands?
What would be your highest priorities in the implementation : What would be your highest priorities in the implementation of a distance education program? Where would you start? Why are they the highest priority
Reflect on the infections or illnesses : Reflect on the infections or illnesses you learned about. Compare and contrast your prior and current knowledge
Why is it important that your documents look professional : least four ways to format a document to make it look more professional and attractive. Why is it important that your documents look professional and attractive?
What is the maximum number of customers in the queue : What is the maximum number of customers in the queue at any time? What is the longest wait any one customer experiences?
Describe how each obtains its essential nutrients : Provide an example of an organism within each of the four main nutritional categories of microbes and describe how each obtains its essential nutrients.
Find all the minimum sop and all the minimum pos solutions : Find all the minimum SOP and all the minimum POS solutions and express each solution as the resulting sum of minterms.
Formulate the hypothesis and differential diagnosis : Describe the steps that can be taken to formulate the hypothesis and differential diagnosis for this case study.
Describes a variety of ways to embarrass your organization : What do you think of these? Are there any you would be more likely to try, or have you tried? What would your approach be when faced with senior management

Reviews

Write a Review

Computer Engineering Questions & Answers

  Describe the characteristics of a complex system

Describe the characteristics of a complex system. What is the essence of constructing a model? Name two types of simulations and distinguish between them.

  How the emerging technologies are impacting organizations

This week's journal article was focused on the Complexity of Information Systems Research in the Digital World. Complexity is increasing as new technologies.

  Write down a method definition to count

Write down a class declaration for a student that has String first, last, and middle names as data fields. Declare only the data members and a no-arg constructor.

  Create a web page that will prompt the user for a color name

Create a Web page that will prompt the user for a color name. Use this color name to write the text "This is your favorite color!".

  Develop an activity diagram based on the following

Develop an activity diagram based on the following narrative. Note any ambiguities or questions that you have as you develop the model.

  Convert the given floating-point numbers to decimal values

Convert the following IEEE single-precision floating-point numbers to their decimal values. Report the answers to three significant figures.

  Stop and wait arq

Porter’s Competitive Forces Model may be used in order to assess the opportunities and threats because of the influence of Internet.

  What could be the source of infection

Create your own any fictitious security attack scenario at any organization that requires an immediate attention. Use a security awareness training as the first

  The whole scope of internet users are forced change ipv6

till the whole scope of Internet users are forced to change to IPv6 there would be no acceleration of its deployment. The old saying comes into the forum; why stop using something that you know works and you are happy with this

  A program for leibniz formula for calculating the value

In PYTHON Divide your program into two modules -one which contains your class and another which demonstrates the class methods.

  Your company is currently investigating the use of linux

your company is currently investigating the use of linux. your manager has asked you to research the feasibility of

  Produce a feasibility study for a system for a business

L/615/1677-Systems Analysis & Design-Pearson BTEC Levels 4 and 5 Higher Nationals in Computing Specification.Analyse their system using a suitable methodology.

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