01 - SYSC4005 - Introduction To Simulation
01 - SYSC4005 - Introduction To Simulation
SYSC 4005A/5001W
Discrete Simulation/Modeling
Winter 2024
1
Why is Simulation Studied?
2
Performance Evaluation
3
Approaches to Performance Evaluation
4
Approaches to Performance Evaluation
Pros & Cons
5
Simulation / Modeling
Definitions
6
Simulation / Modeling
Definitions (cont.)
7
Simulation / Modeling
Definitions (cont.)
• A Simulation Model:
• is an abstract representation of a real system that captures the
essential characteristics or properties of the system,
• it often requires making simplifying set of assumptions about how the
system works,
• these assumptions expressed in mathematical, logical, and
symbolic relationships between the entities, or objects of interest,
of the system,
• is used to study the behavior of the system over time.
8
Simulation / Modeling
The Process
9
Simulation / Modeling
Solving the Model
• Many real-world systems are too complex that models of these systems
are virtually impossible to solve mathematically.
10
Model of a System: What?
• A model is defined as a representation of a system for the purpose of
studying that system.
• It is only necessary to consider those aspects of the system that affect
(or relevant to) the problem under investigation.
• these aspects are represented in a model of the system.
• The model is a simplification of the system but should be sufficiently
detailed to permit valid conclusions to be drawn about the real system.
• Different models of the same system could be required as the purpose of
investigation changes.
• The model contains only those components that are relevant to the
study.
11
Model of a System: Why?
12
A Famous Quote…
13
Types of System Models
14
Components of a System
15
Examples of Systems and Their Components*
A. Discrete B. Continuous
17
Ways to Study a System
System Performance
Evaluation
Experiment Experiment
with the actual with a model
system of the system 1. Performance Performance
Measurement Modeling
Physical Mathematical
model model
3. Analytical
2. Simulation
Modeling
Analytical
Simulation Refer to slide 4.
solution
18
System
System Model Taxonomy
Model
19
Drivers of Simulation Tools
1. Special-
purpose
simulation
languages
Simulation is one
of the most
widely used tools
in operations
research and
system analysis: 2. Massive
computing
capabilities at a
decreasing
cost per
operation
3. Advances in
simulation https://journals.sagepub.com/doi/full/10.1177/15485129211067175
methodologies
20
What Simulations Do and When to Use
21
What Simulations do and When to Use (cont.)
22
When Simulations Should NOT be Used
1. When the problem can be solved using common sense.
2. If the problem can be solved analytically.
3. If it is easier to perform direct experiments.
4. If the costs exceed savings.
5. If the resources or time are not available to develop, verify and validate
the model.
6. If no data is available, not even estimates.
7. If the managers have unreasonable expectation
8. If system behavior is too complex to be defined.
23
Application Areas of Simulation
• Computer networks, systems, protocols.
• Manufacturing applications, e.g., semiconductor.
• Construction engineering and project management.
• Logistics, supply chain and distribution applications.
• Transportation modes and traffic.
• Business process simulation.
• Military applications.
• Risk analysis.
• Health care.
24
Simulation vs. Optimization
• In contrast to optimization models, simulation models are run rather than
solved.
• Given a particular set of inputs and model characteristics, the model is
run and the simulated behavior is observed.
• This process of changing inputs and model characteristics results in a
set of scenarios that are evaluated.
• A good solution, either in the analysis of an existing system or in the
design new system, is then recommended for implementation.
25
Simulation
Advantages
26
Simulation
Advantages (cont.)
• Insight can be obtained about the interaction of variables and about the
importance of variables to the performance of the system.
• Bottleneck analysis can be performed to discover where work in process,
information, materials, and so on are being delayed excessively.
• A simulation study can help in understanding how the system operates
rather than how individuals think the system operates.
• “What if” questions can be answered. This is particularly useful in the
design of new systems.
27
Simulation
Disadvantages
28
Simulation
Disadvantages (cont.)
29
Discrete Event Simulation – Recap
• DES is the modeling of systems in which the state variable changes only
at a discrete set of points in time.
• The simulation models are analyzed by:
• Numerical methods: employ computational procedures to “solve”
mathematical models.
• Analytical methods: employ the deductive reasoning of mathematics
to “solve” the model,
• In the case of simulation models, which employ numerical methods,
models are “run” rather than solved.
• an artificial history is generated from the model assumptions,
• observations are collected to be analyzed and to estimate the true
system performance measures.
30
Steps in a Simulation
Study
31
Steps in a Simulation Study (1/4)
• Every study should begin with a statement of the problem which must be clearly
1. Problem understood.
formulation • Sometimes, the problem must be reformulated as the study progresses.
3. Model • Abstracting the essential features of the problem and selecting and modifying basic
assumptions that characterize the system.
conceptual- • Enriching and elaborating the model to get useful approximation by starting with a
ization simple model and building toward greater complexity.
32
Steps in a Simulation Study (2/4)
• There is a constant interplay between the construction of the model and the collection
4. Data of the needed input data. The objectives dictate the kind of data to be collected.
collection • Takes a large portion of the simulation time, it is necessary to begin as early as
possible.
• Models require a storage and computation; therefore, the model must be entered into
5. Model a computer-recognizable format.
translation • The modeler must decide whether to program the model or to use special-purpose
simulation software.
33
Steps in a Simulation Study (3/4)
• Achieved through the calibration of the model, an iterative process of comparing the
model against actual system behavior and using the discrepancies to improve the
7. Validated? model. This process is repeated until model accuracy is judged acceptable (the
simulation model replicate this system measure.)
8. • Determine the alternatives that are to be simulated. The decision concerning which
alternatives to simulate is a function of runs that have been completed and analyzed.
Experimental • For each simulated system design, decisions need to be made: the lengths of the
design initialization period and simulation runs, and the number of each run’s replications.
9. Production
• Production runs and their subsequent analysis are used to estimate measures of
runs and performance for the system designs that are being simulated.
analysis
34
Steps in a Simulation Study (4/4)
10. More • Given the analysis of runs that have been completed, the analyst determines whether
additional runs are needed and what design those additional experiments should
runs? follow.
11. • Program and progress documentation is necessary for numerous reasons: program
will be used again, if the program is to be modified, model users can change input
Documenting parameters to study their relationships with measure of performance.
and reporting • The analysis results should be reported clearly and concisely in a final report.
12. • The success of this step depends on how well the previous eleven steps have been
performed.
Implement- • It is contingent upon how thoroughly the analyst has involved the ultimate model user
ation during the entire simulation process.
35
Phases of Simulation-Model Building
36
A Simulation Example
https://www.sciencedirect.com/science/article/pii/S2352711019303723
37
A Simulation Example (1/4)
• Patients arrive at an ER. The arrival of the patients occurs randomly and
may vary with the day of the week and even the hour of the day.
• The hospital has a triage station, where the arriving patient’s condition is
monitored:
• if the patient’s condition warrants immediate attention, the patient is
expedited to an ER bed to be attended by a doctor and a nurse and
the patient’s admitting information may be obtained from a relative.
• if the patient does not require immediate attention, the patient goes
through the admitting process, where the patient’s information is
obtained. The patient is then directed to the waiting room, to wait for
allocation to a room, a doctor, and a nurse.
38
A Simulation Example (2/4)
• The doctors and nurses within the emergency department must monitor
the health of the patients by performing tests and diagnosing the
patient’s symptoms. This occurs on a periodic basis.
• As the patient receives care, the patient may be moved to and require
other facilities (MRI, X-ray, etc.).
• Eventually, the patient is either discharged after receiving care or
admitted to the main hospital.
• The hospital is interested in conducting a study of the emergency
department in order to improve the care of the patients while better
utilizing the available resources.
39
A Simulation Example (3/4)
• To investigate this situation, you might need to understand the behavior
of certain measures of performance:
• the average number of patients that are waiting,
• the average waiting time of the patients and their average total time in
the emergency department,
• the average number rooms required per hour,
• the average utilization of the doctors and nurses (and other
equipment).
• The hospital has historical records available on the operation of the ER
through its patient tracking system which can be used to estimate the
current performance of the ER.
40
A Simulation Example (4/4)
• When conducting a study of the ER we might want to propose changes to
how the department will operate (e.g., staffing levels) in the future.
• We are faced with trying to predict the future behavior of the system and
its performance when making changes to the system,
• we cannot realistically experiment with the actual system without
possibly endangering the lives or care of the patients.
• It would be better to model the system and to test the effect of changes
on the model. If the model has acceptable fidelity, then you can infer how
the changes will affect the real system. This is where simulation
techniques can be utilized.
41
Discrete Event Simulation
Software Examples
https://en.wikipedia.org/wiki/List_of_discrete_event_simulation_software
42
Questions?
43