시뮬레이션의 종류 • Static (정적) VS. Dynamic (동적) • Deterministic VS. Stochastic • Continuous (연속) VS. Discrete (이산) 4
The Buffon’s Needle Problem • Prob(1 st event) = (l/2 + l/2) / d = l/d d l/2 7
Estimating Pi 10
Estimating Pi http: //mste. illinois. edu/activity/buffon/ 11
Using Computer to Simulation • 컴퓨터 능력의 발전 – 일반적인 프로그래밍 언어 (C++, Visual Basic, Java, Matlab, Python, etc) • Simulation software 의 발전 – GUI environments: 사용이 용이함 – Arena, Anylogic, Automod, Matlab-simulink – Spreadsheet, @risk, Crystal Ball 13
An Outpatient Clinic (외래병원 ) Patient Arrival Lab Test Check In Nurse (Vitals) Is the Dr. Ready? Yes No Clinic’s Waiting Room After vitals are taken Physician Check Out Pharmacy’s Waiting Room Pharmacy No Mail the medicine? Yes Exit 14
An Outpatient Clinic 15
A Calculation of Pi • Pi=3. 14159…. • Monte-Carlo simulation Area of circle = pi * radius^2 Area of rectangle = 2 * 2 = (radius*2) ^2 Radius = 1 Area of cir. / Area of rect. = pi / 4 1. Plot dots inside the rectangle 2. Plot dots inside the circle 3. Calculate the ratio of dots inside the circle over dots inside the rectangle 4. Pi = the ratio * 4 16
Random Number Generation (난수 발생) • Excel 의 function – “=RAND()” – “=RANDBETWEEN(bottom, top)” 24