sheets lecture 7 + 8

Flows and Networks
Plan for today (lecture 6):
• Last time / Questions?
• Kelly / Whittle network
• Optimal design of a Kelly / Whittle network:
optimisation problem
• Intermezzo: mathematical programming
• Optimal design of a Kelly / Whittle network:
Lagrangian and interpretation
• Optimal design of a Kelly / Whittle network:
Solution optimisation problem
• Optimal design of a Kelly / Whittle network:
network structure
• Summary
• Exercises
• Questions
Flows and Networks
Plan for today (lecture 5):
•
•
•
•
•
•
•
•
Last time / Questions?
Waiting time simple queue
Little
Sojourn time tandem network
Jackson network: mean sojourn time
Product form preserving blocking
Summary / Next
Exercises
Blocking in tandem networks of simple queues (1)
• Simple queues, exponential service queue j, j=1,…,J
• state
n  (n1 ,..., nJ )
move
T j , j 1 (n)  (n1 ,..., n j  1, n j 1  1,..., nJ )
depart
T j 0 (n)  (n1 ,..., n j  1,..., nJ )
arrive
T0 k (n)  (n1 ,..., nk  1,..., nJ )
• Transition rates
q (n, T j , j 1 (n))   j
q (n, TJ 0 (n))   J
q (n, T01 (n))  
• Traffic equations
 j  j   j 1 j 1 , j  2,..., J
11  
• Solution

j 
j
, j  1,..., J
Blocking in tandem networks of simple queues (2)
•
Simple queues, exponential service queue j, j=1,…,J
•
Transition rates
q (n, T j , j 1 (n))   j
q (n, TJ 0 (n))   J
q (n, T01 (n))  
•
Traffic equations
 j  j   j 1 j 1 , j  2,..., J
11  

j 
j
•
Solution
•
Equilibrium distribution
J
 (n)   (1   j ) j n
j
, j  1,..., J
n  S  {n : n  0}
j 1
•
Partial balance
J
J
k 0
k 0
 (n) q(n, T jk (n))    (T jk (n)) q(T jk (n), n)
J
J


 (n) j    jk    j (T j 0 (n))    (T jk (n))kj
k 1
k 1


•
PICTURE J=2
Blocking in tandem networks of simple queues (3)
•
Simple queues, exponential service queue j, j=1,…,J
•
Suppose queue 2 has capacity constraint: n2<N2
•
Transition rates
q (n, T j , j 1 (n))   j , j  2,..., J
q (n, T1, 2 (n))  11(n2  N 2 )
q (n, TJ 0 (n))   J
q (n, T01 (n))  
•
Partial balance?
•
PICTURE J=2
•
Stop protocol, repeat protocol, jump-over protocol
J
 (n)   (1   j ) j n
n  S  {n : n  0}
j
j 1
J
J
k 0
k 0
 (n) q(n, T jk (n))    (T jk (n)) q(T jk (n), n)
J
J


 (n) j    jk    j (T j 0 (n))    (T jk (n))kj
k 1
k 1


Kelly / Whittle network
•
Transition rates
for some functions
:S[0,
•
),
Traffic equations
 (T j 0 (n))
q (n, T jk (n))   j
p jk
 ( n)
 (T j 0 (n))
q (n, T j 0 (n))   j
p j0
 ( n)
 ( n)
q (n, T0 k (n))  0
p0 k
 ( n)
 j ( j  p jk )  0 p0 k    k k pkj
k 0
k 1
 j ( j )   0 p0 k    k pkj
•
Open network
•
Partial balance equations:
k 1
J
J
k 0
k 0
 (n) q(n, T jk (n))    (Tkj (n)) q(Tkj (n), n)
•
Theorem: Assume B
1
 1


 j
J
   (n)
nS
then
J
 (n)  B (n)
j 1
satisfies partial balance,
j 1
 1


 j




nj
J





nj
 jn
J

 jn  
j
j 1
j
nS
j 1
and is equilibrium distribution Kelly / Whittle network
Interpretation traffic equations
• Transition rates
for some functions
:S(0, ),
 (T j 0 (n))
q (n, T jk (n))   j
p jk
 ( n)
 (T j 0 (n))
q (n, T j 0 (n))   j
p j0
 ( n)
 ( n)
q (n, T0 k (n))  0
p0 k
 ( n)
• Traffic equations
• Open network
 j ( j  p jk )  0 p0 k    k k pkj
k 0
k 1
• Theorem: Suppose that the equilibrium distribution is
J
 (n)  B (n)
