Professional Documents
Culture Documents
Spring 2017
Buffer
n m
l
M/D/1/n
Note: m-stage
Erlang (Em) is used
to approximate
deterministic service
time (D).
Copyright © 2017 by K.S. Trivedi 6
Traditional Approach
Step 3-a: Build system of linear equations
(Steady-state solution)
pQ = 0
p1 = 1
where 1 = [1,1, .., 1] T
A PN is a 5-tuple (P,T,I,O,M)
P set of places
T set of transitions
I input arcs
O output arcs
M initial marking
token
t1
p1 p2
p1 – resource idle
p2 – resource busy t2
t1 – task arrives
t2 – task completes
p1 p2
t2
p1 – resource idle
p2 – resource busy p3 – user
t1 – task arrives
t2 – task completes
Copyright © 2017 by K.S. Trivedi 24
The firing rules of a PN
m t k m'
t_fail t_fail
t_repair t_repair
arc multiplicity
inhibitor arcs
priority levels
enabling functions (guards)
high level PN
m k
tk
pj
The transition can fire iff the inhibitor place does not
contain any tokens.
Copyright © 2017 by K.S. Trivedi 42
Petri Net : Inhibitor Arc
.
p1 p2 p1
. p2
t2 m t2 m
Reachability CTMC
graph t1 λ
10 01 10 01
t2 m 54
Copyright © 2017 by K.S. Trivedi
From SPN to CTMC
A Simple Example
λ
PP with rate λ
λ
SPN model
RG = CTMC λ λ λ
0 1 2 .......
λ m
SPN model
RG = CTMC λ λ λ
0 1 2 .......
m m m
Copyright © 2017 by K.S. Trivedi 59
SPN: M/M/1/n Queue (1)
m
M/M/1/n λ
n
n
SPN model
λ m
RG = CTMCλ λ λ
0 1 2 ....... n
m m m
Copyright © 2017 by K.S. Trivedi 60
SPN: M/M/1/n Queue (2)
m
M/M/1/n λ
n
λ m
SPN model
n
RG = CTMC
λ λ λ
0 1 2 ....... n
m m m
Copyright © 2017 by K.S. Trivedi 61
61
Marking dependent firing rate
• A firing rate is associated with each
transition.
• Firing rate of a transition may be marking
dependent.
T
n # Actual firing rate
l of T = nl
λ m
Next consider:
Multiple server M/M/n
Infinite server M/M/
T
• Single server n Rate of T = µ
µ
rateval
T
• Multiple server n Rate of T m µ
m µ
T ratefun
• Infinite server n
# Rate of T = n µ
µ
Copyright © 2017 by K.S. Trivedi
ratedep 66
SPN Availability Model
up
#
m λ
down
up up up
2
# # #
m λ m λ m λ
e(m): #up>=1
2
l(t1) = #p1 * l
ERG CTMC
t2
ERG CTMC
t2
ERG CTMC
u 1-u
m
m(t3) = #P4 m
n m
l(t1) = l
t1 arrival
t3 service
Copyright © 2017 by K.S. Trivedi 80
immediate trans.
GSPN Example: M/M/i/n Queue
Pserver
i
n-i
Tservice
Tarrival tquick
#
λ Pqueue Pservice m
i>0
(ERG):Tarrival tquick Tarrival tquick
0,0,i 1,0,i 0,1,i-1 ... 1,i-1,1 0,i,0
Tservice Tservice tquick
Tarrival
n-i,i,0 n-i,i-1,1 ....... 1,i,0 1,i-1,1
Tservice tquick tquick
Tservice
i>0
(CTMC):l l l l l l
0,0,i 0,1,i-1 ... 0,i,0 1,i,0 ... n-i,i,0
m 2m im im im im
Copyright © 2017 by K.S. Trivedi 82
Measures of Reliability &
Performance
Solving the model means computing the (steady
state/transient/cumulative transient) vector over the state
space (markings). The vector size being equal to the
number of (tangible) markings.
Assumptions
• The failure rate of each processor is
• The repair times are exponentially
distributed with mean 1/
• A processor fault is covered with
probability c
• The reconfiguration times and the reboot
times are exponentially distributed with
mean 1/ and 1/, respectively
n c Dn Dn-1
n n-1 n-2 ............... 1
0
n (1 c) Bn Bn-1
(n 1) (1 c)
j 2 j 2
• Stochastic characteristics
– Allow definition of reward rates in terms of net level entities
– Automatically generate the reward rates for the markings
– Enables computation of required measures of interest
Measures of Interest
Copyright © 2017 by K.S. Trivedi 99
SRN Summary
Place
Timed Transition
Immediate Transition
Inhibit Arc
m m
l mm
SRN of M/E
Copyright by/1/n
© 2017 m Queue
K.S. Trivedi 102
SRN Analysis: Step-2
Reachability Analysis: Automatically Generate ERG
SRN
Specification
Extended
Reachabilty
Graph
Vanishing Marking
Copyright Tangible Marking
© 2017 by K.S. Trivedi 103
SRN Analysis: Step-3
Reachability Analysis: Automatically Generate RG
Extended
Reachabilty
Graph
Eliminate
Vanishing
Marking
CTMC = RG
Traffic in a cell
Copyright © 2017 by K.S. Trivedi 107
Performance Measures: Loss
formulas or probabilities
• When a new call (NC) is attempted in an cell covered by a
base station (BS), the NC is connected if an idle channel is
available in the cell. Otherwise, the call is blocked
• If an idle channel exists in the target cell, the handoff call
(HC) continues nearly transparently to the user. Otherwise,
the HC is dropped
• Loss Formulas
– New call blocking probability, Pb : Percentage of new calls rejected
– Handoff call dropping probability, Pd : Percentage of calls forcefully
terminated while crossing cells
#
lh mo
Handoff-in
Handoff-out
#
lh mo
Handoff-in
Handoff-out
ln + lh ln + lh lh lh
0 1 ... C-g-1 C-g C-g+1 ... C-1 C
mc +mo (C-g)(mc+mo) (C+1-g)(mc+mo) C(mc +mo)
Pd p C
Pb p C g ... p C Call blocking probability
Copyright © 2017 by K.S. Trivedi 116
Reward Rates for the CTMC model
• Rate of handoff-out,
• mean number of calls in the system,
Copyright © 2017 by K.S. Trivedi 117
Loss formulas for wireless
network with hard handoff
Dropping probability
for handoff:
Blocking probability
of new calls:
# 1/MTTF
Repair
C idle_channels
1/MTTR
mc
# 1/MTTF
# mo Repair
C idle_channels
Handoff_out_call
1/MTTR
#
1/MTTF
Copyright © 2017 by K.S. Trivedi 122
WFS Example Revisited as SPNs
2 1
Pwsup Pfsup
mw # Tfsfail Tfsrep
lw lf mf
Twsfail
Twsrep
Pwsdn Pfsdn
Copyright © 2017 by K.S. Trivedi 124
WFS example first SPN
2 1
Pwsup Pfsup
mw # Tfsfail Tfsrep
lw lf mf
Twsfail
Twsrep
Pwsdn Pfsdn
Replace the inhibitor arc by an enabling function (or guard)
Copyright © 2017 by K.S. Trivedi 125
Reachability Graph of the SRN
2100 2001
1110 1011
0120 0021
Pwsfl #
Tfsfl Tfsrp
Pwst
Twsrp
twscv
twsuc
Pwsdn Pfsdn
Copyright © 2017 by K.S. Trivedi 128
Copyright © 2017 by K.S. Trivedi 129
Reachability Graph of the GSPN
wsrp wsrp
mw mw
2lwc lwc
21000 11010 01020
2lw(1-c) lw(1-c)
lf mf lf mf lf mf
#λwsfl λfsfl
Tfsfl Tfsrp
Twsrp Twsfl
μfsrp
μwsrp
Pwsdn Pfsdn
Pwsrp Pfsrp
t1 t0
Immediate Prob.
Transition value
t0 1
t1 1
Prepair
Copyright © 2017 by K.S. Trivedi 134
ERG for the example
Tfsrp
2100001 2000101
Tfsfl t0
2000010
Twsrp Twsfl
Twsfl
1101001
Tfsrp
t1 Twsrp 1001010
1110000 1010100 Twsfl
Tfsfl
Twsrp Twsfl
Twsfl 0002010
0111000 t1 Tfsrp
Tfsfl 0102001
0011100 1001101
Twsrp t0
2100001 2000101
λfsfl 1
2000010
μwsrp 2λwsfl
2λwsfl
1101001
λfsrp
1 μwsrp 1001010
1110000 1010100 λwsfl
λfsfl
μwsrp λwsfl
λwsfl 0002010
0111000 1 μfsrp
λfsfl 0102001
0011100 1001101
μwsrp 1
mf 2lw
2lw mw mw
2
lf 3 7
lw mw lw mw lw
4 lf
lf 5 8
mf
Copyright © 2017 by K.S. Trivedi 138
GSPN Example: M/M/m/b Queue
Pserver
m
b-m
Tservice
Tarrival tquick
#
l Pqueue Pservice m
We assume b > m
ratefun
Copyright © 2017 by K.S. Trivedi 140
Multiprocessor Reliability
Model
• Features of SRN:
– Bipartite graph with two kinds of nodes: places
and transitions
– Timed and immediate transitions
– Inhibitor arc, variable cardinality, guard function,
and priority
– Reward rate based measures
– Fluid stochastic Petri net: fluid places and fluid
arcs
• MOTOROLA
– Recovery strategies in wireless handoff:
– Proposed and modeled several strategies
– Fixed-point iteration used
– Software rejuvenation in CMTS
• IBM
– Software rejuvenation for a cluster system
• Boeing, EMC, NEC, NTT, … …
Copyright © 2017 by K.S. Trivedi 157
SRN CHARACTERISTICS
• Structural characteristics:
– Marking dependency
– Priorities
– Guards
– Resampling policies, for general distributions
– Variable cardinality arcs
• Stochastic characteristics:
– Allow definition of reward rates in terms of net level
entities
– Automatically generate the reward rates for the
markings
Copyright © 2017 by K.S. Trivedi 158
STEPS IN ANALYTIC NUMERIC SOLUTION
OF MARKOVIAN SRN
Stochastic Reward Net
Generates all markings of the SRN by
considering all the enabled transitions in
each marking. Classify the markings as
Tangible and Vanishing markings.
Extended Reachability Graph
Reachabilit
y Graph
Markov
Reward
Model
Numerical
Solution 1 client, 1 server token ring system
Copyright © 2017 by K.S. Trivedi 160
Analytic-Numeric Methods
Extended Reachability Graph (ERG)
sensitivity
steady-state Fast MTTA transient
analysis
solver
IOP_SSMETHOD
Phase-Type Expansion
Non-Homogeneous Markov
SRN (MRM)
(discrete) State space
models non-Markov models ESPN (SMP)
Non-Homogeneous Markov
G am m a g a m v a l( t, v a l1 , v a l2 ) v a l1 = , v a l2 = l
B e ta b e tv a l( t, v a l1 , v a l2 ) v a l1 = a , v a l2 = b
P o is s o n p o is v a l( t, v a l1 , v a l2 ) v a l1 = p , v a l2 = s te p
B in o m in a l b in o v a l( t, v a l1 , v a l2 , v a l3 ) v a l1 = p , v a l2 = q
v a l3 = s te p
N e g a tiv e B in o m in a l n e g b v a l( t, v a l1 , v a l2 , v a l1 = , v a l2 = p ,
v a l3 ) v a l3 = s te p
2 - s ta g e h y p e r v a l( t, v a l1 , v a l2 , v a l1 = l v a l2 = l
H y p e r e x p o n e n tia l v a l3 ) v a l3 = p
3 - s ta g e h y p o v a l( t, v a l1 , v a l2 , v a l3 , v a l1 = n u m s ta g e s
H y p o e x p o n e n tia l v a l4 ) v a l2 ~ 4 = l l
E r la n g e r lv a l( t, v a l1 , v a l2 ) v a l1 = l , v a l= p h a s e
P a r e to p a r v a l( t, k , a lp h a ) f P a r ( x ) = k /( x + k ) + 1
C auchy c a u v a l( t, a lp h a , b e ta )
Copyright © 2017 by K.S. Trivedi 179
Copyright © 2010 by K.S. Trivedi
Fluid Petri Net
Fluid stochastic Petri net (FSPN)
Introduced by K. Trivedi and V. Kulkarni (1993)
Allow both discrete and continuous places
Useful in fluid approximation of discrete queuing system
Powerful formalism of stochastic fluid queueing networks
Boundary conditions complicated. Solution techniques
under investigation.
fplace(“FP1”); inf(“T1”);
fbound(“FP1”, 7.5);
finit(“FP1”, 2.5); diarc(“T2”, “FP2”);
fbreak(“FP1”, 3.0);
Indicate a state
change at x = 3.0 state functions for FSPN:
(a) fmark(“FP1”);
(b) Trivedi
Copyright © 2017 by K.S. fcondition(“FP2”, F_LQ, 3.0);
183
DISCRETE EVENT SIMULATION
• Can be used for:
– Markovian SRN
– non-Markovian SRN (limited extent analytic-numerical
methods exist but not implemented in SPNP)
– Fluid SPN (limited extent analytic-numerical methods
exist but not implemented in SPNP)
• FSPN (Fluid Stochastic Petri net)
Used as a model for:
– Systems involving fluid variables
– Approx. of models with a large number of tokens
• No need to generate the reachability graph
• Possibility to give the number of replications or the desired
relative error. Copyright © 2017 by K.S. Trivedi 184
Execution of SPNP
options()
ReadModel()
6
net() No
Rebuild?
Yes Yes
Simulation? Discrete Event
Simulation BuildReachabilityGraph()
No
bind()
Steady State Accumulative
ac_final()
Rebuild() sensi()
Transient MTTA
Copyright © 2017 by K.S. Trivedi 185
Solution Techniques
SRN Model
• Simulation methods
– Implementation of other general distributions
– Importance sampling (for rare events)
– Sensitivity analysis
– Non-linear FSPNs
– 2nd order FSPNs
IOP_SIM_RUNMETHOD
Regenerative Batch
Independent
Simulation means
Replications
(VAL_REG) (VAL_BATCH)
Regenerative Importance
Regular DES Restart Splitting
Importance Sampling Sampling
(VAL_REPL) (VAL_RESTART) (VAL_SPLIT)
(VAL_ISREG) (VAL_IS)
Copyright © 2017 by K.S. Trivedi 189
Simulation Options Setup
• IOP_SIMULATION=VAL_YES
• IOP_SIM_RUNMETHOD
• IOP_SIM_RUNS
• FOR_SIM_ERROR (when IOP_SIM_RUNS=0)
– run until the error precision is reached
• FOP_SIM_LENGTH: End time of simulation
• FOP_SIM_CONFIDENCE (0.90, 0.95, or 0.99)
• IOP_SIM_CUMULATIVE: for cumulative measures
• FOP_FLUID_EPSILON: precision for fluid place
• FOP_TIME_EPSILON: the smallest time step
Copyright © 2017 by K.S. Trivedi 190
Other Useful Options
• IOP_ELIMINATION
– VAL_REDNEVER: no reduction
– VAL_REDAFTERRG: reduction after RG generation
– VAL_REDONTHEFLY: reduction during RG generation
• IOP_MC
– VAL_DTMC: solve embedded DTMC
• FOP_ABS_RET_M0
– Prob. of ABSORBING STATE INIT STATE
• IOP_SIM_SEED
– Used to replicate simulation results
• IOP_SIM_STD_REPORT: as pr_std_average()
T1
A
T1 C T3
t
B T2
T2
D
T4 Copyright © 2017 by K.S. Trivedi 193
t
Importance Splitting
B3 Note:
Every state
will eventually
B2
return to 0
B1
0
Copyright © 2017 by K.S. Trivedi 194
RESTART Technique
i 1
1
T 0 i (t )1 A (ti )dti