You are on page 1of 57

Course

Simulation of Industrial Systems

Basic IE models
for simulation:
SSQ simulation
and Queuing
Systems variants
Chapter 6

Slide 1 .
1.1 Problem Statement - SSQ
5. Specification model : notation
Arriving Machine Departing Single-Server Queue
Blank Parts (Server) Finished Parts
7 6 5 4

Queue (FIFO) Part in Service

Chapter 6. SSQ Simulation Model(2) Slide 2 .


1.1 Problem Statement -
6. Computational model SSQ

𝑑𝑖 = 0 𝑖𝑓 𝑎𝑖 ≥ 𝑐𝑖−1
𝑑𝑖 = 𝑐𝑖−1 − 𝑎𝑖 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

In other terms 𝑑𝑖 = max(0, 𝑐𝑖−1 − 𝑎𝑖 )


Slide 3 .
6. Computational model

Chapter 6. SSQ Simulation Model(2) Slide 4 .


6. Computational model
6. Computational model

Chapter 6. SSQ Simulation Model(2)


6. Computational model
6. Computational model

Algorithm 1 + some Statistics Calculation

Chapter 6. SSQ Simulation Model(2)


6. Computational model

Example
1

https://github.com/newOnahtaN/simulations/blob/master/Downloads/ssq1.dat
6. Computational model

Example
2

Chapter 6. SSQ Simulation Model(2) Slide 10 .


6. Computational model
6. Computational model

Why
exponential
?
6. Computational model
6. Computational model
6. Computational model
1.1 6.Problem Statement
Computing model - SSQ

Slide 16 .
1.1 6.Problem Statement
Computing model - SSQ

Slide 17 .
1.1 6.Problem Statement
Computing model - SSQ

Service Node queue service

Slide 18 .
1.1 Problem Statement
7. Example 3 - SSQ
Example
3

Ci 0 58 94 128 158 196 236 267 296 346 376

Chapter 6. SSQ Simulation Model(2) Slide 19 .


1.1 Problem Statement
7. Example 3 - SSQ

Chapter 6. SSQ Simulation Model(2) Slide 20 .


1.1 Problem Statement
7. Example 3 - SSQ

Chapter 6. SSQ Simulation Model(2) Slide 21 .


1.1 Problem Statement
7. Example 3 - SSQ

(ssq2)

Chapter 6. SSQ Simulation Model(2) Slide 22 .


1.1 Problem Statement
7. Example 3 - SSQ

Chapter 6. SSQ Simulation Model(2) Slide 23 .


1.1 Problem Statement
8. Little’s Theorem - SSQ

Chapter 6. SSQ Simulation Model(2) Slide 24 .


1.1 9.
Problem Statement
Example 3 (cont.) - SSQ

Chapter 6. SSQ Simulation Model(2) Slide 25 .


1.1 9.
Problem Statement
Example 3 (cont.) - SSQ

Chapter 6. SSQ Simulation Model(2) Slide 26 .


1.1 10.
Problem Statement
Traffic intensity - SSQ

Chapter 6. SSQ Simulation Model(2) Slide 27 .


Course
Simulation of Industrial Systems

Basic IE models
for simulation:
A SSQ System

Chapter 6
(APPENDIX 1– Example 4)

Slide 28 .
Exercise Type

Chapter 2 – Fundamental Simulation Concepts Slide 29 of 46


Exercise Type

Chapter 2 – Fundamental Simulation Concepts Slide 30 of 46


Exercise Type

Chapter 2 – Fundamental Simulation Concepts Slide 31 of 46


Exercise Type

Chapter 2 – Fundamental Simulation Concepts Slide 32 of 46


Exercise Type

Chapter 2 – Fundamental Simulation Concepts Slide 33 of 46


Chapter 2 – Fundamental Simulation Concepts Slide 34 of 46
Dashboards of simulation by hand

Add

Q(t) graph

