CP164 Final: Queues - Simulations

36 views2 pages
14 Jun 2018
School
Course
Professor
Notes - Queues - Simulations
We can simulate the behaviour of a system using queues, including such things as:
people lining up for a movie or a bank
traffic flow
computer processes
We can then use these simulations to answer questions such as:
How many teller windows should be open at the start of the day?
Should there be a separate line for each tellers or one line for all tellers?
When should the bank open another teller window?
How many tellers do we need to make sure that all customers are served by closing time?
Note that the answers we receive from these simulations are only useful if the inputs are
reasonable approximations of reality. This requires observation, record-keeping, and data
analysis. (After all, GIGO.)
A system is composed of:
servers
entities which are performing a service, such as a grocery store clerk, a tech support
person at a call centre, a bank machine, or a computer CPU. Simulations may have
multiple servers. Servers take time to perform their service, and this time is
assigned a service-time distribution.
clients
entities which require a service and wait in a queue to be served by a server.
Simulations may have multiple queues for clients. Clients join a queue at a time
determined by an arrival rate.
How can this help? Imagine that a grocery store has to decide between opening up more
self-serve check-outs or staffing more check-outs. The store has kept records on how many
people use the store throughout the day. It knows the minimum, maximum, and average
amount of time a customer takes to use a self-serve checkout. It knows the same
information for the standard check-outs. It can then run a series of computer simulations
using these numbers with more and fewer of each type of check-out and try to determine
the best value for their money.
The Array-Based Queue Implementation
The general notes about an array-based implementations for a Stack also apply to a Queue.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Document Summary

We can simulate the behaviour of a system using queues, including such things as: people lining up for a movie or a bank traffic flow computer processes. Note that the answers we receive from these simulations are only useful if the inputs are reasonable approximations of reality. This requires observation, record-keeping, and data analysis. (after all, gigo. ) A system is composed of: servers entities which are performing a service, such as a grocery store clerk, a tech support person at a call centre, a bank machine, or a computer cpu. Servers take time to perform their service, and this time is assigned a service-time distribution. clients entities which require a service and wait in a queue to be served by a server. Clients join a queue at a time determined by an arrival rate. Imagine that a grocery store has to decide between opening up more self-serve check-outs or staffing more check-outs.