1 / 11

Arrival & Service Times for Assignment 3

Arrival & Service Times for Assignment 3. Byung-Hyun Ha bhha@pusan.ac.kr. What We’ll Do. Generate input data for your own Part Number Arrival Time Inter-arrival Time Service Time 1 0.00 1.73 2.90 2 1.73 1.35 1.76 3 3.08 0.71 3.39 4 3.79 0.62 4.52

rune
Download Presentation

Arrival & Service Times for Assignment 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Arrival & Service Times for Assignment 3 Byung-Hyun Ha bhha@pusan.ac.kr

  2. What We’ll Do • Generate input data for your own Part Number Arrival Time Inter-arrival TimeService Time 1 0.00 1.73 2.90 2 1.73 1.35 1.76 3 3.08 0.71 3.39 4 3.79 0.62 4.52 5 4.41 14.28 4.46 6 18.69 0.70 4.36 7 19.39 15.52 2.07 8 34.91 3.15 3.36 9 38.06 1.76 2.37 10 39.82 1.00 5.38 11 40.82 . . . . . . . . . .

  3. Overview • Use your student ID as a seed, i.e. Z0 • For ith inter-arrival time (Ai) and service time (Si) • Generate random integers (Z2i–1, Z2i) • Get random numbers (U2i–1, U2i) from integers • Generate Ai and Si from random numbers

  4. Generate Random Integer • Linear congruential generator (LCG) • Consult 12.1 of our textbook • Zi = (aZi-1 + c) mod m • For us  a = 13821, c = 0, m = 215 = 32768 • Knuth - and Borosh and Niederreiter LCGs • http://random.mat.sbg.ac.at/~charly/server/node3.html

  5. Generate Random Integer • Example (Zi = 13821Zi-1mod 32768) • Z0 = 111313 seed: my employee id • Z1 = 13821111313mod 32768 = 32141 • Z2 = 1382132141mod 32768 = 17753 • Z3 = … You can use a calculator or an excel sheet 

  6. Get Random Number • Ui ~ distributed uniformly in [0,1] • Ui = Zi / m = Zi / 32768 • Example • U1 = Z1 / 32768 = 32141 / 32768  0.98 • U2 = Z2 / 32768  0.54 • U3 = Z3 / 32768  0.92 • U4 = Z4 / 32768  0.59 • …

  7. Generate Ai and Si • Generating random variates • Consult 12.2 of our textbook • In case of exponential dist. with  =  • PDF: f(x) = (1/)e-x/ • CDF: F(x) = 1 - e-x/ • with U ~ distributed uniformly in [0,1] • U = F(X) = 1 - e-X/  X = -ln(1 – U)

  8. Generate Ai and Si • Pictorial illustration

  9. Generate Ai and Si • Assumption • Ai ~ distributed exponential with  = 5 • Si ~ distributed exponential with  = 4 • Example • A1 = -5ln(1-U1) = -5ln(1-0.98)  19.78 • S1 = -4ln(1-U2) = -4ln(1-0.54)  3.12 • A2 = -5ln(1-U3) = -5ln(1-0.92)  12.73 • S2 = -4ln(1-U4) = -4ln(1-0.59)  3.61

  10. What We Have Done • Generate input data for my own Part Number Arrival Time Inter-arrival Time Service Time 1 0.00 19.78 3.12 2 19.78 12.73 3.61 3 32.51 0.74 6.89 4 33.25 8.92 3.80 5 42.17 8.96 2.65 6 51.13 4.51 0.32 7 55.64 1.07 0.67 8 56.72 2.03 3.77 9 58.74 2.09 2.45 10 60.84 0.95 7.30 11 61.79 . . . . . . . . . .

  11. Further Readings • Chapter 12 of the textbook • Linear congruential generator from Wikipedia • http://en.wikipedia.org/wiki/Linear_congruential_generator • Knuth - and Borosh and Niederreiter LCGs • http://random.mat.sbg.ac.at/~charly/server/node3.html

More Related