Handout 6_2010 - 1 IE 372 Simulation - Handout 6 RANDOM...

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

View Full Document Right Arrow Icon
1 IE 372 Simulation - Handout 6 RANDOM NUMBER AND RANDOM VARIATE GENERATION General Idea Let X be a continuous random variable with probability density function ( ) f x and cumulative distribution function ( ) F x , i.e. ( ) ( ) P X x F x = . p 1.0 F ( x ) 0 x x Corresponding to each value of ( ) F x , we can find a value of x , i.e. if ( ) F x p = then 1 ( ) x F p - = . Since we want to generate a random sample from ( ) F x , any p in the interval (0,1) is equally likely to occur, i.e. (0,1) p u : where (0,1) u is uniform distribution between 0 and 1. Hence, to generate any x from any distribution, we first need a (0,1) u random variate (RV) to use as the value of p , which we call a random number (RN). The same idea is applicable to discrete distributions as well.
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Random Number Generation There are two types of RN generators. 1. True RN generators Usually make use of physical devices, e.g. spinning an unbiased wheel, drawing numbered balls, using electronic devices, and so on. “True” in the sense that each value is equally likely and unpredictable (provided that the device is unbiased). Not desirable for our purposes because - They have limited use in practice as we may need millions of RNs in a simulation run. - The RN stream generated is not reproducible. Hence simulation results are not reproducible. 2. Pseudo RN generators A stream of RNs is generated using recursive arithmetic equations. Not true since previous RN determines the next one. We can use them as long as they behave like RNs, i.e. satisfy statistical properties of randomness (independence and uniformity). Why Reproducibility? To be able to debug our models. To try alternative strategies under identical input conditions, e.g. using the same interarrival time and service time values for the same customers. To eliminate undesired sources of variability (to be discussed later under variance reduction).
Background image of page 2
3 Linear Congruential Generators (LCGs) These are the most common arithmetic RN generators. The recursive equation is: 1 ( )mod i i z az c m - = + i i u z m = , u i u (0,1) where a , c and m are pre-defined constants; values of these parameters are critical for the quality of the RN generator ( c is zero in many LCGs), 0 z is an (arbitrary) integer RN “seed” supplied by the user, 1 2 3 , , , z z z K is a RN “stream” generated for a given 0 z . Example: Let 2 a = , 3 c = , 5 m = and assume 0 10 z = . Then 1 (2 10 3)mod5 3 z = + = 1 3 5 0.6 u = = 2 (2 3 3)mod5 4 z = ⋅ + = 2 4 5 0.8 u = = 3 (2 4 3)mod5 1 z = ⋅ + = 3 1 5 0.2 u = = 4 (2 1 3)mod5 0 z = ⋅ + = 4 0 5 0.0 u = = 5 (2 0 3)mod5 3 z = ⋅ + = 5 1 3 5 0.6 u u = = = 0.6, 0.8, 0.2, 0.0, 0.6 is the RN stream generated for seed 10. The generator starts repeating itself with
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 13

Handout 6_2010 - 1 IE 372 Simulation - Handout 6 RANDOM...

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

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