Download presentation
Presentation is loading. Please wait.
Published byAudrey Warner Modified over 9 years ago
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 Time Service Time 10.001.732.90 21.731.351.76 33.080.713.39 43.790.624.52 54.4114.284.46 618.690.704.36 719.3915.522.07 834.913.153.36 938.061.762.37 1039.821.005.38 1140.82......
3
Overview Use your student ID as a seed, i.e. Z 0 For i th inter-arrival time (A i ) and service time (S i ) –Generate random integers (Z 2i–1, Z 2i ) –Get random numbers (U 2i–1, U 2i ) from integers –Generate A i and S i from random numbers
4
Generate Random Integer Linear congruential generator (LCG) –Consult 12.1 of our textbook –Z i = (aZ i-1 + c) mod m –For us a = 13821, c = 0, m = 2 15 = 32768 Knuth - and Borosh and Niederreiter LCGs –http://random.mat.sbg.ac.at/~charly/server/node3.htmlhttp://random.mat.sbg.ac.at/~charly/server/node3.html
5
Generate Random Integer Example (Zi = 13821 Z i-1 mod 32768) –Z 0 = 111313 seed: my employee id –Z 1 = 13821 111313 mod 32768 = 32141 –Z 2 = 13821 32141 mod 32768 = 17753 –Z 3 = … You can use a calculator or an excel sheet
6
Get Random Number U i ~ distributed uniformly in [0,1] –U i = Z i / m = Z i / 32768 Example –U 1 = Z 1 / 32768 = 32141 / 32768 0.98 –U 2 = Z 2 / 32768 0.54 –U 3 = Z 3 / 32768 0.92 –U 4 = Z 4 / 32768 0.59 –…
7
Generate A i and S i 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 A i and S i Pictorial illustration
9
Generate A i and S i Assumption –A i ~ distributed exponential with = 5 –S i ~ distributed exponential with = 4 Example –A 1 = -5 ln(1-U 1 ) = -5 ln(1-0.98) 19.78 –S 1 = -4 ln(1-U 2 ) = -4 ln(1-0.54) 3.12 –A 2 = -5 ln(1-U 3 ) = -5 ln(1-0.92) 12.73 –S 2 = -4 ln(1-U 4 ) = -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 10.0019.783.12 219.7812.733.61 332.510.746.89 433.258.923.80 542.178.962.65 651.134.510.32 755.641.070.67 856.722.033.77 958.742.092.45 1060.840.957.30 1161.79......
11
Further Readings Chapter 12 of the textbook Linear congruential generator from Wikipedia –http://en.wikipedia.org/wiki/Linear_congruenti al_generatorhttp://en.wikipedia.org/wiki/Linear_congruenti al_generator Knuth - and Borosh and Niederreiter LCGs –http://random.mat.sbg.ac.at/~charly/server/no de3.htmlhttp://random.mat.sbg.ac.at/~charly/server/no de3.html
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.