sfm-07:pe, may 31, 2007 bertinoro, italy · fluid cl-fluid (or continuous) places contain a...

152
Fluid models in performance analysis Mikl´osTelek Dept. of Telecom., Technical University of Budapest SFM-07:PE, May 31, 2007 Bertinoro, Italy Joint work with Marco Gribaudo Dip. di Informatica, Universit`a di Torino,

Upload: others

Post on 22-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Fluid models in performance analysis

Miklos TelekDept. of Telecom., Technical University of Budapest

SFM-07:PE,

May 31, 2007

Bertinoro, Italy

Joint work with

Marco GribaudoDip. di Informatica, Universita di Torino,

Page 2: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 1

Outline

1 Motivations

2 Formalisms

2.1 Reward Models

2.2 Fluid Models

2.3 Fluid Stochastic Petri Nets

3 Analytical Description of Fluid Models

3.1 Introduction to Fluid Models

3.3 Transient Behavior

3.3 Transient Description

3.4 Stationary Description

Page 3: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 2

Outline

4 Solution Methods

4.1 Transient Solution Methods

4.2 Steady State Solution Methods

5 Applications

5.1 Peer-to-Peer Transfer Time Distribution

5.2 Pharmaceutical Rroduction system

5.3 Software Systems with Rejuvenation

6 Conclusions and References

Page 4: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 3

1. Motivations

- Conventional modelling techniques have somelimitations due to:

• State space explosion,

• Granularity and size,

• Modelling power limitations,

• Inaccurate distribution approximation.

- Continuous modelling techniques can help (in somecases) to overcome these limitations!

Page 5: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 4

1. Motivations: State space explosion

- The size of the state space of a model generally growsexponentially by increasing its parameters (i.e.increasing the number of costumer in a non-productform queuing network).

- This size can reach very quickly the storage andprocessing capacity of a machine.

- Fluid techniques use additional continuous variableswhich are not part of the conventional state space,leading to smaller sets.

Page 6: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 5

1. Motivations: Granularity and Size

- Many systems are characterized by huge amount ofvery small elements (i.e. the packets in a broadbandrouter, raw parts in a flexible manufactory system).

- Continuous variables may very naturally approximatethese large discrete numbers.

Page 7: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 6

1. Motivations: Modelling power

- In some cases, physical quantities like time,temperature, or speed must be modelled explicitly.

- Conventional modelling technique “discretize” thosequantities by choosing a finite set of possible values.

- Continuous variables can instead exactly model thesequantities.

Page 8: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 7

1. Motivations: Inaccurate

approximations

- Many conventional modelling techniques relay only onExponential distributions and homogeneous Poissionprocesses (i.e. Markov Chains, GSPNs).

- Fluid model can directly embed more complexdistributions and non-homogenous Poission process,without the need of using approximate techniques (likePhase-Type expansion).

Page 9: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 8

2. Formalisms

- Continuous quantities have been introduced inperformance models in many flavors.

- Many high-level and low-level performance evaluationformalisms have been developed to deal with continuousquantities. Here we will consider:

• Reward Models,

• Fluid Models,

• Fluid Stochastic Petri Nets.

Page 10: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 9

2.1. Reward Models

- A Reward Model is a Markov chain in which eachstate has associated a positive quantity called RewardRate.

- Reward is accumulated proportionally to the timespent in a state and to the corresponding reward rate.

- The accumulated reward is unbounded.

Page 11: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 10

2.1. Reward Models

- The Markov Chain that governs the reward is calledthe underlaying Markov Chain.

- It is described by a generator matrix Q, whoseelement qij defines the transition from state i to state j:

qij = lim∆t→0

P{S(t + ∆t) = j|S(t) = i}∆t

, for i 6= j

qij = −∑

k 6=i

qik, for i = j

- S(t) represents the state of the underlaying Markovchain at time t.

Page 12: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 11

2.1. Reward Models

- The reward rate of the state i is denoted by ri, ri ≥ 0.

- They are collected in a diagonal Matrix R, whoseelements [R]ij are such that:

[R]ij = 0, for i 6= j,

[R]ij = ri, for i = j.

Page 13: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 12

2.1. Reward Models

- We denote with X(t) the total reward accumulateduntil time t.

- We set X(0) = 0.

- In this case

X(t) =∫ t

0

rS(u) du.

Page 14: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 13

2.2. Fluid Models

- Fluid Models are an extension of Reward Models.

- The rate associated to each state (called in this caseflow rate or drift) can be positive, negative or zero.

- The accumulated reward is called Fluid Level.

- The Fluid level has at least a lower bound at zero.

- The analysis techniques for Reward and Fluid Modelswill be presented in Part 3 and 4 of this tutorial.

Page 15: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 14

2.2. Fluid Models

- Fluid Models are described by the same parametersused for Reward Models:

- The Transition Rate Matrix Q.

- The Flow Rate Matrix R.

- The Flow Rate Matrix is equivalent to the RewardRate Matrix, without the restriction that its elementsmust be positive.

Page 16: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 15

2.3. Fluid Stochastic Petri Nets

- A Fluid Stochastic Petri Net (FSPN) is anextension of an ordinary Stochastic Petri Net, capableof incorporating continuous quantities.

- Other similar extensions with minor differences are:Continuous Petri Nets and Hybrid Petri Nets. In thistutorial we will not consider such formalisms.

- We will present the basic formalism, intended forstochastic analysis (not simulation).

Page 17: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 16

2.3. Fluid Stochastic Petri Nets

- The modelling primitives that can be used in a FSPNmodel are divided into two categories:

• Discrete primitives,

• Fluid (Continuous) primitives.

Page 18: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 17

2.3. Fluid Stochastic Petri Nets

pi

tkTj

discreteplace

timedtransition

immediatetransition

discretearc

inhibitorarc

tokens

pi

- Discrete primitives are identical to the equivalentprimitives of a Generalized Stochastic Petri Net(GSPN).

Page 19: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 18

2.3. Fluid Stochastic Petri Nets

fluidarcx2

cl

fluidplace

fluid

cl

- Fluid primitives are instead specific for FSPN.

Page 20: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 19

2.3. Fluid Stochastic Petri Nets

- The Discrete Part of a model is the subset of themodel by all and only its discrete primitives.

- The Fluid Part of a model is the subset of the modelcomposed by all and only its fluid primitives.

- It can be easily shown that the Discrete Part of aFSPN is a GSPN.

Page 21: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 20

2.3. Fluid Stochastic Petri Nets

pidiscreteplace

tokens

pi

- Discrete Places contain Tokens.

- The number of tokens contained in a Discrete Placerepresent its Marking.

- The Discrete Marking of a discrete place is a naturalnumber.

Page 22: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 21

2.3. Fluid Stochastic Petri Nets

pidiscreteplace

tokens

pi

- We call Pd the set of discrete places.

- We indicate with pi ∈ Pd an element of this set.

- We denote with mi the discrete marking of place pi.

Page 23: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 22

2.3. Fluid Stochastic Petri Nets

x2

cl

fluidplace

fluid

cl

- Fluid (or Continuous) Places contain a continuousquantity called Fluid.

- This corresponds to the Marking for a Fluid Place.

- The Fluid Marking (Fluid Level) is a non-negative realnumber.

Page 24: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 23

2.3. Fluid Stochastic Petri Nets

x2

cl

fluidplace

fluid

cl

- We call Pc the set of fluid places.

- We indicate with cl ∈ Pc an element of this set.

- We denote with xl the fluid level of place cl.

Page 25: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 24

2.3. Fluid Stochastic Petri Nets

- Markings of Discrete Places are collected in a vector of|Pd| natural numbers, m = (m1, . . . ,m|Pd|).

- Markings of Fluid Places are collected in a vector of|Pc| real numbers, x = (x1, . . . ,x|Pc|).

- The Complete Marking M = (m,x) of the model is theset of both the Discrete and Fluid Markings.

Page 26: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 25

2.3. Fluid Stochastic Petri Nets

- The Marking M = (m,x) evolves in time.

- We denote with mi(t) and xl(t) respectively thediscrete marking of place pi at time t, and the fluid levelof place cl at time t.

- We call M(t) = {(mi(t), xl(t)), t ≤ 0} the stochasticprocess that defines the model evolution (the MarkingProcess).

Page 27: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 26

2.3. Fluid Stochastic Petri Nets

- Places (both Fluid and Discrete) are characterized byan Initial Marking.

- The Initial Marking of a place represents its markingat time t = 0.

- We call it M0 = (m0,x0).

Page 28: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 27

2.3. Fluid Stochastic Petri Nets

Tjtimedtransition

- Timed Transitions represents events that happens withtime.

- They move tokens among the discrete places.

- They move fluid along the fluid places.

Page 29: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 28

2.3. Fluid Stochastic Petri Nets

Tjtimedtransition

- We call Te the set of the timed transitions.

- We address with Tj ∈ Te a transition of this set.

Page 30: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 29

2.3. Fluid Stochastic Petri Nets

- Timed Transitions can be enabled, depending on themarking of the places and on the weights of the discreteand inhibitor arcs that are connected to it.

- When a Timed Transition Tj is enabled, it fires afteran exponentially distributed time.

- We denote with F (Tj , M) the Instantaneous FiringRate of transition Tj in marking M (that is the rateparameter of the exponential distribution of thetransition firing time).

Page 31: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 30

2.3. Fluid Stochastic Petri Nets

- An enabled timed transition Tj changes the marking ofthe discrete places to which it is connected with discretearcs when it fires.

- An enabled timed transition Tj continuously changesthe marking of the fluid places to which it is connectedwith fluid arcs as long as it is enabled.

Page 32: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 31

2.3. Fluid Stochastic Petri Nets

tkimmediatetransition

- Immediate Transitions represents events that happensin zero time.

- They move tokens among discrete places.

- They cannot change the fluid level in continuousplaces.

Page 33: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 32

2.3. Fluid Stochastic Petri Nets

tkimmediatetransition

- We call Ti the set of the immediate transitions.

- We address with tk ∈ Ti a transition of this set.

Page 34: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 33

2.3. Fluid Stochastic Petri Nets

- Immediate Transitions can be enabled, following thesame rules as timed transitions.

- Immediate transitions are characterized by theirWeight, which is used to determine which transition willfire when more than one are enabled at the same time.

- We denote with W (tk,M) the Weight of immediatetransition tk in marking M .

Page 35: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 34

2.3. Fluid Stochastic Petri Nets

- When more than one transition (timed or immediate)are enabled in a marking, a conflict arises.

- The conflict resolution algorithm determines whichtransition actually fires.

Page 36: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 35

2.3. Fluid Stochastic Petri Nets

- If both timed and immediate transitions are enabled ina marking, immediate transitions have priority over thetimed ones (i.e. timed transitions can be ignored).

- Race policy solves conflict among timed transition(whichever fires first).

- Probabilistic decision, based on the transition weights,determines which fires among several immediatetransition concurrently enabled.

Page 37: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 36

2.3. Fluid Stochastic Petri Nets

discretearc

inhibitorarc

- Discrete Arcs and Inhibitor Arcs connect discreteplaces to transitions.

- They determine when a transition is enabled.

- Discrete Arcs also determine what happens when atransition fires.

Page 38: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 37

2.3. Fluid Stochastic Petri Nets

- Each Discrete Arc or Inhibitor Arcs has associated aweight.

- The standard GSPNs: firing rules apply to FSPNs:

• A transition is enabled if all its input places have at least as

many tokens as the weight of the corresponding arc.

• A transition is enabled if all the places to which it is

connected with inhibitor arcs have at most as many tokens as

the weight of the connecting arc, minus one.

• When a transition fires, it removes from its input places and

it puts into the output places as many tokens as the

corresponding connecting arc.

Page 39: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 38

2.3. Fluid Stochastic Petri Nets

fluidarc

- Fluid (continuous) Arcs connect timed transitions tofluid places.

- Each Fluid arc has associated a Flow Rate.

- The Flow Rate is a non-negative real number.

Page 40: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 39

2.3. Fluid Stochastic Petri Nets

fluidarc

- A fluid arc directed form a timed transition to a fluidplace, pumps fluid into the place at a rate equal to thearc’s Flow Rate.

- A fluid arc directed form a fluid place to a timedtransition, removes fluid from the place at a rate equalto the arc’s Flow Rate.

- Fluid flows only when the Timed Transition atbeginning or at the end of the arc is enabled.

Page 41: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 40

2.3. Fluid Stochastic Petri Nets

- When the fluid place becomes empty (its fluid markingreaches zero), the fluid flow stop.

- We denote with R(Tj , cl,M) the flow rate of a fluid arcfrom timed transition Tj to fluid place cl in marking M .

- We use R(cl, Tj ,M) when the arc is directed in theopposite direction (from the place to the transition).

Page 42: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 41

2.3. Fluid Stochastic Petri Nets

- Fluid Stochastic Petri Nets are analyzed bytransforming them into equivalent Fluid Models.

- If the FSPN has a single fluid place, then standard FMcan be applied.

- If the FSPN has more than one fluid place, thenspecial FM with multiple continuous variables must beused.

Page 43: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 42

2.3. Fluid Stochastic Petri Nets

- The Transition Rate Matrix Q and the Flow RateMatrix R can be automatically generated starting fromthe FSPN Model.

- The state space of the FM corresponds to the statespace of the discrete part of the FSPN model.

- Both the state space and the Transition Rate MatrixQ can be calculated applying standard GSPNtechniques to the discrete part of FSPN the model.

Page 44: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 43

2.3. Fluid Stochastic Petri Nets

- The elements of the flow rate matrix can be computedfrom the flow rates of the fluid arcs. If we imagine tohave only one single fluid place cl, then we can define:

ri =∑

Tj∈E(mi)

(R(Tj , cl,mi)−R(Tj , cl,mi))

mi is the discrete marking corresponding to state i, and

E(mi) is the set of timed transition enabled in mi.

Page 45: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 44

2.3. Fluid Stochastic Petri Nets

- Some important extensions have been proposed in theliterature. Two of them are:

• Fluid-dependent transition and flow rates,

• Flush-out arcs.

Page 46: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 45

2.3. Fluid Stochastic Petri Nets

- Both the transition rates of timed transition, and theflow rates associated to the fluid arcs can depend on thecomplete (discrete and continuous) marking of theprocess.

- In this case the underlaying stochastic process shouldbe analyzed using non-homogenous Fluid Models.

- Both the transition rate matrix and the flow ratematrix depend on the fluid part of the model: Q(x),R(x).

Page 47: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 46

2.3. Fluid Stochastic Petri Nets

flush-outarc

- Flush-out arcs are special arcs that connect fluidplaces to timed transition (but not timed transition tofluid places).

- They are drawn using thick lines.

- When a transition fires, the places connected with aflush-out arc are emptied in zero time.

Page 48: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 47

2.3. Fluid Stochastic Petri Nets

flush-outarc

- Despite their simplicity, Flush-out Arcs can beexploited to obtain many interesting effects, likedropping the content of the transmission buffer.

- The underlaying stochastic model is no longer astandard Fluid Model, but it can be analyzed similarlyusing appropriate boundary conditions.

Page 49: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 48

3.1 Introduction to fluid models

Continuous time stochastic processes with

• discrete value (state),e.g. CTMC,

• continuous value,e.g. unfinished work in a queue,

• hybrid (continuous and discrete) value,e.g. unfinished work and the number of customers.

Page 50: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 49

3.1 Introduction to fluid models

General continuous and hybrid valued stochastic processes

are hard to analyze.

But, there are special cases:

• reward models,

• fluid models.

A simple function of a discrete state stochastic process

governs the evolution of the continuous variable.

When the discrete state stochastic process is a CTMC

• Markov reward models,

• Markov fluid models.

We focus on this Markovian case.

Page 51: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 50

3.1 Introduction to fluid models

Reward models: unbounded (non-decreasing) evolution,

Fluid models: bounded evolution.

S(t)

k

i

j

t

t

X(t)

kr

jr

irkr

S(t)

k

i

j

t

t

X(t)

r

irkr kr

j

B

0

Page 52: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 51

3.1 Introduction to fluid models

Classes of fluid models:

• finite buffer – infinite buffer,

• first order – second order,

• homogeneous – fluid level dependent,

• barrier behaviour in second order case

– reflecting – absorbing.

Page 53: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 52

3.1 Introduction to fluid models

Infinite buffer: the continuous quantity is only lower

bounded at zero.

Finite buffer: the continuous quantity is lower bounded at

zero and upper bounded at B.

S(t)

k

i

j

t

t

X(t)

r

irkr kr

j

0

S(t)

k

i

j

t

t

X(t)

r

irkr kr

j

B

0

Page 54: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 53

3.1 Introduction to fluid models

First order: the continuous quantity is a deterministic

function of a CTMC.

Second order: the continuous quantity is a stochastic

function of a CTMC.

S(t)

k

i

j

t

t

X(t)

r

irkr kr

j

B

0

0

1

2

3

4

5

6

7

8

9

1 1.5 2 2.5 3 3.5 4

fluid levelstate

Page 55: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 54

3.1 Introduction to fluid models

Interpretation of second order fluid models.

Random walk with decreasing time and fluid granularity.

CTMC state

Fluid

level

Page 56: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 55

3.1 Introduction to fluid models

Homogeneous: the evolution of the CTMC is independent of

the fluid level.

Fluid level dependent: the generator of the CTMC is a

function of the fluid level.

dX(t) =rdt

S(t)

Q

X(t)

S(t)

X(t)

S(t)

Q(X(t))

dX(t) =rdt

S(t)(X(t))

Page 57: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 56

3.1 Introduction to fluid models

Boundary behaviour of second order fluid models.

Reflecting: the fluid level is immediately reflected at the

boundary.

Absorbing: the fluid level remains at the boundary up to a

state transition of the Markov chain.

t

X(t)

S(t)

k

i

j

t

r=0iσ kr

B

j

>0

<0

t

X(t)

S(t)

k

i

j

t

r=0iσ kr

B

j

>0

<0

Page 58: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 57

3.1 Introduction to fluid models

Interpretation of the boundary behaviours:

CTMC state

Fluid

level

Upper boundary

Reflecting Absorbing

Page 59: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 58

3.2 Transient behaviour of fluid models

- Transient behaviour of first order infinite buffer

homogeneous Markov fluid models,

- Extensions:

• finite buffer,

• second order,

• fluid level dependency.

Page 60: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 59

3.2 Transient behaviour of fluid models

First order, infinite buffer, homogeneous Markov fluid models

During a sojourn of the CTMC in state i (S(t) = i) the fluid

level (X(t)) increases at rate ri when X(t) > 0:

X(t+∆)−X(t) = ri∆ → d

dtX(t) = ri if S(t) = i, X(t) > 0.

When X(t) = 0 the fluid level can not decrease:

d

dtX(t) = max(ri, 0) if S(t) = i, X(t) = 0.

That is

d

dtX(t) =

8<:

rS(t) if X(t) > 0,

max(rS(t), 0) if X(t) = 0.

Page 61: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 60

3.2 Transient behaviour of fluid models

First order, finite buffer, homogeneous Markov fluid models

When X(t) = B the fluid level can not increase:

d

dtX(t) = min(ri, 0), if S(t) = i, X(t) = B.

That is

d

dtX(t) =

8>><>>:

rS(t), if X(t) > 0,

max(rS(t), 0), if X(t) = 0,

min(rS(t), 0), if X(t) = B.

Page 62: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 61

3.2 Transient behaviour of fluid models

Second order, infinite buffer, homogeneous Markov fluid

models with reflecting barrier

During a sojourn of the CTMC in state i (S(t) = i) in the

sufficiently small (t, t + ∆) interval the distribution of the

fluid increment (X(t + ∆)−X(t)) is normal distributed with

mean ri∆ and variance σ2i ∆:

X(t + ∆)−X(t) = N (ri∆, σ2i ∆),

if S(u) = i, u ∈ (t, t + ∆), X(t) > 0.

At X(t) = 0 the fluid process is reflected immediately,

−→ Pr(X(t) = 0) = 0.

Page 63: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 62

3.2 Transient behaviour of fluid models

Second order, infinite buffer, homogeneous Markov fluid

models with absorbing barrier

Between the boundaries the evolution of the process is the

same as before.

First time when the fluid level decreases to zero the fluid

process stops,

−→ Pr(X(t) = 0) > 0.

Due to the absorbing property of the boundary the

probability that the fluid level is close to it is very low,

−→ lim∆→0Pr(0<X(t)<∆)

∆= 0.

Page 64: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 63

3.2 Transient behaviour of fluid models

Inhomogeneous (fluid level dependent), first order, infinite

buffer Markov fluid models

The evolution of the fluid level is the same:

d

dtX(t) =

8<:

rS(t)(X(t)), if X(t) > 0,

max(rS(t)(X(t)), 0), if X(t) = 0.

But the evolution of the CTMC depends on the fluid level:

lim∆→0

Pr(S(t + ∆) = j|S(t) = i)

∆= qij(X(t)) .

The generator of the CTMC is Q(X(t)) and the rate matrix

is R(X(t)).

Page 65: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 64

3.3 Transient description of fluid models

Notations:

πi(t) = Pr(S(t) = i) – state probability,

ui(t) = Pr(X(t) = B, S(t) = i) – buffer full probability,

`i(t) = Pr(X(t) = 0, S(t) = i) – buffer empty probability,

