0% found this document useful (0 votes)
138 views41 pages

04 - Discrete Event Sim Concept (Final)

The document discusses discrete-event simulation and uses an (S,s) inventory system as an example. Discrete-event simulation models a system as it evolves over time by representing changes that occur at discrete points in time. The example inventory system simulates different reorder policies to determine the optimal values of S and s that minimize total expected costs of ordering, holding inventory, and shortages over a 5 year period.

Uploaded by

Muda Safarandi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views41 pages

04 - Discrete Event Sim Concept (Final)

The document discusses discrete-event simulation and uses an (S,s) inventory system as an example. Discrete-event simulation models a system as it evolves over time by representing changes that occur at discrete points in time. The example inventory system simulates different reorder policies to determine the optimal values of S and s that minimize total expected costs of ordering, holding inventory, and shortages over a 5 year period.

Uploaded by

Muda Safarandi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 41

Concept of

Discrete-Event Simulation

Jurusan Teknik Industri Institut Teknologi Nasional


BANDUNG 2014

Classification of Simulation

Based on time role in the model: Static vs.


Dynamic
Based on probabilistic (i.e., random)
contents: Deterministic vs. Stochastic
(Probabilistic)
Based on the state of the system: Discrete
vs. Continuous

State of a System

State of a system: collection of variables necessary


to describe a system at a particular time, relative to
the objectives of a study.
E.g.: in a study of a bank, possible state variables:

System category based on the system state:

the number of busy tellers


the number of customers in the bank
Discrete system vs. Continuous system

State of a System

Types of Simulation Models


Static

& Probabilistic: Monte Carlo


Simulation
Dynamic & Continuous state: System
Dynamics Simulation
Dynamic, Probabilistic, & Discrete state:
Discrete-event Simulation

Discrete-Event Simulation
Discrete-event simulation: concerns the
modeling of a system as it evolves over time
by a representation in which the state
variables change instantaneously at
separate points in time.

Fundamental Terms (1)

System: a collection of entities (e.g.: people and


machines) that interact together over time to
accomplish one or more goals.
Measures of performance (or Performance
Indicator): output response of the system, as the
objective of the study for the system. It can be used
to compare one system to another.
Parameter: an intrinsic character of a systems
component
System state: the collection of systems state
variables necessary to describe the system at a
particular point of time.

Fundamental Terms (2)

Event: an instantaneous occurrence that changes


the state of a system.

Event list: a list of future events, ordered by time of


occurrence.

Entity: any object or component in the system which


requires explicit representation in the model (e.g., a
customer, a machine)

Attributes: the properties of a given entity (e.g., the


priority of a waiting customer, the routing of a job
through a shop, the arrival time of a customer)

Example of Fundamental Terms (1)


Example: notice a queuing system!
State variables of the system state: number of
customer in system, number of customer in queue
(queue length), server status (busy or idle).
Events: arrival of customer, customer entering queue,
customer starting service, departure of customer from
service.
Measures of performance: average queue length,
average waiting time, average time in system,
maximum queue length, maximum waiting time, server
utilization.
Parameter: (distribution of) service rate, (distribution
of) arrival rate, number of servers
9

Example of Fundamental Terms (2)


Exercise:
Identify state variables, events, and measures
of performance in the following systems:
An inventory warehouse
A teaching-learning classroom
An automatic teller machine (ATM)
A field of battle-tank combat

10

Time-Advance Mechanism

11

Simulation clock: a program variable in a


simulation model representing the current
value of simulated time.
Approaches for advancing the simulation
clock:
1. Next-event time advance
2. Fixed-increment time advance
Basic approach in discrete-event simulation
next-event time advance

Time Advance Mechanism

Fixed-Increment Time Advance

Next-Event Time Advance

12

13

Discrete Event Simulation Logic

Example: The Simple (S, s) Inventory


System
(Source: Law & Kelton, 2000, with a slight parameter-value modification)

A company sells a single product. They want to decide how


many items they should have in inventory for each of the next n
months. The decision of ordering for supply is made in the
beginning of each month.
Times between customer-arrivals are random variables from
Exponential Distribution with a mean (beta) of 0.2 month.
The size of the demands of each customer are random
variables D following this discrete probability distribution:
0.10 for d 1
0.30 for d 2

f (d ) 0.35 for d 3
0.25 for d 4

0
otherwise

14

The (S, s) Inventory System

15

At the beginning of each month, the company reviews


the inventory level and decides how many items to
order from its supplier.
Inventory policy (S, s), where S = maximum inventory
level, s = reorder point, that is if inventory at the
beginning of the month is I, and if I < s then they
order at the amount of (S I), otherwise (I >= s) they
order nothing.
Delivery lag (lead time) of each order from supplier is
random variable from Uniform Distribution between
0.5 and 1 month.

The (S, s) Inventory System

Demand is satisfied immediately from inventory, but if


inventory is empty, demand is backordered.

There are three of cost-components in this inventory


system

16

Setup (ordering) cost per order Rp 32


Holding cost of inventory Rp 1 per item per month.
Shortage (backorder) cost Rp 5 per item per month.

The (S, s) Inventory System

17

The (S, s) Inventory System

Notice: Even though this is a relatively simple in


