0% found this document useful (0 votes)
3 views

01 - SYSC4005 - Introduction To Simulation

Uploaded by

Macaulay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

01 - SYSC4005 - Introduction To Simulation

Uploaded by

Macaulay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Introduction to Simulation

SYSC 4005A/5001W
Discrete Simulation/Modeling
Winter 2024

1
Why is Simulation Studied?

Simulation is studied / used to


“assess” or “predict” the
performance of complicated
existing or planned systems
under certain conditions.

Simulation is heavily based on


modeling which is an essential
tool in system performance
evaluation.

2
Performance Evaluation

• Performance is a key consideration in the design, development, or


operation of any systems, including computer systems.
• Goal: is to get the highest possible performance for a given cost
(e.g., dollars , energy, etc.)
• Objectives: establish a quantitative understanding of system
behavior which is sufficient for:
• evaluating alternative system designs/configurations,
• predicting system performance for a given set of inputs,
• performance debugging and system tunning.

3
Approaches to Performance Evaluation

1. Obtain measurement data by observing the


Performance events and activities on an existing system (actual
Evaluation
or smaller-scale); evaluate new algorithms or
designs by implementing and comparing them.
2. Develop a computer program that implements
1. Performance Performance an abstracted model of the physical system;
Measurement Modeling manipulate the model and/or its inputs to estimate
the system performance.
3. Represent the system by an abstract
mathematical model of the physical system (e.g.,
3. Analytical
2. Simulation
Modeling formula); manipulate parameters of the model to
obtain information about the system performance.

4
Approaches to Performance Evaluation
Pros & Cons

• Measures performance directly on a system.


Performance • Generally, provides the most valid results.
Measurements
• Not very flexible, may be difficult to vary some workload parameters.

• Develop a simulation program that implements the model.


Simulation • Collect data by running the simulation to estimate the performance
Modeling measures of interest.
• It may be costly to develop and run the simulation program.

• Uses mathematical methods to obtain solutions to the performance


Analytical measures of interest.
Modeling • Easy to compute if a simple analytic solution is available.
• Solutions to complex models may be difficult to obtain.

5
Simulation / Modeling
Definitions

• Simulation: is the imitation of the operation of a real-world process or


system over time. It can be done by hand or on a computer.
• involves the generation and the observation of an artificial history /
data of the system to draw inferences concerning of its operating
characteristics.

6
Simulation / Modeling
Definitions (cont.)

• A System: is a collection of entities (or objects) that are joined together in


some regular interaction or interdependence toward the achievement of
some logical end (purpose):
• it is often affected by changes occurring outside the system, i.e.,
system environment,
• it is necessary to decide on the boundary between the system and its
environment,
• this decision may depend on the purpose of the study.

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

• Once a proper simulation model, or simply the model, is developed &


validated, it can be used to investigate (solve) a wide variety of “what if ”
scenarios of the real system.

 As a design tool: can be  As an analysis tool: potential


used to study systems in changes can be first simulated
the design phase before the to predict their impact on
system is built. system performance.

9
Simulation / Modeling
Solving the Model

• Simple models can be solved analytically using mathematical methods


such as differential calculus, probability theory, algebraic methods, etc.

• Many real-world systems are too complex that models of these systems
are virtually impossible to solve mathematically.

• Numerical, computer-based simulation can be used to imitate the


behavior of the system over time.

Data are collected as if a real system were being observed.


Data is used to estimate the measures of performance of the system.

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?

• It is of interest to study a system to understand


the relationships between its components or to
predict how the system will operate under a
new policy. Studies of
• To study the system, it is sometimes possible to systems are
experiment with the system itself. often
• this is not always an option as a new system accomplished
might not yet exist; it could be in only with a model of
hypothetical form or at the design stage. a system.
• even if the system exists, it might be
impractical to experiment with it.

12
A Famous Quote…

• Models are useful when they


provide critical insights into
the system behavior (e.g.,
its performance.)
• Models are especially
valuable when they are
simple, elegant, and
computationally fast.

13
Types of System Models

Mathematical Physical Static Dynamic


Uses symbolic Represents the
Is a larger (scale-up)
notation and system at a Represent systems
or smaller (scale-
mathematical particular point in as they change over
down) version of a
equations. E.g., time. E.g., Monte time.
system.
simulation model Carlo simulation.

Deterministic Stochastic Discrete vs. Continuous


