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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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