CSC401 Simulation Techniques Exam 1 is scheduled to be given on Wednesday, October 13, 2010 This exam will cover Chapters 1 – 6 of the text book. It will be designed as a 1.25 hour in-class exam with a take-home component.. You will be allowed to take up to the full 100 minutes of the period. I will post the take-home portion Wednesday, October 6, on blackboard. This part will be to complete a simulation. You will be allowed to bring two pages of notes to the in-class portion of the exam. Everything you should know for the exam: Please check the assessment paper – all topics will eventually be covered and questions will appear on the midterm or final. Chapter 1 Introduction to Simulation All of first chapter should be studied for the exam. The material has good topics for exam questions: the what and how of simulation from an overall standpoint. A simulation is the imitation of the operation of a real-world process or system over time. Simulation involves the generation of an artificial history of a system and the observation of that artificial history to draw inferences concerning the operating characteristics of the real system. Develop a system model Set of assumptions concerning the operation of the system. Mathematical, logical, symbolic relationships between the entities (objects of interest) of the system. Validated system can be used to investigate what-if questions about the real-world system such as Analysis tool to predict the effect of system changes on performance Design tool to predict the performance of new systems Sometimes a model can be done analytically via mathematical techniques. Many systems are too complex for mathematical solutions and require computer-based simulation. 1.1When simulation is the appropriate tool. Study and experimentation of internal interactions of a complex system Informational, organizational, environmental changes can simulated and there effect on the model’s behavior observed. Knowledge gained during design of simulation model is valuable. Verify analytic solutions. Simulation models for training. Animation facilitates visualization. 1.2 When simulation is not appropriate 1. and 2. Problem can be solved easily analytically or by common sense. 3. Don’t use if easier to perform direct experiments 4. Don’t use if costs exceed savings. 5. and 6. Don’t use simulation if resources or time are not available. 7. If no data is available, not even estimates, simulation is not advised. 8. Don’t use if not enough time or personnel to validate model. 9. Simulation tough if managers have unreasonable expectations 10. If system behavior too complex or undefined, simulation not appropriate. (Human behavior) 1.3 Advantages and disadvantages or simulation Simulation mimics what happens in real life. Simulation model does not need to make dubious assumptions. Output from model directly correspond to outputs from real system. 1.4 Areas of application Simulation for risk analysis is growing: options pricing and insurance. Simulation of large-scale systems, such as the internet backbone and wireless networks, are growing as hardware and software increase their capability to handle large numbers of entities in a reasonable time. Simulation models of automated material handling systems 1.5 Systems and system environment A system is defined as a group of objects that are joined together in some regular interaction or interdependence toward accomplishment of some purpose. A system is often affected by changes occurring outside the system. Such changes are said to occur in the system environment. In modeling systems, it is necessary to decide on the boundary between the system and its environment. This decision may depend on the purpose of the study. Setting of interest rate may be a constraint or may be an activity of the system. 1.6 Components of a system Entity – object of interest in the system Attribute – property of an entity Activity – represents a time period of specified length Collection of entities that compose a system for one study may be only a subset of the overall system State of a system – that collection of variables necessary to describe the system at any time, relative to the objectives of the study Event – an instantaneous occurrence that might change the state of the system. Endogenous – activities and events occurring within a system Exogenous – activities and events in the environment that affect the system. 1.7 Discrete and continuous systems Although few systems are wholly discrete or continuous, usually one type of change usually predominates for most systems A discrete system is one in which the sate variables change only at discrete set of points in time. A continuous system is one in which the state variables change continuously over time. 1.8 Model of a system A model is defined as a representation of a system for the purpose of studying the system. Usually only need those aspects of the system that affect the problem under investigation. Chapter 3 1.9 Types of models Models can be classified as being mathematical or physical Mathematical models use symbolic notation and mathematical equations to represent a system A simulation model is a particular type of mathematical model A static simulation model, some time called a Monte Carlo simulation, represents a particular point in time. Dynamic simulation models represent systems as they change over time. Simulation models that contain no random variables are classified as deterministic. Have a known set of inputs which will result in a unique set of outputs A stochastic simulation model has one or more random variables as inputs. Random inputs lead to random outputs. Since outputs are random, they can be considered only as estimates of the true characteristics of a model In a stochastic simulation, the output measures must be treated as statistical estimates of the true characteristics of the system. Discrete models can be used to model a continuous system. Models in text are discrete, dynamic, and stochastic 1.10 Discrete-event systems simulation Discrete –event systems simulation is the modeling of systems in which the state variables changes only at a discrete set of points in time The simulation models are analyzed by numerical methods rather than by analytical methods Analytical methods employ the deductive reasoning of mathematics to “solve” the model. Numerical methods employ computational procedures to “solve” mathematical models. Simulation models which employ numerical models are run rather than solved. Artificial history of the system generated from model assumptions and observations are collected to be analyzed and to estimate the true system performance measures. Large amount of data usually requires the aid of a computer 1.11 Steps in a simulation study Problem formulation Setting of objectives and overall project plan Model conceptualization Art and science Data collection Interplay between construction of the model and collection of needed data Model translation Program the model Verified? Verify the computer program prepared for the simulation model to insure it performs properly Validated? Validation usually is achieved through calibration of the model Experimental design The alternatives that are to be simulated must be determined. Production runs and analysis Production runs, and their subsequent analysis, are used to estimate measures of performance for system designs that are being simulated. More runs? Given the analysis of runs that have been completed, additional runs may be needed and may require a different experimental design. Documentation and reporting Program documentation Progress documentation important to keep project on course Implementation Depends on how well previous steps have been performed Model and underlying assumptions properly communicated important Phase 1: problem formulation, and setting of objectives and overall design Phase 2: model conceptualization, data collection, model translation, verification, and validation Phase 3: running the model, experimental design, production runs and analysis, additional runs Phase 4: documentation and reporting, and implementation Problems: Page 22 + 1, 2, 3, 4, 11 Chapter 2 Simulation Examples This chapter should also be looked at as prime exam material. We looked carefully at both the grocery store and the call center. You should be able to handle either in a spreadsheet. What is meant by “manually” in the following? This chapter presents several examples of simulation that can be performed by devising a simulation table either manually or with a spreadsheet. The simulation table provides a systematic method for tracking system state over time. Methodology of discrete-system simulation 1. Determine the characteristics of each of the inputs to the simulation. These are often modeled as probability distributions, either continuous or discrete. 2. Construct a simulation table. Each simulation table is different, for each is developed for the problem at hand. For each repetition or trial there are a set of inputs and one response. 3. For each repetition i, generate a value for each of the p inputs, and evaluate the function, calculating a value of the response yi. The input values may be computed by sampling values from the distributions chosen in step 1. A response typically depends on the inputs and one or more previous responses. The inventory example has a closed-form (mathematical) solution to compare to the simulation solution. This is an important concept. Note that I skipped over the inventory section (Section 2.2). 2.1 Simulation of queuing systems A queueing system is described by its calling population, the nature of the arrivals, the service mechanism, the system capacity, and the queueing discipline. A simple single-channel queueing system is shown in figure 2.1. Queueing systems require the concepts of system state, events, and simulation clock (Chapter 3). The state of the system is the number of units in the system and the status of the server, busy or idle. An event is a set of circumstances that causes an instantaneous change in the state of the system. In a single-channel queueing system there are only two possible events that affect the state of the system: arrival event and the departure event. The queueing system includes the server, the unit being serviced ( if there is one), and the units in the queue (if any). The simulation clock is used to track simulated time. If a unit has just competed service, the simulation proceeds in the manner shown in the flow diagram of figure 2.2 The arrival even occurs when a unit enters the system. figure 2.3 If the server is busy, the unit enters the queue. If the server is not busy, the unit begins service. After the completion of the service, the server will either become idle or will remain busy with the next unit. Simulations of queueing systems generally require the maintenance of an event list for determining what happens next. The event list tracks the future times at which the different types of events occur. This chapter simplifies the simulation by tracking each unit explicitly. Simulation clock times for arrivals and departures are computed in a simulation table customized for each problem. In simulation, events usually occur at random times, the randomness imitating uncertainty in real life. Why are random numbers needed? What is the difference between random digits and random numbers? Pseudo-random numbers? In a single-channel queueing simulation, interarrival times and service times are generated from the distributions of these random variables. For simplicity, assume that the times between arrivals were generated by rolling a die five times and recording the up face. The second time of interest is the service time. Service times generated at random from a distribution of service times. Now, the interarrival times and service times must be meshed to simulate the singlechannel queueing system. Example 2.1 Single-Channel Queue One of our favorites A small grocery store has only one checkout counter. Customers arrive at this checkout counter at random times that are from 1 to 8 minutes apart. Each possible value of interarrival time has the same probability of occurrence, as shown in Table 2.6. The service times vary from 1 to 6 minutes, with the probabilities shown in Table 2.7. The problem is to analyze the system by simulating the arrival and service of 100 customers. Compare the findings that follow from the simulation to what you might find using Little’s law. 1. The average waiting time for a customer = total time customers wait / total number of customers = 174 minutes / 100 customers = 1.74 minutes / customer 2. The probability that a customer has to wait in the queue = number of customers who wait / total number of customers = 46 / 100 = .46 3. The proportion of the time the server is idle = total time the server is idle / total time of the simulation = 101 / 418 = .24 so the probability that the server is busy is 1 - .24 = .76 This means the server is utilized 76% of the time. 4. The average service time is = total service time in minutes / total number of customers = 317 minutes / 100 = 3.17 This result can be compared with the expected service time by finding the mean of the service–time distribution E ( S ) sp ( s ) This is the sum of the service time s times the probability s 0 of the service time. s and p(s) are from table 2.7. This yields 3.2. If the simulation is run longer the average and expected value will get closer together. 5. The average time between arrivals = sum of all times between arrivals in minutes / number of arrivals – 1 = 415 minutes / 99 = 4.19 minutes nothing before 1 or after 100 6. The average waiting time of those who wait = total time customers wait in queue / total number of customers that wait = 174 minutes / 54 = 3.22 minutes 7. The average time a customer spends in the system = total time customers spend in the system / total number of customers = 491 minutes / 100 = 4.91 minutes also = average time customer spends waiting in the queue + average time customer spends in service = 1.74 minutes + 3.17 minutes = 4.91 minutes In Section 2.3 we worried about the reliability problem. Came back to reliability in Chapter 5. We did do a problem from section 2.3 about the project simulation on page 54+ We also spent some time in this secion thinking about random digits, random numbers and their applicability Problems Page 83: # 21 - 27, 44 - 47 One of the spreadsheet problems will be part of the take-home. Chapter 3 General Principles Most of Chapter 3 should be studied in detail for the exam Everything in the Introduction and Section 3.1 is important Section 3.1 An activity typically represents a service time, an interarrival time, or any other processing time whose duration has been characterized and defined by the modeler. An activity’s duration may be specified in a number of ways: 1. Deterministic—for example, always exactly 5 minutes; 2. Statistical—for example, as a random draw from among 2, 5, 7 with equal probabilities; 3. A function depending on system variables and/or entity attributes The duration of an activity is computable from its specification at the instant it begins. Its duration is not affected by the occurrence of other events (unless, as is allowed by some simulation packages, the model contains logic to cancel an event). To keep track of activities and their expected completion time, at the simulated instant that an activity duration begins, an event notice is created having an event time equal to the activity’s completion time. A delay’s duration is not specified by the modeler ahead of time, in contrast to an activity, but rather is determined by system conditions. For example, customer’s delay in a waiting line may be dependent on the number and duration of service of other customers ahead in line as well as the availability of servers and equipment. Quite often, a delay’s duration is measured and is one of the desired outputs of a model run. Typically, a delay ends when some set of logical conditions becomes true or one or more other events occur. A delay is sometimes called a conditional wait, an activity an unconditional wait. The completion of an activity is an event, often called a primary event, that is managed by placing an event notice on the FEL. The completion of a delay is sometimes called a conditional or secondary event, but such events are not represented by event notices, nor do they appear on the FEL. The systems modeled here are dynamic, changing over time. System state, entity attributes and the number of active entities, the contents of sets, and the activities and delays currently in progress are all functions of time and are constantly changing over time. Time itself is represented by a variable called CLOCK The definition of the model components provides a static description of the model. In addition, a description of the dynamic relationships and interactions between the components is also needed. Some questions that need answers include: 1. How does each event affect system state, entity attributes, and set contents? 2. How are activities defined (i.e., deterministic, probabilistic, or some other mathematical equation)? What event marks the beginning or end of each activity? 3. Which events trigger the beginning (and end) of each type of delay? Under what conditions does a delay begin or end? 4. What is the system state at time 0? What events should be generated at time 0 to “prime” the model—that is, to get the simulation started? A discrete-event simulation (hereafter called a simulation) proceeds by producing a sequence of system snapshots (or system images) that represent the evolution of the system through time. The mechanism for advancing simulation time and guaranteeing that all events occur in correct chronological order is based on the future event list (FEL). Time t is the value of CLOCK, the current value of simulated time. How is the clock managed? The length and contents of the FEL are constantly changing as the simulation progresses, and thus its efficient management in a computerized simulation will have a major impact on the efficiency of the computer program representing the model. Event-scheduling / time-advance algorithm Step1 Remove the event notice for the imminent event (event 3, time t1) from FEL Step 2 Advance CLOCK to imminent event time (i.e. advance clock from t to t1) Step 3 Execute imminent event: update system state, change entity attributes and set membership as needed. Step 4 Generate future events (if necessary) and place their event notices on FEL, ranked by event time. Step 5 Update cumulative statistics and counters In addition, a service-completion event will be generated and scheduled at the time of an arrival event provided that, upon arrival, there is at least one idle server in the server group. Every simulation must have a stopping event, here called E, which defines how long the simulation will run. There are generally two ways to stop a simulation: When using a simulation package or even when doing a manual simulation, a modeler adopts a world view or orientation for developing a model. The most prevalent world views are the event-scheduling world view, as discussed in the previous section, the process-interaction world view, and the activity-scanning world view. When using a package that supports the process-interaction approach, a simulation analyst thinks in terms of processes. Both the event-scheduling and the process-interaction approach use a variable time advance— that is, when all events and system state changes have occurred at one instant of simulated time, the simulation clock is advanced to the time of the next imminent event on the FEL. The activity-scanning approach, in contrast, uses a fixed time increment and a rule-based approach to decide whether any activities can begin at each point in simulated time. See if you can re-read Subsection 3.1.3 easily, since we have spent quite a bit of time on queueing. I still like the dump truck problem Chapter 4 examples In this chapter I expect that you would be able to handle the mechanics of creating a Java simulation program as well as a spreadsheet, and the mechanics of using Extend. Using a Spreadsheet, Programming a simulation with a high-level language such as Java Using simulation software There are many examples at the end of the chapter to choose for the take-home portion. Review your work. What about problem 12 on page 133, 15, or 27? Chapter 5 Statistical Models in Simulation To me, some of the sections are more important than others. The introduction is good. Purpose & Overview The world the model-builder sees is probabilistic rather than deterministic. Some statistical model might well describe the variations. An appropriate model can be developed by sampling the phenomenon of interest: Select a known distribution through educated guesses Make estimate of the parameter(s) Tes0t for goodness of fit 5.1 Review of Terminology and Concepts This section contains important simulation concepts and should be carefully studied Discrete Random Variables X is a discrete random variable if the number of possible values of X is finite, or countably infinite. The collection of pairs [xi, p(xi)], i = 1,2,…, is called the probability distribution of X, and p(xi) is called the probability mass function (pmf) of X. Continuous Random Variables X is a continuous random variable if its range space Rx is an interval or a collection of intervals. f(x) is denoted as the pdf of X Cumulative Distribution Function Cumulative Distribution Function (cdf) is denoted by F(x), where F(x) = P(X <= x) Discrete and continuous cases All probability questions about X can be answered in terms of the cdf Expectation The expected value of X is denoted by E(X) If X is discrete If X is continuous a.k.a the mean, m, or the 1st moment of X A measure of the central tendency The variance of X is denoted by V(X) or var(X) or Definition: V(X) = E[(X – E[X]2] 2 Also, V(X) = E(X2) – [E(x)]2 A measure of the spread or variation of the possible values of X around the mean The standard deviation of X is denoted by Definition: square root of V(X) Expressed in the same units as the mean To compute variance of X, we first compute E(X2): 5.2 Useful Statistical Models I’m not interested in all of theses Queueing Systems In a queueing system, interarrival and service-time patterns can be probablistic Sample statistical models for interarrival or service time distribution: Exponential distribution: if service times are completely random Normal distribution: fairly constant but with some random variability (either positive or negative) Truncated normal distribution: similar to normal distribution but with restricted value. Gamma and Weibull distribution: more general than exponential (involving location of the modes of pdf’s and the shapes of tails.) Inventory and supply chain -not interested in Reliability and maintainability Time to failure (TTF) Exponential: failures are random Gamma: for standby redundancy where each component has an exponential TTF Weibull: failure is due to the most serious of a large number of defects in a system of components Normal: failures are due to wear Other areas - a little much For cases with limited data, some useful distributions are: Uniform, triangular and beta Other distribution: Bernoulli, binomial and hyperexponential. 5.3 Discrete Distributions These are okay. Should be familiar – what is it that makes each unique (what you use in simulation) Discrete random variables are used to describe random phenomena in which only integer values can occur. Bernoulli trials and Bernoulli distribution Binomial distribution Geometric and negative binomial distribution Poisson distribution Bernoulli Trials and Bernoulli Distribution Bernoulli Trials: Consider an experiment consisting of n trials, each can be a success or a failure. Binomial Distribution The number of successes in n Bernoulli trials, X, has a binomial distribution. Geometric & Negative Binomial Distribution Geometric distribution The number of Bernoulli trials, X, to achieve the 1st success: Negative binomial distribution The number of Bernoulli trials, X, until the kth success Poisson Distribution Poisson distribution describes many random processes quite well and is mathematically quite simple. E(X) = = V(X) 5.4 Continuous Distributions Continuous random variables can be used to describe random phenomena in which the variable can take on any value in some interval. The distributions listed here each have unique ideas associated with them Uniform Distribution A random variable X is uniformly distributed on the interval (a,b), U(a,b), if its pdf and cdf are......page 166 P(x1 < X < x2) is proportional to the length of the interval [F(x2) – F(x1) = (x2-x1)/(b-a)] E(X) = (a+b)/2 V(X) = (b-a)2/12 U(0,1) provides the means to generate random numbers, from which random variates can be generated. Exponential Distribution A random variable X is exponentially distributed with parameter > 0 if its pdf and cdf are.......page 167 Memoryless property For all s and t greater or equal to 0: P(X > s+t | X > s) = P(X > t) Normal Distribution A random variable X is normally distributed has the pdf...... Mean: please see discussion starting on page 173 Variance: Special properties: . f(-x)=f(+x); the pdf is symmetric about . The maximum value of the pdf occurs at x = ; the mean and mode are equal. Evaluating the distribution: Use numerical methods (no closed form) Independent of and using the standard normal distribution: Weibull Distribution A random variable X has a Weibull distribution if its pdf has the form...page 180 3 parameters: Location parameter: Scale parameter: Shape parameter. Example: = 0 and = 1: have to simplify to make it manageable as in homework Lognormal Distribution A random variable X has a lognormal distribution if its pdf has the form... Mean E(X) = e+2/2 Variance V(X) = e+2/2 (e2 - 1) Relationship with normal distribution – some things have to be positive When Y ~ N(, 2), then X = eY ~ lognormal(, 2) Parameters and 2 are not the mean and variance of the lognormal Poisson Distribution – one of the big ones Definition: N(t) is a counting function that represents the number of events occurred in [0,t]. A counting process {N(t), t>=0} is a Poisson process with mean rate if: Arrivals occur one at a time {N(t), t>=0} has stationary increments {N(t), t>=0} has independent increments Properties Equal mean and variance: E[N(t)] = V[N(t)] = t Stationary increment: The number of arrivals in time s to t is also Poisson-distributed with mean (t-s) Interarrival Times - Poisson Consider the interarrival times of a Possion process (A1, A2, …), where Ai is the elapsed time between arrival i and arrival i+1 The 1st arrival occurs after time t iff there are no arrivals in the interval [0,t], hence: P{A1 > t} = P{N(t) = 0} = e-t P{A1 <= t} = 1 – e-t [cdf of exp()] Interarrival times, A1, A2, …, are exponentially distributed and independent with mean 1/ Splitting and Pooling - Poisson Splitting: Suppose each event of a Poisson process can be classified as Type I, with probability p and Type II, with probability 1-p. N(t) = N1(t) + N2(t), where N1(t) and N2(t) are both Poisson processes with rates p and (1-p) Pooling: Suppose two Poisson processes are pooled together N1(t) + N2(t) = N(t), where N(t) is a Poisson processes with rates 1 + 2 Nonstationary Poisson Process (NSPP) Poisson Process without the stationary increments, characterized by (t), the arrival rate at time t. Empirical Distributions - Poisson A distribution whose parameters are the observed values in a sample of data. May be used when it is impossible or unnecessary to establish that a random variable has any particular parametric distribution. Advantage: no assumption beyond the observed values in the sample. Disadvantage: sample might not cover the entire range of possible values. P. 220, #7 – 10 and #24 - 28 Chapter 6 Queueing Models Sections 1, 2, 3, and 4 are important. We will return to 6.6 – you are still responsible for it. Queueing models provide the analyst with a powerful tool for designing and evaluating the performance of queueing systems. Typical measures of system performance: Server utilization, length of waiting lines, and delays of customers For relatively simple systems, compute mathematically For realistic models of complex systems, simulation is usually required. 6.1 Characteristics of Queueing Systems Key elements of queueing systems: Customer: refers to anything that arrives at a facility and requires service, e.g., people, machines, trucks, emails. Server: refers to any resource that provides the requested service, e.g., repairpersons, retrieval machines, runways at airport. 6.1.1 Calling Population Calling population: the population of potential customers, may be assumed to be finite or infinite. Finite population model: if arrival rate depends on the number of customers being served and waiting, e.g., model of one corporate jet, if it is being repaired, the repair arrival rate becomes zero. Infinite population model: if arrival rate is not affected by the number of customers being served and waiting, e.g., systems with large population of potential customers. 6.1.2 System Capacity System Capacity: a limit on the number of customers that may be in the waiting line or system. 6.1.3 Arrival Process For infinite-population models: In terms of interarrival times of successive customers. Random arrivals: interarrival times usually characterized by a probability distribution. Most important model: Poisson arrival process (with rate ), where An represents the interarrival time between customer n-1 and customer n, and is exponentially distributed (with mean 1/). Scheduled arrivals: interarrival times can be constant or constant plus or minus a small random amount to represent early or late arrivals. e.g., patients to a physician or scheduled airline flight arrivals to an airport. At least one customer is assumed to always be present, so the server is never idle, e.g., sufficient raw material for a machine. For finite-population models: Customer is pending when the customer is outside the queueing system, e.g., machine-repair problem: a machine is “pending” when it is operating, it becomes “not pending” the instant it demands service form the repairman. Runtime of a customer is the length of time from departure from the queueing system until that customer’s next arrival to the queue, e.g., machine-repair problem, machines are customers and a runtime is time to failure. 6.1.4 Queue Behavior and Queue Discipline Queue behavior: the actions of customers while in a queue waiting for service to begin, for example: Balk: leave when they see that the line is too long, Renege: leave after being in the line when its moving too slowly, Jockey: move from one line to a shorter line. Queue discipline: the logical ordering of customers in a queue that determines which customer is chosen for service when a server becomes free, for example: First-in-first-out (FIFO) Last-in-first-out (LIFO) Service in random order (SIRO) Shortest processing time first (SPT) Service according to priority (PR). 6.1.5 Service Times and Service Mechanism Service times of successive arrivals are denoted by S1, S2, S3. May be constant or random. {S1, S2, S3, …} is usually characterized as a sequence of independent and identically distributed random variables, e.g., exponential, Weibull, gamma, lognormal, and truncated normal distribution. A queueing system consists of a number of service centers and interconnected queues. Each service center consists of some number of servers, c, working in parallel, upon getting to the head of the line, a customer takes the 1st available server. 6.2 Queueing Notation A notation system for parallel server queues: A/B/c/N/K A represents the interarrival-time distribution, B represents the service-time distribution, c represents the number of parallel servers, N represents the system capacity, K represents the size of the calling population. Primary performance measures of queueing systems: Pn: steady-state probability of having n customers in system, Pn(t): probability of n customers in system at time t, : arrival rate, e: effective arrival rate, : service rate of one server, : server utilization, An: interarrival time between customers n-1 and n, Sn: service time of the nth arriving customer, Wn: total time spent in system by the nth arriving customer, WnQ: total time spent in the waiting line by customer n, L(t): the number of customers in system at time t, LQ(t): the number of customers in queue at time t, L: long-run time-average number of customers in system, LQ: long-run time-average number of customers in queue, w : long-run average time spent in system per customer, wQ: long-run average time spent in queue per customer. 6.3 Long-run Measures of Performance of Queueing Systems 6.3.1Time-Average Number in System L Compute using the total area under the function, The time-weighted-average number in queue 6.3.2 Average Time Spent in System Per Customer w The average time spent in system per customer, called the average system time 6.3.3 The Conservation Equation Conservation equation (a.k.a. Little’s law) Holds for almost all queueing systems or subsystems (regardless of the number of servers, the queue discipline, or other special circumstances). 6.3.4 Server Utilization Definition: the proportion of time that a server is busy. Observed server utilization, , is defined over a specified time interval [0,T]. Long-run server utilization is . For systems with long-run stability: Server Utilization and System Performance System performance varies widely for a given utilization In general, variability of interarrival and service times causes lines to fluctuate in length. 6.3.5 Costs in Queueing Problems Costs can be associated with various aspects of the waiting line or servers 6.4 Steady-State Behavior of Infinite-Population Markovian Models Markovian models: exponential-distribution arrival process (mean arrival rate = ). Service times may be exponentially distributed as well (M) or arbitrary (G). A queueing system is in statistical equilibrium if the probability that the system is in a given state is not time dependent: P( L(t) = n ) = Pn(t) = Pn. Mathematical models in this chapter can be used to obtain approximate results even when the model assumptions do not strictly hold (as a rough guide). Simulation can be used for more refined analysis (more faithful representation for complex systems). You should understand how each of the following queues operate 6.4.1 M/G/1 Queues No need to memorize what is going on – concepts are best. Single-server queues with Poisson arrivals & unlimited capacity. Suppose service times have mean 1/ and variance 2 and = < 1, the steady-state parameters of M/G/1 queue: No simple expression for the steady-state probabilities P0, P1, … L – LQ = is the time-average number of customers being served. M/M/1 Queues Suppose the service times in an M/G/1 queue are exponentially distributed with mean 1/, then the variance is 2 = 1/2. M/M/1 queue is a useful approximate model when service times have standard deviation approximately equal to their means. Effect of Utilization and Service Variability For almost all queues, if lines are too long, they can be reduced by decreasing server utilization () or by decreasing the service time variability ( 2). A measure of the variability of a distribution, coefficient of variation (cv): The larger cv is, the more variable is the distribution relative to its expected value Multiserver Queue The real question is what happens if we add another server? Are things linear as in the Poisson split of section 5.4? M/M/c/∞/∞ queue: c channels operating in parallel. Each channel has an independent and identical exponential service-time distribution, with mean 1/. To achieve statistical equilibrium, the offered load () must satisfy < c, where /(c) = is the server utilization. 6.5 Steady-State Behavior of Finite-Population Models This is worth a good read to understand the concepts involved When the calling population is small, the presence of one or more customers in the system has a strong effect on the distribution of future arrivals. 6.6 Networks of Queues This is worth a good read to understand the concepts involved. Many systems are naturally modeled as networks of single queues: customers departing from one queue may be routed to another.