29
1 Networks of queues Networks of queues reversibility, output theorem, tandem networks, partial balance, product-form distribution, blocking, insensitivity, BCMP networks, mean-value analysis, Norton's theorem, sojourn times Richard J. Boucherie Stochastic Operations Research department of Applied Mathematics University of Twente

1 Networks of queues Networks of queues reversibility, output theorem, tandem networks, partial balance, product-form distribution, blocking, insensitivity,

Embed Size (px)

Citation preview

1

Networks of queues

• Networks of queues reversibility, output theorem, tandem networks, partial balance, product-form distribution, blocking, insensitivity, BCMP networks, mean-value analysis, Norton's theorem, sojourn times

Richard J. Boucherie

Stochastic Operations Researchdepartment of Applied Mathematics

University of Twente

2

Networks of Queues: lecture 4

MSc assignment: ambulance planning …

3

Networks of Queues: lecture 4

Nelson, sec 10.3.5-10.6.6• Last time on NoQ …

– Jackson network– Kelly-Whittle network– Partial balance– Time reversed process– Product form

• Quasi reversibility• Network of quasi reversible queues• Queue disciplines, Symmetric queues, BCMP networks• Summary / Exercises

4Last time on NoQ: Jackson network : Definition

• M/M/1 queues, exponential service queue j, j=1,…,J

• state

move

depart

arrive

• Transition rates

),...,1,...,(

),...,1,...,(

),...,1,...,1,...,(

position at 1 )0...,0,1,0,...0(

),...,(

1

1

1

1

Jkk

Jjj

Jjiji

i

J

nnnen

nnnen

nnnneen

ie

nnn

kk

jjj

jkjkj

ennq

pennq

peennq

),(

),(

),(

0

5Last time on NoQ :closed network : equilibrium distribution

• Theorem: The equilibrium distribution for the closed Jackson network

containing N jobs is

and satisfies partial balance

traffic equations

}:{/)(1

NnnSnBn jj

Njjjnj

J

jN

j

kk

jjj

jkjkj

ennq

pennq

peennq

),(

),(

),(

0

kjkk

jkjk

pp

),()(),()(11

neenqeeneennqn kj

J

kkjkj

J

k

6Last time on NoQ : Open network : equilibrium distribution

Theorem: The equilibrium distribution for the open Jackson network is

and satisfies partial balance

},...,1,0:{/)(1

JjnnnBn jjjjnj

J

j

j

),()(),()(00

neenqeeneennqn kj

J

kkjkj

J

k

7

Last time on NoQ : Partial balance

• Detailed balance: Prob flow between each two states matches

• Partial balance: prob flow out of state n due to departure from queue j is balanced by prob flow into state n due to arrival to queue j, for each queue j, j=0,…,J

• Global balance: total prob flow out of state n equals total prob flow into state n

• Probability flow in/out queue in relation to network

),()(),()(

),()(),()(

),()(),()(

0000

00

neenqeeneennqn

neenqeeneennqn

neenqeeneennqn

kj

J

kkj

J

jkj

J

k

J

j

kj

J

kkjkj

J

k

kjkjkj

8Last time on NoQ :Kelly Whittle network

),()(),()(00

neenqeeneennqn kj

J

kkjkj

J

k

kk

jjj

j

jkjj

kj

n

nennq

pn

enennq

pn

eneennq

)(

)(),(

)(

)(),(

)(

)(),(

0

Theorem: The equilibrium distribution for the Kelly Whittle network is

where

and π satisfies partial balance

SnnBn jjjnj

J

j

j

/)()(1

kjkk

jj p

9

Insert equilibrium distribution and rates in partial balance

This is the beauty of partial balance!

kjkk

J

k

ns

J

sj

jkjj

J

k

ns

J

sj

kjkkj

j

j

kns

J

skj

J

k

jkjjn

s

J

s

J

k

kj

J

kkjkj

J

k

pen

pen

peen

eneen

pn

enn

neenqeeneennqn

sjs

sjs

s

s

01

01

10

10

00

)(

)(

)(

)()(

)(

)()(

),()(),()(

• Last time on NoQ

10Last time on NoQ : Time reversed process

• Theorem: If X(t) is a stationary Markov process with transition rates q(j,k), and equilibrium distribution π(j), jεS, then the reversed process X(τ-t) is a stationary Markov process with transition rates

and the same equilibrium distribution.

• Theorem: Kelly’s lemmaLet X(t) be a stationary Markov process with transition rates q(j,k). If we can find a collection of numbers q’(j,k) such that q’(j)=q(j), jεS, and a collection of positive numbers π (j), jεS, summing to unity, such that

then q’(j,k) are the transition rates of the time-reversed process, and π (j), jεS, is the equilibrium distribution of both processes.

)(

),()(),('

j

jkqkkjq

Skj ,

),(')(),()( jkqkkjqj Skj ,

11

Alternative proof: use Kelly’s lemma

Forward rates

Guess backward rates

Check conditions

Jkjpn

eneennq jkj

jkj ,...,0, ,

)(

)(),(

jj

jjk

jj

jjj

j

kj

kjjj

kkj

j

kjkj

r

kj

n

enp

n

en

pn

eneennq

)(

)(

)(

)(

)(

)(),(

,

,,

jj

jjkj

j

kjkj

kj n

enp

n

eneennq

)(

)(

)(

)(),(

,,

kjjj

kkrjk

rjkj

jkj

r

pp

Jkjpn

eneennq

,...,0, ,)(

)(),(

Last time on NoQ : Time reversed process

12

Alternative proof: use Kelly’s lemma

Guess for equilibrium distribution

insert

SnnBn jjjnj

J

j

j

/)()(1

kjkkj

jns

J

sj

kkj

rjkj

jns

J

s

kjkjkjr

peen

eneen

pn

enn

neenqeeneennqn

s

s

)(

)()(

)(

)()(

),()(),()(

1

1

Last time on NoQ : Time reversed process

13

Networks of Queues: lecture 4

Nelson, sec 10.3.5-10.6.6• Last time on NoQ …• Quasi reversibility• Network of quasi reversible queues• Queue disciplines, Symmetric queues, BCMP networks• Summary / Exercises

Quasi-reversibility

• Multi class queueing network, class c ε C

• A queue is quasi-reversible if its state x(t) is a stationary Markov process with the property that the state of the queue at time t0, x(t0), is independent of(i) arrival times of class c customers subsequent to time t0 (ii) departure times of class c customers prior to time t0.

• TheoremIf a queue is QR then(i) arrival times of class c customers form independent Poisson processes(ii) departure times of class c customers form independent Poisson processes.

Quasi-reversibility

• S(c,x) set of states queue contains one more class c than in state x

• Arrival rate class c customerindependent of state x

• Thus arrival rate independent of prior events, and has constant rate Poisson process

)',()(),('

