What is the longest wait any one customer experienced

Assignment Help Basic Computer Science
Reference no: EM131681277

Question: (Supermarket Simulation) Write a program that simulates a check-out line at a supermarket. The line is a queue. Customers arrive in random integer intervals of 1 to 4 minutes. Also, each customer is serviced in random integer intervals of 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:

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

2) At the first customer's arrival time: Determine customer's service time (random integer from 1 to 4); Begin servicing the customer; Schedule arrival time of next customer (random integer 1 to 4 added to the current time).

3) For each minute of the day: If the next customer arrives, Say so; Enqueue the customer; Schedule the arrival time of the next customer. If service was completed for the last customer, 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's the maximum number of customers in the queue at any time?

b) What's the longest wait any one customer experienced?

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

Reference no: EM131681277

Questions Cloud

What is discrimination, how is it different from prejudice : What is discrimination and how is it different from prejudice. Give examples to describe the different kinds of discrimination in our society today
Use tools often enough to make purchase worth : Some individuals cannot afford large investment necessary to purchase all of appropriate tools while others do not use tools often enough to make purchase worth
Competent in a health organization : Give three examples of how a leader can ensure that all employees are culturally competent in a health organization.
Systems in health organizations : How are Planning and Decision Making linked and used by leaders as systems in health organizations?
What is the longest wait any one customer experienced : (Supermarket Simulation) Write a program that simulates a check-out line at a supermarket. The line is a queue. Customers arrive in random integer intervals.
What difference might this make for the ability of u.s : What difference might this make for the ability of U.S. companies, such as automobile manufacturers, to compete internationally
Analyze the commonly used financial ratios by categories : Discuss the roles played by financial ratios in general and analyze the commonly used financial ratios by categories.
Specific disease prevalence for a population : 1. Discuss how to estimate specific disease prevalence for a population?
Performance-binary-search-tree-based duplicate elimination : (Duplicate Elimination) We've seen that duplicate elimination is straightforward when creating a binary search tree. Describe how you would perform duplicate.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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