Answered step by step
Verified Expert Solution
Question
1 Approved Answer
8. 10. In the model of Section 14, suppose that Cl is the exponential distribution with rate 4 and G: is exponential with rate 3.
8. 10. In the model of Section 14, suppose that Cl is the exponential distribution with rate 4 and G: is exponential with rate 3. Suppose that the arrivals are according to a Poisson process with rate 6. Write a simulation program to generate data corresponding to the rst 1000 arrivals. Use it to estimate (a) the average time spent in the system by these customers. (b) the proportion of services performed by server 1. (c) Do a second simulation of the rst 1000 arrivals and use it to answer parts (a) and (b). Compare your answers to the ones previously obtained. . Suppose in the twoserver parallel model of Section 7.4 that each server has its own queue, and that upon arrival a customer joins the shortest one. An arrival nding both queues at the same size (or nding both servers empty) goes to server 1. (a) Determine appropriate variables and events to analyze this model and give the updating procedure. Using the same distributions and parameters as in Exercise 8, nd (b) the average time spent in the system by the rst 1000 customers. (c) the proportion of the rst I000 services performed by server 1. Before running your program, do you expect your answers in parts (b) and (c) to be larger or smaller than the corresponding answers in Exercise 8'? Suppose in Exercise 9 that each arrival is sent to server 1 with probability p, independent of anything else. (a) Determine appropriate variables and events to analyze this model and give the updating procedure. (b) Using the parameters of Exercise 9, and taking p equal to your estimate of part (c) of that problem, simulate the system to estimate the quantities dened in part (b) of Exercise 9. Do you expect your answer to be larger or smaller than that obtained in Exercise 9'? 14 A Queueing System with Two Parallel Servers Consider a model in which customers arrive at a system having two servers. Upon arrival the customer will join the queue if both servers are busy, enter service with server ] if that server is free, or enter service with server 2 otherwise. When the customer completes service with a server {no matter which one), that customer then departs the system and the customer that has been in queue the longest (if there are any customers in queue} enters service. The service distribution at server i is G,,:' = 1, 2. [See Figure 13.) l l B 3' Th.- Diner-i- EVIIII Simulation Approach Figure 7.3.. A Queue with Two Parallel Servers. Suppose that we want to simulate the preceding model, keeping track of the amounts of Time spent in the system by each customer. and the number of services performed by each server. Because there are multiple servers, it follows that customers will not necessarily depart in the order in which they arrive. Hence, to know which customer is departing the system upon a service completion we will have to keep track of which customers are in the system. So let us number the customers as they arrive. with the rst arrival being customer number I, the next being number 2, and so on. Because customers enter service in order of their arrival, it follows that knowing which customers are being served and how many are waiting in queue enables us to identify the waiting customers. Suppose that customers t' and j are being served, where i c: j, and that there are n 2 2: 0 others waiting in queue. Because all customers with numbers less than j would have entered service before j. whereas no customer whose number is higher than j could yet have completed service [because to do so they would have had to enter service before either i or j), it follows that customers j + 1,. ..,j + u- 2 are waiting in queue. To analyze the system we will use the following variables: Time Variable 1 System State Variable (55) (u, i1. i3} if there are at customers in the system, i, is with server I and 3 is with server 3. Note that 55 = {0) when the system is empty. and SS = (I, j, (l) or (LO, j} when the only customer is j and he is being served by server 1 or server 2, respectively. Counter Variables NA: the number of arrivals by time t Cy: the number of customers served by j, j = 1. 2. by Time r Output Variables Am): the arrival time of customer :1, n 3 1 DUI): the departure time of customer is, u ,2}, I Event list (A, $1, 12 where A is the time of the next arrival, and , is the service completion time of the customer presently being served by server i, i = 1, 2. If there is no customer presently with server i, then we set; = co, i = 1, 2. In the following, the event list will always consist of the three variables fA, 1, 12. To begin the simulation, we initialize the variables and event list as follows: Initialize Set t = NA = C1 = Cz = 0. Set SS = (0). Generate To, and set tA = To, f1 = 12 = 00. To update the system, we move along in time until we encounter the next event. In the following cases, Y, always refers to a random variable having distribution Ghi = 1, 2. Case 1: SS = (n, i,, i2) and tA = min(1A, 1 , 12) Reset: 1 = IA. Reset: NA = NA + 1. Generate T, and reset tA = T,. Collect the output data A(NA) = t. If SS = (0): Reset: SS = (1, NA, 0). Generate Y, and reset = 1 + Y1. If SS = (1, j, 0): Reset: SS = (2, j, NA). Generate Yz and reset f2 = 1 + Y2. If SS = (1, 0, j): Reset SS = (2, NA, j). Generate Y, and reset fi = 1 + Y1. If n > 1: Reset: SS = (n + 1, /1, i2). Case 2: SS = (n, i1, i2) and 1 2: Let m = max(i1, i2) and Reset SS = (n - 1, m + 1, i2) Generate Y, and reset f = t + Y, Case 3: SS = (n, i1, i2) and 12
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started