xxqcxcSx

Quasi-reversibility

• Multi class queueing network, class c ε C• S(c,x) set of states in which queue contains one

more class c than in state x• Arrival rate class c customer

independent of state x• Departure rate class c customer

independent of state x

• Characterise QR, combine

• A form of partial balance

)',()(),('

xxqcxcSx

)',()(

),'()'()',()(

),('

xxqc

xxqxxxqxr

xcSx

r

),'()'()',()()(),('),('

xxqxxxqxcxcSxxcSx

17

Networks of Queues: lecture 4

Nelson, sec 10.3.5-10.6.6• Last time on NoQ …• Quasi reversibility• Network of quasi reversible queues• Queue disciplines, Symmetric queues, BCMP networks• Summary / Exercises

18

Network of quasi reversible queues

• Multiclass queueing network, type i=1,..,I• J queues• Customer type identifies route• Poisson arrival rate per type i=1,…,I• Route r(i,1),r(i,2),…,r(i,S(i))• Type i at stage s in queue r(i,s)• S(c,x) set of states in which queue contains one more

class c than in state x

• State X(t)=(x1(t),…,xJ(t))

• Fixed number of visits; cannot use Markov routing• 1, 2, or 3 visits to queue: use 3 types

19

Network of quasi reversible queues• Construct network by multiplying rates for individual

queues• Transition rates• Arrival of type i causes queue k=r(i,1) to change at

• Departure type i from queue j = r(i,S(i))

• Routing

• Internal

),1,(')',( kkkkkk xiSxxxq

)'),(,()',( jjjjjj xiSiSxxxq

)',,(),1,('

)1,(

)',()',(

)',(

)',()',(

),1,('

jjjkkk

k

kkkjjj

kkxsiSx

kkkjjj

xsiSxxsiSx

si

xxqxxq

xxq

xxqxxq

kk

)',( jjj xxq

Network of Quasi-reversible queues• Rates

• Theorem : For an open network of QR queues(i) the states of individual queues are independent at fixed time

