+ All Categories
Home > Documents > Simulating Single server queuing models

Simulating Single server queuing models

Date post: 12-Feb-2016
Category:
Upload: marek
View: 30 times
Download: 0 times
Share this document with a friend
Description:
Simulating Single server queuing models. 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. - PowerPoint PPT Presentation
Popular Tags:
23
Simulating Single server queuing models
Transcript
Page 1: Simulating Single server queuing models

Simulating Single server queuing models

Page 2: Simulating Single server queuing models

Simulating Single server queuing models

• Consider the following sequence of activities that each customer undergoes:1. Customer arrives2. Customer waits for service if the server is

busy.3. Customer receives service.4. Customer departs the system.

Page 3: Simulating Single server queuing models

Analytical Solutions

• Analytical solutions for W, L, Wq, Lq exist However, analytical solution exist at infinity which cannot be reached.

• Therefore, Simulation is a most.

Page 4: Simulating Single server queuing models

Flowchart of an arrival event

IdleBusy

An Arrival

Status of Server

Customer joins queueCustomer enters service

More

Page 5: Simulating Single server queuing models

Flowchart of a Departure event

NO Yes

A Departure

Queue Empty ?

Set system status to idle

Remove customer from Queue and begin service

More

Page 6: Simulating Single server queuing models

An example of a hand simulation

• Consider the following IAT’s and ST’s:

• A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4, A9=1.9, …

• S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

• Want: Average delay in queue • Utilization

Page 7: Simulating Single server queuing models

InitializationTime = 0

system

Server

00 0

0 0 0 0

00.4999.

System state

Serverstatus

# in que

Times of Arrival

TimeOf Lastevent

Clock

Eventlist

Numberdelayed

Totaldelay

AreaUnderQ(t)

AreaUnderB(t)

A

D

Statistical Counters

Page 8: Simulating Single server queuing models

ArrivalTime = 0.4

system

01 0.4

1 0 0 0

0.41.6

2.4

System state

Serverstatus

# in que

Times of Arrival

TimeOf Lastevent

Clock

Eventlist

Numberdelayed

Totaldelay

AreaUnderQ(t)

AreaUnderB(t)

A

D

0.4

A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

Statistical Counters

Page 9: Simulating Single server queuing models

ArrivalTime = 1.6

system

11 1.6

1.6

1 0 0 1.2

1.62.1

2.4

System state

Serverstatus

# in que

Times of Arrival

TimeOf Lastevent

Clock

Eventlist

Numberdelayed

Totaldelay

AreaUnderQ(t)

AreaUnderB(t)

A

D0.4

1.6

A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

Statistical Counters

Page 10: Simulating Single server queuing models

ArrivalTime = 2.1

21 2.1

1.6

2.1

1 0 0.5 1.7

2.13.8

2.4

System state

Serverstatus

# in que

Times of Arrival

TimeOf Lastevent

Clock

Eventlist

Numberdelayed

Totaldelay

AreaUnderQ(t)

AreaUnderB(t)

A

D0.4

1.6

System

2.1

A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

Statistical Counters

Page 11: Simulating Single server queuing models

DepartureTime = 2.4

11 2.4

2.1

2 0.8 1.1 2.0

2.43.8

3.1

System state

Serverstatus

# in que

Times of Arrival

TimeOf Lastevent

Clock

Eventlist

Numberdelayed

Totaldelay

AreaUnderQ(t)

AreaUnderB(t)

A

D1.6

2.1

System

A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

Statistical Counters

Page 12: Simulating Single server queuing models

DepartureTime = 3.1

01 3.1

3 1.8 1.8 2.7

3.13.8

3.3

System state

Serverstatus

# in que

Times of Arrival

TimeOf Lastevent

Clock

Eventlist

Numberdelayed

Totaldelay

AreaUnderQ(t)

AreaUnderB(t)

A

D2.1

System

A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

Statistical Counters

Page 13: Simulating Single server queuing models

DepartureTime = 3.1

