Chapter 6 Exercises Solutions

Chapter 6 Exercises Solutions - STAT 340/CS 437 Short...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
STAT 340/CS 437 Short Solutions to Exercise of Chapter 6 1. (a) Note : T 0 is the time when service gets started; T is the “door-closing” time (no more arrivals after T ). For notation and definitions of variables see Handout 4. Initialize the System: – Set t = 0; N A = 0; N D 1 = 0; N D 2 = 0; SS = (0 , 0 , 0). – Generate I from exp( μ ), the first arrival time. – Set t A = I ; t D 1 = ; t D 2 = . Update the System Based on t , SS = ( n,i 1 ,i 2 ), t A , t D 1 and t D 2 : – Case 0: t A < T 0 Reset t = t A ; N A = N A + 1; SS = ( n + 1 ,i 1 ,i 2 ) (here we must have i 1 = i 2 = 0); Generate I from exp( μ ) and reset t A = t + I ; Collect A ( N A ) = t . Set the departure times here for the first two customers if they arrive before t = T 0 : (1) If N A = 1, generate Y 1 from exp( λ 1 ), reset i 1 = 1 and t D 1 = T 0 + Y 1 . (2) If N A = 2, generate Y 2 from exp( λ 2 ), reset i 2 = 2 and t D 2 = T 0 + Y 2 . – Case 1: t A = min( t A ,t D 1 ,t D 2 ) and T 0 t A T Reset t = t A ; N A = N A + 1. Generate I from exp( μ ) and reset t A = t + I . Collect output A ( N A ) = t . (1) If SS = (0 , 0 , 0): Reset SS = (1 ,N A , 0); Generate Y 1 from exp( λ 1 ) and reset t D 1 = t + Y 1 . (2) If SS = (1 ,i 1 , 0): Reset SS = (2 ,i 1 ,N A ); Generate Y 2 from exp( λ 2 ) and reset t D 2 = t + Y 2 . (3) If SS = (1 , 0 ,i 2 ): Reset SS = (2 ,N A ,i 2 ); Generate Y 1 from exp( λ 1 ) and reset t D 1 = t + Y 1 . (4) If n > 1: Reset SS = ( n + 1 ,i 1 ,i 2 ). – Case 2: t D 1 = min( t A ,t D 1 ,t D 2 ) and t D 1 T Reset t = t D 1 ; N D 1 = N D 1 + 1. Collect D ( i 1 ) = t . 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
(1) If n = 1, reset SS = (0 , 0 , 0); t D 1 = . (2) If n = 2, reset SS = (1 , 0 ,i 2 ); t D 1 = . (3) If n > 2: Let m = max( i 1 ,i 2 ), then the next customer to be at server 1 is m + 1. Reset SS = ( n - 1 ,m + 1 ,i 2 ); Generate Y 1 from exp( λ 1 ) and reset t D 1 = t + Y 1 . – Case 3:
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/27/2009 for the course STAT 340 taught by Professor Xu(sunny)wang during the Spring '09 term at Waterloo.

Page1 / 7

Chapter 6 Exercises Solutions - STAT 340/CS 437 Short...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online