The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
Syllabus: IELM313 System Simulation
Course Description
Basic concepts and algorithm of discreteevent simulation, generation of random
variates, modeling input distributions, statistical analysis of simulation outputs,
verification and validation of simul
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
IELM313 Homework 1
Due at 5pm on 23 March 2011, Room 556 7
1. Develop an algorithm to generate random variates from the distribution with pdf
1
2 ( x 2 ),
1
x
f ( x ) = 2 ,
3
2
0,
2 x3
3< x6
otherwise
2. When a truck enters a terminal, it has a 90% cha
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
Homework 2 (Solution)
1
10 Percent quantile is the 50th smallest value = 5.83
,
2
One of the replication (fig. 1) may be hard to see the deletion point. You can
check the average across replications or cumulative average (fig. 2).
fig. 1
fig. 2
The deleti
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
IELM 4130
Page 1 of 1
System Simulation
Inclass Quiz 1 Solution
Consider a hair salon that has only one barber. Four customers showed up in this salon yesterday
morning. Their arrival and departure times are given below.
Customer
Arrival
Departure
1
10:1
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
IELM 4130
Page 1 of 1
System Simulation
Inclass Quiz 6
Suppose there are 10 designs. If one would like to compare all the other designs against design 1,
what is the individual condence level one needs to set in order to achieve 90% overall condence
leve
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
IELM 4130
Page 1 of 1
System Simulation
Inclass Quiz 3 Solution
Suppose that interarrival times to a bank are distributed
for
0
(3/7)(x/7)2 for
f (x) =
0
for
according to the pdf f (x) where
x<0
0x7
x>7
How would you generate these interarrival times, a
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
IELM 4130
Page 1 of 1
System Simulation
Inclass Quiz 2 Solution
We discussed the Linear Congruential Generator (LCG) to generate random numbers from the
distribution Uniform[0,1]. Consider the following algorithm that generalizes LCG.
1. xn (axn1 + bxn2
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
IELM 4130
Page 1 of 1
System Simulation
Inclass Quiz 4
There are 5 observations from a distribution: 0.4, 0.5, 0.3, 0.9, and 0.1. Use KS test to determine
whether the data is from the probability distribution with the following CDF
F (x) =
x2 , 0 x 1
0,
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
IELM313 Homework 2
Due 18 April 2011, Rm5567
1. Download TTF.xls from the course website. The file includes the time to failure
(TTF) from the simulation of the Bit Bucket computer systems. Each value in the file
represents the TTF (in the unit of year) f
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
Introduction to Simulation
IELM 313
Dr. Jeff Hong
Note 1, Page 1
What is simulation?
How the pilots of combat fighters are trained?
Note 1, Page 2
What is simulation?
Note 1, Page 3
Static vs. Dynamic
Time does not play a natural role in static simulati
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
Verification & Validation
IELM 313
Dr. Jeff Hong
Note 6, Page 1
Verification
Insure that your computer simulation
model matches your conceptual model.
Does not attempt to establish that you
have a good (valid) model, but rather
checks that you correctly
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
Output Analysis
IELM 313
Dr. Jeff Hong
Output Analysis
Output Analysis covers
The design of the simulation experiment (# of replications,
which systems to simulate)
Analysis of the data generated by the simulation
A key goal of output analysis is to p
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
Project Presentation & Report
IELM 313
What do you need to include?
Motivation and problem definition
Assumptions and simulation model (a short
demo is required in the presentation)
Input modeling
Output analysis
Validation
Alternative models (solut
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
General Concepts and Algorithm
of DiscreteEvent Simulation
IELM 313
Dr. Jeff Hong
Note 2 Page 1
The case of Bit Bucket Computers
Bit Bucket Computers specializes in installing and maintaining highly
reliable computer systems. One of its standard configur
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
Comparisons via Simulation
IELM 313
Dr. Jeff Hong
Note 7, Page 1
Motivation
Simulations are typically run to compare 2 or more
alternative system designs or scenarios.
Types of comparisons:
Comparing two system designs
Comparing multiple system design
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
Input Modeling for Simulation
IELM 313
Dr. Jeff Hong
Note 4 Page 1
Input Models
Input models represent the uncertainty in a stochastic
simulation.
Random variates are generated based on the input models
Simulation outputs are determined by the input mo
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
RandomVariate Generation
IELM 313
Dr. Jeff Hong
Note 3, Page 1
Random Numbers and Random Variates
If we want to simulate the Darker Image copy shop for a
month, do we need to collect data for a month?
What can we do?
Can we really generate randomness
The Hong Kong University of Science and Technology
System Simulation
IELM 313

Spring 2012
IELM 4130
Page 1 of 2
System Simulation
Inclass Quiz 5
The Crude Oil has the following prices in US dollars per barrel in the past 20 trading days.
Date
15Mar12
16Mar12
19Mar12
20Mar12
21Mar12
22Mar12
23Mar12
26Mar12
27Mar12
28Mar12
2