0% found this document useful (0 votes)
63 views35 pages

General Principles in Discrete-Event Simulation: Book: Jerry Bank's Chapter 3 Kelton's Chapter 2

This document discusses key concepts in discrete-event simulation including entities, attributes, activities, events, and the event scheduling world view. It provides examples of modeling a single-channel queue and the dump truck problem in discrete-event simulation. The single-channel queue example demonstrates how to represent the system state, define entities and events, and manually simulate the model using event scheduling by advancing the simulation clock and managing the future event list. The document aims to introduce fundamental discrete-event simulation concepts and methodologies.

Uploaded by

Trân Lê
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views35 pages

General Principles in Discrete-Event Simulation: Book: Jerry Bank's Chapter 3 Kelton's Chapter 2

This document discusses key concepts in discrete-event simulation including entities, attributes, activities, events, and the event scheduling world view. It provides examples of modeling a single-channel queue and the dump truck problem in discrete-event simulation. The single-channel queue example demonstrates how to represent the system state, define entities and events, and manually simulate the model using event scheduling by advancing the simulation clock and managing the future event list. The document aims to introduce fundamental discrete-event simulation concepts and methodologies.

Uploaded by

Trân Lê
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

Industrial Systems Engineering - International University – VNU-HCM

General Principles in Discrete- Event


Simulation
Book: Jerry Bank’s chapter 3
Kelton’s chapter 2

Dr. Pham Huynh Tram


phtram@hcmiu.edu.vn
Jan 2020
Discrete-Event System Simulation
1
Recall

Discrete-event models are appropriate for those systems for


which changes in system ______occur only at ______ points
in time.

2
Objectives

Introduce fundamental concepts and methodologies


underlying all discrete-event simulation packages

- entities, attributes, activities, events...


- world views for developing a simulation model

3
1. Concepts in Discrete-Event Simulation

● System state: A collection of variables that contain all the


information necessary to describe the system at any time.

What are the system state variables in the Single-Channel Queue?


- ..
- ..

4
1. Concepts in Discrete-Event Simulation

● Entities:
- dynamic objects in the simulation, which move around in
the system, affect the state of the system
- all entities have to be created.
- most entities represent real things in a simulation, but you
also can create “fake” ones

What are the entities in the Single-Channel Queue?

5
1. Concepts in Discrete-Event Simulation

● Attributes:
- a common characteristic of all entities, but with a specific
value that can differ from one entity to another
- attribute values are tied to specific entities

6
1. Concepts in Discrete-Event Simulation

● Events:
- An instantaneous occurrence that changes the state of a
system
What events may take place in the Example of Single-Channel Queue?
……
…..

- Every simulation must have a stopping event . There are


generally two ways to stop a simulation:
+ at t=0, schedule a stop simulation event at a specified future
time
+ Run length TE is determined by the simulation itself.
Generally, TE is the time of occurrence of some specified
event E. 7
1. Concepts in Discrete-Event Simulation

● Activities:
- A duration of time of specified length, which is known
when it begins (although it may be specified deterministic or
in statistical distribution)
- This duration is characterized and defined by the modeler

What activities we may consider in the Example of Single-Channel


Queue?

8
1. Concepts in Discrete-Event Simulation

an end of inspection event


event time = 105

Event notice

100 105 time

current simulated time Inspection time (=5)

● The duration of an activity is computable from its specification at the instant it


begins.
● To keep track of activities and their expected completion time, at the simulated
instant that an activity duration begins, an event notice is created having an event
time equal to the activity's completion time.

9
1. Concepts in Discrete-Event Simulation

● Delay:
- A duration of time of unspecified indefinite length, which is not
known until it ends
- Not specified by the modeler ahead of time, but rather
determined by system conditions.
- Quite often, a delay's duration is measured and is one of the
desired outputs of a model run.

A customer's waiting time in the line may be dependent on the


number and duration of service of other customers ahead in line
as well as the availability of servers and equipment.
10
2. World views for developing a model
● A system is modeled in terms of
○ its state at each point in time
○ the entities that pass through the system and the entities
that represent system resources
○ the activities and events that cause system state to
change.