pi(t, x) = lim∆→0

1

∆Pr(x < X(t) < x + ∆, S(t) = i)

– fluid density.

=⇒ πi(t) = `i(t) + ui(t) +R

xpi(t, x)dx.

Page 66: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 65

3.3 Transient description of fluid models

First order, infinite buffer, homogeneous behaviour.

Forward argument:

If S(t + δ) = i, then between t and t + ∆ the CTMC

• stays in i with probability 1 + qii∆,

• moves from k to i with probability qki∆,

• has more than 1 state transition with probability σ(∆).

Page 67: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 66

3.3 Transient description of fluid models

Fluid density:

pi(t + ∆, x) = (1 + qii∆) pi(t, x− ri∆)+X

k∈S,k 6=i

qki∆ pk(t, x−O(∆))+

σ(∆) ,

where lim∆→0 σ(∆)/∆ = 0 and lim∆→0O(∆) = 0.

Page 68: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 67

3.3 Transient description of fluid models

pi(t + ∆, x)− pi(t, x− ri∆) =X

k∈Sqki∆ pk(t, x−O(∆)) + σ(∆) ,

pi(t + ∆, x)− pi(t, x)

∆+ ri

pi(t, x)− pi(t, x− ri∆)

ri∆=

X

k∈Sqki pk(t, x−O(∆)) +

σ(∆)

∆,

∂tpi(t, x) + ri

∂xpi(t, x) =

X

k∈Sqki pk(t, x) .

Page 69: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 68

3.3 Transient description of fluid models

Empty buffer probability:

If ri > 0,

−→ the fluid level increases in state i,

−→ `i(t) = Pr(X(t) = 0, S(t) = i) = 0.

