You are on page 1of 7

CST-501

Simulation (Period 9)

Presented by

Daw Ank Phyu Win

Associate Professor
The Acceptance-Rejection Method
• To consider triangular distribution

• to generate a random observation


1. to generate a uniform random number r1 between 0 and 1,
to set x = 2r1
to accept x with
2. to generate a uniform random number r2 between 0 and 1
to accept x if r2 f(x)
to reject x if r2 > f(x)
( given function)
• to use given function
• to follow the instruction as above
Problem 22.4-19
• to use the acceptance-rejection method
• to generate three random observations from the triangular distribution
• Uniform random number:
0.096,0.569,0.665,0.764,0.842,0.492,0.224,0.950,0.610,0.145,0.484,0.552,0.350,0.590

r1 x r2 f(x) Accept?
0.096 0.192 0.569 0.192 No
0.665 1.330 0.764 0.670 No
0.842 1.684 0.492 0.316 No
0.224 0.448 0.950 0.448 No
0.610 1.220 0.145 0.780 Yes
0.484 0.968 0.552 0.968 Yes
0.350
• the 0.700 1.220,0.968,0.700
three samples: 0.590 0.700 yes
Problem 22.4-20

• to use the acceptance-rejection method

• to generate three random observations from the probability density function

• uniform random numbers:


0.096,0.569,0.665,0.764,0.842,0.492,0.224,0.950,0.610,0.145,0.484,0.552,0.350,0.590,0.430,

0.041,0.802,0.471,0.255,0.799,0.608,0.577,0.347,0.933,0.581,0.173,0.603,0.040


[ =
Problem 22.4-20 (continued)
r1 x= r2 F(x) Accept?
0.096 13.098 0.569 0.062 No
0.665 18.155 0.764 0.163 No
0.842 19.176 0.492 0.184 No
0.224 14.733 0.950 0.095 No
0.610 17.810 0.145 0.156 Yes
0.484 16.957 0.552 0.139 No
0.350 15.916 0.590 0.118 No
0.430 16.557 0.041 0.131 Yes
0.802 18.955 0.471 0.179 No
0.255 15.05 0.799 0.101 No
0.608 17.797 0.577 0.156 No
0.347 15.891 0.933 0.118 No
0.581 17.622 0.173 0.152 No
0.603 17.765 0.040 0.155 Yes

The three random observations: 17.810,16.557, 17.765


Conclusions

• Simulation is a powerful tool in assisting the teaching and learning process.

• Students can explore the content of the simulation and they have the freedom to change any
parameter in the simulation and observe the results.

• When simulated functions under conditions such as goals, guidelines, proper mentoring and
guidance from teachers, students are able to unlock and develop their potentials and prepare for
every issue they will face in their practicum stage.

• Simulation is a widely used tool for estimating the performance of complex stochastic systems.

• Simulation is one of the most popular techniques of operations research.

• Simulation provides only statistical estimates rather than exact results.


Reference

• Frederick S. Hiller, Gerald J. Lieberman, Introduction to Operations Research, Seventh Edition

( Stanford University ), January 2000.

• Textbook link: https://notendur.hi.is/kth93/3.20.pdf

You might also like