● Event-scheduling world view


● Process-interaction world view

11
2.1. Event-Scheduling

● Modeling and computational worked is centered around


the events, when they occur, and what happens when they
do
● The mechanism for advancing simulation time and
guaranteeing that all events occur in correct chronological
order is based on the future event list (FEL).

12
2.1. Event-Scheduling

● Event notice: A record of an event to occur at the current or some


future time, along with any associated data necessary to execute
the event; at a minimum, the record includes the event type and
the event time.
Example:
- (A, t ), representing an arrival event to occur at future time t
- (D, t ), representing a customer departure at future time t
- (E, 60), representing the simulation-stop event at future time 60

● Future Event list (Event calendar): A list of event notices for


future events, ordered by time of occurrence

● Clock: A variable representing simulated time, called CLOCK


13
2.1. Event Scheduling
Example of Single-Channel Queue: Manual Simulation Using Event Scheduling
● System state
- LQ(t) is the number of customers in the waiting line
- LS(t) is the number being served (0 or 1) at time t
● Entities: The server and customers are not explicitly modeled, except in terms
of the state variables above.
● Events:
- Arrival (A)
- Departure (D)
- Stopping event (E), scheduled to occur at time 60.
● Event notices (event type, event time):
- (A, t ), representing an arrival event to occur at future time t
- (D, t ), representing a customer departure at future time t
- (E, 60), representing the simulation-stop event at future time 60.
● Activities: ● Delay:
- Interarrival time
- Customer time spent in waiting line.
- Service time
14
Execution of the arrival
event

15
Execution of the departure event 16
● List processing: the
management of the FEL.
– the removal of the
imminent event.
– the addition of a new
event to the list, and
– occasionally removal
of some event
( cancellation of an
event).

● Scheduling a future
event: at the instant an
activity begins, its
duration is computed or
drawn as a sample from a
statistical distribution

● efficiency of searching
of the list depends on the
logical organization of
the list and on how the
search is conducted 17
2.1. Event Scheduling

Imminent event
current value of
simulated time

→ generating an arrival to a queueing system


18
(no. of customers
at different points
of the system)

System snapshot at
different simulating
time

19
2.1. Event Scheduling

● A discrete-event simulation: the modeling over time of a system all of whose state
changes occur at discrete points in time - those points when an event occurs.

● A discrete-event simulation proceeds by producing a sequence of system snapshots


(system images) which represent the evolution of the system through time.

Figure 3.1 Prototype system snapshot at simulation time t 20


2.1. Event Scheduling

Example: The Dump Truck Problem

Traveling

Loading

Scale
Loader Weighing
queue queue

First-Come
First-Come First-Served
First-Served

■ The distributions of loading time, weighing time, and travel time are
given in Tables 3.3, 3.4, and 3.5, respectively, from Table A.1.

■ The purpose of the simulation is to estimate the loader and scale


utilizations (percentage of time busy).
21
3.1.3. Manual Simulation Using Event Scheduling (9)

Table 3.3 Distribution of Loading Time for the Table 3.4 Distribution of Weighing Time for the
Dump Trucks Dump Trucks

Table 3.5 Distribution of Travel Time for the


Dump Trucks
– The activity times are taken from the
following list as needed:

22
3.1.3. Manual Simulation Using Event Scheduling (10)

Example The Dump Truck Problem (Cont.)


– System state [LQ(t), L(t), WQ(t), W(t)]
● LQ(t) = number of trucks in loader queue
● L(t) = number of trucks (0, 1, or 2) being loaded
● WQ(t) = number of trucks in weigh queue
● W(t) = number of trucks (0 or 1) being weighed, all at simulation time t

– Event notices :
● (ALQ, t, DTi ), dump truck i arrives at loader queue (ALQ) at time t
● (EL, t, DTi), dump truck i ends loading (EL) at time t
● (EW, t, DTi), dump truck i ends weighing (EW) at time t

– Entities : The six dump trucks (DT 1, … , DT 6)

23
3.1.3. Manual Simulation Using Event Scheduling (11)

