Discrete Event Simulation
Building blocks Entities Activities Events
Discrete Event Model Changes of system state only occur at discrete points in time
Concepts in DES (1) System Model A collection of entities that interact together over time to accomplish one or more goals Model An abstract representation of a system
Concepts in DES (2) System state Entity A collection of variables that contain all information necessary to describe the system at any time Entity Any object or component in the system which requires representation in the model
Concepts in DES (3) Attribute List Event The properties of a given entity List A collection of associated entities Event An instantaneous occurrence that changes the state of a system
Concepts in DES (4) Event notice Event list A record of an event: event time stamp, event type, associated data, … Event list A list of event notices for future events. Also known as future event list (FEL)
Concepts in DES (5) Activity Delay Clock A duration of time of specified length, which is known when it begins (e.g. service time,inter-arrival time) Delay A duration of time of unspecified length, which is unknown until it ends (delay in last-in, first-out system) Clock A variable representing simulated time
Activities Represents time whose duration is defined by the modeler Deterministic Statistical A function depending on system variables or entity attributes Loading time of cargo depends on the number of items
Example:The Able Baker Carhop Problem One Queue with Two Servers Two Carhops: Able and Baker Able is faster Able gets the customer if both carhops are idle
Example Interval distribution of cars 1 min 25% 2 min 40% 3 min 20%
Example Service Distribution for Able 2 min 30% 3 min 28% 4 min 25%
Example Service Distribution for Baker 3 min 35% 4 min 25% 5 min 20%
System state Q(t): The number of cars waiting to be served at time t A(t): 0 or 1 indicate Able being idle or busy at time t B(t): 0 or 1 indicate Baker being idle or busy at time t
Entities and Attributes Server Total service time Total idle time Customers Waiting In service
Events Arrival Event Service completion by Able Service completion by Baker
Activities Inter-arrival time Service time by Able Service time by Baker
Event-scheduling/time-advance algorithm Put all the events into future event list (FEL) by time order Pick the smallest time stamped event and execute, put new event into FEL Executing the events changes the system state, attribute of entities Simulation ends when No more events
Example: Manual Simulation of Single-channel Queue A small grocery store has only one checkout counter Customers arrive randomly from 1 to 8 minutes Service time varies randomly from 1 to 6 minutes
System state Q(t) S(t) Number of customers in line Status of server: 0 1 (idle busy)
Events Arrival (A) Departure (D) Stopping event (E), scheduled to occur at time 60
Event Notices (A,t), representing an arrival event to occur at future time t (D,t), representing an departure event to occur at future time t (E,60), representing a simulation stop event to occur at future time 60
Activities and Delays Activities: Delay Inter arrival time 1 to 8 min Service time 1 to 6 min Delay Customer time spent in waiting line
Simulation Table Clock System State Entities and attributes FEL Statistics