Models have a Models have one or Choosing one or the other is a
known set of inputs more RVs as inputs function of the characteristics of the
that will result in a that lead to random
unique set of outputs  statistical system and the objective of the
outputs. estimates. study.

14
Components of a System

An Entity • is an object of interest in the system.


Endogenous: used to
describe activities and
An Attribute • is a property of an entity. events occurring within a
system (e.g., completion
• represents a time period of specified of a service).
An Activity length.
Exogenous: used to
A State of a • the collection of variables necessary to
describe activities and
System describe the system at any time. events in the environment
that affect the system
• an instantaneous occurrence that might (e.g., order arrival).
An Event change the state of the system.

15
Examples of Systems and Their Components*

* Partial listing of the system components is shown. A


complete list cannot be developed unless the purpose
of the study is known.
16
Types of Systems

A. Discrete B. Continuous

State variable(s) State variable(s)


change only at a change
discrete set of continuously over
points in time. time.

e.g., bank system


e.g., the head of
where the number
water behind a
of customers is a
dam
state variable.

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

Deterministic Stochastic This course is


about Discrete
Event Simulation
Static
(DES). Models
Static Dynamic (Monte Carlo Dynamic considered are
Simulation) discrete, dynamic,
and stochastic.

Continuous Discrete Continuous Discrete

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

1. Enable the study of internal interactions of a complex system or of a


subsystem within a complex system.
2. Informational, organizational, and environmental changes can be
simulated, and the effect of these alterations on the model’s behavior
can be observed.
3. The knowledge gained in designing a simulation model can suggest
improvements in the system.
4. Insights may be obtained as to which variables are most important and
how variables interact.
5. Can be used as an educational device to reinforce analytic solution
methodologies and to verify analytic solutions.

21
What Simulations do and When to Use (cont.)

6. Can be used to experiment with new designs or policies prior to


implementation.
7. By simulating different capabilities for a machine, requirements can be
determined.
8. Animation shows a system in simulated operation so that the plan can
be visualized.
9. Simulations designed for training make learning possible without the
cost of disruption of on-the-job instruction.
10.Modern systems (factory, wafer fabrication plant, etc.) is so complex and
that its internal interactions can be treated only through simulation.

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.

Simulation mimics what happens in a real system or what is


perceived for a system in the design stage.

25
Simulation
Advantages

• New policies, operating procedures, decision rules, information flows,


organizational procedures, and so on can be explored without disrupting
ongoing operations of the real system.
• New hardware designs, physical layouts, transportation systems, and so
on can be tested without committing resources for their acquisition.
• Hypotheses about how or why certain phenomena occur can be tested for
feasibility.
• Time can be compressed or expanded to allow for a speed-up or slow-
down of the phenomena under investigation.

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

• Model building requires special training. It is an art that is learned over


time and through experience,
if two models are constructed by different competent individuals, they
might have similarities, but it is highly unlikely that they will be the
same.
• Simulation results can be difficult to interpret. Most simulation outputs are
essentially random variables (they are usually based on random inputs),
it can be hard to distinguish whether an observation is a result of
system interrelationships or of randomness.

28
Simulation
Disadvantages (cont.)

• Simulation modeling and analysis can be time consuming and expensive,


saving on resources for modeling and analysis could result in a
simulation model or analysis that is not sufficient to the task.
• Simulation is used in some cases when an analytical solution is possible,
or even preferable,
this might be particularly true in the simulation of some waiting lines
where closed-form queueing models are available.

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.

2. Setting of • Objectives are the questions to be answered by simulation.


objectives • Determination that simulation is the appropriate methodology for the problem.
and overall • Project plan should include alternative systems and their effectiveness and evaluation
project plan method.

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.

• Is the computer program performing properly? With complex models, it is difficult to


translate a model successfully in its entirety without a good deal of debugging.
6. Verified? • If the input parameters and logical structure of the model are correctly represented in
the computer, verification has been completed.

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

Phase One Phase Two


• Steps 1 & 2: period • Steps 3, 4, 5, 6, &
of discovery or 7: model building
orientation. and data collection.

Phase Three Phase Four


• Steps 8, 9, & 10: • Steps 11 & 12:
running the model. implementation
phase.

36
A Simulation Example

Simulation can be used


to calculate patient
throughput and patient
waiting times. Also, it
can define space
requirements.

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

You might also like