Title: Introduction to Simulation
1Introduction to Simulation
Assistant Professor Dr.Patcharaporn
Neammanee Applied Statistics school, NIDA
2Agenda
- Inventory problem
- What is simulation?
- Hotel booking problem
- Car insurance problem
3Software
- Microsoft Excel
- Arena
- MINITAB
4Inventory problem
- ???????????? 150 ??????????
- ???????? 50 ??????????
- ??????? 300 ??????????
- ??????????? 10,000 ??? ?????????????????????
5Solution
???????????
?????????????? ?????????? 10,000 ???
6Additional problem
- ????????
- ????????? 1 ???? 50 ??????????
- ????????? 2 ???? 40 ??????????
- ????????? 3 ???? 30 ??????????
- ????????? 4?????????? 20 ??????????
7Solution
???????????
8 9??????????????????
?????????
10Solution
?????????????????????????????????
- ????????????? 15040
- 190 ???
- ??????????? 300 -190
- 110 ???
- ????????????????????? ?????????? 10,000 ???
11Probability of items per order
???????????
12Random-variate generation
13Examples
- ????????????? 1
- Rand1 0.30432
- ???????????????????????? 1 ??????? 1
- ?????????????????? 100 ???
- ??????? ??????? 100 ???
- ????????????? 2
- Rand2 0. 66387
- ???????????????????????? 2 ??????? 3
- ??????? 100 120x3 460 ???
- ????????????? 3
- Rand3 0.95631
- ???????????????????????? 3 ??????? 5
- ??????? 460 130x5 1,010 ???
14Simulation
- ?????????? Microsoft Excel
- ?????????? 50 ?????
15Simulation
16Simulation
- IF(B2ltJ2,G2,IF(B2ltJ3,G3,IF(B2ltJ4,G4,
IF(B2ltJ5,G5, IF(B2ltJ6,G6,0)))))
17Simulation
18Simulation output
19Simulation output
20Additional problem
- ???????????????????????????????????????
- ??????????? 3 ??????????????????????
- ???? 280 ??????????
- ?????????? 5 ??????????????????????
- ???? 250 ??????????
21What is simulation?
22What is simulation?
- Simulation is a computer model that attempts to
imitate the behavior of a real system or
activity.
23What is simulation?
- Simulation is the process of designing a
mathematical or logical model of a real system
and then conducting computer-based experiments
with the model to describe, explain, and predict
the behavior of the real system (Stewart
Ronald, 1990).
24Types of simulation
- In dynamic simulation models, events occur
sequentially over time. Specialized software is
required. - In static simulation models time is not explicit
and the analysis can be done in Excel
spreadsheets.
25Monte carlo simulation
- Monte Carlo method is used for static simulation.
- Computer creates the values of the stochastic
random variables. - Distribution and its parameters are specified.
- Samples are repeatedly drawn from each
distribution. - For each input variable, look at a histogram to
verify that we are sampling from the desired
distribution. - For each output variable, look at percentiles as
well as the mean.
26Phases of simulation project
- Phase I (design) identify the problem, set
objectives, design the model, collect data. - Phase II (execution) empirical modeling,
specify the variables, validate the model,
execute the simulation, prepare reports. - Phase III (communication) explain the
findings to decision-makers.
27Hotel booking problem
28Hotel booking problem
- ??????????????????????????????????????????????????
50 ???? - ????????????????????????????????????????????
- ??????????????????????????????????????????????????
??????????????????????????????????????????????????
?????
29Objective
- ???????????????????????????
- ??????????????????? 65 ??????????
30Model ???????????????????????????????
31Collect Data
- ???????????????
- ??????????????????????? ??????????????????????????
????????? 0.7 - ????????????????????? ????????????????????????????
??????? 0.85 - ???????????????????
- ?????????????????????????? ??????????????? 300
???????????????? - ??????????????????????????????????????????????????
?(Overbooking) ????????????????????????????? ????
upgrade ??????? ?????????????????? 200
???????????????? - ??????????????????????????????????????? 100
????????????????
32Simulation
33Simulation
34Simulation
35Simulation
36Simulation
- IF(B3gtS1,S3S1-S5(B3-S1),S3B3-S4
(S1-B3))
37Simulation output ???????????????????
- ?????????? 100 ?????
- ????????????????????????
38Simulation output ???????????????????
39Findings to decision-makers
40Alternative ???????????????
- ?????? 55 ????
- ?????? 60 ????
- ?????? 65 ????
- ?????? 70 ????
- ?????? 75 ????
41Result ?????????????????????????????
42Car Insurance Problem
43Objective
- ????????????????????????? Claim ???????????
44Model ???????????????? Claim ?????????????
45Collect Data
- ????????????????????????????????????? Claim
?????? - ??????????????????? Claim ??????? Claim
????????????????? - ????????? Claim ????????????????????
46Raw Data
47Specify Variable
- ????????????????????????? Claim ??????? 0.316
- ?????????????????????? Claim ?????????????????????
claim-??????????????????????????????
48Specify Variable
- ????????? Claim?????????????????????????
- (Normal distribution) ????????????? 9,290
???????????????????? 3,740
49Simulation
50Simulation
- IF(D30,0,IF(D3lt0.644,1,IF(D3lt0.876,2,IF(D3lt0.966
,3,IF(D3lt0.998,4,5)))))
51Simulation
- IF(F30,0,NORMINV(F3,R1,R2))
52Simulation
53Simulation output
- ?????????????????????? 300 ???
54Simulation output
55When do we simulate?
- In general, consider simulation when
- - The system is complex
- - Uncertainty exists in the variables
- - Real experiments are impossible or costly
- - The processes are repetitive
56When do not we simulate?
- we are less inclined to simulate when
- - The system is simple
- - Variables are stable or nonstochastic
- - Real experiments are cheap and nondisruptive
- - The event will only happen once
57Thank you for your attention ? ?
- Patcharaporn Neammanee
- patchara_at_as.nida.ac.th