(ii) an arriving customer sees the equilibrium distribution(ii’) the equibrium distribution for a queue is as it would be in isolation with arrivals forming a Poisson process.(iii) time-reversal: another open network of QR queues(iv) system is QR, so departures form Poisson process

)()...()( 11 JJ xxx

)',,(),1,(')1,(

)',()',(

)'),(,()',(

),1,(')',(

)',(

jjjkkkk

kkkjjj

jjjjjj

kkkkkk

xsiSxxsiSxsi

xxqxxq

xiSiSxxxq

xiSxxxq

xxq

Network of Quasi-reversible queues• Proof of part (i): Kelly’s lemma• Rates

• Transition rates reversed process (guess)

)',,()',1,(),(

)',(')',('

)',1,()',('

)),(,(')',('

)',('

jjjkkkj

jjjkkk

jjjjjj

kkkkkk

xsiSxxsiSxsi

xxqxxq

xiSxxxq

xiSiSxxxq

xxq

)',,(),1,(')1,(

)',()',(

)'),(,()',(

),1,(')',(

)',(

jjjkkkk

kkkjjj

jjjjjj

kkkkkk

xsiSxxsiSxsi

xxqxxq

xiSiSxxxq

xiSxxxq

xxq

Network of Quasi-reversible queues• Proof of part (i): Kelly’s lemma• For

• We have

• Satisfied due to )(),()1,(

),(

),'('),'(')'()'(

)1,(

)',()',()()(

)',,(),',1,(

isisi

si

xxqxxqxx

si

xxqxxqxx

xsiSxxsiSx

jk

j

jjjkkkkkjj

k

kkkjjjkkjj

jjjkkk

23

Networks of Queues: lecture 4

Nelson, sec 10.3.5-10.6.6• Last time on NoQ …• Quasi reversibility• Network of quasi reversible queues• Queue disciplines, Symmetric queues, BCMP networks• Summary / Exercises

Queue disciplines

• Operation of the queue j:(i) Each job requires exponential(1) amount of service.(ii) Total service effort supplied at rate φj(nj)(iii) Proportion γ j(k,nj) of this effort directed to job in position k, k=1,…, nj ; when this job leaves, his service is completed, jobs in positions k+1,…, nj move to positions k,…, nj -1.(iv) When a job arrives at queue j he moves into position k with probability δj(k,nj + 1), k=1,…, nj +1; jobs previously in positions k,…, nj move to positions k+1,…, nj +1. 0 if 0)(1),(1),(

11

nnnknk jj

n

kj

n

k

• Operation of the queue j:(i) Each job requires exponential(1) amount of service.(ii) Total service effort supplied at rate φj(nj)(iii) Proportion γ j(k,nj) of this effort directed to job in position k, (iv) job arriving at queue j moves into position k with prob. δj(k,nj + 1)

• Examples: FCFSLCFSPSinfinite server queue

• BCMP network

Queue disciplines

Symmetric queues

• Operation of the queue j:(i) Each job requires exponential(1) amount of service.(ii) Total service effort supplied at rate φj(nj)(iii) Proportion γ j(k,nj) of this effort directed to job in position k, (iv) job arriving at queue j moves into position k with prob. δj(k,nj + 1)

• Examples: IS, LCFS, PS• Symmetric queue QR (for general service requirement) • Instantaneous attention• Note: FCFS with identical service rate for all types is QR

),(),( nknk jj

27

Networks of Queues: lecture 4

Nelson, sec 10.3.5-10.6.6• Last time on NoQ …• Quasi reversibility• Queue disciplines, Symmetric queues, BCMP networks• Network of quasi reversible queues• Summary / Exercises

Quasi-reversibility and partial balance

• QR: fairly general queues, service disciplines, Markov routing, product form equilibrium distribution factorizes over queues.

• PB: fairly general relation between service rate at queues, state-dependent routing (blocking), product form equilibrium distribution factorizes over service and routing parts.

• Identical for single type queueing network with Markov routing

• Note: in Nelson proof for Markov routing

• QR partial balance• NOT partial balance QR (exercise)• NOT QR Reversibility (see Nelson, ex 10.14)• NOT Reversibility QR (see Nelson, ex 10.12)

29

Summary / next / exercises:

• Jackson network• Kelly Whittle network• Partial balance• Quasi reversibility• Customer types• Queue disciplines• BCMP networks

• Next:– Insensitivity– Aggregation / decomposition / Norton’s theorem

• Exercises: 20,22,24,25,26,27,29,30