Example (Cont.)
– Lists:
● Loader queue: all trucks waiting to begin loading, ordered on a first
come, first served basis
● Weigh queue : all trucks waiting to be weighed, ordered on a first come,
first served basis

– Activities: Loading time, weighing time, and travel time

– Delays: Delay at loader queue, and delay at scale

– It has been assumed that five of the trucks are at the loaders and one is at the
scale at time 0.

– The simulation table is given in Table 3.6.

24
Table 3.6 Simulation Table for Dump Trucks
Operation
Truck 4 begins to load,
Truck 3 joins the weigh queue
schedule an EL event for future
(because the scale is occupied.)
time 10

At time 0,
5 trucks at
the loaders
and 1 is at
the scale

The imminent
event is an EL
event with
time 5, hence
clock is
advanced to
time t=5

25
Table 3.6 Simulation Table for Dump Trucks
Operation

26
3.1.3. Manual Simulation Using Event Scheduling (12)

Example
(Cont.)
– This logic for the occurrence of the end-loading event
● When an end-loading (EL) event occurs, say for truck j at time t , other events
may be triggered.
● If the scale is idle [W(t)=0], truck j begins weighing and an end-weighing
event (EW) is scheduled on the FEL.
● Otherwise, truck j joins the weigh queue.
● If at this time there is another truck waiting for a loader, it will be removed
from the loader queue and will begin loading by the scheduling of an end-
loading event (EL) on the FEL.

– In order to estimate the loader and scale utilizations, two cumulative statistics are
maintained:
● BL = total busy time of both loaders from time 0 to time t
● BS = total busy time of the scale from time 0 to time t
27
3.1.3. Manual Simulation Using Event Scheduling (13)

Example 3.5 (Cont.)


– The utilizations are estimated as follows:

⬥ average loader utilization

⬥ average scale utilization

■ These estimates cannot be regarded as accurate estimates of the long-run


“steady-state” utilizations of the loader and scale.
■ A considerably longer simulation would be needed to reduce the effect of
the assumed conditions at time 0 (five of the six trucks at the loaders) and
to realize accurate estimates.

28
2.1. Event-Scheduling

● Advantages:
- allow us to control everything; have complete flexibility
with regards to attributes, variable and logic flow; know the
state of everything anytime
- easily to be coded up in any programming language or with
macros in a spreadsheet

● Disadvantages:
- become very complicated for large models with lots of
different kinds of events, entities and resources

29
2.2. Process-interaction World View

● Instead of keeping track of all events, entities, attributes,


variables, statistical accumulators all the time as in the event-
scheduled, it’s more ore natural way to take the viewpoint of
an entity as it works its way through the model.
● The process-interaction approach focuses on the processes
that entities undergo
● Analogous to flowcharting

30
2.2. Process-interaction World View

Event-scheduling approach

31
2.2. Process-interaction World View

Process-oriented approach

Figure 3.4 Two interesting customer processes in a single-server queue

32
2.2. Process-interaction World View

● Example of Single-channel Queue


(you may put yourself in a position of a typical part entity)
- Create yourself (a new entity arrives)
- Write down what time it is now on one of your attributes (for
other computations later)
- Wait in the Q until the server is free
- Seize the server (and take yourself out of the Q)
- Compute your waiting time in the Q
- Stay with the server for a duration that the service requires
- Release the server so other entities can seize it
- Compute your total time in system
- Dispose of yourself and go away

33
2.2. Process-interaction World View

- This approach is employed when using a process-oriented


simulation language (eg. SIMAN) or a simulation software (eg.
ARENA)
- Most discrete-event simulation are actually executed in the event
orientation even though we cannot see it. ARENA’s hierarchical
nature allows us to get down into the event orientation to regain
the control to model something peculiar. In that case, we have to
think and code with event-oriented logic

→ we’ll take the process-oriented approach because of its ease


and power, but it’s good to have some understanding of what’s
going under the hood.

34
3.3 Summary

● Introduced the major concepts and building blocks in simulation:


– Entities and attributes.
– Events and activities.

● 2 major world views:


– Event-scheduling.
– Process interaction.
– Activity scanning.

35

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy