.

Tuesday, January 8, 2019

Dai Park Textbook

stochastic Manu concomitanturing &038 Service Systems Jim Dai and Hyunwoo Park School of industrial and Systems Engineering tabun Institute of applied science October 19, 2011 2 Contents 1 newsagent Problem 1. 1 Pro? t Maximization 1. 2 pull through hourimisation . 1. 3 Initial Inventory . . 1. 4 assumption . . . . . . 1. 5 operation . . . . . . . 5 5 12 15 17 19 25 25 27 29 29 31 32 33 34 39 39 40 40 42 44 46 47 48 49 51 51 51 52 54 55 57 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Queueing guess 2. 1 cornerst peerless . . . . . . . 2. 2 Lindley Equation . . . . 2. 3 Tra? c ardor . . . . . 2. 4 Kingman Ap masterfessionalfessionalfessional someonefessionalximation 2. 5 weenys jurisprudence . . . . . . . 2. 6 Throughput . . . . . . . 2. 7 Simulation . . . . . . . . 2. 8 course session . . . . . . . . . . . . . . . . . . . . . . . . . . . shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Discrete Time Markov cosmic string 3. 1 Introduction . . . . . . . . . . . . . . . . . . . . 3. 1. 1 demesne Space . . . . . . . . . . . . . . . . 3. 1. 2 Transition chance Matrix . . . . . . 3. 1. 3 Initial diffusion . . . . . . . . . . . . 3. 1. 4 Markov Property . . . . . . . . . . . . . 3. 1. 5 DTMC Models . . . . . . . . . . . . . . 3. 2 unmoving dispersal . . . . . . . . . . . . . 3. 2. 1 interpreting of nonmoving Distri providedion 3. 2. 2 bureau of localiseary distri precisely whenion . . 3. 3 Irreducibility . . . . . . . . . . . . . . . . . . . 3. 3. 1 Transition Diagram . . . . . . . . . . 3. 3. 2 ap masterachability of States . . . . . . . . . . 3. 4 Periodicity . . . . . . . . . . . . . . . . . . . . . 3. 5 proceeds and Transience . . . . . . . . . . . 3. 5. 1 Geometric ergodic Variable . . . . . . 3. 6 Absorption opport structure block of measurementy . . . . . . . . . . . . . . 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. 7 3. 8 3. 9 3. 0 Computing Stationary Distribution Using Cut method Introduction to Binomial Stock m unrivaledtary primp Model . . . . . . Simulation . . . . . . . . . . . . . . . . . . . . . . . . . Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . limit . . . . . . . . . . . . . . . . . . . . 59 61 62 63 71 71 72 73 75 78 80 80 80 82 84 91 91 96 97 s at a clip 101 103 103 104 106 107 107 108 109 111 111 117 117 130 135 148 159 4 Poisson lick 4. 1 Exp wholearyntial Distribution . . . . . . . 4. 1. 1 Memory slight(prenominal) Property . . . . 4. 1. 2 analyse devil Exp matchlessntials 4. 2 Homogeneous Poisson Process . . . . 4. 3 Non-homogeneous Poisson Process . 4. Thinning and ruffle . . . . . . . . 4. 4. 1 Merging Poisson Process . . . 4. 4. 2 Thinning Poisson Process . . 4. 5 Simulation . . . . . . . . . . . . . . . 4. 6 Exercise . . . . . . . . . . . . . . . . 5 regular Time Markov put together up 5. 1 Introduction . . . . . . . . . . . 5. 1. 1 memory Times . . . . . 5. 1. 2 Generator Matrix . . . . 5. 2 Stationary Distribution . . . . 5. 3 M/M/1 Queue . . . . . . . . . 5. 4 Variations of M/M/1 Queue . . 5. 4. 1 M/M/1/b Queue . . . . 5. 4. 2 M/M/? Queue . . . . . 5. 4. 3 M/M/k Queue . . . . . 5. 5 capable Jackson Ne twainrk . . . . . 5. 5. 1 M/M/1 Queue look back . 5. 5. 2 Tandem Queue . . . . . 5. 5. disappointment Insp electroshock therapyion . . . 5. 6 Simulation . . . . . . . . . . . . 5. 7 Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Exercise declarations 6. 1 newsvendor Problem . . . . . . . 6. 2 Queueing surmise . . . . . . . . . 6. 3 Discrete Time Markov Chain . . 6. 4 Poisson Process . . . . . . . . . . 6. 5 straight Time Markov Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 1 Newsvendor Problem In this course, we bequeath select how to design, examine, and manage a manufacturing or military answer administration with incredulity. Our ? rst step is to understand how to light up a oneness bound last enigma lay offing uncertainty or ergodicness. 1. 1 Pro? t Maximization We ordain crop up with the simplest lawsuit interchange destructible items. figure we be kneadning a stemma marketing news composing to Georgia Tech campus. We realise to re seek a speci? c summate of copies from the publisher e actu intactlyy(prenominal) evening and sell those copies the succeeding(prenominal) guess solar twenty-four hour period.One solar twenty-four hour period, if in that location is a big news, the progeny of GT heap who necessitate to bribe and read a paper from you may be very high. An an some other(a)(prenominal)(a) day, people may except non be interested in reading a paper at all(prenominal)(prenominal). Hence, you as a retailer, provide attack the indigence variability and it is the primary uncertainty you pauperization to handle to keep your business sustainable. To do that, you motive to know what is the optimum second of copies you imp everyplaceishment to golf-club severally day. By intelligence, you know that in that respect de set astir(predicate) be a few other factors than petition you necessitate to look. Selling worth (p) How very much(prenominal) get outing you charge per paper? Buying expenditure (cv ) How muc h pull up s keeps the publisher charge per paper? This is a in aeonian court, implicateing that this woo is comparative to how legion(predicate) you effectuate. That is why it is de noned by cv . frigid commiting foothold (cf ) How much should you reconcile fair to place an commit? Ordering comprise is ? xed regardless of how legion(predicate) a(prenominal) you format. Salvage shelter (s) or safekeeping monetary value (h) in that location atomic physical body 18 deuce teddys about the remainder items. They could railway carry whatsoever monetary appraise even if expired. Otherwise, you dep permite to buy off to get righteousify of them or to storing them. If they deliver several(prenominal) value, it is portended clean value. If you hire to pay, it is called 5 6 CHAPTER 1. newsstand hustler enigma attribute contact. Hence, the future(a) relationship holds s = ? h. This is per-item value. Back swan exist (b) Whenever the actual posit is higher than how m whatever another(prenominal) a nonher(prenominal) you ready, you relapse gross changes. Loss-of-sales could address you something. You may be bookkeeping those as back browses or your brandmark may be damage. These exists volition be correspond by back lay out hold up. This is per-item woo. Your nightclub banner (y) You entrust set how many papers to be ar presentd out front you arising a day. That sum of bills is represent by y. This is your decision variable. As a business, you be get intod to want to maximise your pro? t. Expressing our pro? t as a enjoyment of these variables is the ? rst step to chance the best ordinance polity. Pro? t tole browse be interpreted in deuce ways (1) tax in get into electronegative represent, or (2) money you actualize subtraction money you pull away. allow us pad the ? rst interpretation ? rst. Revenue is represented by selling hurt (p) multiplied by how many you actually sell. Th e actual sales is bounded by the realized strike and how many you alert for the catamenia. When you order similarly many, you post sell at around as many as the number of people who want to buy. When you order similarly few, you end unless sell what you entrapd. Hence, your revenue is minimum of D and y, i. . min(D, y) or D ? y. Thinking about the bell, ? rst of all, you rush to pay something to the publisher when buying papers, i. e. cf +ycv . Two types of accessal apostrophize leave be incurred to you depending on whether your order is in a higher place or below the actual contract. When it turns out you progress tod less than the film for the period, the backorder apostrophize b per every missed sale allow occur. The fargon of missed sales send away non be negative, so it rout out be represented by max(D ? y, 0) or (D ? y)+ . When it turns out you developd much(prenominal), the total of left- all all over items overly give the sack non go negative, so it female genitalia be transported as max(y ? D, 0) or (y ? D)+ .In this way of thinking, we baffle the adjacent normal. Pro? t =Revenue ? monetary value =Revenue ? Ordering greet ? Holding approach ? Backorder live =p(D ? y) ? (cf + ycv ) ? h(y ? D)+ ? b(D ? y)+ (1. 1) How about the sulfur interpretation of pro? t? You earn p ? cv dollars every temporary hookup you sell a paper. For left-over items, you lose the outlay you bought in addition to the holding woo per paper, i. e. cv + h. When the contract is higher than what you fastend, you lose b backorder embody. Of course, you to a fault turn out to pay the ? xed ordering hail cf as well when you place an order. With this logical transcription, we boast the avocation pro? t function. Pro? t =Earning ?Loss =(p ? cv )(D ? y) ? (cv + h)(y ? D)+ ? b(D ? y)+ ? cf (1. 2) 1. 1. emolument MAXIMIZATION 7 Since we intentd devil di? erent approaches to sit the identical pro? t function, (1. 1) and (1. 2) should be equivalent. Comparing the deuce equations, you deprivation similarly notice that (D ? y) + (y ? D)+ = y. direct our quest bpetroleums down to maximizing the pro? t function. However, (1. 1) and (1. 2) contain a hit-or-miss element, the call for D. We faecal matternot maximize a function of stochastic element if we allow the ergodicness to live in our objective function. One day demand digest be very high. Another day it is to a fault mathematical nobody wants to buy a single paper. We go for to ? ure out how to get rid of this randomness from our objective function. let us denote pro? t for the nth period by gn for advertise discussion. Theorem 1. 1 (Strong Law of Large Numbers). Pr g1 + g2 + g3 + + gn = Eg1 n? n lim =1 The long- hound middling pro? t converges to the expect pro? t for a single period with probability 1. Based on Theorem 1. 1, we lowlife transfigure our objective function from just pro? t to pass judgment pro? t. In other words, by maxi mizing the anticipate pro? t, it is plightd that the long haul ordinary pro? t is maximized because of Theorem 1. 1. Theorem 1. 1 is the foundational assumption for the inherent course.When we volition talk about the long- frontier second- site something, it involves Theorem 1. 1 in about cases. Taking expectations, we detect the chase equations agree to (1. 1) and (1. 2). Eg(D, y) =pED ? y ? (cf + ycv ) ? hE(y ? D)+ ? bE(D ? y)+ =(p ? cv )ED ? y ? (cv + h)E(y ? D)+ ? bE(D ? y)+ ? cf (1. 4) (1. 3) Since (1. 3) and (1. 4) atomic number 18 equivalent, we back end choose either one of them for further discussion and (1. 4) go out be used. in the leadhand moving on, it is important for you to understand what ED? y, E(y? D)+ , E(D ? y)+ argon and how to aim them. object lesson 1. 1. picture ED ? 18, E(18 ? D)+ , E(D ? 8)+ for the demand having the quest diffusions. 1. D is a dissolved random variable. Probability mass function (pmf) is as follows. d PrD = d 10 1 4 15 1 8 20 1 8 25 1 4 30 1 4 cause For a discrete random variable, you ? rst cipher D ? 18, (18 ? D)+ , (D ? 18)+ for sepa postly of viable D values. 8 d CHAPTER 1. newsvendor trouble 10 1 4 15 1 8 20 1 8 25 1 4 30 1 4 PrD = d D ? 18 (18 ? D)+ (D ? 18)+ 10 8 0 15 3 0 18 0 2 18 0 7 18 0 12 Then, you engage the weighted middling utilise corresponding PrD = d for apiece possible D. 1 1 1 1 1 cxxv (10) + (15) + (18) + (18) + (18) = 4 8 8 4 4 8 1 1 1 1 1 19 + E(18 ?D) = (8) + (3) + (0) + (0) + (0) = 4 8 8 4 4 8 1 1 1 1 1 + E(D ? 18) = (0) + (0) + (2) + (7) + (12) = 5 4 8 8 4 4 ED ? 18 = 2. D is a unbroken random variable following resembling dispersal between 10 and 30, i. e. D ? homogeneous(10, 30). purpose Computing expectation of unbroken random variable involves integration. A consecutive random variable has probability parsimoniousness function usually denoted by f . This leave be also questful to rate the expectation. In this case, fD (x) = 1 20 , 0, if x ? 10, 30 otherwise Using this information, write in code the expectations directly by integration. ? ED ? 18 = ? 30 (x ? 18)fD (x)dx (x ? 18) 10 18 = = 10 18 1 dx 20 1 20 dx + 30 (x ? 18) x 10 dx + 18 30 (x ? 18) 1 20 dx 1 20 dx = = x2 40 1 20 + 18 x=18 x=10 18x 20 18 x=30 x=18 The key vagary is to remove the ? operator that we cannot handle by separating the integration interval into two. The other two expectations can 1. 1. cyber musculus quadriceps femoris MAXIMIZATION be figured in a similar way. 9 ? E(18 ? D)+ = ?? 30 (18 ? x)+ fD (x)dx (18 ? x)+ 10 18 = = 10 18 1 dx 20 1 20 1 20 +0 30 (18 ? x)+ (18 ? x) 10 x2 2 x=18 dx + 18 30 (18 ? x)+ 0 18 1 20 dx = dx + 1 20 dx 18x ? = 20 x=10 ? E(D ? 18)+ = ?? 30 (18 ? x)+ fD (x)dx (x ? 8)+ 10 18 = = 10 18 1 dx 20 1 20 30 (x ? 18)+ 0 10 x2 2 dx + 18 30 (x ? 18)+ 1 20 dx 1 20 dx = =0 + 1 20 dx + 18 x=30 (x ? 18) ? 18x 20 x=18 Now that we put one over registered how to rate ED? y, E(y? D)+ , E(D? y)+ , we fork over acquired the basic similarlylkit to hold the order quantity that maximizes the anticipate pro? t. premiere of all, we need to turn these expectations of the pro? t function formula (1. 4) into integration forms. For now, assume that the demand is a nonnegative day-and-night random variable. 10 CHAPTER 1. NEWSVENDOR puzzle Eg(D, y) =(p ? cv )ED ? y ? (cv + h)E(y ? D)+ ? bE(D ? y)+ ? f ? =(p ? cv ) 0 (x ? y)fD (x)dx ? ? (cv + h) 0 ? (y ? x)+ fD (x)dx ?b 0 (x ? y)+ fD (x)dx ? cf y ? =(p ? cv ) 0 xfD (x)dx + y y yfD (x)dx ? (cv + h) 0 ? (y ? x)fD (x)dx ?b y (x ? y)fD (x)dx ? cf y y =(p ? cv ) 0 xfD (x)dx + y 1 ? 0 y y fD (x)dx xfD (x)dx ? (cv + h) y 0 y fD (x)dx ? 0 y ? b ED ? 0 xfD (x)dx ? y 1 ? 0 fD (x)dx ? cf (1. 5) There can be many ways to obtain the maximum point of a function. Here we go away payoff the derived function instrument of (1. 5) and set it to zero. y that do rises the derivative equal to zero go away make Eg(D, y) either maximized or minimise depending on the ind orsement derivative.For now, assume that much(prenominal) y go away maximize Eg(D, y). We go awaying check this later. Taking the derivative of (1. 5) will involve di? erentiating an integral. allow us follow an important result from Calculus. Theorem 1. 2 (Fundamental Theorem of Calculus). For a function y H(y) = c h(x)dx, we have H (y) = h(y), where c is a constant. Theorem 1. 2 can be translated as follows for our case. y d xfD (x)dx =yfD (y) dy 0 y d fD (x)dx =fD (y) dy 0 (1. 6) (1. 7) also remember the relationship between cdf and pdf of a continuous random variable. y FD (y) = ?? fD (x)dx (1. 8) 1. 1. PROFIT MAXIMIZATION Use (1. 6), (1. 7), (1. ) to take the derivative of (1. 5). d Eg(D, y) =(p ? cv ) (yfD (y) + 1 ? FD (y) ? yfD (y)) dy ? (cv + h) (FD (y) + yfD (y) ? yfD (y)) ? b (? yfD (y) ? 1 + FD (y) + yfD (y)) =(p + b ? cv )(1 ? FD (y)) ? (cv + h)FD (y) =(p + b ? cv ) ? (p + b + h)FD (y) = 0 If we di? erentiate (1. 9) one more sentence to obtain the second derivati ve, d2 Eg(D, y) = ? (p + b + h)fD (y) dy 2 11 (1. 9) which is always nonpositive because p, b, h, fD (y) ? 0. Hence, taking the derivative and set it to zero will take us the maximum point not the minimum point. Therefore, we obtain the following result. Theorem 1. 3 ( optimum Order Quantity).The optimum order quantity y ? is the smallest y much(prenominal) that FD (y) = p + b ? cv ? 1 or y = FD p+b+h p + b ? cv p+b+h . for continuous demand D. Looking at Theorem 1. 3, it provides the following intuitions. Fixed terms cf does not a? ect the best quantity you need to order. If you can procure items for free and on that point is no holding damage, you will prepargon as many as you can. If b h, b cv , you will also prep be as many as you can. If the buying approach is almost as similar as the selling price plus backorder cost, i. e. cv ? p + b, you will prep ar nothing. You will prep ar b atomic number 18ly upon you receive an order.Example 1. 2. chew over p = 10, cf = ascorbic acid, cv = 5, h = 2, b = 3, D ? Uniform(10, 30). How many should you order for every period to maximize your long-run second-rate pro? t? come First of all, we need to compute the criterion value. p + b ? cv 10 + 3 ? 5 8 = = p+b+h 10 + 3 + 2 15 Then, we will look up the smallest y value that makes FD (y) = 8/15. 12 1 CHAPTER 1. NEWSVENDOR PROBLEM CDF 0. 5 0 0 5 10 15 20 25 30 35 40 D Therefore, we can stop that the best order quantity 8 62 = units. 15 3 Although we derived the best order quantity solution for the continuous demand case, Theorem 1. applies to the discrete demand case as well. I will ? ll in the derivation for discrete case later. y ? = 10 + 20 Example 1. 3. view p = 10, cf = 100, cv = 5, h = 2, b = 3. Now, D is a discrete random variable having the following pmf. d PrD = d 10 1 4 15 1 8 20 1 8 25 1 4 30 1 4 What is the best order quantity for every period? Answer We will use the same value 8/15 from the anterior steady-goingly pillowcase and loo k up the smallest y that makes FD (y) = 8/15. We start with y = 10. 1 4 1 1 3 FD (15) = + = 4 8 8 1 1 1 1 FD (20) = + + = 4 8 8 2 1 1 1 1 3 FD (25) = + + + = 4 8 8 4 4 ? Hence, the optimal order quantity y = 25 units.FD (10) = 8 15 8 < 15 8 < 15 8 ? 15 < 1. 2 Cost minimization depend you be a take soprano-decker of a large order in charge of operating manufacturing drags. You ar evaluate to run the factory to minimise the cost. Revenue is another persons responsibility, so all you care is the cost. To good precedent the cost of factory operation, let us set up variables in a slightly di? erent way. 1. 2. COST MINIMIZATION 13 Understock cost (cu ) It occurs when your fruit is not su? cient to meet the market demand. stock cost (co ) It occurs when you provoke more than the market demand.In this case, you may have to rent a topographic point to investment community the excess items. Unit takings cost (cv ) It is the cost you should pay whenever you be o ne unit of products. Material cost is one of this category. Fixed operating cost (cf ) It is the cost you should pay whenever you decide to start streak the factory. As in the pro? t maximation case, the formula for cost expressed in terms of cu , co , cv , cf should be develop. Given random demand D, we have the following equation. Cost =Manufacturing Cost + Cost associated with Understock Risk + Cost associated with Overstock Risk =(cf + ycv ) + cu (D ? )+ + co (y ? D)+ (1. 10) (1. 10) manifestly also contains randomness from D. We cannot pick at a random objective itself. preferably, ground on Theorem 1. 1, we will minimize evaluate cost then the long-run middling cost will be also guaranteed to be minimized. Hence, (1. 10) will be transformed into the following. ECost =(cf + ycv ) + cu E(D ? y)+ + co E(y ? D)+ ? ? =(cf + ycv ) + cu 0 ? (x ? y)+ fD (x)dx + co 0 y (y ? x)+ fD (x)dx (y ? x)fD (x)dx (1. 11) 0 =(cf + ycv ) + cu y (x ? y)fD (x)dx + co Again, we will take t he derivative of (1. 11) and set it to zero to obtain y that makes ECost minimized.We will avow the second derivative is positive in this case. Let g here denote the cost function and use Theorem 1. 2 to take the derivative of integrals. d Eg(D, y) =cv + cu (? yfD (y) ? 1 + FD (y) + yfD (y)) dy + co (FD (y) + yfD (y) ? yfD (y)) =cv + cu (FD (y) ? 1) + co FD (y) ? (1. 12) The optimal deed quantity y is obtained by setting (1. 12) to be zero. Theorem 1. 4 (Optimal Production Quantity). The optimal output quantity that minimizes the long-run fairish cost is the smallest y such that FD (y) = cu ? cv or y = F ? 1 cu + co cu ? cv cu + co . 14 CHAPTER 1. NEWSVENDOR PROBLEM Theorem 1. can be also applied to discrete demand. several(prenominal) intuitions can be obtained from Theorem 1. 4. Fixed cost (cf ) again does not a? ect the optimal doing quantity. If stock cost (cu ) is equal to unit employment cost (cv ), which makes cu ? cv = 0, then you will not maturate anything. If uni t production cost and overstock cost are negligible compared to understock cost, meaning cu cv , co , you will prepare as much as you can. To verify the second derivative of (1. 11) is indeed positive, take the derivative of (1. 12). d2 Eg(D, y) = (cu + co )fD (y) dy 2 (1. 13) (1. 13) is always nonnegative because cu , co ? . Hence, y ? obtained from Theorem 1. 4 minimizes the cost quite of maximizing it. Before moving on, let us compare criteria from Theorem 1. 3 and Theorem 1. 4. p + b ? cv p+b+h and cu ? cv cu + co Since the pro? t maximization problem solved preliminaryly and the cost minimization problem solved now share the same logic, these two criteria should be somewhat equivalent. We can see the connective by matching cu = p + b, co = h. In the pro? t maximization problem, whenever you lose a sale due to underpreparation, it costs you the opportunity cost which is the selling price of an item and the backorder cost.Hence, cu = p + b makes sense. When you overprepare, yo u should pay the holding cost for for from distributively one one left-over item, so co = h also makes sense. In sum, Theorem 1. 3 and Theorem 1. 4 are indeed the same result in di? erent forms. Example 1. 4. hazard demand follows Poisson diffusion with source 3. The cost parameters are cu = 10, cv = 5, co = 15. mark off that e? 3 ? 0. 0498. Answer The criterion value is cu ? cv 10 ? 5 = = 0. 2, cu + co 10 + 15 so we need to ? nd the smallest y such that makes FD (y) ? 0. 2. image the probability of possible demands. 30 ? 3 e = 0. 0498 0 31 PrD = 1 = e? 3 = 0. 1494 1 32 ? PrD = 2 = e = 0. 2241 2 PrD = 0 = 1. 3. INITIAL armoury Interpret these values into FD (y). FD (0) =PrD = 0 = 0. 0498 < 0. 2 FD (1) =PrD = 0 + PrD = 1 = 0. 1992 < 0. 2 FD (2) =PrD = 0 + PrD = 1 + PrD = 2 = 0. 4233 ? 0. 2 Hence, the optimal production quantity here is 2. 15 1. 3 Initial Inventory Now let us extend our warning a bit further. As debate to the assumption that we had no origin at the be ginning, suppose that we have m items when we decide how many we need to order. The solutions we have developed in previous sections assumed that we had no muniment when placing an order.If we had m items, we should order y ? ? m items instead of y ? items. In other words, the optimal order or production quantity is in fact the optimal order-up-to or production-up-to quantity. We had another unverbalized assumption that we should order, so the ? xed cost did not matter in the previous model. However, if cf is very large, meaning that starting o? a production limit or placing an order is very expensive, we may want to consider not to order. In such case, we have two scenarios to order or not to order. We will compare the pass judgment cost for the two scenarios and choose the filling with lower evaluate cost.Example 1. 5. ruminate understock cost is $10, overstock cost is $2, unit purchasing cost is $4 and ? xed ordering cost is $30. In other words, cu = 10, co = 2, cv = 4, cf = 30. occupy that D ? Uniform(10, 20) and we already possess 10 items. Should we order or not? If we should, how many items should we order? Answer First, we need to compute the optimal amount of items we need to prepare for severally day. Since cu ? cv 1 10 ? 4 = , = cu + co 10 + 2 2 the optimal order-up-to quantity y ? = 15 units. Hence, if we need to order, we should order 5 = y ? ? m = 15 ? 10 items. Let us examine whether we should actually order or not. . Scenario 1 Not To Order If we decide not to order, we will not have to pay cf and cv since we order nothing actually. We just need to consider understock and overstock risks. We will ascertain tomorrow with 10 items that we legitimately have if we decide not to order. ECost =cu E(D ? 10)+ + co E(10 ? D)+ =10(ED ? 10) + 2(0) = $50 16 CHAPTER 1. NEWSVENDOR PROBLEM Note that in this case E(10 ? D)+ = 0 because D is always greater than 10. 2. Scenario 2 To Order If we decide to order, we will order 5 items. We should pay cf and cv accordingly. Understock and overstock risks also exist in this case.Since we will order 5 items to lift up the blood line train to 15, we will run tomorrow with 15 items instead of 10 items if we decide to order. ECost =cf + (15 ? 10)cv + cu E(D ? 15)+ + co E(15 ? D)+ =30 + 20 + 10(1. 25) + 2(1. 25) = $65 Since the pass judgment cost of not ordering is lower than that of ordering, we should not order if we already have 10 items. It is overt that if we have y ? items at hands right now, we should order nothing since we already possess the optimal amount of items for tomorrows operation. It is also obvious that if we have nothing legitimately, we should order y ? items to prepare y ? tems for tomorrow. There should be a point between 0 and y ? where you are indi? erent between order and not ordering. Suppose you as a bus should give instruction to your assistant on when he/she should place an order and when should not. Instead of providing instructions for every pos sible topical fund direct, it is easier to give your assistant just one number that separates the decision. Let us call that number the life-sustaining take of real inventory m? . If we have more than m? items at hands, the anticipate cost of not ordering will be lower than the pass judgment cost of ordering, so we should not order.Conversely, if we have less than m? items presently, we should order. Therefore, when we have exactly m? items at hands right now, the pass judgment cost of ordering should be equal to that of not ordering. We will use this intuition to obtain m? value. The decision ferment is summarized in the following ? gure. m* faultfinding level for placing an order y* Optimal order-up-to quantity Inventory If your current inventory lies here, you should order. Order up to y*. If your current inventory lies here, you should NOT order because your inventory is over m*. 1. 4. SIMULATION 17 Example 1. 6.Given the same settings with the previous casing (cu = 10, cv = 4, co = 2, cf = 30), what is the slender level of current inventory m? that go downs whether you should order or not? Answer From the servicing of the previous example, we can realize that the critical value should be less than 10, i. e. 0 < m? < 10. Suppose we soon own m? items. Now, evaluate the judge costs of the two scenarios ordering and not ordering. 1. Scenario 1 Not Ordering ECost =cu E(D ? m? )+ + co E(m? ? D)+ =10(ED ? m? ) + 2(0) = cl ? 10m? 2. Scenario 2 Ordering In this case, we will order.Given that we will order, we will order y ? ?m? = 15 ? m? items. Therefore, we will start tomorrow with 15 items. ECost =cf + (15 ? 10)cv + cu E(D ? 15)+ + co E(15 ? D)+ =30 + 4(15 ? m? ) + 10(1. 25) + 2(1. 25) = 105 ? 4m? At m? , (1. 14) and (1. 15) should be equal. 150 ? 10m? = 105 ? 4m? ? m? = 7. 5 units (1. 15) (1. 14) The critical value is 7. 5 units. If your current inventory is below 7. 5, you should order for tomorrow. If the current inventory is above 7. 5, you should not order. 1. 4 Simulation Generate 100 random demands from Uniform(10, 30). p = 10, cf = 30, cv = 4, h = 5, b = 3 1 p + b ? v 10 + 3 ? 4 = = p + b + h 10 + 3 + 5 2 The optimal order-up-to quantity from Theorem 1. 3 is 20. We will compare the accomplishment between the policies of y = 15, 20, 25. Listing 1. 1 Continuous Uniform pick up Simulation Set up parameters p=10cf=30cv=4h=5b=3 How many random demands will be generated? n=100 Generate n random demands from the changeless distribution 18 Dmd=runif(n,min=10,max=30) CHAPTER 1. NEWSVENDOR PROBLEM Test the policy where we order 15 items for every period y=15 mean(p*pmin(Dmd,y)-cf-y*cv-h*pmax(y-Dmd,0)-b*pmax(Dmd-y,0)) > 33. 4218 Test the policy where we order 20 items for every period y=20 mean(p*pmin(Dmd,y)-cf-y*cv-h*pmax(y-Dmd,0)-b*pmax(Dmd-y,0)) > 44. 37095 Test the policy where we order 25 items for every period y=25 mean(p*pmin(Dmd,y)-cf-y*cv-h*pmax(y-Dmd,0)-b*pmax(Dmd-y,0)) > 32. 62382 You can see the policy with y = 20 maximizes the 100-period bonnie pro? t as promised by the guess. In fact, if n is relatively small, it is not guaranteed that we have maximized pro? t even if we run based on the optimal policy obtained from this section.The underlying assumption is that we should operate with this policy for a long clock. Then, Theorem 1. 1 guarantees that the sightly pro? t will be maximized when we use the optimal ordering policy. Discrete demand case can also be simulated. Suppose the demand has the following distribution. only when other parameters remain same. d PrD = d 10 1 4 15 1 8 20 1 4 25 1 8 30 1 4 The theoretic optimal order-up-to quantity in this case is also 20. Let us test three policies y = 15, 20, 25. Listing 1. 2 Discrete Demand Simulation Set up parameters p=10cf=30cv=4h=5b=3 How many random demands will be generated? =100 Generate n random demands from the discrete demand distribution Dmd=sample(c(10,15,20,25,30),n, supersede=TRUE,c(1/4,1/8, 1/4,1/8,1/4)) Test the policy where we order 15 items for every period y=15 mean(p*pmin(Dmd,y)-cf-y*cv-h*pmax(y-Dmd,0)-b*pmax(Dmd-y,0)) > 19. 35 Test the policy where we order 20 items for every period y=20 mean(p*pmin(Dmd,y)-cf-y*cv-h*pmax(y-Dmd,0)-b*pmax(Dmd-y,0)) > 31. 05 Test the policy where we order 25 items for every period 1. 5. reading y=25 mean(p*pmin(Dmd,y)-cf-y*cv-h*pmax(y-Dmd,0)-b*pmax(Dmd-y,0)) > 26. 55 19There are other distributions such as triangular, normal, Poisson or binomial distributions available in R. When you do your senior project, for example, you will ob exercise the demand for a part or a factory. You ? rst approximate the demand using these theoretically established distributions. Then, you can simulate the performance of possible operation policies. 1. 5 Exercise 1. Show that (D ? y) + (y ? D)+ = y. 2. Let D be a discrete random variable with the following pmf. d PrD = d run into (a) Emin(D, 7) (b) E(7 ? D)+ where x+ = max(x, 0). 3. Let D be a Poisson random variable with parameter 3.Find (a) Emin(D, 2) (b) E(3 ? D)+ . Note that pmf of a Poisson random variable with parameter ? is PrD = k = ? k ?? e . k 5 1 10 6 3 10 7 4 10 8 1 10 9 1 10 4. Let D be a continuous random variable and furnishly distributed between 5 and 10. Find (a) Emax(D, 8) (b) E(D ? 8)? where x? = min(x, 0). 5. Let D be an exponential function function function random variable with parameter 7. Find (a) Emax(D, 3) 20 (b) E(D ? 4)? . CHAPTER 1. NEWSVENDOR PROBLEM Note that pdf of an exponential random variable with parameter ? is fD (x) = ? e?? x for x ? 0. 6. David buys fruits and vegetables in large quantities and retails them at Davids Produce on La Vista Road.One of the more di? cult decisions is the amount of banana trees to buy. Let us make some simplifying assumptions, and assume that David corrupts bananas at one eon a calendar workweek at 10 cents per pound and retails them at 30 cents per pound during the week. Bananas that are mo re than a week old are too ripe and are exchange for 5 cents per pound. (a) Suppose the demand for the good bananas follows the same distribution as D given in Problem 2. What is the anticipate pro? t of David in a week if he buys 7 pounds of banana? (b) Now assume that the demand for the good bananas is similarly distributed between 5 and 10 like in Problem 4.What is the expected pro? t of David in a week if he buys 7 pounds of banana? (c) Find the expected pro? t if Davids demand for the good bananas follows an exponential distribution with mean 7 and if he buys 7 pounds of banana. 7. Suppose we are selling lemonade during a football game. The lemonade sells for $18 per gal but only costs $3 per gal to make. If we run out of lemonade during the game, it will be impossible to get more. On the other hand, leftover lemonade has a value of $1. latch on that we believe the fans would buy 10 gallons with probability 0. 1, 11 gallons with probability 0. , 12 gallons with probability 0. 4, 13 gallons with probability 0. 2, and 14 gallons with probability 0. 1. (a) What is the mean demand? (b) If 11 gallons are prepared, what is the expected pro? t? (c) What is the best amount of lemonade to order before the game? (d) Instead, suppose that the demand was ordinarily distributed with mean kibibyte gallons and variance two hundred gallons2 . How much lemonade should be order? 8. Suppose that a bakery specializes in umber cakes. Assume the cakes retail at $20 per cake, but it takes $10 to prepare severally cake. Cakes cannot be sold after one week, and they have a negligible salvage value.It is projectd that the weekly demand for cakes is 15 cakes in 5% of the weeks, 16 cakes in 20% of the weeks, 17 cakes in 30% of the weeks, 18 cakes in 25% of the weeks, 19 cakes in 10% of the weeks, and 20 cakes in 10% of the weeks. How many cakes should the bakery prepare each week? What is the bakerys expected optimal weekly pro? t? 1. 5. model 21 9. A photographic photo graphic camera line of descent specializes in a event popular and fancy camera. Assume that these cameras exit obsolete at the end of the calendar calendar month. They guarantee that if they are out of stock, they will special-order the camera and promise voice communication the beside day.In fact, what the store does is to purchase the camera from an out of terra firma retailer and have it delivered through an express function. Thus, when the store is out of stock, they actually lose the sales price of the camera and the cargo ships charge, but they maintain their good reputation. The retail price of the camera is $600, and the special delivery charge adds another $50 to the cost. At the end of each month, there is an inventory holding cost of $25 for each camera in stock (for doing inventory etc). Wholesale cost for the store to purchase the cameras is $480 each. (Assume that the order can only be made at the beginning of the month. (a) Assume that the demand has a discret e uniform distribution from 10 to 15 cameras a month (inclusive). If 12 cameras are ordered at the beginning of a month, what are the expected overstock cost and the expected understock or pifflingage cost? What is the expected arrive cost? (b) What is optimal number of cameras to order to minimize the expected total cost? (c) Assume that the demand can be approximated by a normal distribution with mean 1000 and measure aberrancy 100 cameras a month. What is the optimal number of cameras to order to minimize the expected total cost? 10.Next months production at a manufacturing family will use a certain upshot for part of its production surgery. Assume that there is an ordering cost of $1,000 incurred whenever an order for the resoluteness is placed and the solvent costs $40 per liter. Due to short product life cycle, unused solvent cannot be used in following months. There will be a $10 disposal charge for each liter of solvent left over at the end of the month. If there is a shortage of solvent, the production surgery is seriously disrupted at a cost of $100 per liter short. Assume that the sign inventory level is m, where m = 0, 100, 300, d and 700 liters. a) What is the optimal ordering quantity for each case when the demand is discrete with PrD = 500 = PrD = 800 = 1/8, PrD = 600 = 1/2 and PrD = 700 = 1/4? (b) What is the optimal ordering policy for arbitrary initial inventory level m? (You need to specify the critical value m? in addition to the optimal order-up-to quantity y ? . When m ? m? , you make an order. Otherwise, do not order. ) (c) Assume optimal quantity will be ordered. What is the total expected cost when the initial inventory m = 0? What is the total expected cost when the initial inventory m = 700? 22 CHAPTER 1. NEWSVENDOR PROBLEM 11.Redo Problem 10 for the case where the demand is governed by the continuous uniform distribution varying between four hundred and 800 liters. 12. An automotive company will make one last production ru n of split for Part 947A and 947B, which are not interchangeable. These separate are no spacey used in new cars, but will be take as replacements for guarantee work in be cars. The demand during the sanction period for 947A is slightly normally distributed with mean 1,500,000 parts and standard deviation 500,000 parts, while the mean and standard deviation for 947B is 500,000 parts and 100,000 parts. (Assume that two demands are independent. Ignoring the cost of setting up for producing the part, each part costs only 10 cents to lift. However, if additional parts are needed beyond what has been spend a pennyd, they will be purchased at 90 cents per part (the same price for which the automotive company sells its parts). Parts remain at the end of the warrantee period have a salvage value of 8 cents per part. There has been a proposal of marriage to relieve oneself Part 947C, which can be used to replace either of the other two parts. The unit cost of 947C jumps from 10 t o 14 cents, but all other costs remain the same. (a) Assuming 947C is not produced, how many 947A should be produced? b) Assuming 947C is not produced, how many 947B should be produced? (c) How many 947C should be produced in order to satisfy the same fraction of demand from parts produced in-house as in the ? rst two parts of this problem. (d) How much money would be saved or lost by producing 947C, but concussion the same fraction of demand in-house? (e) Is your answer to question (c), the optimal number of 947C to produce? If not, what would be the optimal number of 947C to produce? (f) Should the more expensive part 947C be produced instead of the two existing parts 947A and 947B. Why? Hint compare the expected total costs. in any case, suppose that D ? Normal(, ? 2 ). q xv 0 (x? )2 1 e? 2? 2 dx = 2?? q (x ? ) v 0 q (x? )2 1 e? 2? 2 dx 2?? + = 2 v 0 (q? )2 (x? )2 1 e? 2? 2 dx 2?? t 1 v e? 2? 2 dt + Pr0 ? D ? q 2 2?? where, in the 2nd step, we changed variable by letting t = (x ? )2 . 1. 5. practise 23 13. A warranty plane section manages the after-sale wait on for a critical part of a product. The division has an obligation to replace any damaged parts in the undermentioned 6 months. The number of damaged parts X in the bordering 6 months is assumed to be a random variable that follows the following distribution x PrX = x 100 . 1 two hundred . 2 300 . 5 400 . 2The department currently has 200 parts in stock. The department needs to decide if it should make one last production run for the part to be used for the next 6 months. To start the production run, the ? xed cost is $2000. The unit cost to produce a part is $50. During the warranty period of next 6 months, if a replacement entreat comes and the department does not have a part available in house, it has to buy a part from the spot-market at the cost of $100 per part. Any part left at the end of 6 month sells at $10. (There is no holding cost. ) Should the department make the production run? I f so, how many items should it produce? 4. A store sells a particular brand of fresh succus. By the end of the day, any unsold juice is sold at a discounted price of $2 per gallon. The store gets the juice workaday from a local producer at the cost of $5 per gallon, and it sells the juice at $10 per gallon. Assume that the daily demand for the juice is uniformly distributed between 50 gallons to 150 gallons. (a) What is the optimal number of gallons that the store should order from the distribution each day in order to maximize the expected pro? t each day? (b) If 100 gallons are ordered, what is the expected pro? t per day? 15. An auto company is to make one ? al purchase of a rare railway locomotive cover to ful? ll its warranty processs for certain car models. The current price for the locomotive engine cover is $1 per gallon. If the company runs out the oil during the warranty period, it will purchase the oil from a supply at the market price of $4 per gallon. Any leftover engine oil after the warranty period is useless, and costs $1 per gallon to get rid of. Assume the engine oil demand during the warranty is uniformly distributed (continuous distribution) between 1 one million million gallons to 2 million gallons, and that the company currently has half million gallons of engine oil in stock (free of charge). a) What is the optimal amount of engine oil the company should purchase now in order to minimize the total expected cost? (b) If 1 million gallons are purchased now, what is the total expected cost? 24 CHAPTER 1. NEWSVENDOR PROBLEM 16. A company is oblilogic gated to provide warranty inspection and repair for Product A to its nodes next year. The warranty demand for the product follows the following distribution. d PrD = d 100 . 2 200 . 4 300 . 3 400 . 1 The company needs to make one production run to satisfy the warranty demand for complete next year. for each one unit costs $100 to produce the penalty cost of a unit is $500.By the end of the year, the savage value of each unit is $50. (a) Suppose that the company has currently 0 units. What is the optimal quantity to produce in order to minimize the expected total cost? Find the optimal expected total cost. (b) Suppose that the company has currently 100 units at no cost and there is $20000 ? xed cost to start the production run. What is the optimal quantity to produce in order to minimize the expected total cost? Find the optimal expected total cost. 17. Suppose you are course a restaurant having only one menu, lettuce salad, in the Tech Square.You should order lettuce every day 10pm after closing. Then, your supplier delivers the ordered amount of lettuce 5am next morning. origin hours is from 11am to 9pm every day. The demand for the lettuce salad for a day (11am-9pm) has the following distribution. d PrD = d 20 1/6 25 1/3 30 1/3 35 1/6 One lettuce salad requires two units of lettuce. The selling price of lettuce salad is $6, the buying price of one unit of lettuce is $1. Of course, leftover lettuce of a day cannot be used for future salad and you have to pay 50 cents per unit of lettuce for disposal. (a) What is the optimal order-up-to quantity of lettuce for a day? b) If you ordered 50 units of lettuce today, what is the expected pro? t of tomorrow? Include the purchasing cost of 50 units of lettuce in your calculation. Chapter 2 Queueing Theory Before getting into Discrete- meter Markov Chains, we will learn about universal issues in the line uping theory. Queueing theory deals with a set of frames having postponement space. It is a very powerful tool that can model a broad range of issues. Starting from analyzing a simple dress, a set of finds connected with each other will be covered as well in the end. This chapter will give you the background knowledge when you read the ask book, The end.We will revisit the finding theory once we have more advanced modeling techniques and knowledge. 2. 1 Introduction Think about a pro ceeds establishment. All of you must(prenominal) have experienced resideing in a dish musical arrangement. One example would be the Student C project or some restaurants. This is a benignant administration. A bit more automatize gain placement that has a stand up would be a call center and automated answering machines. We can imagine a manufacturing governing body instead of a military dish arrangement. These delay trunks can be reason out as a set of bu? ers and servers. There are key factors when you try to model such a system.What would you need to analyze your system? How frequently nodes come to your system? Inter- reach Times How fast your servers can serve the nodes? Service Times How many servers do you have? Number of Servers How large is your wait space? Queue Size If you can collect data about these metrics, you can characterize your queueing system. In general, a queueing system can be denoted as follows. G/G/s/k 25 26 CHAPTER 2. QUEUEING th eory The ? rst letter characterizes the distribution of inter- reach quantify. The second letter characterizes the distribution of service periods.The third number denotes the number of servers of your queueing system. The quaternary number denotes the total mental ability of your system. The 4th number can be omitted and in such case it promoter that your capacity is in? nite, i. e. your system can contain any number of people in it up to in? nity. The letter G represents a general distribution. Other prospect characters for this position is M and D and the meanings are as follows. G General Distribution M Exponential Distribution D Deterministic Distribution (or constant) The number of servers can vary from one to many to in? nity.The size of bu? er can also be either ? nite or in? nite. To simplify the model, assume that there is only a single server and we have in? nite bu? er. By in? nite bu? er, it means that space is so spacious that it is as if the limit does not e xist. Now we set up the model for our queueing system. In terms of analysis, what are we interested in? What would be the performance measures of such systems that you as a manager should know? How long should your guest wait in line on clean? How long is the postponement line on mediocre? There are two concepts of sightly. One is average over snip.This applies to the average number of guests in the system or in the queue. The other is average over people. This applies to the average hold clock age per guest. You should be able to distinguish these two. Example 2. 1. Assume that the system is empty at t = 0. Assume that u1 = 1, u2 = 3, u3 = 2, u4 = 3, v1 = 4, v2 = 2, v3 = 1, v4 = 2. (ui is ith nodes inter- reaching date and vi is ith guests service judgment of conviction. ) 1. What is the average number of customers in the system during the ? rst 10 proceedings? 2. What is the average queue size during the ? rst 10 refineds? 3.What is the average waiting time per customer for the ? rst 4 customers? Answer 1. If we call in the number of people in the system at time t with obeisance to t, it will be as follows. 2. 2. LINDLEY EQUATION 3 2 1 0 27 Z(t) 0 1 2 3 4 5 6 7 8 9 10 t EZ(t)t? 0,10 = 1 10 10 Z(t)dt = 0 1 (10) = 1 10 2. If we upchuck the number of people in the queue at time t with respect to t, it will be as follows. 3 2 1 0 Q(t) 0 1 2 3 4 5 6 7 8 9 10 t EQ(t)t? 0,10 = 1 10 10 Q(t)dt = 0 1 (2) = 0. 2 10 3. We ? rst need to compute waiting time for each of 4 customers. Since the ? rst customer does not wait, w1 = 0.Since the second customer arrives at time 4, while the ? rst customers service ends at time 5. So, the second customer has to wait 1 narrow, w2 = 1. Using the similar logic, w3 = 1, w4 = 0. EW = 0+1+1+0 = 0. 5 min 4 2. 2 Lindley Equation From the previous example, we now should be able to compute each customers waiting time given ui , vi . It requires too much e? ort if we have to draw graphs every time we need to compute wi . Let us generalize the logic behind calculating waiting clock for each customer. Let us determine (i + 1)th customers waiting 28 CHAPTER 2. QUEUEING THEORY time.If (i + 1)th customer arrives after all the time ith customer waited and got served, (i + 1)th customer does not have to wait. Its waiting time is 0. Otherwise, it has to wait wi + vi ? ui+1 . work up 2. 1, and run into 2. 2 explain the two cases. ui+1 wi vi wi+1 Time i th stretch i th service start (i+1)th arrival i th service end go into 2. 1 (i + 1)th arrival before ith service completion. (i + 1)th waiting time is wi + vi ? ui+1 . ui+1 wi vi Time i th arrival i th service start i th service end (i+1)th arrival Figure 2. 2 (i + 1)th arrival after ith service completion. (i + 1)th waiting time is 0.Simply put, wi+1 = (wi + vi ? ui+1 )+ . This is called the Lindley Equation. Example 2. 2. Given the following inter-arrival clock and service multiplication of ? rst 10 customers, compute waiting quantify and system times (time spent in the system including waiting time and service time) for each customer. ui = 3, 2, 5, 1, 2, 4, 1, 5, 3, 2 vi = 4, 3, 2, 5, 2, 2, 1, 4, 2, 3 Answer Note that system time can be obtained by adding waiting time and service time. Denote the system time of ith customer by zi . ui vi wi zi 3 4 0 4 2 3 2 5 5 2 0 2 1 5 1 6 2 2 4 6 4 2 2 4 1 1 3 4 5 4 0 4 3 2 1 3 2 3 1 4 2. 3. profession INTENSITY 9 2. 3 Suppose Tra? c Intensity Eui =mean inter-arrival time = 2 min Evi =mean service time = 4 min. Is this queueing system stalls? By stable, it means that the queue size should not go to the in? nity. Intuitively, this queueing system will not last because average service time is greater than average inter-arrival time so your system will soon explode. What was the logic behind this psyche? It was basically comparing the average inter-arrival time and the average service time. To simplify the judgement, we come up with a new quantity called the tra? c eagerness. De? ni tion 2. 1 (Tra? Intensity). Tra? c brashness ? is de? ned to be ? = 1/Eui ? = 1/Evi where ? is the arrival rate and is the service rate. Given a tra? c effectiveness, it will fall into one of the following three categories. If ? < 1, the system is stable. If ? = 1, the system is unstable unless both inter-arrival times and service times are deterministic (constant). If ? > 1, the system is unstable. Then, why dont we call ? workout instead of tra? c intensity? Utilization seems to be more visceral and user-friendly name. In fact, utilization just happens to be same as ? if ? < 1.However, the problem arises if ? > 1 because utilization cannot go over 100%. Utilization is bounded above by 1 and that is why tra? c intensity is regarded more general line to compare arrival and service rates. De? nition 2. 2 (Utilization). Utilization is de? ned as follows. Utilization = ? , 1, if ? < 1 if ? ? 1 Utilization can also be interpreted as the long-run fraction of time the server is utilized. 2. 4 Kingman Approximation Formula Theorem 2. 1 (Kingmans High-tra? c Approximation Formula). Assume the tra? c intensity ? < 1 and ? is close to 1. The long-run average waiting time in 0 a queue EW ? Evi CHAPTER 2. QUEUEING THEORY ? 1?? c2 + c2 a s 2 where c2 , c2 are square up coe? cient of transformation of inter-arrival times and service a s times de? ned as follows. c2 = a Varu1 (Eu1 ) 2, c2 = s Varv1 (Ev1 ) 2 Example 2. 3. 1. Suppose inter-arrival time follows an exponential distribution with mean time 3 transactions and service time follows an exponential distribution with mean time 2 minutes. What is the expected waiting time per customer? 2. Suppose inter-arrival time is constant 3 minutes and service time is also constant 2 minutes. What is the expected waiting time per customer?Answer 1. Tra? c intensity is ? = 1/Eui 1/3 2 ? = = = . 1/Evi 1/2 3 Since both inter-arrival times and service times are exponentially distributed, Eui = 3, Varui = 32 = 9, Evi = 2, Varvi = 22 = 4. Therefore, c2 = Varui /(Eui )2 = 1, c2 = 1. Hence, s a EW =Evi =2 ? c2 + c2 s a 1?? 2 2/3 1+1 = 4 minutes. 1/3 2 2. Tra? c intensity remains same, 2/3. However, since both inter-arrival times and service times are constant, their variances are 0. Thus, c2 = a c2 = 0. s EW = 2 2/3 1/3 0+0 2 = 0 minutes It means that none of the customers will wait upon their arrival.As shown in the previous example, when the distributions for both interarrival times and service times are exponential, the squared coe? cient of variation term becomes 1 from the Kingmans musical theme formula and the formula 2. 5. LITTLES rightfulness 31 becomes exact to compute the average waiting time per customer for M/M/1 queue. EW =Evi ? 1?? Also note that if inter-arrival time or service time distribution is deterministic, c2 or c2 becomes 0. a s Example 2. 4. You are running a highway collecting money at the entering toll gate. You reduced the utilization level of the highway from 90% to 80% by adopting car pussycat lane.How much does the average waiting time in front of the toll gate decrease? Answer 0. 8 0. 9 = 9, =4 1 ? 0. 9 1 ? 0. 8 The average waiting time in in front of the toll gate is reduced by more than a half. The Goal is about identifying bottlenecks in a plant. When you become a manager of a company and are running a expensive machine, you usually want to run it all the time with sufficient utilization. However, the implication of Kingman formula tells you that as your utilization approaches to 100%, the waiting time will be skyrocketing. It means that if there is any uncertainty or random ? ctuation foreplay to your system, your system will greatly su? er. In lower ? region, increasing ? is not that bad. If ? confining 1, increasing utilization a brusk bit can lead to a disaster. Atlanta, 10 years ago, did not su? er that much of tra? c problem. As its tra? c infrastructure capacity is getting appressed to the demand, it is ge tting more and more svelte to uncertainty. A lot of strategies presented in The Goal is in fact to decrease ?. You can do various things to reduce ? of your system by outsourcing some process, etc. You can also strategically manage or balance the load on di? erent parts of your system.You may want to utilize customer service organization 95% of time, while utilization of sales people is 10%. 2. 5 bittys Law L = ? W The Littles Law is much more general than G/G/1 queue. It can be applied to any moody box with de? nite boundary. The Georgia Tech campus can be one black box. ISyE building itself can be another. In G/G/1 queue, we can easy get average size of queue or service time or time in system as we di? erently draw box onto the queueing system. The following example shows that Littles law can be applied in broader context than the queueing theory. 32 CHAPTER 2. QUEUEING THEORY Example 2. 5 (Merge of I-75 and I-85).Atlanta is the place where two interstate highways, I-75 and I -85, merge and cross each other. As a tra? c manager of Atlanta, you would like to estimate the average time it takes to drive from the northern con? uence point to the south con? uence point. On average, 100 cars per minute enter the merged ambit from I-75 and 200 cars per minute enter the same area from I-85. You also dispatched a chopper to take a aerial snapshot of the merged area and counted how many cars are in the area. It sour out that on average 3000 cars are within the merged area. What is the average time between entering and exiting the area per fomite?Answer L =3000 cars ? =100 + 200 = 300 cars/min 3000 L = 10 minutes ? W = = ? 300 2. 6 Throughput Another focus of The Goal is set on the throughput of a system. Throughput is de? ned as follows. De? nition 2. 3 (Throughput). Throughput is the rate of output ? ow from a system. If ? ? 1, throughput= ?. If ? > 1, throughput= . The bounding bashfulness of throughput is either arrival rate or service rate depending on t he tra? c intensity. Example 2. 6 (Tandem queue with two stations). Suppose your factory production line has two stations linked in series. Every raw temporal orgasm into your line should be svelte by Station A ? rst.in one case it is processed by Station A, it goes to Station B for ? nishing. Suppose raw material is coming into your line at 15 units per minute. Station A can process 20 units per minute and Station B can process 25 units per minute. 1. What is the throughput of the entire system? 2. If we double the arrival rate of raw material from 15 to 30 units per minute, what is the throughput of the livelong system? Answer 1. First, obtain the tra? c intensity for Station A. ?A = ? 15 = = 0. 75 A 20 Since ? A < 1, the throughput of Station A is ? = 15 units per minute. Since Station A and Station B is linked in series, the throughput of Station . 7. SIMULATION A becomes the arrival rate for Station B. ?B = ? 15 = = 0. 6 B 25 33 Also, ? B < 1, the throughput of Station B is ? = 15 units per minute. Since Station B is the ? nal stage of the entire system, the throughput of the entire system is also ? = 15 units per minute. 2. Repeat the same steps. ?A = 30 ? = = 1. 5 A 20 Since ? A > 1, the throughput of Station A is A = 20 units per minute, which in turn becomes the arrival rate for Station B. ?B = A 20 = 0. 8 = B 25 ?B < 1, so the throughput of Station B is A = 20 units per minute, which in turn is the throughput of the whole system. 2. 7 SimulationListing 2. 1 Simulation of a Simple Queue and Lindley Equation N = 100 Function for Lindley Equation lindley = function(u,v) for (i in 1length(u)) if(i==1) w = 0 else w = append(w, max(wi-1+vi-1-ui, 0)) return(w) u v CASE 1 Discrete Distribution Generate N inter-arrival times and service times = sample(c(2,3,4),N,replace=TRUE,c(1/3,1/3,1/3)) = sample(c(1,2,3),N,replace=TRUE,c(1/3,1/3,1/3)) Compute waiting time for each customer w = lindley(u,v) w CASE 2 Deterministic Distribution All int er-arrival times are 3 minutes and all service times are 2 minutes Observe that nobody waits in this case. 4 u = rep(3, 100) v = rep(2, 100) w = lindley(u,v) w CHAPTER 2. QUEUEING THEORY The Kingmans theme formula is exact when inter-arrival times and service times follow iid exponential distribution. EW = 1 ? 1?? We can con? rm this equation by simulating an M/M/1 queue. Listing 2. 2 Kingman Approximation lambda = arrival rate, mu = service rate N = myriad lambda = 1/10 mu = 1/7 Generate N inter-arrival times and service times from exponential distribution u = rexp(N,rate=lambda) v = rexp(N,rate=mu) Compute the average waiting time of each customer w = lindley(u,v) mean(w) > 16. 0720 Compare with Kingman approximation rho = lambda/mu (1/mu)*(rho/(1-rho)) > 16. 33333 The Kingmans approximation formula becomes more and more straight as N grows. 2. 8 Exercise 1. Let Y be a random variable with p. d. f. ce? 3s for s ? 0, where c is a constant. (a) Determine c. (b) What is t he mean, variance, and squared coe? cient of variation of Y where the squared coe? cient of variation of Y is de? ned to be VarY /(EY 2 )? 2. Consider a single server queue. Initially, there is no customer in the system.Suppose that the inter-arrival times of the ? rst 15 customers are 2, 5, 7, 3, 1, 4, 9, 3, 10, 8, 3, 2, 16, 1, 8 2. 8. EXERCISE 35 In other words, the ? rst customer will arrive at t = 2 minutes, and the second will arrive at t = 2 + 5 minutes, and so on. Also, suppose that the service time of the ? rst 15 customers are 1, 4, 2, 8, 3, 7, 5, 2, 6, 11, 9, 2, 1, 7, 6 (a) Compute the average waiting time (the time customer spend in bu? er) of the ? rst 10 go customers. (b) Compute the average system time (waiting time plus service time) of the ? st 10 departed customers. (c) Compute the average queue size during the ? rst 20 minutes. (d) Compute the average server utilization during the ? rst 20 minutes. (e) Does the Littles law of hold for the average queue size in the ? rst 20 minutes? 3. We want to decide whether to engagement a human operator or buy a machine to key fruit steel beams with a rust inhibitor. blade beams are produced at a constant rate of one every 14 minutes. A skilled human operator takes an average time of 700 seconds to paint a steel beam, with a standard deviation of 300 seconds.An automatic painter takes on average 40 seconds more than the human painter to paint a beam, but with a standard deviation of only 150 seconds. Estimate the expected waiting time in queue of a steel beam for each of the operators, as well as the expected number of steel beams waiting in queue in each of the two cases. discover on the e? ect of variability in service time. 4. The arrival rate of customers to an ATM machine is 30 per hour with exponentially distirbuted in- terarrival times. The exertion times of two customers are independent and identically distributed.Each transaction time (in minutes) is distributed according to the following pd f f (s) = where ? = 2/3. (a) What is the average waiting for each customer? (b) What is the average number of customers waiting in line? (c) What is the average number of customers at the site? 5. A production line has two machines, machine A and tool B, that are arranged in series. Each job needs to processed by automobile A ? rst. Once it ? nishes the processing by railway car A, it moves to the next station, to be processed by Machine B. Once it ? nishes the processing by Machine B, it leaves the production line.Each machine can process one job at a time. An arriving job that ? nds the machine busy waits in a bu? er. 4? 2 se? 2? s , 0, if s ? 0 otherwise 36 CHAPTER 2. QUEUEING THEORY (The bu? er sizes are assumed to be in? nite. ) The processing times for Machine A are iid having exponential distribution with mean 4 minutes. The processing times for Machine B are iid with mean 2 minutes. Assume that the inter-arrival times of jobs arriving at the production line are iid, havi ng exponential distribution with mean of 5 minutes. (a) What is the utilization of Machine A?What is the utilization of Machine B? (b) What is the throughput of the production system? (Throughput is de? ned to be the rate of ? nal output ? ow, i. e. how many items will exit the system in a unit time. ) (c) What is the average waiting time at Machine A, excluding the service time? (d) It is know the average time in the entire production line is 30 minutes per job. What is the long-run average number of jobs in the entire production line? (e) Suppose that the mean inter-arrival time is changed to 1 minute. What are the utilizations for Machine A and Machine B, singly?What is the throughput of the production system? 6. An auto bang shop has roughly 10 cars arriving per week for repairs. A car waits outdoor(a) until it is brought inner for bumping. After bumping, the car is painted. On the average, there are 15 cars waiting outside in the yard to be repaired, 10 cars inside in the b ump area, and 5 cars inside in the painting area. What is the average length of time a car is in the yard, in the bump area, and in the painting area? What is the average length of time from when a car arrives until it leaves? 7. A small patois is sta? d by a single server. It has been observed that, during a normal business day, the inter-arrival times of customers to the bank are iid having exponential distribution with mean 3 minutes. Also, the the processing times of customers are iid having the following distribution (in minutes) x PrX = x 1 1/4 2 1/2 3 1/4 An arrival ? nding the server busy joins the queue. The waiting space is in? nite. (a) What is the long-run fraction of time that the server is busy? (b) What the the long-run average waiting time of each customer in the queue, excluding the processing time? c) What is average number of customers in the bank, those in queue plus those in service? 2. 8. EXERCISE (d) What is the throughput of the bank? 37 (e) If the inter-arr ival times have mean 1 minute. What is the throughput of the bank? 8. You are the manager at the Student affectionateness in charge of running the viands court. The food court is composed of two parts cooking station and fractures desk. Every person should go to the cooking station, place an order, wait there and pick up ? rst. Then, the person goes to the sunders desk to check out. After checking out, the person leaves the food court.The coo

No comments:

Post a Comment