Page 70: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 69

3.3 Transient description of fluid models

If ri ≤ 0:

`i(t + ∆) =

(1 + qii∆)

0@`i(t) +

Z −ri∆

0

pi(t, x)dx

| {z }∗

1A+

X

k∈S,k 6=i

qki∆

0@`k(t) +

Z O(∆)

0

pk(t, x)dx

| {z }O(∆)

1A+

σ(∆) .

Page 71: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 70

3.3 Transient description of fluid models

When x ≤ −ri∆, then

pi(t, x) = pi(t, 0) + xp′i(t, 0) + σ(∆) ,

and

∗ =

Z −ri∆

0

pi(t, x)dx

=

Z −ri∆

0

pi(t, 0)dx +

Z −ri∆

0

xp′i(t, 0)dx +

Z −ri∆

0

σ(∆)dx

= −ri∆ pi(t, 0) +(−ri∆)2

2p′i(t, 0)

| {z }σ(∆)

+ (−ri∆) σ(∆)| {z }σ(∆)

.

Page 72: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 71

3.3 Transient description of fluid models

From which the empty buffer probability:

`i(t + ∆) = (1 + qii∆)�`i(t) −ri∆pi(t, 0) + σ(∆)

�+

X

k∈S,k 6=i

qki∆ (`k(t) +O(∆)) + σ(∆) ,

