Log in / Register
Home arrow Business & Finance arrow The mathematics of financial models
< Prev   CONTENTS   Next >

Simulating a Queue

One of the well-studied areas in operations management is the theory of queues. Queuing problems have been extensively researched and applied in various areas of operations management (e.g., telecommunications, traffic engineering, computing network, and so on) since they were first discussed by Erlang in 1909. The philosophy underlying all queuing problems is based on the fact that there are customers (who arrive according to a prespecified distribution) and servers (who serve according to a prespecified distribution). Using this as a platform, one can then investigate various metrics, ranging from time taken to be served, to the time during which servers are busy, to the number of customers served, and so on. Given the variants on the queuing problems, Kendall, in 1953, suggested a convention that was in the form of A/BI k[1] to help classify basic queuing problems. Over time, this was extended to AIBI k/S/N/P[2] so as to help better classify different types of queuing problems. The interested reader is referred to Ross (2007) or Cooper (1981) for further discussion on queuing.

With the above backdrop, it is not too difficult to see that the simplest variation of the queuing problem happens when there is only one server and both the interarrival-time pdf of the customers and the service-time pdf of the servers are deterministic. In this instance, there are no unknowns, as metrics like waiting time, number of people in queue, time over which the server is busy, and so on can all be exactly determined if they are not already trivially zeroes. The problem gets trickier the moment one departs from these deterministic assumptions. In fact, one of the commonly used assumptions in queuing theory is the M/M/l queue (where there is one server, interarrival-time pdf of each customer has an exponential pdf with rate λ, and service-time pdf for each customer has an exponential pdf with rate) μ. Since one already knows how to simulate an exponential variate, it only remains for one to put all the pieces together so that quantities of interest can be monitored. Suppose, for example, that λ < μ[3] and one is interested in quantifying the probability that there is no one in the queue. To do this, one has to keep track of the number of people in the queue, the time of arrival, the time at which the service is completed, and so on. Table 4.11 illustrates the implementation of the queuing system.

As shown in Table 4.11, the commands given for any cell in row 7 all relate to the corresponding cells immediately above in row 6. Furthermore, the reader should also note that the entries in cells C4 and G4 are set to 0 to indicate the start of time, entry in cell D5 is set to 0 to indicate the state of the queuing process when the queue just starts being operational, and that the entry in cell E5 is set trivially to cell C5 (to signify the start of service the moment the first customer walks into the queue). To calculate the probability that there is no one in the queue, one has to first extend the rows further down until one reaches about 5,000 customers. Once this is done, one can now look at Column D and compute the proportion of times the cells in Column D show up 0 see the result to be 0.252.[4]

  • [1] A refers to the distribution of interarrival times examples of which include M (exponential pdf), D (deterministic pdf), En (Erlang pdf with shape parameter n) and, G (general pdf). B refers to the distribution of service times examples of which include M (exponential pdf), D (deterministic pdf), En (Erlang pdf with shape parameter n), and G (general pdf), k refers to the number of servers.
  • [2] S refers to the total number of arrivals the queuing system can contain. N refers to the size of the population that the arrivals come from. P refers to the priority nature of the service examples of which include First In First Out (FIFO) and Fast In First Out (FIFO).
  • [3] This assumption is necessary if the server is ever going to catch up with serving all the customers. Otherwise, over the long run, the server would always be busy and hence the probability of there being 0 customers in the queue would be trivially 0.
  • [4] The asymptotic result for this can be shown to be 1 – 4 that simplifies to 0.25 for the example in Table 4.11. This is discussed further in Chapter 9.
Found a mistake? Please highlight the word and press Shift + Enter  
< Prev   CONTENTS   Next >
Business & Finance
Computer Science
Language & Literature
Political science