j 1
then




J

j 1
j
 (T j 0 (n)) 
E
 j 
j
  ( n) 
and rate jk
• PROOF
 1


 j
nj
 j  jk
 jn
j
nS
• Source
• How to route jobs, and
• how to allocate capacity over the nodes?
•
sink
Optimal design of Kelly / Whittle network (1)
•
 (T j 0 (n))
q (n, T jk (n))   j
p jk
 ( n)
 (T j 0 (n))
q (n, T j 0 (n))   j
p j0
 ( n)
 ( n)
q (n, T0 k (n))  0
p0 k
 ( n)
Transition rates
for some functions
:S[0,
•
),
Routing rules for open network to clear input traffic
0 p0 k
as efficiently as possible
•
Cost per time unit in state n : a(n)
•
Cost for routing jk :
•
Design : b_j0=+ : cannot leave from j; sequence of queues
•
Expected cost rate
b jk
C  A( )   b jk  jk j
j ,k
A( ) 

nS
J
a (n) (n)  j

nS
j 1
J
 (n)  j n
j 1
j
nj
Optimal design of Kelly / Whittle network (2)
• Transition rates
 (T j 0 (n))
q(n, T jk (n))   j
p jk , j, k  0,..., J
 (n)
• Given: input traffic
0 p0 k
• Maximal service rate
 j    jk    j p jk   j
k 0
k 0
• Optimization problem :
C  A( )   b jk  jk j
minimize costs
j ,k
A( ) 
k 0
j
jk
nS
a (n) (n)  j
  (n) 
j 1
   k kj , j  1,..., J
k 0
 j   j , j  1,..., J
 j  0, j  1,..., J
0  1
 jk  0, j  1,..., J , k  0,..., J
0 k fixed
j 1
J
nS
• Under constraints


J
nj
j
nj
Intermezzo: mathematical programming
• Optimisation problem
min f ( x1 ,..., xn )
s.t. g i ( x1 ,..., xn )  bi
i  1,..., m
• Lagrangian L  f ( x ,..., x ) 
1
n
m

i 1
i (bi  g i ( x1 ,..., xn ))
L  b  g ( x ,..., x )  0
i
i
1
n

i
m
g i
L  f 


i
x
x
x
j
j i 1
j
• Lagrangian optimization problem
min L( x1 ,..., xn , 1 ,..., m )
• Theorem : Under regularity conditions: any point
( x1 ,..., xn , 1 ,..., m ) that satisfies Lagrangian
optimization problem yields optimal solution ( x1 ,..., xn )
of Optimisation problem
Intermezzo: mathematical programming (2)
• Optimisation problem
min f ( x1 ,..., xn )
s.t. g i ( x1 ,..., xn )  bi
i  1,..., m
• Introduce slack variables
• Kuhn-Tucker conditions:
m
g i
f
  i
 0, j  1,..., n
x

x
j i 1
j
 i (bi  g i ( x1 ,..., xn ))  0, i  1,..., m
 i  0, i  1,..., m
• Theorem : Under regularity conditions: any point
( x1 ,..., xn )
that satisfies Lagrangian optimization
problem yields optimal solution
of Optimisation problem
• Interpretation multipliers: shadow price for constraint. If
RHS constraint increased by , then optimal objective
value increases by i
Optimal design of Kelly / Whittle network (3)
• Optimisation problem
min C ({ j ,  jk })  A( )   b jk  jk j
j ,k

k 0
j
jk
   k kj  0, j  1,..., J
k 0
 j   j , j  1,..., J
 j  0, j  1,..., J
0  1
 jk  0, j  1,..., J , k  0,..., J
0 k fixed
• Lagrangian form
L C
j 0

k 0
 j ( k kj   j  jk )    j (  jk   j )
   j j 
j 0
j 0

j ,k 0
jk
k 0
 jk
 0   0   0  00  0
• Interpretation Lagrange multipliers :
j 
L
 ( )
0j
 j   L
 j
Optimal design of Kelly / Whittle network (4)
• KT-conditions
L  0, j  1,..., J

j
L  0, j , k  0,..., J

jk

k 0
 j ( k kj   j  jk )  0, j  1,..., J
 j (  jk   j )  0, j  1,..., J
k 0
 j j  0, j  1,..., J
 jk  jk  0, j , k  0,..., J
 j , j ,  j , jk  0
• Computing derivatives:
L  c  
b jk  jk   j j    k  jk   j

j j

k
k
j
L  b           
jk j
j j
k j
j
jk
 jk
