SlideShare a Scribd company logo
Fundamental Simulation Concepts
SIE 431/531
Young-Jun Son, PhD
Systems and Industrial Engineering
son@sie.arizona.edu
Steps in Simulation Study
Example (Simple Processing System)
• General intent
• Estimate expected production
• Waiting time in queue, queue length, proportion of time machine is busy
• Time units
• Can use different units in different places (minutes, seconds, …)
• Be careful to check units when specifying inputs
Model Specifics
• Initially (time 0) empty and idle
• Base time units: minutes
• Input data (assume given for now), in minutes:
• Stop when 20 minutes of (simulated) time have passed
Sample Path
• Sample path
• Realization of system behavior
• Stochastic realization; trajectory
Goals of Study (Performance Metrics)
• Total production of parts over run (P)
• Average waiting time of parts in queue:
• Maximum waiting time of parts in queue:
N
WQ
N
i
i

1
N = no. of parts completing queue wait
WQi = waiting time in queue of ith part
WQ1 = 0 (why?)
i
N
i
WQ
max
,...,
1

Goals of Study (Performance Metrics) (2)
• Average number of parts in queue:
• Maximum number of parts in queue:
Q(t) = number of parts in queue at time t
20
)
(
20
0
 dt
t
Q
)
(
max
20
0
t
Q
t

Goals of Study (Performance Metrics) (3)
• Average and maximum total time in system of parts (cycle time):
• Utilization of machine (proportion of time busy)
• And, more
TSi = time in system of part i
i
P
i
P
i
i
TS
P
TS
max
,...,
1
1 ,




20
0
( ) 1 if machine is busy at time
, ( ) 0 if machine is idle at time
20
B t dt t
B t t


Generation of Sample Path
• Input data + Logic => sample path (realization of a system
behavior)
• What kinds of input data? ( , )
• What kinds of logic?
• Recursive equations for a simple system (spreadsheet based simulation)
• Event mechanism (to be covered)
Spreadsheet based Simulation
• Logic: recursive equation
Spreadsheet based Simulation (2)
Spreadsheet based Simulation (3)
• Popular for static models or very simple dynamic models
• Add-ins – @RISK, Crystal Ball
• Inadequate tool for dynamic simulations if there’s any complexity
• Extremely easy to simulate single-server queue in Arena – Chapter
3
• Can build very complex dynamic models with Arena – most of rest
of book
Components (terminologies) of Simulation Model
• Entities
• Dynamic objects in the simulation
• Something moving throughout the system
• Examples: ( )
• It may not be tangible, such as order for the company, requests,
etc
Components (terminologies) of Simulation Model (2)
• Attributes
• Local variable (tag) characterizing entities
• Each entity can have same or different values
• Most important thing is that their values are tied to specific entities
• Examples:
• Values can be real number, integer number, texts, or some other object
types: different software supports different data types
Components (terminologies) of Simulation Model (3)
• Variables
• Information that reflects some characteristics of the system, regardless
how many or what kinds of entities are around
• Variables are not tied in specific entity, rather pertain to the system at
large
• Examples:
• System (Arena) built-in variables: TNOW (current simulation time)
• User specified variables
Components (terminologies) of Simulation Model (4)
• Resources
• Entities compete with each other for service from resources such as
personnel, equipment, or space in storage area of limited size
• Example:
• Seizing and releasing. Capturing and freeing. Changing of system
variables
• Capacity or units of a resource: a resource can represent a group of
several individual and identical servers. If you want to differentiate them,
you need to define another resource
• Definition differs in different simulation packages (for now, we stick to the
Arena’s definition)
Components (terminologies) of Simulation Model (5)
• Queues
• A place where entities can wait when no resource is available
• Queue also has a capacity
• Example:
• You must model how to handle an entity arriving at a queue that’s already
full
• Should we allow this happen and do something? Balking!!
• Should we model so that this does not occur?
• This could be a logical queue or physical queue. This differs depending on
different simulation packages
Components (terminologies) of Simulation Model (6)
• Statistical Accumulators
• Variables needed for storing statistical information necessary to estimate
the desired performance measures (e.g., mean time in system)
• Several simulation packages take care of statistical accumulation. But, in
our hand simulation, we will do it manually to understand how it works
• Examples:
Components (terminologies) of Simulation Model (7)
• Events
• An event is something that happens at an instant of (simulated) time that
might change a system state (such as attributes, variables, or statistical
accumulators)
• There are four kinds of events in our example:
• Initialization to set things up: making all zeroes or initialization values
• Arrival: A new part enters the system
• Departure: A part finishes its service at the machine and leaves the system
• The End: The simulation is stopped at time 15 minutes
• Question: why not the following is not included to the event:
• “parts leave the queue and begin service at the machine, which changes the
system”?
Components (terminologies) of Simulation Model (8)
• Event calendar
• Event calendar is the place where future events are stored
• Event calendar has a set of records, where each record is associated with
1) id of an entity, 2) event time, and 3) the kind of event (init, arrive,
depart, or end)
• When it’s time to execute the next event, the top record is removed from
the calendar and the information in this record is used to execute the
appropriate logic, such as changing variables, showing message boxes, or
placing new records to the event calendar
• Arena (or other commercial simulation packages) places newly scheduled
events to the event calendar in increasing order of event times) => the
top one is always the next event to occur
• The variables that describe the system don’t change between successive
events
• Example: machine start processing, machine end processing: no change of
system states
Components (terminologies) of Simulation Model (9)
• Simulation clock:
• The current value of simulation clock (TNOW)
• Simulation does not take all values and flow continuously
• Updated when events occur (the event time of the top record from the
event calendar becomes the current simulation time before the associated
logic is performed)
• Stopping rule of simulation:
• Time or number of parts produced, etc
• If stopping rule is not properly given, simulation may run for ever: you
must kill the process (thread)

More Related Content

Similar to 2_1_Fundamentals_Event_Mechanism_Chapter_2.pdf

U nit i data structure-converted
U nit   i data structure-convertedU nit   i data structure-converted
U nit i data structure-converted
Shri Shankaracharya College, Bhilai,Junwani
 
lecture 1.pptx
lecture 1.pptxlecture 1.pptx
lecture 1.pptx
AmnaMuneer9
 
Intro_2.ppt
Intro_2.pptIntro_2.ppt
Intro_2.ppt
MumitAhmed1
 
Intro.ppt
Intro.pptIntro.ppt
Intro.ppt
SharabiNaif
 
Intro.ppt
Intro.pptIntro.ppt
Intro.ppt
Anonymous9etQKwW
 
Cs 331 Data Structures
Cs 331 Data StructuresCs 331 Data Structures
simulation modeling in DSS
 simulation modeling in DSS simulation modeling in DSS
simulation modeling in DSS
Enaam Alotaibi
 
Computer aided process design and simulation (Cheg.pptx
Computer aided process design and simulation (Cheg.pptxComputer aided process design and simulation (Cheg.pptx
Computer aided process design and simulation (Cheg.pptx
PaulosMekuria
 
Unit 1 introduction to simulation
Unit 1 introduction to simulationUnit 1 introduction to simulation
Unit 1 introduction to simulation
DevaKumari Vijay
 
Data structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfData structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdf
DukeCalvin
 
ADS Introduction
ADS IntroductionADS Introduction
ADS Introduction
NagendraK18
 
Types of Operating System
Types of Operating System Types of Operating System
Types of Operating System
Rianchaljha
 
Go Observability (in practice)
Go Observability (in practice)Go Observability (in practice)
Go Observability (in practice)
Eran Levy
 
ASH Archit ecture and Advanced Usage.pdf
ASH Archit ecture and Advanced Usage.pdfASH Archit ecture and Advanced Usage.pdf
ASH Archit ecture and Advanced Usage.pdf
tricantino1973
 
Simulation and modeling introduction.pptx
Simulation and modeling introduction.pptxSimulation and modeling introduction.pptx
Simulation and modeling introduction.pptx
ShamasRehman4
 
Analysis modeling & scenario based modeling
Analysis modeling &  scenario based modeling Analysis modeling &  scenario based modeling
Analysis modeling & scenario based modeling
Benazir Fathima
 
Introduction to data structure and algorithms
Introduction to data structure and algorithmsIntroduction to data structure and algorithms
Introduction to data structure and algorithms
Research Scholar in Manonmaniam Sundaranar University
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
BootNeck1
 
introduction to modeling, Types of Models, Classification of mathematical mod...
introduction to modeling, Types of Models, Classification of mathematical mod...introduction to modeling, Types of Models, Classification of mathematical mod...
introduction to modeling, Types of Models, Classification of mathematical mod...
Waqas Afzal
 
Data Analysis – Technical learnings
Data Analysis – Technical learningsData Analysis – Technical learnings
Data Analysis – Technical learnings
InvenkLearn
 

Similar to 2_1_Fundamentals_Event_Mechanism_Chapter_2.pdf (20)

U nit i data structure-converted
U nit   i data structure-convertedU nit   i data structure-converted
U nit i data structure-converted
 
lecture 1.pptx
lecture 1.pptxlecture 1.pptx
lecture 1.pptx
 
Intro_2.ppt
Intro_2.pptIntro_2.ppt
Intro_2.ppt
 
Intro.ppt
Intro.pptIntro.ppt
Intro.ppt
 
Intro.ppt
Intro.pptIntro.ppt
Intro.ppt
 
Cs 331 Data Structures
Cs 331 Data StructuresCs 331 Data Structures
Cs 331 Data Structures
 
simulation modeling in DSS
 simulation modeling in DSS simulation modeling in DSS
simulation modeling in DSS
 
Computer aided process design and simulation (Cheg.pptx
Computer aided process design and simulation (Cheg.pptxComputer aided process design and simulation (Cheg.pptx
Computer aided process design and simulation (Cheg.pptx
 
Unit 1 introduction to simulation
Unit 1 introduction to simulationUnit 1 introduction to simulation
Unit 1 introduction to simulation
 
Data structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdfData structures and algorithms Module-1.pdf
Data structures and algorithms Module-1.pdf
 
ADS Introduction
ADS IntroductionADS Introduction
ADS Introduction
 
Types of Operating System
Types of Operating System Types of Operating System
Types of Operating System
 
Go Observability (in practice)
Go Observability (in practice)Go Observability (in practice)
Go Observability (in practice)
 
ASH Archit ecture and Advanced Usage.pdf
ASH Archit ecture and Advanced Usage.pdfASH Archit ecture and Advanced Usage.pdf
ASH Archit ecture and Advanced Usage.pdf
 
Simulation and modeling introduction.pptx
Simulation and modeling introduction.pptxSimulation and modeling introduction.pptx
Simulation and modeling introduction.pptx
 
Analysis modeling & scenario based modeling
Analysis modeling &  scenario based modeling Analysis modeling &  scenario based modeling
Analysis modeling & scenario based modeling
 
Introduction to data structure and algorithms
Introduction to data structure and algorithmsIntroduction to data structure and algorithms
Introduction to data structure and algorithms
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
introduction to modeling, Types of Models, Classification of mathematical mod...
introduction to modeling, Types of Models, Classification of mathematical mod...introduction to modeling, Types of Models, Classification of mathematical mod...
introduction to modeling, Types of Models, Classification of mathematical mod...
 
Data Analysis – Technical learnings
Data Analysis – Technical learningsData Analysis – Technical learnings
Data Analysis – Technical learnings
 

More from JomaraCeliaRosellRos

Final Project presentation.pptx
Final Project presentation.pptxFinal Project presentation.pptx
Final Project presentation.pptx
JomaraCeliaRosellRos
 
Creatividad Desafío 04 Grupo 04_revJLZO.pdf
Creatividad Desafío 04 Grupo 04_revJLZO.pdfCreatividad Desafío 04 Grupo 04_revJLZO.pdf
Creatividad Desafío 04 Grupo 04_revJLZO.pdf
JomaraCeliaRosellRos
 
2_1_Fundamentals_Event_Mechanism_Chapter_2.pdf
2_1_Fundamentals_Event_Mechanism_Chapter_2.pdf2_1_Fundamentals_Event_Mechanism_Chapter_2.pdf
2_1_Fundamentals_Event_Mechanism_Chapter_2.pdf
JomaraCeliaRosellRos
 
Week 2.pptx
Week 2.pptxWeek 2.pptx
Week 1.pptx
Week 1.pptxWeek 1.pptx
Final_Team_Project_Simulation_Paper.docx.pdf
Final_Team_Project_Simulation_Paper.docx.pdfFinal_Team_Project_Simulation_Paper.docx.pdf
Final_Team_Project_Simulation_Paper.docx.pdf
JomaraCeliaRosellRos
 
2_2_Event_Mechanism_Chapter_2.pdf
2_2_Event_Mechanism_Chapter_2.pdf2_2_Event_Mechanism_Chapter_2.pdf
2_2_Event_Mechanism_Chapter_2.pdf
JomaraCeliaRosellRos
 

More from JomaraCeliaRosellRos (7)

Final Project presentation.pptx
Final Project presentation.pptxFinal Project presentation.pptx
Final Project presentation.pptx
 
Creatividad Desafío 04 Grupo 04_revJLZO.pdf
Creatividad Desafío 04 Grupo 04_revJLZO.pdfCreatividad Desafío 04 Grupo 04_revJLZO.pdf
Creatividad Desafío 04 Grupo 04_revJLZO.pdf
 
2_1_Fundamentals_Event_Mechanism_Chapter_2.pdf
2_1_Fundamentals_Event_Mechanism_Chapter_2.pdf2_1_Fundamentals_Event_Mechanism_Chapter_2.pdf
2_1_Fundamentals_Event_Mechanism_Chapter_2.pdf
 
Week 2.pptx
Week 2.pptxWeek 2.pptx
Week 2.pptx
 
Week 1.pptx
Week 1.pptxWeek 1.pptx
Week 1.pptx
 
Final_Team_Project_Simulation_Paper.docx.pdf
Final_Team_Project_Simulation_Paper.docx.pdfFinal_Team_Project_Simulation_Paper.docx.pdf
Final_Team_Project_Simulation_Paper.docx.pdf
 
2_2_Event_Mechanism_Chapter_2.pdf
2_2_Event_Mechanism_Chapter_2.pdf2_2_Event_Mechanism_Chapter_2.pdf
2_2_Event_Mechanism_Chapter_2.pdf
 

Recently uploaded

ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 

Recently uploaded (20)

ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 

2_1_Fundamentals_Event_Mechanism_Chapter_2.pdf

  • 1. Fundamental Simulation Concepts SIE 431/531 Young-Jun Son, PhD Systems and Industrial Engineering son@sie.arizona.edu
  • 3. Example (Simple Processing System) • General intent • Estimate expected production • Waiting time in queue, queue length, proportion of time machine is busy • Time units • Can use different units in different places (minutes, seconds, …) • Be careful to check units when specifying inputs
  • 4. Model Specifics • Initially (time 0) empty and idle • Base time units: minutes • Input data (assume given for now), in minutes: • Stop when 20 minutes of (simulated) time have passed
  • 5. Sample Path • Sample path • Realization of system behavior • Stochastic realization; trajectory
  • 6. Goals of Study (Performance Metrics) • Total production of parts over run (P) • Average waiting time of parts in queue: • Maximum waiting time of parts in queue: N WQ N i i  1 N = no. of parts completing queue wait WQi = waiting time in queue of ith part WQ1 = 0 (why?) i N i WQ max ,..., 1 
  • 7. Goals of Study (Performance Metrics) (2) • Average number of parts in queue: • Maximum number of parts in queue: Q(t) = number of parts in queue at time t 20 ) ( 20 0  dt t Q ) ( max 20 0 t Q t 
  • 8. Goals of Study (Performance Metrics) (3) • Average and maximum total time in system of parts (cycle time): • Utilization of machine (proportion of time busy) • And, more TSi = time in system of part i i P i P i i TS P TS max ,..., 1 1 ,     20 0 ( ) 1 if machine is busy at time , ( ) 0 if machine is idle at time 20 B t dt t B t t  
  • 9. Generation of Sample Path • Input data + Logic => sample path (realization of a system behavior) • What kinds of input data? ( , ) • What kinds of logic? • Recursive equations for a simple system (spreadsheet based simulation) • Event mechanism (to be covered)
  • 10. Spreadsheet based Simulation • Logic: recursive equation
  • 12. Spreadsheet based Simulation (3) • Popular for static models or very simple dynamic models • Add-ins – @RISK, Crystal Ball • Inadequate tool for dynamic simulations if there’s any complexity • Extremely easy to simulate single-server queue in Arena – Chapter 3 • Can build very complex dynamic models with Arena – most of rest of book
  • 13. Components (terminologies) of Simulation Model • Entities • Dynamic objects in the simulation • Something moving throughout the system • Examples: ( ) • It may not be tangible, such as order for the company, requests, etc
  • 14. Components (terminologies) of Simulation Model (2) • Attributes • Local variable (tag) characterizing entities • Each entity can have same or different values • Most important thing is that their values are tied to specific entities • Examples: • Values can be real number, integer number, texts, or some other object types: different software supports different data types
  • 15. Components (terminologies) of Simulation Model (3) • Variables • Information that reflects some characteristics of the system, regardless how many or what kinds of entities are around • Variables are not tied in specific entity, rather pertain to the system at large • Examples: • System (Arena) built-in variables: TNOW (current simulation time) • User specified variables
  • 16. Components (terminologies) of Simulation Model (4) • Resources • Entities compete with each other for service from resources such as personnel, equipment, or space in storage area of limited size • Example: • Seizing and releasing. Capturing and freeing. Changing of system variables • Capacity or units of a resource: a resource can represent a group of several individual and identical servers. If you want to differentiate them, you need to define another resource • Definition differs in different simulation packages (for now, we stick to the Arena’s definition)
  • 17. Components (terminologies) of Simulation Model (5) • Queues • A place where entities can wait when no resource is available • Queue also has a capacity • Example: • You must model how to handle an entity arriving at a queue that’s already full • Should we allow this happen and do something? Balking!! • Should we model so that this does not occur? • This could be a logical queue or physical queue. This differs depending on different simulation packages
  • 18. Components (terminologies) of Simulation Model (6) • Statistical Accumulators • Variables needed for storing statistical information necessary to estimate the desired performance measures (e.g., mean time in system) • Several simulation packages take care of statistical accumulation. But, in our hand simulation, we will do it manually to understand how it works • Examples:
  • 19. Components (terminologies) of Simulation Model (7) • Events • An event is something that happens at an instant of (simulated) time that might change a system state (such as attributes, variables, or statistical accumulators) • There are four kinds of events in our example: • Initialization to set things up: making all zeroes or initialization values • Arrival: A new part enters the system • Departure: A part finishes its service at the machine and leaves the system • The End: The simulation is stopped at time 15 minutes • Question: why not the following is not included to the event: • “parts leave the queue and begin service at the machine, which changes the system”?
  • 20. Components (terminologies) of Simulation Model (8) • Event calendar • Event calendar is the place where future events are stored • Event calendar has a set of records, where each record is associated with 1) id of an entity, 2) event time, and 3) the kind of event (init, arrive, depart, or end) • When it’s time to execute the next event, the top record is removed from the calendar and the information in this record is used to execute the appropriate logic, such as changing variables, showing message boxes, or placing new records to the event calendar • Arena (or other commercial simulation packages) places newly scheduled events to the event calendar in increasing order of event times) => the top one is always the next event to occur • The variables that describe the system don’t change between successive events • Example: machine start processing, machine end processing: no change of system states
  • 21. Components (terminologies) of Simulation Model (9) • Simulation clock: • The current value of simulation clock (TNOW) • Simulation does not take all values and flow continuously • Updated when events occur (the event time of the top record from the event calendar becomes the current simulation time before the associated logic is performed) • Stopping rule of simulation: • Time or number of parts produced, etc • If stopping rule is not properly given, simulation may run for ever: you must kill the process (thread)