Simulating Single server queuing models - PowerPoint PPT Presentation

About This Presentation
Title:

Simulating Single server queuing models

Description:

Arrival rate (l =15) customers per hour ... Generate uniform [0,1] RN: RAND() Return X = -1/l * ln(RAND()) Analytical Solutions ... – PowerPoint PPT presentation

Number of Views:334
Avg rating:3.0/5.0
Slides: 18
Provided by: Alre
Category:

less

Transcript and Presenter's Notes

Title: Simulating Single server queuing models


1
Simulating Single server queuing models
2
Simulating Single server queuing models
  • Consider the following sequence of activities
    that each customer undergoes
  • Customer arrives
  • Customer waits for service if the server is busy.
  • Customer receives service.
  • Customer departs the system.

3
Example
  • Arrival rate (l 15) customers per hour
  • Service time 3 minutes (service rate (m 20)
    customer per hour
  • Arrival and Service times are exponentially
    distributed
  • Note the generation of Exponential Random
    Variable is
  • Generate uniform 0,1 RN RAND()
  • Return X -1/l ln(RAND())

4
Analytical Solutions
  • Analytical solutions for W, L, Wq, Lq exist (see
    Lecture 05)
  • However, analytical solution exist at infinity
    which cannot be reached.
  • Therefore, Simulation is a most.

5
Flowchart of an arrival event
Idle Busy
An Arrival
Status of Server
Customer enters service
Customer joins queue
More
6
Flowchart of a Departure event
  • NO Yes

A Departure
Queue Empty ?
Remove customer from Queue and begin service
Set system status to idle
More
7
An example of a hand simulation
  • Consider the following IATs and STs
  • A10.4, A21.2, A30.5, A41.7, A50.2, A61.6,
    A70.2, A81.4, A91.9,
  • S12.0, S20.7, S30.2, S41.1, S53.7, S60.6
  • Want Average delay in queue
  • Utilization

8
System state
Initialization Time 0 system
0.4
999
A
Server




0
D
Clock
Eventlist
0
0
0
in que
Time Of Last event
Server status
0
0
0
0
Area Under B(t)
Total delay
Area Under Q(t)
Number delayed
Times of Arrival
Statistical Counters
9
Arrival Time 0.4 system
System state
1.6
2.4
A




0.4
D
Clock
0.4
Eventlist
0
1
0.4
in que
Time Of Last event
Server status
1
0
0
0
Area Under B(t)
Total delay
Area Under Q(t)
Number delayed
Times of Arrival
Statistical Counters
A10.4, A21.2, A30.5, A41.7, A50.2, A61.6,
A70.2, A81.4 S12.0, S20.7, S30.2, S41.1,
S53.7, S60.6
10
Arrival Time 1.6 system
System state
2.1
2.4
A
1.6



1.6
D
Clock
0.4
Eventlist
1
1
1.6
in que
Time Of Last event
1.6
Server status
1
0
0
1.2
Area Under B(t)
Total delay
Area Under Q(t)
Number delayed
Times of Arrival
Statistical Counters
A10.4, A21.2, A30.5, A41.7, A50.2, A61.6,
A70.2, A81.4 S12.0, S20.7, S30.2, S41.1,
S53.7, S60.6
11
Arrival Time 2.1
System state
3.8
2.4
A
1.6
2.1


2.1
D
Clock
0.4
Eventlist
2
1
2.1
in que
Time Of Last event
1.6
Server status
1.7
1
0
0.5
2.1
Area Under B(t)
Total delay
Area Under Q(t)
Number delayed
Times of Arrival
System
Statistical Counters
A10.4, A21.2, A30.5, A41.7, A50.2, A61.6,
A70.2, A81.4 S12.0, S20.7, S30.2, S41.1,
S53.7, S60.6
12
Departure Time 2.4
System state
3.8
3.1
A
2.1



2.4
D
Clock
1.6
Eventlist
1
1
2.4
in que
Time Of Last event
2.1
Server status
2.0
2
0.8
1.1
Area Under B(t)
Total delay
Area Under Q(t)
Number delayed
Times of Arrival
System
Statistical Counters
A10.4, A21.2, A30.5, A41.7, A50.2, A61.6,
A70.2, A81.4 S12.0, S20.7, S30.2, S41.1,
S53.7, S60.6
13
Departure Time 3.1
System state
3.8
3.3
A




3.1
D
Clock
2.1
Eventlist
0
1
3.1
in que
Time Of Last event
Server status
2.7
3
1.8
1.8
Area Under B(t)
Total delay
Area Under Q(t)
Number delayed
Times of Arrival
System
Statistical Counters
A10.4, A21.2, A30.5, A41.7, A50.2, A61.6,
A70.2, A81.4 S12.0, S20.7, S30.2, S41.1,
S53.7, S60.6
14
Departure Time 3.1
System state
3.8
999.
A




3.3
D
Clock
Eventlist
0
0
3.3
in que
Time Of Last event
Server status
2.9
3
1.8
1.8
Area Under B(t)
Total delay
Area Under Q(t)
Number delayed
Times of Arrival
System
Statistical Counters
A10.4, A21.2, A30.5, A41.7, A50.2, A61.6,
A70.2, A81.4 S12.0, S20.7, S30.2, S41.1,
S53.7, S60.6
15
Departure Time 3.1
System state
4.0
4.9
A




3.8
D
Clock
3.8
Eventlist
0
1
3.8
in que
Time Of Last event
Server status
2.9
4
1.8
1.8
Area Under B(t)
Total delay
Area Under Q(t)
Number delayed
Times of Arrival
System
Statistical Counters
A10.4, A21.2, A30.5, A41.7, A50.2, A61.6,
A70.2, A81.4 S12.0, S20.7, S30.2, S41.1,
S53.7, S60.6
16
Departure Time 3.1
System state
5.6
4.9
A
4.0



4.0
D
Clock
3.8
Eventlist
1
1
4.0
in que
Time Of Last event
Server status
3.1
4.0
4
1.8
1.8
Area Under B(t)
Total delay
Area Under Q(t)
Number delayed
Times of Arrival
System
Statistical Counters
A10.4, A21.2, A30.5, A41.7, A50.2, A61.6,
A70.2, A81.4 S12.0, S20.7, S30.2, S41.1,
S53.7, S60.6
17
Departure Time 3.1
System state
5.6
8.6
A




4.9
D
Clock
4.0
Eventlist
0
1
4.9
in que
Time Of Last event
Server status
4.0
5
2.7
2.7
Total delay
Area Under Q(t)
Area Under B(t)
Number delayed
Times of Arrival
System
Statistical Counters
A10.4, A21.2, A30.5, A41.7, A50.2, A61.6,
A70.2, A81.4 S12.0, S20.7, S30.2, S41.1,
S53.7, S60.6
Write a Comment
User Comments (0)
About PowerShow.com