00 3.3

3 1.8 1.8 2.9

3.33.8999.

System state

Serverstatus

# in que

Times of Arrival

TimeOf Lastevent

Clock

Eventlist

Numberdelayed

Totaldelay

AreaUnderQ(t)

AreaUnderB(t)

A

D

System

A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

Statistical Counters

Page 14: Simulating Single server queuing models

DepartureTime = 3.1

01 3.8

4 1.8 1.8 2.9

3.84.0

4.9

System state

Serverstatus

# in que

Times of Arrival

TimeOf Lastevent

Clock

Eventlist

Numberdelayed

Totaldelay

AreaUnderQ(t)

AreaUnderB(t)

A

D

System

3.8

A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

Statistical Counters

Page 15: Simulating Single server queuing models

DepartureTime = 3.1

11 4.0

4.0

4 1.8 1.8 3.1

4.05.6

4.9

System state

Serverstatus

# in que

Times of Arrival

TimeOf Lastevent

Clock

Eventlist

Numberdelayed

Totaldelay

AreaUnderQ(t)

AreaUnderB(t)

A

D

System

3.8

4.0

A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

Statistical Counters

Page 16: Simulating Single server queuing models

DepartureTime = 3.1

01 4.9

5 2.7 2.7 4.0

4.95.6

8.6

System state

Serverstatus

# in que

Times of Arrival

TimeOf Lastevent

Clock

Eventlist

Numberdelayed

Totaldelay

AreaUnderQ(t)

AreaUnderB(t)

A

D

System

4.0

A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

Statistical Counters

Page 17: Simulating Single server queuing models

Monte Carlo Simulation

• Solving deterministic problems using stochastic models. – Example: estimate

• It is efficient in solving multi dimensional integrals.

b

adxxgI )(

Page 18: Simulating Single server queuing models

Monte Carlo Simulation

• To illustrate, consider a known region R with area A and R1 subset of R whose area A1 in unknown.

• To estimate the area of R1 we can through random points in the region R. The ratio of points in the region R1 over the points in R approximately equals the ratio of A1/A.

R R1

Page 19: Simulating Single server queuing models

Monte Carlo Simulation

• To estimate the integral I. one can estimate the area under the curve of g. – Suppose that M = max {g(x) } on [a,b]

a b

R1

RM

1. Select random numbers X1, X2, …,Xn in [a,b]

And Y1, Y2, … ,Yn in [0,M]

2. Count how many points (Xi,Yi) in R1, say C1

3. The estimate of I is then C1M(b-a)/n

Page 20: Simulating Single server queuing models

Advantages of Simulation• Most complex, real-world systems with stochastic

elements that cannot be described by mathematical models. Simulation is often the only investigation possible

• Simulation allow us to estimate the performance of an existing system under proposed operating conditions.

• Alternative proposed system designs can be compared with the existing system

• We can maintain much better control over the experiments than with the system itself

• Study the system with a long time frame

Page 21: Simulating Single server queuing models

Disadvantages of Simulation• Simulation produces only estimates of

performance under a particular set of parameters

• Expensive and time consuming to develop• The Large volume of numbers and the

impact of the realistic animation often create high level of confidence than is justified.

Page 22: Simulating Single server queuing models

Pitfalls of Simulation • Failure to have a well defined set of objectives at

the beginning of the study• Inappropriate level of model details• Failure to communicate with manager during the

course of simulation• Treating a simulation study as if it is a

complicated exercise in computer programming• Failure to have well trained people familiar with

operations research and statistical analysis• Using commercial software that may contain

errors

Page 23: Simulating Single server queuing models

Pitfalls of Simulation cont.• Reliance on simulator that make simulation

accessible to anyone• Misuse of animation• Failure to account correctly for sources of

randomness in the actual system• Using arbitrary probability distributions as input of

the simulation• Do output analysis un correctly• Making a single replication and treating the output

as true answers• Comparing alternative designs based on one

replication of each design• Using wrong measure of performance


Recommended