B(t) graph

Slide 35 .
Example
4 Simulation by Hand:
Assume here that first job arrive at t=0, i.e first
Setup
interarrival r(1)=0, end condition: t=20

System Clock B(t) Q(t) Arrival times of Event calendar


custs. in queue

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Slide 36 .
Example
4 Simulation by Hand:
t = 0.00, Initialize
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [1, 0.00, Arr]
0.00 0 0 <empty> [–, 20.00, End]

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue
0 0.00 0.00 0.00

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Slide 37 .
Example
4 Simulation by Hand:
t = 0.00, Arrival of Part 1
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [2, 1.73, Arr]
1 0.00 1 0 <empty> [1, 2.90, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
1 0.00 0.00 0.00

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ... Arrival
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Slide 38 .
Example
4 Simulation by Hand:
t = 1.73, Arrival of Part 2
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [1, 2.90, Dep]
2 1 1.73 1 1 (1.73) [3, 3.08, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
1 0.00 0.00 1.73

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ... Arrival
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Slide 39 .
Example
4 Simulation by Hand:
t = 2.90, Departure of Part 1
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [3, 3.08, Arr]
2 2.90 1 0 <empty> [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.17 2.90

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ... Departure

Slide 40 .
Example
4 Simulation by Hand:
t = 3.08, Arrival of Part 3
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [4, 3.79, Arr]
3 2 3.08 1 1 (3.08) [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.17 3.08

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ... Arrival
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Slide 41 .
Example
4 Simulation by Hand:
t = 3.79, Arrival of Part 4
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [5, 4.41, Arr]
4 3 2 3.79 1 2 (3.79, 3.08) [2, 4.66, Dep]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 1.88 3.79

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ... Arrival
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Slide 42 .
Example
4 Simulation by Hand:
t = 4.41, Arrival of Part 5
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [2, 4.66, Dep]
5 4 3 2 4.41 1 3 (4.41, 3.79, 3.08) [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
2 1.17 3.12 4.41

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ... Arrival
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Slide 43 .
Example
4 Simulation by Hand:
t = 4.66, Departure of Part 2
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [3, 8.05, Dep]
5 4 3 4.66 1 2 (4.41, 3.79) [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
3 2.75 3.87 4.66

4
3
Q(t) graph
2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ... Departure

Slide 44 .
Example
4 Simulation by Hand:
t = 8.05, Departure of Part 3
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [4, 12.57, Dep]
5 4 8.05 1 1 (4.41) [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
4 7.01 10.65 8.05

4
3
Q(t) graph
2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ... Departure

Slide 45 .
Example
4 Simulation by Hand:
t = 12.57, Departure of Part 4
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [5, 17.03, Dep]
5 12.57 1 0 () [6, 18.69, Arr]
[–, 20.00, End]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
5 15.17 15.17 12.57

4
3
Q(t) graph
2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ... Departure

Slide 46 .
Example
4 Simulation by Hand:
t = 17.03, Departure of Part 5
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [6, 18.69, Arr]
17.03 0 0 () [–, 20.00, End]

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue
5 15.17 15.17 17.03

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ... Departure

Slide 47 .
Example
4 Simulation by Hand:
t = 18.69, Arrival of Part 6
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [7, 19.39, Arr]
6 18.69 1 0 () [–, 20.00, End]
[6, 23.05, Dep]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
6 15.17 15.17 17.03

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ... Arrival
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Chapter 2 – Fundamental
Slide 48Simulation
. Concepts Slide 48 of 46
Example
4 Simulation by Hand:
t = 19.39, Arrival of Part 7
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [–, 20.00, End]
7 6 19.39 1 1 (19.39) [6, 23.05, Dep]
[8, 34.91, Arr]
Number of Total of Area under Area under
completed waiting waiting times in queue Q(t) B(t)
times in queue
6 15.17 15.17 17.73

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ... Arrival
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Slide 49 .
Example
4 Simulation by Hand:
t = 20.00, The End
System Clock B(t) Q(t) Arrival times of Event calendar
custs. in queue [6, 23.05, Dep]
7 6 20.00 1 1 (19.39) [8, 34.91, Arr]

Number of Total of Area under Area under


completed waiting waiting times in queue Q(t) B(t)
times in queue
6 15.17 15.78 18.34

4
3
Q(t) graph 2
1
0
0 5 10 15 20
2
B(t) graph 1
0
0 5 10 15 20

Time (Minutes)
Interarrival times 0 1.73, 1.35, 0.71, 0.62, 14.28, 0.70, 15.52, 3.15, 1.76, 1.00, ...
End Condition t=20
Service times 2.90, 1.76, 3.39, 4.52, 4.46, 4.36, 2.07, 3.36, 2.37, 5.38, ...

Slide 50 .
Simulation by Hand:
Finishing Up
• Average waiting time in queue: 𝑑ҧ
Total of times in queue 15.17
  2.53 minutes per part
No. of times in queue 6

• Time-average number in queue:


Area under Q(t ) curve 15.78
  0.79 part
Final clock value 20


20

Utilization of drill press: 


0
B(t ) dt
also or (B )
20

Area under B(t ) curve 18.34


  0.92 (dimension less)
Final clock value 20
Course
Simulation of Industrial Systems

Basic IE models
for simulation:
A SSQ System

Chapter 6
(APPENDIX 2– Notations in
Queuing theory)

Slide 52 .
Queueing theory

 Popular, simple model: M/M/1 queue


A single-queue single-server system with a single traffic source and
an infinite storage capacity.
In the notation, the M stands for Markovian;
M/M/1 means that the system has
- A Poisson arrival process (Interarrival times ~ exponential ),
- An exponential service time distribution, indep. of interarrivals
- And one server.
– Must have E(service) < E(interarrival)
– Steady-state (long-run, forever)

Slide 53 .
Queueing theory

 Popular, simple model: M/M/1 queue


- Queuing theory provides exact theoretical results for some
performance measures of an M/M/1 queuing system and this model
makes it easy to compare empirical results with the corresponding
theoretical results.
– Exact analytic results: e.g., analytic average waiting time in queue is

With an arrival rate and a service rate :


average waiting time in queue is =
The first term is the mean total waiting time in the combined queue-server
system and the second term is the mean service time.

Utilization of the server =


Slide 54 .
Queueing theory

 M/U/1 queue
– Interarrival times ~ exponential
– Service times ~ Uniformly distributed , indep. of interarrivals
– Must have E(service) < E(interarrival)
– Steady-state (long-run, forever)

See SSQ2

Slide 55 .
Kendall's notation

In Queueing Theory, Kendall's notation is the standard system used to


describe and classify a Queueing node.
Kendall proposed describing Queueing Models using three factors
written A/S/c, where:
A denotes the time between arrivals to the queue,
S the size of jobs and
c the number of servers at the node.
It has since been extended to A/S/c/K/N/D, where:
K is the capacity of the queue,
D is the queueing discipline and
N is the size of the population of jobs to be served.

Slide 56 .
Kendall's notation

When the final three parameters are not specified (e.g. M/M/1 queue),
it is assumed K = ∞, N = ∞ and D = FIFO.

 M/D/1 queue
represents the queue length in a system having a single server, where
arrivals are determined by a Poisson process and job service times are
fixed (deterministic).
-Arrivals occur at rate λ according to a Poisson process and move the
process from state i to i + 1.
- Service times are deterministic time D (serving at rate μ = 1/D).
 Other models
See : D/M/1 queue, M/D/1 queue, M/D/c queue, M/M/1 queue, M/M/c
queue, M/M/∞ queue, M/G/1 queue M/G/k queue, G/M/1 queue, G/G/1

Slide 57 .

You might also like