0% found this document useful (0 votes)
9 views

Chapter 05 - Basic IE models for simulation- introduction to SSQ

The document discusses the simulation of a single-server queueing system (SSQ), detailing the problem statement, assumptions, and performance measures to be estimated. It emphasizes the use of programming languages like C or MATLAB for implementation and outlines the necessary components for a successful simulation, including event types and stopping rules. Additionally, it provides an intuitive explanation of the simulation process with examples of interarrival and service times.

Uploaded by

Racem Mellouli
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Chapter 05 - Basic IE models for simulation- introduction to SSQ

The document discusses the simulation of a single-server queueing system (SSQ), detailing the problem statement, assumptions, and performance measures to be estimated. It emphasizes the use of programming languages like C or MATLAB for implementation and outlines the necessary components for a successful simulation, including event types and stopping rules. Additionally, it provides an intuitive explanation of the simulation process with examples of interarrival and service times.

Uploaded by

Racem Mellouli
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Course

Simulation of Industrial Systems

Basic IE models
for simulation:
introduction
to SSQ
Chapter 5

Dr Racem Mellouli Slide 1 .


SIMULATION OF A SINGLE-SERVER
QUEUEING SYSTEM

• Will show how to simulate a specific version of the single-


server queueing system (intuitive explanation)
 Implementation: Simulation may need some codes in C
language or MATLAB programming language and some
features found in all simulation models (with Arena for
example)

Slide 2 .
1.1 Problem Statement - SSQ
Introduction

Slide 3 .
1.1 Problem Statement - SSQ

Chapter 4. SSQ Simulation Model(1) Slide 4 . Dr Racem Mellouli


Slide 5 .
Chapter 4. SSQ Simulation Model(1) Slide 6 . Dr Racem Mellouli
1 Problem Statement - SSQ
(Input/Output)

• Assume interarrival times are independent and


identically distributed (IID) random variables
• Assume service times are IID, and are
independent of interarrival times
• Queue discipline is FIFO
• Start empty and idle at time 0
• First customer arrives after an interarrival time,
not at time 0
• Stopping rule: When nth customer has
completed delay in queue (i.e., enters in service)
… n will be specified as input  Time of end of
simulation

Slide 7 .
1 Problem Statement (cont’d.)
(Input/Output)
• Quantities to be estimated
 Expected average delay in queue (excluding service time)
of the n customers completing their delays
 with i includes only customers that complete their delay in the queue
 Expected average number of customers in queue
(excluding any in service)
– A continuous-time average
– =Area under Q(t), such that Q(t) = queue length at time t  will be
divided by T(n) = time simulation ends …
 Expected utilization (proportion of time busy) of the server
– Another continuous-time average
– =Area under B(t) proportion of server-busy elapsed time. B(t) = 1
if busy, 0 if idle at time t,  …
 Many others are possible (maxima, minima, time or number
in system, proportions, quantiles, variances …)
• Important: Discrete-time vs. continuous-time statistics

Slide 8 .
2 Intuitive Explanation
• Given (for now) interarrival times (all times are in
minutes):
0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
• Given service times:
2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …
• n = 6 delays in queue desired
• “Hand” simulation:
 Display system, state variables, clock, event list, statistical
counters … all after execution of each event
 Use above lists of interarrival, service times to “drive” simulation
 Stop when number of delays hits n = 6, compute output
performance measures

Chapter 4. SSQ Simulation Model(1) Dr Racem Slide


Mellouli
9.
2 Intuitive Explanation (cont’d)

Dashboard of simulation (Simulation when running):


Status of the system after discrete-time changes: A set variables values
well represented
 System variables:
+ Initialization, arrivals, departures…(events)
+ Current items in queue behind the server
+ View of items status (unregistered, in queue, served)
 System state: Server statue ; Number in Queue; List of registered
Times of Arrivals (of waiting items in queue); Time of last event.
 Time and Event variables: current Clock variable, Next-Event
variable (next Arrival (A) / next Departure (D) of service in process )
 Statistical counters: Number of delayed, Total delay, Area under
Q(t), Area under B(t)

Slide 10 .
2 Intuitive Explanation (cont’d)
Status
shown is
after all
changes
have
been
made in
each
case …

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Chapter 4. SSQ Simulation Model(1) Dr RacemSlide


Mellouli
11 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Slide 12 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Chapter 4. SSQ Simulation Model(1) Dr RacemSlide


Mellouli
13 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Slide 14 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Chapter 4. SSQ Simulation Model(1) Dr RacemSlide


Mellouli
15 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Slide 16 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Chapter 4. SSQ Simulation Model(1) Dr RacemSlide


Mellouli
17 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Slide 18 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Chapter 4. SSQ Simulation Model(1) Dr RacemSlide


Mellouli
19 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Slide 20 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Chapter 4. SSQ Simulation Model(1) Dr RacemSlide


Mellouli
21 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Slide 22 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

Chapter 4. SSQ Simulation Model(1) Dr RacemSlide


Mellouli
23 .
2 Intuitive Explanation (cont’d)

Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …
Final output performance measures:
Average delay in queue = 5.7/6 = 0.95 min./cust.
Time-average number in queue = 9.9/8.6 = 1.15 custs.
Server utilization = 7.7/8.6 = 0.90 (dimensionless)
Slide 24 .
3 Program Organization and Logic
• C or Matlab program to do this model
 Event types: 1 for arrival, 2 for departure
 Modularize for initialization, timing, events, library, report,
main
• Changes from hand simulation:
 Stopping rule: n = 1000 (rather than 6)
 Interarrival and service times “drawn” from an exponential
distribution (mean b = 1 for interarrivals, 0.5 for service
times)

– Density function

- Cumulative distribution function

Chapter 4. SSQ Simulation Model(1) Dr RacemSlide


Mellouli
25 .
3 Program Organization and Logic
(cont’d.)

• How to “draw” (or generate) an observation (variate) from


an exponential distribution?
• Proposal:
 Assume a perfect random-number generator that generates
IID variates from a continuous uniform distribution on [0, 1]
… denoted the U(0, 1) distribution … will be seen in Chap.
[Statistical framework of Simulation]
 Algorithm:
1. Generate a random number U
2. Return X = – b ln U

Slide 26 .
4. Alternative Stopping Rules

• Stop simulation at (exactly) time 8 hours (= 480 minutes),


rather than whenever n delays in queue are completed
 Before, final value of simulation clock was a random
variable
 Now, number of delays completed will be a random variable
• Introduce an artificial “end-simulation” event (type 3)
 Schedule it on initialization
 Event routine is report generator
 Be sure to update continuous-time statistics to end

Chapter 4. SSQ Simulation Model(1) Dr RacemSlide


Mellouli
27 .
1.1 Problem Statement - SSQ
5. Specification model : notation

Slide 28 .
1.1 Problem Statement - SSQ
5. Specification model : notation

Chapter 4. SSQ Simulation Model(1) Slide 29 . Dr Racem Mellouli

You might also like