`i(t + ∆)− `i(t) = qii∆ `i(t)− ri∆pi(t, 0)+

X

k∈S,k 6=i

qki∆ (`k(t) +O(∆)) + σ(∆) ,

Page 73: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 72

3.3 Transient description of fluid models

and

`i(t + ∆)− `i(t)

∆=

− ri pi(t, 0) +X

k∈Sqki (`k(t) +O(∆)) +

σ(∆)

∆,

d

dt`i(t) = −ri pi(t, 0) +

X

k∈Sqki `k(t) .

Page 74: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 73

3.3 Transient description of fluid models

Set of governing equations:

Fluid density:

∂tpi(t, x) + ri

∂xpi(t, x) =

X

k∈Sqki pk(t, x) ,

Empty buffer probability:

if ri <= 0:

d

dt`i(t) = −ri pi(t, 0) +

X

k∈Sqki `k(t),

if ri > 0:

`i(t) = 0.

Page 75: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 74

3.3 Transient description of fluid models

By the definition of fluid density and empty buffer

probability:Z ∞

0

pi(t, x)dx + `i(t) = πi(t) .

In the homogeneous case:

d

dtπi(t) =

X

k∈Sqki πk(t), −→ πi(t) = πi(0)eQt.

Page 76: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 75

3.3 Transient description of fluid models

First order, finite buffer , homogeneous behaviour.

If there is also an upper boundary:

if ri < 0:

ui(t) = 0,

if ri ≥ 0:

d

dtui(t) = ri pi(t, B) +

X

k∈Sqki uk(t).

Page 77: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 76

3.3 Transient description of fluid models

Second order , infinite buffer, homogeneous behaviour.

Fluid density:

pi(t + ∆, x) =

(1 + qii∆)

Z ∞

−∞pi(t, x− u)fN (∆ri,∆σ2

i )(u)du

| {z }∗∗

+

X

k∈S,k 6=i

qki∆ pk(t, x−O(∆))+

σ(∆)

Page 78: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 77

3.3 Transient description of fluid models

Using

pi(t, x− u) = pi(t, x)− up′i(t, x) +u2

2p′′i (t, x) +O(u)3

we have:

∗∗ =

pi(t, x)

Z ∞

−∞fN (∆ri,∆σ2

i )(u)du

| {z }1

−p′i(t, x)

Z ∞

−∞ufN (∆ri,∆σ2

i )(u)du

| {z }∆ri

+

p′′i (t, x)

Z ∞

−∞

u2

2fN (∆ri,∆σ2

i )(u)du

| {z }∆2r2

i +∆σ2i /2=∆σ2

i /2+σ(∆)

+

Z ∞

−∞O(u)3fN (∆ri,∆σ2

i )(u)du

| {z }O(∆)2=σ(∆)

.

Page 79: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 78

3.3 Transient description of fluid models

From which:

pi(t + ∆, x) =

(1 + qii∆)�pi(t, x)− p′i(t, x)∆ri + p′′i (t, x)∆σ2

i /2�

+X

k∈S,k 6=i

qki∆ pk(t, x−O(∆)) + σ(∆) ,

pi(t + ∆, x)− pi(t, x) =

qii∆pi(t, x)− p′i(t, x)∆ri + p′′i (t, x)∆σ2i /2+X

k∈S,k 6=i

qki∆ pk(t, x−O(∆)) + σ(∆) ,

∂tpi(t, x) +

∂xpi(t, x)ri − ∂2

∂x2pi(t, x)

σ2i

2=X

k∈Sqki pk(t, x).

Page 80: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 79

3.3 Transient description of fluid models

Second order , infinite buffer, reflecting barrier ,

homogeneous behaviour.

Boundary condition:

Reflecting barrier −→ `i(t) = 0.

Fluid density at 0:

Z ∞

0

pi(t, x)dx = πi(t)

,∂

∂t

Page 81: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 80

3.3 Transient description of fluid modelsZ ∞

x=0

∂tpi(t, x)

| {z }z }| {−∂pi(t, x)

∂xri +

∂2pi(t, x)

∂x2

σ2i

2+X

k∈Sqki pk(t, x)

dx =∂

∂tπi(t)

| {z }z }| {X

k∈Sqkiπi(t)

−ri

24pi(t, x)

35∞

x=0| {z }−pi(t,0)

+σ2

i

2

24p′i(t, x)

35∞

x=0| {z }−p′

i(t,0)

+X

k∈Sqki

Z ∞

x=0pk(t, x)dx

| {z }πi(t)

=X

k∈Sqkiπi(t)

ripi(t, 0)− σ2i

2p′i(t, 0) = 0

Page 82: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 81

3.3 Transient description of fluid models

First order, infinite buffer, inhomogeneous behaviour .

Fluid density:

∂tpi(t, x) + ri(x)

∂xpi(t, x) =

X

k∈Sqki(x) pk(t, x)

Empty buffer probability:

if ri(0) < 0 (and ri(x) is continuous):

d

dt`i(t) = − ri(0) pi(t, 0) +

X

k∈Sqki(0) `k(t),

if ri(0) > 0 (and ri(x) is continuous):

`i(t) = 0.

Page 83: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 82

3.3 Transient description of fluid models

General case:

Second order , finite buffer , inhomogeneous behaviour .

Differential equations:

∂p(t, x)

∂t+

∂p(t, x)

∂xR(x) − ∂2p(t, x)

∂x2S(x) = p(t, x) Q(x) ,

p(t, 0) R(0) − p′(t, 0) S(0) = `(t) Q(0) ,

−p(t, B) R(B) + p′(t, B) S(B) = u(t) Q(B) ,

where R(x) = Diag〈ri(x)〉 and S(x) = Diag〈σ2i (x)

2〉.

Page 84: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 83

3.3 Transient description of fluid models

General case:

Second order , finite buffer , inhomogeneous behaviour .

Bounding behaviour:

σi = 0 and positive/negative drift: `i(t)=0/ui(t)=0.

σi >0 , reflecting lower/upper barrier: `i(t) = 0/ui(t) = 0.

σi >0 , absor. lower/upper barrier: pi(t, 0)=0/pi(t, B)=0.

Normalizing condition:

Z B

0

p(t, x) dx1I + `(t)1I + u(t)1I = 1.

Page 85: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 84

3.4 Stationary description of fluid models

Condition of ergodicity:

For ∀x, y ∈ R+, ∀i, j ∈ S the transition time

T = mint>0

(X(t) = y, S(t) = j|X(0) = x, S(0) = i)

has a finite mean (i.e., E(T ) < ∞).

Page 86: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 85

3.4 Stationary description of fluid models

Notations:

πi = limt→∞

Pr(S(t) = i) – state probability,

ui = limt→∞

Pr(X(t) = B, S(t) = i) – buffer full probability,

`i = limt→∞

Pr(X(t) = 0, S(t) = i) – buffer empty probability,

pi(x) = limt→∞

lim∆→0

1

∆Pr(x < X(t) < x + ∆, S(t) = i)

– fluid density,

Fi(x) = limt→∞

Pr(X(t) < x, S(t) = i)

– fluid distribution.

Page 87: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 86

3.4 Stationary description of fluid models

First order, infinite buffer, homogeneous behaviour.

Fluid density:

ri∂

∂xpi(x) =

X

k∈Sqki pk(x) .

Empty buffer probability:

if ri <= 0:

0 = −ri pi(0) +X

k∈Sqki `k,

if ri > 0:

`i = 0.

Page 88: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 87

3.4 Stationary description of fluid models

First order, finite buffer , homogeneous behaviour.

Fluid density:

ri∂

∂xpi(x) =

X

k∈Sqki pk(x) .

Boundary equations:8><>:

ri pi(0) =X

k∈Sqki `k, if ri ≤ 0,

`i = 0, if ri > 0.

8><>:

−ri pi(B) =X

k∈Sqki uk, if ri ≥ 0,

ui = 0, if ri < 0.

Page 89: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 88

3.4 Stationary description of fluid models

Second order , infinite buffer, reflecting boundary ,

homogeneous behaviour.

Fluid density:

ri∂

∂xpi(x)− ∂2

∂x2pi(x)

σ2i

2=X

k∈Sqki pk(x) .

Empty buffer probability:

`i = 0.

Boundary equation:

ripi(0)− σ2i

2p′i(0) =

X

k∈Sqki `k = 0.

Page 90: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 89

3.4 Stationary description of fluid models

Second order , infinite buffer, absorbing boundary ,

homogeneous behaviour.

Fluid density:

ri∂

∂xpi(x)− ∂2

∂x2pi(x)

σ2i

2=X

k∈Sqki pk(x).

Empty buffer probability:

pi(0) = 0.

Boundary equation:

−σ2i

2p′i(0) =

X

k∈Sqki `k.

Page 91: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 90

3.4 Stationary description of fluid models

General case:

Second order , finite buffer , inhomogeneous behaviour .

p′(x) R(x) − p′′(x) S(x) = p(x) Q(x) ,

p(0) R(0) − p′(0) S(0) = ` Q(0) ,

−p(B) R(B) + p′(B) S(B) = u Q(B) ,

σi =0 and positive/negative drift: `i = 0/ui = 0.

σi >0, reflecting lower/upper barrier: `i = 0/ui = 0.

σi >0, absorbing lower/upper barrier: pi(0) = 0/pi(B) = 0.

Page 92: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 91

4 Solution methods

Numerical techniques:

reward fluid

differential equations (+) +

spectral decomposition (+) +

randomization + +

transform domain + +

matrix exponent + +

moments + -

Page 93: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 92

4 Solution methods

Transient analysis:

• initial condition ,

• set of differential equations,

• bounding behaviour.

Stationary analysis:

• set of differential equations,

• bounding behaviour,

• normalizing condition .

Page 94: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 93

4.1 Transient solution methods

• Numerical solution of differential equations,

• Randomization,

• Markov regenerative approach,

• Transform domain.

Page 95: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 94

4.1 Transient solution methods

Numerical solution of differential equations (Chen et al.)

All cases.

The approach

• starts from the initial condition, and

• follows the evolution of the fluid distribution in the

(t, t + ∆) interval at some fluid levels based on the

differential equations and the boundary condition.

This is the only approach for inhomogeneous models.

Page 96: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 95

4.1 Transient solution methods

Randomization (Sericola)

First order, infinite buffer, homogeneous behaviour.

F ci (t, x) =

∞Xn=0

e−λt (λt)n

n!

nX

k=0

n

k

!xk

j (1− xj)n−kb

(j)i (n, k),

where F ci (t, x) = Pr(X(t) > x, S(t) = i),

xj =x−r+

j−1t

rjt−r+j−1t

if x ∈ [r+j−1t, rjt), and

b(j)i (n, k) is defined by initial value and a simple recursion.

Page 97: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 96

4.1 Transient solution methods

Properties of the randomization based solution method:

• the expression with the given recursive formulas is a

solution of the differential equation,

the initial value of b(j)i (n, k) is set to fulfill the boundary

condition,

• 0 ≤ xj ≤ 1

−→ convex combination of non-negative numbers

−→ numerical stability,

• the initial fluid level is X(0) = 0.

(extension to X(0) > 0 and to finite buffer is not

available.)

Page 98: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 97

4.1 Transient solution methods

First order, infinite buffer, homogeneous case.

Markov regenerative approach (Ahn-Ramaswami)

Busy/idle period:

interval when the buffer is non-empty/empty.

Ti : the beginning of the ith busy period.

=⇒(S(ti), Ti) is a Markov renewal sequence.

The idle period is PH distributed.

Analysis of a single busy period:

similar analysis as in Matrix geometric models.

Page 99: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 98

4.1 Transient solution methods

First order, infinite/finite buffer, homogeneous case.

Transform domain description (Ren-Kobayashi)

The Laplace transform of

∂p(t, x)

∂t+

∂p(t, x)

∂xR − ∂2p(t, x)

∂x2S = p(t, x) Q ,

is

p∗∗(s, v) = ( p∗(0, v)| {z }initial condition

+ p∗(s, 0)| {z }unknown

R)(sI + vR−Q)−1.

p∗(s, 0) eliminates the roots of det(sI + vR−Q).

Page 100: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 99

4.2 Stationary solution methods

Condition of stability of infinite buffer first/second order

homogeneous fluid models.

Suppose S(t) is a finite state irreducible CTMC with

stationary distribution π.

The fluid model is stable if the overall drift is negative:

d =Xi∈S

πiri < 0.

−→ the variance does not play role.

Page 101: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 100

4.2 Stationary solution methods

• Spectral decomposition,

• Matrix exponent,

• Numerical solution of differential equations,

• Randomization.

Page 102: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 101

4.2 Stationary solution methods

State space partitioning:

• S+: i ∈ S+ iff σi > 0,

second order states,

• S0: i ∈ S0 iff ri = 0 and σi = 0,

zero states,

• S0+: i ∈ S0+ iff ri > 0 and σi = 0,

positive first order states,

• S0−: i ∈ S0− iff ri < 0 and σi = 0,

negative first order states,

• S∗ = S0−SS0+,

first order states.

Page 103: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 102

4.2 Stationary solution methods

First order, infinite/finite buffer, homogeneous case.

Spectral decomposition (Kulkarni)

Differential equation: p′(x) R = p(x) Q ,

Form of the solution vector: p(x) = eλxφ,

Substituting this solution we get the characteristic equation:

φ(λR−Q) = 0,

whose solutions are obtained at det(λR−Q) = 0.

Page 104: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 103

4.2 Stationary solution methods

Spectral decomposition

The characteristic equation has |S0+|+ |S0−| solutions, with

8>><>>:

|S0+| negative eigenvalue,

1 zero eigenvalue,

|S0−| − 1 positive eigenvalue.

From which the solution is: p(x) =

|S0+|+|S0−|Xj=1

ajeλjxφj ,

and the aj coefficients are set to fulfill the boundary and

normalizing conditions.

Page 105: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 104

4.2 Stationary solution methods

Spectral decomposition

In the infinite buffer case these conditions are:

• p(0) R = ` Q ,

• `i = 0 if ri > 0, and

• R∞0

pi(x) + `i = πi.

From which aj = 0 for λj > 0

and the rest of the coefficients are obtained from a linear

system of equations.

Page 106: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 105

4.2 Stationary solution methods

Spectral decomposition

In the finite buffer case these conditions are:

• p(0) R = ` Q , p(B) R = u Q ,

• `i = 0 if ri > 0, ui = 0 if ri < 0, and

• R∞0

pi(x) + `i + ui = πi.

From which the aj coefficients are obtained from a linear

system of equations.

Page 107: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 106

4.2 Stationary solution methods

Consequences:

• If |S0−| = 1

−→ all eigenvalues are non-positive.

• If |S0−| > 1 and the buffer is infinite

−→ special treatment of the positive eigenvalues

−→ spectral decomposition is necessary.

• If the buffer is finite

−→ no need for special treatment of the positive

eigenvalues.

Page 108: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 107

4.2 Stationary solution methods

First order, finite buffer, homogeneous case.

Matrix exponent: (Gribaudo)

Assume that |S0| = 0 and S = S∗.Introduce v = ` + u, Q−, Q+,

where q−ij = qij if i ∈ S− and otherwise q−ij = 0.

The set of equations becomes:

∂p(x)

∂xR = p(x)Q −→ p(B) = p(0) eQR−1B = p(0) Φ,

p(0)R = vQ− −→ p(0) = vQ−R−1,

−p(B)R = vQ+ −→ v(Q−R−1ΦR + Q+) = 0 ,

Page 109: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 108

4.2 Stationary solution methods

Matrix exponent:

And the normalizing condition is

`1I + u1I + p(0)

Z B

0

eQR−1xdx

| {z }Ψ

1I =

v(I + Q−R−1Ψ)1I = 1 .

Page 110: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 109

4.2 Stationary solution methods

Relation of spectral decomposition and matrix exponent:

Assume that |S0| = 0 and S = S∗.The characteristic equation is: φ(λI−QR−1) = 0,

The spectral solution is: p(x) =

|S|Xj=1

ajeλjxφj ,

where λj and φj are the eigenvalues and the left eigenvector

of matrix QR−1.

Page 111: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 110

4.2 Stationary solution methods

Relation of spectral decomposition and matrix exponent:

Introducing a = {aj} and B =

0BB@

φ1

φ2...φ|S∗|

1CCA ,

the spectral solution can be rewritten as:

p(x) =

|S|Xj=1

ajeλjxφj = a Diag〈eλix〉 B

= a B|{z} B−1 Diag〈eλix〉 B| {z }= p(0) eQR−1x,

Page 112: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 111

4.2 Stationary solution methods

Second order, infinite/finite buffer, homogeneous case.

Spectral decomposition (Karandikar-Kulkarni)

Differential equation: p′(x) R − p′′(x) S = p(x) Q ,

Form of the solution vector: p(x) = eλxφ,

Substituting this solution we get the characteristic equation:

φ(λR− λ2S−Q) = 0,

whose solutions are obtained at det(λR− λ2S−Q) = 0.

Page 113: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 112

4.2 Stationary solution methods

Spectral decomposition

The characteristic equation has 2|S+|+ |S∗| solutions, with

8>><>>:

|S+|+ |S0+| negative eigenvalue,

1 zero eigenvalue,

|S+|+ |S0−| − 1 positive eigenvalue.

From which the solution is: p(x) =

2|S+|+|S∗|Xj=1

ajeλjxφj ,

and the aj coefficients are set to fulfill the boundary and

normalizing conditions.

Page 114: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 113

4.2 Stationary solution methods

Second order, infinite/infinite buffer, homogeneous case.

A transformation of the quadratic equation to a linear one

Assume that |S0| = |S∗| = 0 and S = S+.

d

dxp(x) R − d

dxp′(x) S = p(x) Q ,

d

dxp(x) I = p′(x) I ,

d

dxp(x) p′(x)

R I

−S 0= p(x) p′(x)

Q 0

0 I

=⇒ d

dxp(x) R = p(x) Q −→ p(B) = p(0) eQR−1B .

Page 115: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 114

4.2 Stationary solution methods

Numerical solution of differential equations (Gribaudo et al.)

All cases with finite buffer.

Numerically solve the matrix function M(x) with initial

condition M(0) = I based on

M′(x) R(x) − M′′(x) S(x) = M(x) Q(x)

and calculate the unknown boundary conditions based on

p(B) = p(0) M(B)

This is the only approach for inhomogeneous models.

Page 116: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 115

4.2 Stationary solution methods

First order, infinite/finite buffer, homogeneous case.

Randomization (Sericola)

Randomization with simple coefficients:

Fi(x) =

∞Xn=0

e−λt/r (λt/r)n

n!bi(n)

where r = min(ri|ri > 0) and

bi(n) is defined by initial value and a simple recursion.

Applicable only when |S0−| = 1.

Page 117: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 116

5. Applications

- Fluid Models and FSPNs have been successfully usedin the literature to study several interesting systems.

- Here we present three examples:

• Computation of transfer time distribution in P2Pfile sharing applications

• Model of a pharmaceutical production system

• Analysis of software systems with checkpointing andrejuvenation

Page 118: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 117

5.1. Transfer Time in P2P

- Peer-to-Peer has recently emerged has a new paradigmfor building network applications.

- In the last few year, P2P file-sharing applications (likeKazaa, eDonkey, Gnutella) are generating an increasingfraction on today’s Internet.

Page 119: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 118

5.1. Transfer Time in P2P

- In P2P applications, each peer can act both as a clientand as a server.

- In many P2P protocols, a client can be served inparallel by more than one peer.

- The overall application performance is determined bythe number of requests being served by each peer (bothas a client and as a server).

Page 120: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 119

5.1. Transfer Time in P2P

- We design a fluid model to compute the transfer timedistribution of P2P file sharing protocol.

- We make several simplifying assumptions:

• We neglect the search and queueing phase

• We consider only one single source for download

• We imagine that the overall bandwidth dependsonly on band and on the load at both the client andthe server

Page 121: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 120

5.1. Transfer Time in P2P

Uploads

c_peer s_peer

f(.)

Bytes downloaded

Downloads

Uploads

Downloads

- We model both the server and the client with two

independent service queues: one for the uploads, and

another for the downloads. The number of costumers in a

queue represents the load of that particular component.

Page 122: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 121

5.1. Transfer Time in P2P

Uploads

c_peer s_peer

f(.)

Bytes downloaded

Downloads

Uploads

Downloads

- The fluid buffer represents the quantity of byte received by

the client for the request.

Page 123: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 122

5.1. Transfer Time in P2P

- The flow rate in a state depends on the load of thefour independent components in that state. A possibledefinition could be:

f(s) = min{

cb

#cu + #cd + 1,

sb

#su + #sd + 1

}

s = (#cu, #cd,#su, #sd)

where s represents the discrete state of the model, cb

the client bandwidth and sb the server bandwidth.

Page 124: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 123

5.1. Transfer Time in P2P

Downloads @ Server

Uploads @ Server

Downloads @ Client

Uploads @ Client

- The resulting model is a fluid model (a reward model)

whose underlaying Markov chain is the superposition of the

Markov chains of the four queues.

Page 125: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 124

5.1. Transfer Time in P2P

- The model can be solved using transient analysis.

- The obtained solution can be integrated to computethe transfer time distribution.

F (s, t) = P (T (s) < t) = P (F (t) > s) =∫ ∞

s

π(t, x)dx

F (s, t) is the probability that the applicationsuccessfully downloads a file of length s in t time units.

T (s) is the download time of a file of length s.

F (t) is the amount of downloaded data in t time units.

Page 126: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 125

5.1. Transfer Time in P2P

0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 25

F t(t

| sb

, cb,

s, π

0)

Time (sec)

Effects of different s_peer initial states

Initial load = 4Initial load = 3Initial load = 2Initial load = 1Initial load = 0

- The model can then be exploited, for example, to showthe dependency of the transfer time on the initial loadof the server (for short files).

Page 127: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 126

5.1. Transfer Time in P2P

0

0.2

0.4

0.6

0.8

1

0 500 1000 1500 2000 2500 3000 3500

F t(t

| sb

,cb,

s)

Time (sec)

56 Kbps client-like peer

33K56KDSL

CABLET3

0

0.2

0.4

0.6

0.8

1

0 500 1000 1500 2000 2500 3000 3500

Time (sec)

DSL client-like peer

33K56KDSL

CABLET3

F t(t

| sb

, cb,

s)

- Or to show that the speed and the state of the serverare not influent if the client has a very low bandwidth.

Page 128: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 127

5.2. Pharmaceutical production system

- We consider a pharmaceutical production system.

- If the equipment fails during the sterilization process,all the product contained in the buffer must bediscarded.

Page 129: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 128

5.2. Pharmaceutical production system

��

������ �

��

�����

����

��

µ3(x)

- We model the system with an FSPN with flush-outand fluid dependent transition and flow rates.

Page 130: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 129

5.2. Pharmaceutical production system

- The production slows down when the buffer becomesfull (fluid dependent flow rate α(x))

- The probability that the sterilization process failsincreases when the buffer becomes full (fluid dependenttransition rate µ3(x)).

Page 131: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 130

5.2. Pharmaceutical production system

����

�� ���

����

Flow rate Transition rate

α(x) = A1

1 −

1

1 + eB1−x

!+ C1 µ3(x) = A2

1

1 + eB2−x+ C2

Page 132: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 131

5.2. Pharmaceutical production system

��

�����1��

�� � 2

43

�����

- The underlaying fluid model has only four states, butis non-homogenous.

Page 133: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 132

5.2. Pharmaceutical production system

- We can solve the model using transient analysistechniques.

- Then we can integrate the solution in various ways toobtain interesting performance indices.

Page 134: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 133

5.2. Pharmaceutical production system

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0 2 4 6 8 10

x

T=2T=4

T=12T=26

Steady St.

- Buffer distribution: Xmi∈Sd

πi(τ, x1).

Page 135: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 134

5.2. Pharmaceutical production system

0

0.002

0.004

0.006

0.008

0.01

0.012

0 2 4 6 8 10 12

Time

B2=6B2=7B2=8

- Crash probability:

P (crash at τ) =X

mi:m4=1

Z ∞

0

πi(τ, x1)dx1.

Page 136: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 135

5.2. Pharmaceutical production system

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0 2 4 6 8 10 12

Time

B2=6B2=7B2=8

- Mean quantity of product wasted:

Ψ(c1, T3) =X

mi:E(mi)⊇T3

Z ∞

0

x1 πi(τ, x1) µ3(x1) dx1

Page 137: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 136

5.3. Software system with Rejuvenation

- It is now well established that outages in computersystems are caused more due to software faults.

- Cost-effective fault-tolerance techniques are anattractive way to try to cope with the problem.

- Software rejuvenation, self-restoration andcheckpointing are some of such techniques.

Page 138: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 137

5.3. Software system with Rejuvenation

- Rejuvenation restarts the system, making it experiencea downtime equal to the time it takes to clean up theresources.

- Self-restoration does not block completely the system,but it only degrades its performance. However it is lesseffective than rejuvenation.

- Checkpointing saves the state of the system atpredefined interval, in order to reduce the systemrecovery time.

Page 139: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 138

5.3. Software system with Rejuvenation

- In some cases, like Data-base systems, these threetechnique are used together.

- In the literature, most of the models deals only withsome of these techniques - they do not consider all thefeatures together.

- Using FSPN it is possible to design a model capable ofconsidering all these aspects together.

Page 140: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 139

5.3. Software system with Rejuvenation

T1r

c R 1,1 (m)

c1

Degradation

p2 p3

r

T3

F2 (x1,x3)

T2

a

c

RejuvenationWork

R 4,2 (m,x1)

T4

1

c2 c3x3x2

Time

T5

1

c4x4

p11 p10

Self Restoration

F14 (m,x1)

T14

T15

F15 (m,x1)

t13

p6

T8

F8 (x1,x3)

Crash

r

p7

t11

p9

p8

T9

t12c

a

R 1,15 (m,x1)

x1

h

p4 p5

h

T6

F6 (x2,x4)

T7

Checkpoint

r

c

t10

ch rch r

Workload

p1

m

T17

T16

F17 (m,x1)

k

r c

ch r

- The degradation x1, the work x2 and the time (up-time x3, time

since last checkpoint x4) can be represented using fluid places.

Page 141: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 140

5.3. Software system with Rejuvenation

- Models with four fluid places can only be solved usingsimulative techniques (with current technologies).

- Fortunately, for most performance indices, the totalup-time can be ignored, reducing the number of fluidplaces to three.

- By some deeper analysis, it can be shown that two ofthe three remaining fluid places (the work and the timesince last checkpoint) are dependent, so one of them canbe computed as a function of the other.

Page 142: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 141

5.3. Software system with Rejuvenation

T1r

c 1

c1

Degradation

p2 p3

r

T3

F2 (x1)

T2

c

RejuvenationWork

p6

T8

F8 (x1)

Crash

r

t11

p9

p8

T9

x1

h

p4 p5

h

T6

F6 (x2,x4)

T7

Checkpoint

r

c

t10

c

R 4,2 (x1)

c2x2

T4

Time

T5

1

c4x4

ch rch r

- The figure show a model obtained ignoring theexternal load and the self-restoration.

Page 143: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 142

5.3. Software system with Rejuvenation

- A model with two fluid places can be studied usingtransient analysis techniques.

- From the solution, some interesting performanceindices can be integrated.

- For example the probability of the various discretestate can be evaluated for different values of theparameters.

Page 144: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 143

5.3. Software system with Rejuvenation

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

Pr.

time

NormalRejuv.

Checkp.Crash

0

0.2

0.4

0.6

0.8

1

0 500 1000 1500 2000 2500 3000time

NormalRejuv.

Checkp.Crash

- Case where the mean working time is τwork = 200, andthe mean rejuvenation time is τrej = 200.

Page 145: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 144

5.3. Software system with Rejuvenation

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

Pr.

time

NormalRejuv.

Checkp.Crash

0

0.2

0.4

0.6

0.8

1

0 500 1000 1500 2000 2500 3000time

NormalRejuv.

Checkp.Crash

- Case with τwork = 200, and τrej = 400.

Page 146: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 145

5.3. Software system with Rejuvenation

0

0.2

0.4

0.6

0.8

1

0 100 200 300 400 500

Pr.

time

NormalRejuv.

Checkp.Crash

0

0.2

0.4

0.6

0.8

1

0 500 1000 1500 2000 2500 3000time

NormalRejuv.

Checkp.Crash

- Case with τwork = 400, and τrej = 400.

Page 147: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 146

5.3. Software system with Rejuvenation

0.96

0.965

0.97

0.975

0.98

0.985

0.99

0.995

1

0 100 200 300 400 500

Effi

cien

cy

time

ABC

0.96

0.965

0.97

0.975

0.98

0.985

0.99

0.995

1

0 500 1000 1500 2000 2500time

ABC

The efficiency E(t) =Wc(t)

Wc(t) + Wl(t)

Wc(t) represents the average work checkpointed up time t,

and Wl(t) the average work lost.

Page 148: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 147

6. Conclusions

- Stochastic models with continuous variables (Rewardmodels, Fluid models and FSPNs) often allows propermodeling of real systems.

- Their analysis is a more complex than the ones of onlydiscrete variables, but feasible for a wide class of models.

- The analytical description of these models and a set ofsolution techniques have been introduced.

- Some examples of applications demonstrate thepotential use of fluid models in performance analysis.

Page 149: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 148

Additional referencesB. Sericola, B. Tuffin: A fluid queue driven by a Markovian queue. QueueingSyst. 31(3-4): 253-264 (1999)

B. Sericola: A Finite Buffer Fluid Queue Driven by a Markovian Queue.Queueing Syst. 38(2): 213-220 (2001)

S. Ahn and V. Ramaswami. Fluid Flow Models and Queues - A Connection byStochastic Coupling. Stochastic Models, 19(3):325–348, 2003.

Q. Ren and H. Kobayashi, Transient solutions for the buffer behavior instatistical multiplexing, Performance Evaluation 23 (1995), 6587.

V. G. Kulkarni, Fluid models for single buffer systems, Frontiers in Queueing (J.H. Dshalalow, ed.), Probab. Stochastics Ser., CRC, Florida, 1997, pp. 321338.

R. German, M. Gribaudo, G. Horvath, and M. Telek, “Stationary analysis ofFSPNs with mutually dependent discrete and continuous parts,” in International

Conference on Petri Net Performance Models – PNPM 2003, (Urbana, IL, USA),pp. 30–39, IEEE CS Press, Sept 2003.

A. da Silva Soares and G. Latouche. Matrix analytic methods for fluid queueswith finite buffers. Performance Evaluation. 2005

M. Ajmone Marsan, G. Balbo, G. Conte, S. Donatelli, and G. Franceschinis.Modelling with Generalized Stochastic Petri Nets. 1995.

M. Ajmone Marsan, M. Gribaudo, M. Meo, and M. Sereno. On Petri Net-BasedModeling Paradigms for the Performance Analysis of Wireless Internet Accesses.

Page 150: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 149

In Proceeding of Nineth International Workshop on Petri Nets and Performa nce Models 2001,

PNPM’01, pages 19–28, Aachen, Germany, Sep 2001.

H. Alla and R. David. Continuous and Hybrid Petri Nets. Journal of Systems

Circuits and Computers, 8(1), Feb 1998.

D Anick, D. Mitra, and M. M. Sondhi. Stochastic Theory of a Data-HandlingSystem. Bell Sys. Thech. J, 61(8):1871–1894, Oct 1982.

A. Bobbio, S. Garg, M. Gribaudo, A. Horvath, M. Sereno, and M. Telek.Modeling Software Systems with Rejuvenation, Restoration and Checkpointingthrough Fluid Stochastic Petri Nets. In Proc. 8th Intern. Workshop on Petri Nets and

Performance Models, Zaragoza, Spain, Sep 1999. IEEE-CS Press.

G. Ciardo, J. K. Muppala, and K. S. Trivedi. On the solution of GSPN rewardmodels. Performance Evaluation, 12(4):237–253, 1991.

T. Czachorski and F. Pekergin. Diffusion approximation as a modelling tool. InTutorial Papers of the ATM & IP 2000, pages 18/1 – 18/40, Ilkley, UK, Jul 2000.

A. I. Elwalid and D. Mitra. Statistical Multiplexing with Loss Priorities inRate-Based Congestion Control of High-Speed Networks. IEEE Transaction on

Communications, 42(11):2989–3002, November 1994.

S. Garg, A. Puliafito, M. Telek, and K. S. Trivedi. Analysis of preventivemaintenance in transaction based software systems. IEEE Trans. on Computers,47(1):96–107, 1998. Special issue on Dependability of Computing Systems.

R. German. Markov Regenerative Stochastic Petri Nets with general executionpolicies: Supplementary variable analysis and a prototype tool. In In Proc. 10th

Int. Conf. on Modelling Techniques and Tools for Computer Performance Evaluation, pages

Page 151: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 150

255–266. Springer Verlag - LNCS, Vol. 1469, 1998.

M. Gribaudo and R. German. Numerical Analysis of Bounded Fluid Models usingMatrix Exponentiation. In Proceeding of Eleventh GI/ITG Conference on Measuring,

Modeling and Evaluation of Computer and Communication Systems, MMB’01, pages 41–57,Aachen, Germany, Sep 2001.

M. Gribaudo and A. Horvath. Fluid Stochastic Petri Nets Augmented withFlush-out Arcs: a Transient Analysis Technique. In Proceeding of Nineth International

Workshop on Petri Nets and Performa nce Models 2001, PNPM’01, pages 145–154,Aachen, Germany, Sep 2001.

M. Gribaudo and M. Sereno. Simulation of Fluid Stochastic Petri Nets. In Proc. of

MASCOTS’2000, pages 231–239, San Francisco, CA, Aug 2000.

M. Gribaudo, M. Sereno, and A. Bobbio. Fluid Stochastic Petri Nets: AnExtended Formalism to Include non-Markovian Models. In Proc. 8th Intern.

Workshop on Petri Nets and Performance Models, Zaragoza, Spain, Sep 1999.

M. Gribaudo, M. Sereno, A. Bobbio, and A. Horvath. Fluid Stochastic Petri Netsaugmented with Flush-out arcs: Modelling and Analysis. Discrete Event Dynamic

Systems, 11(1 & 2), 2001.

G. Horton, V. G. Kulkarni, D. M. Nicol, and K. S. Trivedi. Fluid stochastic PetriNets: Theory, Application, and Solution Techniques. European Journal of Operations

Research, 105(1):184–201, Feb 1998.

R. J. Karandikar and V. G. Kulkarni. Second-Order Fluid Flow Models: ReflectedBrownian Motion in a Random Environment. Operations Research, 43(1):77–88,1995.

Page 152: SFM-07:PE, May 31, 2007 Bertinoro, Italy · fluid cl-Fluid (or Continuous) Places contain a continuous quantity called Fluid. - This corresponds to the Marking for a Fluid Place

Gribaudo, Telek: Fluid models 151

G. Latouche and V. Ramaswami. Introduction to Matrix Geometric Methods in Stochastic

Modeling. ASA-SIAM Series on Statistics and Applied Probability. SIAM,Philadelphia PA, 1999.

P. A. W. Lewis and G. S. Shedler. Simulation of nonhomogeneous Poissonprocesses by thinning. Naval Research Logistic Quarterly, 26:403–414, 1979.

D. Mitra. Stochastic Theory of a Fluid Model of Producers and Consumers. Adv.

Appl. Prob., 20:646–676, 1988.

C. Moller and C. Van Loan. Nineteen Dubious Ways to Compute the Exponentialof a Matrix. SIAM Review, 20(4):801–836, Oct 1978.

B. Sericola. Transient analysis of stochastic fluid models. Performance Evaluation,1(32):245–263, May 1998.

K. Trivedi and V. Kulkarni. FSPNs: Fluid Stochastic Petri nets. In Application and

Theory of Petri Nets 1993, Proc. 14th Intern. Conference, LNCS, Chicago, USA, June1993. Springer Verlag.

K. Wolter. Second order fluid stochastic petri nets: an extension of gspns forapproximate and continuous modelling. In Proc. of World Congress on System

Simulation, pages 328–332, Singapore, Sep 1997.

K. Wolter. Jump Transitions in Second Order FSPNs. In Proc. of MASCOTS’99,Washington, DC, Oct 1999.

R. Gaeta, M. Gribaudo, D. Manini, and M. Sereno. Analysis of ResourceTransfers in Peer-to-Peer File Sharing Applications using Fluid Models, to appearin Performance Evaluation, 2005