structure, but the probabilistic components of the
system and the backorder rule indicate the need of
simulation for modeling the system

Simulate the policy of (S=20, s=15). Compare with


(S=20, s=10), (S=25, s=5) and other reasonable
alternatives, which one is better?
Initial inventory level assumed equal to S.
Run the simulation for 60 months (5 years).

18

The (S, s) Inventory System


System Identification for Simulation Modeling:
Measures of performance:
Expected Average Total Inventory cost
= Expected Average Total Ordering Cost
+ Expected Average Total Holding Cost
+ Expected Average Total Shortage Cost

Decision variables:
S and s

19

System parameters:
Ordering (setup) cost, Holding cost per unit per time, Shortage
cost per unit per time, Distribution of demand inter-arrival,
Distribution of demand size, Distribution of supply delivery lag.

The (S, s) Inventory System


System Identification for Simulation Modeling:
System State (States Variables):

Events:

20

Number of inventory on hand


Number of backorder
Inventory level (Number on hand number of backorder)
Number of order in progress (on the way) from supplier
Demand (Customer) Arrival
Supply Arrival
Inventory Review

The (S, s) Inventory System


Influence diagram
(simplified, non-complete):

21

The (S, s) Inventory System


Simulation program logic:
- Initialization subroutine
-

Timing subroutine

Continuous-time statistics subroutine

Event subroutine:
-

22

Demand arrival event subroutine:


Inventory review event subroutine:
Supply arrival event subroutine:

Simulation Logic

23

The (S, s) Inventory System

24

The (S, s) Inventory System

25

The (S, s) Inventory System


Begin
Update Continuous Time
Statistics

Area On Hand = Area On Hand


+ On Hand Level
* (Current Simulation Time Time of Last Event)

Area Backorder = Area Backorder


+ Backorder Level
* (Current Simulation Time Time of Last Event)

Time of Last Event = Current Simulation Time

Return

26

The (S, s) Inventory System

27

Develop the simulation model using Excel Spreadsheet:

The (S, s) Inventory System

28

Use Excel Data Analysis Toolpak for Random Number Generation,


generate three streams (variables), for demand inter-arrival time,
demand size, and supply delivery lag.
Use random number seed (e.g. 12345) to consistantly genereting in
different computer (Excel version)

The (S, s) Inventory System

29

Develop this simulation table

The (S, s) Inventory System

Computing the measures of performance:

30

In a stochastic simulation modelling, usually


we use the term expected . for the
measures of performance, because in the
stochastic (probabilistic) situation, it is the
expectation that we can analyse, not the
exact value.
Frequently, we also use the term
average. for the measures of
performance, to cancel-out the effect of
different total simulation running time

The (S, s) Inventory System

Computing the measures of performance:

1. Expected Average Total Ordering Cost:


=
[Total Number of Ordering-event to Supplier]
x
[Ordering Cost per ordering-event]
__________________________________
(divided by)

[Total Simulation Running Time]


31

The (S, s) Inventory System


Computing the measures of performance:

2. Expected Average Total Holding Cost:


Because holding cost is: Rp per product-unit per time-unit
then:
The total holding cost will depend to the Inventory level (vertical
dimension) and the time span (horizontal dimension) of the
inventory level, when the inventory level is positive (on hand)

Total BLUE area


(total area inventory
on-hand)
contributes to total
holding cost
32

The (S, s) Inventory System


Computing the measures of performance:

2. Expected Average Total Holding Cost:


=
[Total Area Inventory On Hand]
x
[Holding Cost per Product-Unit per Time-Unit]
____________________________________
(divided by)

[Total Simulation Running Time]


33

The (S, s) Inventory System


Computing the measures of performance:

3. Expected Average Total Shortage Cost:


Because shortage cost is: Rp per product-unit per time-unit
then:
The total shortage cost will depend to the Inventory level (vertical
dimension) and the time span (horizontal dimension) of the
inventory level, when the inventory level is negative (backorder)

Total RED area


(total area backorder)
contributes to total
shortage cost

34

The (S, s) Inventory System


Computing the measures of performance:

3. Expected Average Total Shortage Cost:


=
[Total Area Backorder]
x
[Shortage Cost per Product-Unit per Time-Unit]
____________________________________
(divided by)

[Total Simulation Running Time]


35

The (S, s) Inventory System

Computing the measures of performance:

Expected Average Total Cost:


=
Expected Average Total Ordering Cost
+
Expected Average Total Holding Cost
+
Expected Average Total Shortage Cost

36

The (S, s) Inventory System

Complete Simulation Model in Spreadsheet:

37

Statistical Counter in Simulation


1.
2.

3.

38

Counter statistics: accumulation of a counting


variable, e.g. total number of ordering-event.
Discrete-time statistics or Tally statistics:
collected every change occurrence, e.g. average
number of ordering-event, average total ordering
cost.
Continuous-time statistics: collected continuously
every time advance, e.g. average on-hand level,
average backorder level, average holding cost,
average shortage cost.

Using ARENA Simulation Software


Example:
The (S, s) Inventory System in ARENA flowchart:

39

Using ARENA Simulation Software


The (S, s) Inventory System in ARENA example modules:

40

Using ARENA Simulation Software


The (S, s) Inventory System in ARENA animation chart and output:

41

You might also like