Discrete Event Simulation
Discrete Event Simulation
Reference book: Simulation, Modeling & Analysis (3/e) by Law and Kelton, 2000
Outline
System, Model, and Simulation
System: Discrete and Continuous Ways to Study a System Why Model Model Taxonomy Why Simulation
Discrete-Event Simulation
What is Discrete-Event Simulation (DES) Example: A Single Server System Advancement of Simulation Time Components and Organization of Discrete-Event Simulation Model Design of Event List
Discrete system:
state variables change instantaneously at separated point in time, e.g., a bank, since state variables - number of customers, change only when a customer arrives or when a customer finishes being served and departs
Continuous system:
state variable change continuously with respect to time, e.g., airplane moving through the air, since state variables position and velocity change continuously with respect to time
Why Model?
Model:
A representation of the system and study it as a surrogate for the actual system
Why Model?
System is not physically exists Building a system is expensive Measuring a system is time-consuming
Characterizing a Model
Deterministic or Stochastic
D Does th model contain stochastic components? the d l t i t h ti t ?
Static or Dynamic
Is time a significant variable?
Continuous or Discrete
Does the system state evolve continuously or only at discrete points in time? Continuous: classical mechanics Discrete: queuing, inventory, machine shop models
Model Taxonomy
Why Simulation?
Many systems are highly complex, precluding the possibility of analytical solution ibilit f l ti l l ti The analytical solutions are extraordinarily complex, requiring ast computing resources req iring vast comp ting reso rces Thus, such systems should be studied by means of simulation
numerically exercising the model for inputs in question to see how they affect the output measures of performance
Simulation is the process of designing a model of a real system and conducting experiments with this model f th purpose either of d ti i t ith thi d l for the ith f understanding the behavior of the system or of evaluating various strategies (within the limits imposed by a criterion or set of criteria) for the operation of a system system. -Robert E Shannon 1975
System
is composed of objects called entities that have certain properties called attributes
State
a collection of attributes or state variables that represent the entities of the system.
Event
an instantaneous occurrence in time that may alter the state of the system
An event initiates an activity which is the length of time activity, during which entities engage in some operations Entities, attributes, events, activities and the interrelationships between these components are defined in the model of the system
No
Yes Stop
Simulation clock
A variable giving the current value of simulated time
Event list
A list containing the next time when each type of event will occur
Statistical counters
Variables used for storing statistical information about system information
Initialization routine
A subprogram to initialize the simulation model at time 0
Event routine
A subprogram that updates the system state when a particular type of event occur
There is one event routine for each event type
Library routines
A set of subprogram used to generate random observations from probability distributions that were determined as part of the simulation model d l
Main program
A subprogram that invokes the timing routine
determine the next event and
Modeling g
Model Building: find relationships. Data Acquisition: find and collect appropriate data. Model Translation: program and debug.
Conclusion
It is not so hard to write a simulation program Efficiency is critical point to a simulation program
Reference
Simulation, Modeling & Analysis (3/e) by Law and Kelton, 2000 K lt www.cs.wm.edu/~esmirni/Teaching/cs526/DESAFC1.1.ppt 1 1 ppt www.cs.uml.edu/~giam/91.570/Lect1/Lecture1.ppt www.geo.hunter.cuny.edu/.../Discrete%20Event%20 h t d / /Di t %20E t%20 Simulation.ppt www pcs csie ntu edu tw/course/pcs/2007/project/Si www.pcs.csie.ntu.edu.tw/course/pcs/2007/project/Si mulation.pdf