2CPSC531 Simulation
2CPSC531 Simulation
Carey Williamson
Department of Computer Science
University of Calgary
Fall 2017
Recap: Performance Evaluation
Performance
Evaluation
Performance Performance
Measurement Modeling
2
Simulation Model Taxonomy (preview)
3
Terminology (1 of 2)
4
Terminology (2 of 2)
▪ Entity
— An object of interest in the system: Machines in factory
▪ Attribute
— The property of an entity: speed, capacity, failure rate
▪ State
— A collection of variables that describe the system in any
time: status of machine (busy, idle, down,…)
▪ Event
— An instantaneous occurrence that might change the state
of the system: breakdown
5
Simulation Modeling
7
Disadvantages of Simulation
8
When Simulation Is Not Appropriate
9
Common Mistakes in Simulation
10
Types of Simulations
11
Simulation Model Taxonomy
12
Simulation Examples
13
Monte Carlo Simulation
15
Advantages of Trace-Driven Simulations
▪ Credibility
▪ Easy validation: compare simulation with
measurement
▪ Accurate workload: models correlation and
interference
▪ Fair comparison: better than random input
▪ Similarity to the actual implementation:
— trace-driven model is similar to the system
— can understand complexity of implementation
16
Disadvantages of Trace-Driven Simulations
17
Discrete-Event Simulation
18
Discrete and Continuous Systems
19
Discrete and Continuous Systems
20
Discrete-Event Simulation
Departure
Arrival
Arrival
Arrival
Restaurant Example 21
Continuous Simulation
Dam Example 22
Characterizing a Simulation Model
▪ Deterministic or Stochastic
— Does the model contain stochastic components?
▪ Static or Dynamic
— Is time a significant variable?
▪ Continuous or Discrete
— Does the system state evolve continuously or only at
discrete points in time?
23
Simulation Model Taxonomy
24
DES Model Development
25
Three Model Levels
▪ Conceptual Model
— Very high level (perhaps schematic diagram)
— How comprehensive should the model be?
— What are the state variables?
— Which ones are dynamic, and which are most important?
▪ Specification Model
— On paper: entitites, interactions, requirements, rules, etc.
— May involve equations, pseudocode, etc.
— How will the model receive input?
▪ Computational Model
— A computer program
— General-purpose programming language or simulation language?
26
Simulation Software
27
Verification and Validation
▪ Verification
— Computational model should be consistent with
specification model
— Did we build the model right?
▪ Validation
— Computational model should be consistent with the
system being analyzed
— Did we build the right model?
— Can an expert distinguish simulation output from system
output?
28