1 A( )
cj 
 j  j
Optimal design of Kelly / Whittle network (5)
• Theorem : (i) the marginal costs of input satisfy
 j  c j  min k (b jk   k ), j  1,..., J
0  0
with equality for those nodes j which are used in the
optimal design.
• (ii) If the routing jk is used in the optimal design the
equality holds in (i) and the minimum in the rhs is
attained at given k.
• (iii) If node j is not used in the optimal design then αj =0.
If it is used but at less that full capacity then cj =0.
• Dynamic programming equations for nodes that are used
 j  c j  min k (b jk   k )
0  0
Optimal design of Kelly / Whittle network (6)
• PROOF: Kuhn-Tucker conditions :
c j  j   b jk  jk   j j    k  jk  0
k
(*)
k
and  0 if  j  0
b jk j   j j   k j   j  0
and  0 if  jk  0
(**)
Customer types : routes
•
•
•
•
•
Customer type identified route
Poisson arrival rate per type
Type i: arrival rate (i), i=1,…,I
Route r(i,1), r(i,2),…,r(i,S(i))
Type i at stage s in queue r(i,s)
• Fixed number of visits; cannot use
Markov routing
• 1, 2. or 3 visits to queue: use 3 types
Customer types : queue discipline
• Customers ordered at queue
• Consider queue j, containing nj jobs
• Queue j contains jobs in positions 1,…, nj
• 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.
n

k 1
n

k 1
 j ( k , n)  1
 j ( k , n)  1
 j (n)  0 if n  0
Customer types : equilibrium distribution
• Transition rates
type i job arrival (note that queue which job
arrives is determined by type)
type i job completion (job must be on last stage
of route through the network)
type i job towards next stage of its route
• Notice that each route behaves as tandem
network, where each stage is queue in tandem
Thus: arrival rate of type i to stage s : (i)
Let
 (i ) r (i, s)  j
 j (i, s)  
 0 otherwise
• State of the network:
c j (k )  (t j (k ), s j (k ))
c j  (c j (1),..., c j (n j ))
C  (c1 ,..., c J )
• Equilibrium distribution
nj
 j (c j )  b j 
k 1
J
 j (t j (k ), s j (k ))
 j (k )
 (C )    j (c j )
j 1
Symmetric queues; insensitivity
• 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.
n

k 1
n

k 1
 j ( k , n)  1
 j ( k , n)  1
 j (n)  0 if n  0
 j ( k , n)   j ( k , n)
• Symmetric queue is insensitive
Flows and network:
summary stochastic networks
Contents
1. Introduction;
Markov chains
2. Birth-death processes; Poisson process, simple
queue;
reversibility; detailed balance
3. Output of simple queue;
Tandem network; equilibrium distribution
4. Jackson networks;
Partial balance
5. Sojourn time simple queue and tandem
network
6. Performance measures for Jackson networks:
throughput, mean sojourn time, blocking
7. Application: service rate allocation for
throughput optimisation
Application: optimal routing
• further reading[R+SN]
chapter 3: customer types;
chapter 4: examples
Exercises
• [R+SN] 3.1.2, 3.2.3, 3.1.4.
Exercise: Optimal design of Jackson network (1)
•
Consider an open Jackson network
q (n, T jk (n))   j p jk
with transition rates
q (n, T j 0 (n))   j p j 0
q (n, T0 k (n))  0 p0 k
•
Assume that the service rates
j
and arrival rates
0
are given
•
Let the costs per time unit for a job residing at queue j be
aj
•
Let the costs for routing a job from station i to station j be
b jk
•
(i) Formulate the design problem (allocation of routing
probabilities) as an optimisation problem.
•
(ii) Provide the solution to this problem
Exercise: Optimal design of Jackson network (2)
•
Consider an open Jackson network
q (n, T jk (n))   j p jk
with transition rates
q (n, T j 0 (n))   j p j 0
q (n, T0 k (n))  0 p0 k
•
Assume that the routing probabilities
p jk and arrival rates 0
are given
•
Let the costs per time unit for a job residing at queue j be
aj
•
Let the costs for routing a job from station i to station j be
b jk
•
Let the total service rate that can be distributed over the
queues be
 , i.e.,

j  
j
•
(i) Formulate the design problem (allocation of service rates)
as an optimisation problem.
•
(ii) Provide the solution to this problem
•
(iii) Now consider the case of a tandem network, and provide
the solution to the optimisation problem for the case b
for all j,k
jk
0