G-networks with propagating resets via RCAT
Peter Harrison Department of Computing Imperial College London Email:
[email protected]
Proposition 1 The reversed process of a stationary Markov process with generator matrix Q and stationary probabilities p is a stationary Markov process with generator matrix Q’ defined by q’ij = πjqji/πi A product-form solution can then be written down by appropriate enumeration of connected states • Applies to any Markov chain • But how do we find the matrix Q’ without the sought after π ? MAMA 2003
Reversed Compound Agent Theorem (RCAT) • Informal statement: Under appropriate conditions, the reversed process of a co-operation between two components is the co-operation of the reversed components – with appropriate assignment of rates to the active reversed actions – original conditions can be relaxed – possible to consider multiple co-operations MAMA 2003
Let the subsetof action types in a cooperation set L which are passivewith respectto a processP be denotedby P P (L) and the subsetof corresponding active actiontypesby A P (L) = L n P P (L). Assumingthat thesetof outgoing, and setof incoming,synchronisingactionsin any stateof each component contains at mostoneof each type in L, the ReversedCompound Agent Theorem of [5] statesthe following:
Conditions of RCAT
Theorem 2 (Reverse d CompoundAgent) Supposethatthecooperation P L Q has a derivationgraph with an irreducible subgraph G . Given that 1. everypassiveactiontype in L is alwaysenabled (i.e. enabled in all states of thetransition graph); 2. everyreverse d actionof an activeactiontype in L is alwaysenabled; 3. everyoccurrence of a reverse d action of an activeaction type in A P (L) (respectivelyA Q (L)) has thesameratein P (respectivelyQ).
5
Reversed Process the reverse d agentP graph G , is
L
Q, with derivationgraph containingthe reverse d sub-
R f(a; pa ) √ (a; >) j a 2 A P (L)g
L
Sf (a; qa ) √ (a; > ) j a 2 A Q (L)g
where R
=
P f > a √ x a j a 2 P P (L)g
S =
Qf> a √ x a j a 2 P Q (L)g
f x a g are thesolutions(for f> a g) of theequations > a = qa
a 2 P P (L)
> a = pa
a 2 P Q (L)
and pa (respectivelyqa ) is thesymbolic rate of actiontype a in P (respectively Q).
How is it applied in practice? • Check enabling conditions for each co-operating action in each process P and Q • From P construct P´ (R in the theorem) by setting the rate of each passive action a to xa ; similarly construct Q´ • Reverse P´ and Q´ to give P and Q • Denote the (symbolic) reversed rate in P of active action types a in P by λa ; similarly for Q.
• Solve the equations xa = λa
• Construct P´* by making passive those actions a that were active in P (setting their the reverse d agentP Q,similarly with derivationgraph containingthe rever rates to ‘top’); construct Q´* L graph G , is
the reverse d agentP Q, P (a;L >) Qj awith Q´* R• f(a; pa ) √ 2=Aderivationgraph (L)g L Sf (a; qacontainingthe ) √ (a; > ) j a 2rever A Q (L PP´* graph G , is where R f(a; pa ) √ (a; >) j a 2 A P (L)g L Sf (a; qa ) √ (a; > ) j a 2 A Q (L R = P f > a √ x a j a 2 P P (L)g
General network of two queues External arrivals and departures at both nodes • flow from each node to the other • symetrical
µ1
λ1
λ2
p1 2
µ2
1−p1 2
p2 1
1−p2 1
First we need to study a queue with multiple arrival streams and multiple departure channels MAMA 2003
Multiple input-output M/M/1 queues p1 λ1 m arrival streams
p2
λ2 •
n departure streams •
µ •
•
•
•
λm pn
As far as the queue length is concerned, the reversed process is any other M/M/1 queue with service rate µ, n inputs and m outputs, so long as the total arrival rate is λ = λ1+...+λm MAMA 2003
Reversed multi I-O queue Reversed queue has arrival rate λ spread across the reversed outputs in proportion to the channel selection probabilities Similarly, the reversed queue’s output channel selection probabilities are proportional to the arrival rates in the forward queue This gives the following multi I-O queue MAMA 2003
Reversed multi I-O queue (2) µλ 1 /λ m departure streams
λp 1
µλ 2 /λ
n arrival streams
λp 2
•
• µ
•
•
•
•
µλ m /λ
MAMA 2003
λp n
General pair of queues (2)
A PEPA agent to describe the two queues is verse d agentP derivationgraph d sub P0 L Q, Q0 with where L={a1,a2): containingthe reverse
G , is
• Pn = (e1,λ1).Pn+1 (n >= 0) • Pn = (a1,⊥1).Pn+1 (n >= 0) f(a; pa ) √ (a; >) j a 2 A P (L)g L Sf (a; qa ) √ (a; > ) j a 2 A Q (L)g • Pn = (d1,(1-p12)µ1).Pn–1 (n > 0) • Pn = (a2,p12µ1).Pn–1 (n > 0) • Qn = (e2,λ2).Qn+1 (n >= 0) • QRn = =(a2,⊥P2).Q (n >= 0) f >n+1 a √ x a j a 2 P P (L)g • Qn = (d2,(1-p21)µ2).Qn–1 (n > 0) S = Qf> a √ x a j a 2 P Q (L)g • Qn = (a1,p21µ2).Qn–1 (n > 0)
re thesolutions(for f> g) of theequations a MAMA 2003
General pair of queues (3) The state transition graph is a collection of ‘triangles’ of the form: i,j+1
λ2
p 1 2 µ1
(1−p2 1)µ2 λ1
i,j (1−p1 2)µ1
MAMA 2003
p 2 1 µ2
i+1,j
The reversed process Applying the RCAT, we solve the pair of equations • •
⊥1 = (λ2+⊥2)p21 ⊥2 = (λ1+⊥1)p12
These are precisely the traffic equations for the internal flows : vi = ⊥i + λi where vi is the total visitation rate at node i = 1, 2 The solution to the RCAT equations is ( λ 2 + λ 1 p1 2 ) p2 1 ⊥1 = 1− p1 2 p 2 1 MAMA 2003
(λ 1 + λ 2 p2 1)p1 2 ⊥2 = 1 − p1 2 p2 1
The reversed process (2) This gives the reversed agent with transition graph built from triangles of the form: i,j+1
(1−p1 2)v2 (1− λ 1 /v 1 )µ1 (1− λ 2 /v 2 )µ2 µ2 λ 2 /v 2 (1−p2 1)v1 i,j
i+1,j µ1 λ 1 /v 1
PEPA specification comes directly grom RCAT MAMA 2003
Jackson’s Theorem An M-node network with visitation rate vi and service rate µi at node i has equilibrium nonnormalised probability for state n : v ni π (n1 ,..., nM ) = ∏ i i =1 µ i M
Applies to open and closed networks Easily extended to non-constant service rates But not to non-constant arrival rates –– WHY? MAMA 2003
R-CAT applies to G-Networks Passive negative arrivals are ‘always enabled’ if they have no effect on an empty queue Active departure actions are incoming to every state (‘always enabled’ in reversed process) Constant reversed rate for negative departures • Fixed proportion of constant arrival rate
Easily extended to triggers • Positive: as in Gelenbe’s result • Negative: propagation of negative arrivals
Resets • Two variants • Require geometric equilibrium probabilities at reset-queues MAMA 2003
A reset queue i
• Based on simple B-D process of M/M/1 queue
2
• Add ‘resets’, transitions from state 0 caused by a trigger arriving to an empty queue
1
0
• Can there be a reset leading to an empty queue? – An invisible transition
Passive reset-queue • Passive trigger actions are enabled in every state: – Departure from non-empty states – Reset in ety state
• So RCAT applies if a reset-queue does not participate actively in any co-operation
Active departures • If departures from non-empty queues participate actively in a co-operation: – Every state has an incoming active action – But we need their reversed rates to be the same (third condition)
• Similarly for triggers in non-empty states
uence, P 3; P(: : ; P n resp ectiv ely . Henceforth, w eassume left-asso c iati 4; :: :: ((P 1 f a g P 2) f a g P 3) : : :) f a g P n it thebrackets. The following extensionof R CAT appliesto such mul perations: of the successiv e cooperationsP P , (P P ) P , : : :, de1
2
1
2
3
Condition for equal reversed rates f ag
f ag
f ag
πº i cooperatewith the next agent in ents, in which a is active, that can ce, P 3; P 4; : : : ; P n respectively. Henceforth, weassumeleft-asso ciativity º i° 1 ebrackets. The following extensionof R CAT appliesto such multi• Reversed rate of an active departure in state tions: Networks with reset queues
i > 0 is:
πº i negative arrivals to a statei > 0 caus era generalisedqueuein which º i ° 1 triggeror deletion,but a negative arriv onto statei ° 1, i.e. a normal e0 causesa transitionto statej ∏ 0 with probability º j , theequilibriu • with For this bequeues constant require local geometric works ilit y forstatej ∏reset 0.to Then it canbe we shown, forexampleby directsolut alanceequations, that queue length probabilities equilibrium generalised queuein which negative arrivals to a statei > 0 causea o statei ° 1, i.e. a normal a negative arrival º j triggeror = (1° Ω1deletion,but )Ωj1 ausesa transitionto statej ∏ 0 with probability º j , theequilibrium + rates of negativ e arrivals, where Ω1 = ∏+1 =π1 and ∏ forstatej ∏ 0. Then it canbe shown, forexampleby directsolution 1 is the exter ve) arrival rate. Queuessimilar to this were consideredby Gelenbe a nceequations, that
nd passive in P 2; P 3; : : : ; P n (n ∏ 2). This is described by the ultsof thecooperation: successiv e cooperationsP 1 P 2, (P 1 ive multiple f ag
f
Gelenbe-Fourneau Resets agents, in which e, that can (: : : ((P 1a isPactiv ) P ) : : :) P n cooperatew 2 3 ence, P 3; P 4; : : : ; P n respectively. Henceforth,weas • successiv These doe not allow resets1 to an ultsof the cooperationsP P 2empty , (P 1 queue P 2) P 3, : : t thebrac kets. The follo wing extension of R CAT a transitions above) andcooperatewith a reset to statethe I next age wagents, in (red which a is active, that can erations: uence, P 3; P 4>; :0: :occurs ; P n resp ectiv ely. Henceforth,weassumeleft-asso ci with probability f ag
f ag
f ag
f ag
f ag
f ag
t thebrac The following extension of then R CAT appliesto such m • kets. Equilibrium probabilities are πº i perations:
geometric with
+
°
∏ +∏ Ω1 = π + ∏°
º i°
1
Networks with reset queues
• RCAT applies and G-F product-form Networks withthen reset queues
ra generalised which negativ e arrivals to follows queuein (MAMA 2001, Performance 2002) era generalisedqueuein which negative arrivals to a statei > 0 ca onto statei 1, ai.e. a normal onto statei ° 1,° i.e. normal triggerortriggeror deletion,butdeletion,b a negative a
Active resets • Without the red transition, there is no reset transition incoming to state 0, so the second RCAT condition fails • Hence resets cannot participate actively in a G-F network, i.e. cannot cause transitions in other queues like triggers and normal departures • With the red transition (allowing a reset to an empty queue), we can have active resets …..
(: : : ((P 1
f ag
P 2) f a g P 3) : : :) f a g P n
ultsof the successiv e cooperationsP 1 f a g P 2, (P 1 f a g P 2) f a g P agents, inActive which a is active,with that can resets redcooperatewith transition the nex ence, P 3; P 4; : : : ; P n respectively. Henceforth,weassumeleft-a t thebrac kets. The follo wing extension of R CAT appliesto su • The local equilibrium queue length erations: probabilities are now: ∏+ Ω2 = π -
(independently of the negative arrival rate λ ) Networks with reset queues
ra generalisedqueuein which negative arrivals to a statei > • RCAT and product-form follow onto statei ° 1, i.e. a normal triggeror deletion,but a negat 0 causesa transitionto statej ∏ 0 with probability º j , theeq
Example ν c = a+b (negative trigger) b (reset) λ
µ1
d (departure)
p
µ2
1−p
a (positive trigger)
• External negative arrivals to queue 1, rate ν • Triggers from queue 2 to queue 1 – resets cause another negative trigger to queue 2 – triggers to non-empty queue 1 cause positive arrivals
et(type b), which causesa seconddeparturefrom que h probability p, this will generatea triggerat queue1 esultedin a non-empt y queue(with probabilit y Ω ) a 1 Application of RCAT wise.In thelattercase,theremay be a furtherdeparture
• Solving the equations corresponding to the g R CAT tofour thepassive reset-queue, actions a,this b, c,time d wewe getobtain:
xd xa
= =
xb = xc
=
Ω1π1 Ω1(x c + ∫) (1° Ω1)(x c + ∫) pπ2(x a + x d ) π2 + x b
∏=π , with product-formsolutionº
= (1° Ω )(1° y)Ω
needsto be modiØed,giving: (x a + x d )(pπ2 + rx b) xc = 2 + xb Product-form πsolution
erex a ; x b; x d ; Ω1 are deØnedas above. The product-formsoluti = (1° Ω1• )(1° y)Ωi1yjProposition where,again consideringexternaldepart Applying 1 gives the productension2, form π2(1° p)(x a + x d ) ix a j+ x d = º ijy == (π (1° Ω )(1° y)Ω y 2 1 + x )π (1° p) π 2 b 2 2 + xb
vingfor x c, where we obtainthe quadratic: y = xc/pµ eringexternaldeparturearcsin 2 and
dimension2,
(∏+ Ω1(∫ + x c))(π2p + r(1° Ω1)(∫ + x c)) x c = (1° p)x c x x + x c a d π + (1° Ω )(∫ + x ) 2 1 c y= = =
p(1° p)π pπ π 2 2 2 + xb ch has exactlyonepositive root. The value for y thenfollows via a quadratic woth exactly one positive root
we obtain
π2p + r∫(1° Ω1))y
A new Reset Theorem
Theorem 1
An M -node,ergodic G-networkwithservice rateπi , externalpositivearrival rate ∏+i and externalnegativearrival rate∏°i at node i (1 ∑ i ∑ M ), routingprobability matricesP + and P ° , standard triggeringprobabilitymatricesQ + and Q ° and reset-triggering probability matrices R + and R ° for positiveand negative customersrespectively,has equilibrium probability for statek = (k1; : : : ; kM ) º k / yik i where vi+ vi+ yi = ; πi πi + vi° for non-reset,resetnodesrespectivelyand thevisitationratesat each nodei , vi+ and vi° , are theuniquesolutionof theequations X X X + + + ° + vi = ∏i + yj πj pj i + yj vj qj i + (1° yj )¢ j vj° r j+i j
vi°
=
∏°i
+
X
j
j
yj πj p°j i
+
X
j
j
yj vj°
qj° i
+
X
j
where ¢ j = 1 if node j has resetsand ¢ j = 0 if not.
(1° yj )¢ j vj° r j° i
Conclusion • New product-form (I think) • Non-trivial demonstration of the RCAT approach • Future work: – Mechanisation – Multi-agent RCAT – Non-active-passive co-operations, cf. PEPA