 We're going to do a very brief review of the essentials of queuing systems for the purpose of studying simulation. This is part of a simulation modeling and analysis course. We find that a lot of the simulation models that we work with are variations of queuing models. Welcome to the lecture. We have the structure of the basic queuing model. You see in the diagram we've got the input source, the sending the customers into the queuing system. The customers may or may not have to wait in a queue, be delayed in queue before they can go into service and come out as hopefully happy served customers. The input source is the calling population where they come from, the source of the arrivals into the system. This population may be infinite, may be finite. Inter-arrival time is the time between successive arrivals. If we say that arrivals come in randomly with a particular average at a specific constant average rate, then basically we are describing a Poisson process. The average rate of the Poisson process is the mean, lambda, and it's equal to the inverse of the inter-arrival time. The average rate is always, the rate is always going to be the inverse of time and vice versa. And when you play around with the units, you'll see that that so we'll probably have an opportunity to do this with a problem later on. The queue is usually often specified to have a maximum but often the maximum is infinite and that's the simplest case that we work with. The service discipline applies to the queue and it's the order in which the queue members are selected for service. So customers could be lined up, they could be sitting around randomly, they could be at home waiting to be called. But the service discipline is going to determine who gets called first. It'll be FIFO, first in, first out, that's the most usual. LIFO, last in, first out, random. Usually random applies when the items, the entities in the queue don't really have any issue with sitting around forever. Not human beings then. And of course, priority where someone might have a priority and gets pulled out of the queue to go into service first. The service mechanism, you can have one or more service facilities. Each facility can have one or more equal parallel service channels. These are the servers, kind of like the number of tellers in a bank. The service time, every individual, every entity that's going to come into the system and go into service has some kind of random time that's drawn from a probability distribution assigned to it. Where do we see queuing systems in the real world? Well, as you can see here, everywhere. In the commercial arena, going from a one chair barbershop to a supermarket to a gas station to larger and more complex queuing models. In the transportation area, we have toll booths, we have shipping, we have traffic lights. We've got the loading unloading at a dock, a parking lot, taxis, elevators, city bike. And in business, of course, we've got the clerical pools, industrial service systems, maintenance repair shops, social service systems, the judicial system, legislative healthcare. There's almost nothing that you can't model as a queuing system, although there are other models that might apply better to certain systems than queuing systems. But it still is very, very, very broad application area. Important terminology of queuing systems. First of all, the state of the system is generally taken to mean the number of customers that are currently in the system. That's the state of the system. Queue length, of course, is the number of customers waiting for service, which generally speaking is going to be the state of the system minus the number of customers being served. S is the number of servers. Lambda, as we saw before, is the mean arrival rate for incoming customers. Mu is the way we designate the mean service rate. So 1 over lambda is the expected into arrival time. 1 over mu is the expected service time. Rho is the utilization factor. It's the fraction of time the servers are busy. And it can be designated as lambda divided by s times mu, or in the case of 1 server, just lambda divided by mu. When a queuing system is stable, if it runs 24-7 for a long enough time, it goes into a steady state condition, into a state of dynamic equilibrium. Dynamic equilibrium basically means whenever we look at the system, it's going to look approximately the same, even though it's dynamic, not static. Customers are coming in, customers are served, customers are leaving. And yet there's always the same number in queue, the same number being served, the same number in the system. It doesn't look any different if we take snapshots at different points in time, although of course it's different entities, different customers that are there each time. The same rate in is equal to rate out. The utilization factor, Rho, if it's not less than 1, remember the fraction you had before, with a single server, it's lambda over mu. If it's greater than 1, the system is not stable. It has too many people coming in and not enough people going out. And so it won't reach this state of dynamic equilibrium. What you see here are the output measures from the system, the dependent variables you might call them from the queuing system. They're the metrics, they're the measures of effectiveness, MOEs or measures of performance. We use these measures to indicate the performance of a system. What are they? The expected number of customers in the system. Remember, these words expected mean we're talking about population means. We call that L. LQ is the expected number of customers in the queue. W is the expected waiting time in the system. That's including service time, so it's not all real weight in human language. WQ is the expected time in queue. As we know, there isn't just a single queuing model. How do we classify queuing models? We need to be able to discuss them and identify what kind of system we're talking about. Well, we say we have a certain number of phases. How many workstations, let's say? How many times does a customer have to go into service? There may be different service facilities. They may be in order. There may be a choice. They may have to go through phases, all the phases. First to this one, then to that one, then to the third one. How many channels are there? The channels are the identical servers at a particular workstation. What's the queue discipline? What are the rules by which we determine which entity waiting in line is going to be taken next? As we saw, we've got FIFO, LIFO, random and priority. And of course, there's something called preemptive priority where you can interrupt service of some lower priority, but not higher. Some other things that we might be talking about, and this is very important to simulation, bulking, reneging and jockeying. Bulking is where you come into a system and you look at it and you say, wow, I'm not going in. I'm going to go with different dates. Too big, too much traffic. Reneging is where you do go in. It's busy. You wait in line for a certain amount of time and then you turn around and say, no, no, I can't waste any more time here and you walk out. Jockeying is where you have multiple lines, let's say one in front of each server. And you go to one, you're not happy. You go to another and you go back to the first one. So that sometimes the system allows it, sometimes the system doesn't allow it. Jockeying from one line to another where each server has his or her own line. We classify queuing models, we call it the PMMSQ system. The P stands for the number in the population. If it's infinite, we usually leave that off. M and M are Markovian. The first one stands for Poisson arrivals. The second for exponential service. If other distributions are used instead, a different letter would be substituted. S is the number of servers. Queue is the maximum queue size. If the queue is infinite, that can be left off. M, M1 queuing model is the model that's governed by Poisson arrivals, exponential service times, a single server, single phase, a FIFO service discipline, infinite queue size, infinite source. To compute the expected measures of effectiveness for the M1 queuing system, the formulas are really quite simple. You may not think so until you see the next one. These are the four basic measures of effectiveness that we'd like to look at. And they all basically require variations of lambda and mu. So it's really not that bad. Here's the MMSQ. It looks very much like the M1 queue you saw a little bit earlier. The only difference is that there are several servers, a number greater than one, and a customer can be in service at each of the servers. The servers are identical, and yet there's a single queue with a single service discipline. To compute the expected measures of performance for the MMSQ, this gets a little bit more hairy, as you can see. We need to define PN, the probability that there are N customers in the system, P0, the probability that there are no customers in the system, and then the formulas follow as you can see. We may have a spreadsheet on Blackboard. If you're in my course, it'll be in the Blackboard course that has formulas so that you can compute these probabilities automatically and just check your work and make sure that the spreadsheets worked correctly. One of the more interesting things about studying queuing systems is that when we look at the expected measures of performance, there are relationships among them. This has been very widely studied and it sometimes ends up being fascinating, especially when it comes to simulation. We want to be able to see the same relationships coming out of our simulation that we would see in the real world. You can see how L and W, the number in the system, the time in the system, L queue, the number in the queue, the W queue, the time in the queue, how all of these things are related to each other in a very, very simple way, but it's a multiplicative model, not a linear model like we are often expected to use in our statistics courses. I truly hope we're going to have a chance at the end of the course when we do experimental design in simulation to come back and work more with this in a simulation context. I hope you enjoyed this very, very brief overview of queuing systems. It might have seemed to be a little bit off topic in the context of a course called Simulation Modeling and Analysis, but we have found that much of the work we do in simulation modeling and analysis deals with queuing systems, and it's nice to have the systems, the methods, the terminology, the measures of performance to have a place where we can review them and come back to them when we need it, and that was the purpose of this lecture. Thank you for attending this lecture.