• No se han encontrado resultados

On State Space Decomposition for the Numerical Analysis of Stochastic Petri Nets

N/A
N/A
Protected

Academic year: 2023

Share "On State Space Decomposition for the Numerical Analysis of Stochastic Petri Nets"

Copied!
10
0
0

Texto completo

(1)

On state space decomposition for the numerical analysis of stochastic Petri nets



Carlos J. P´erez-Jim´enez and Javier Campos

Dpto. de Inform´atica e Ingenier´ıa de Sistemas, Universidad de Zaragoza Mar´ıa de Luna 3, 50015, Zaragoza, Spain

E-mail: cjperez,jcampos@posta.unizar.es

Abstract

Net-driven decomposition techniques are considered in this paper in order to reduce the state explosion problem for the computation of performance indices of stochastic Petri nets. Basically, the idea is to represent (or partially rep- resent) in a decomposed manner the reachability graph of the model so it can be used for exact and/or approximated performance analysis. In that way, the complete storing of the graph is avoided and, for the case of approximate analy- sis, the solution of the isomorphous continuous time Markov chain is substituted by the solution of smaller components.

The techniques are applied to a couple of non-trivial mod- els.

1. Introduction

One of the major drawbacks for the use of stochastic Petri nets (SPN’s) [9] in performance evaluation of real sys- tems is probably the state explosion problem. This paper tries to contribute to the solution of that problem propos- ing some ideas and techniques for a net-driven decomposi- tion of the reachability graph (RG) of the original system, leading to the generation of the continuous time Markov chains (CTMC’s) associated to several smaller submodels whose solution can be combined for an approximated per- formance analysis. An iterative response time approxima- tion algorithm is the technique selected here for the combi- nation of the solutions of the (CTMC’s of the) submodels in order to approximate the steady-state throughput of transi- tions (number of firings per time unit) in the original model (provided that such steady-state behaviour exists). How- ever, one of the techniques that will be presented gives an exact decomposed representation of the RG of the original system, therefore it could be useful also for exact perfor- mance analysis.

Previous works in the same direction by the authors and other (co-)authors are [1, 11, 12, 10] in the framework of

This work has been developed within the project TAP98-0679 of the Spanish CICYT.

approximate throughput computation for particular net sub- classes and [2] in the framework of tensor algebra-based exact solution of general SPN’s. Other related work is [4].

We assume that the reader is familiar with concepts and notation of

P=T

nets [6] and SPN’s [9]. The paper is or- ganised as follows. In section 2, we review a decompo- sition technique for general stochastic Petri nets that was proposed and applied to the exact solution of the under- lying CTMC in [2]. For our purpose, that decomposi- tion technique has a main problem: the derived subsys- tems may be non-ergodic (thus, the solution of their un- derlying CTMC’s could make no sense). In section 3, we solve the mentioned problem by presenting a very sim- ple technique to build ergodic CTMC’s from the subsys- tems. Even though that technique allows to compute a (meaningful) solution in all cases, in some situations the result may be not very accurate due to the inclusion of spurious states in the submodels that do not correspond to actual ones in the original system and to the ‘inade- quate aggregation’ of different states of the original sys- tem into the same state in the subsystems. For solving more accurately those cases, we present in section 4 a structured view of the RG of the original model that al- lows to compute and store it in a decomposed manner.

In section 4.1, the decomposed representation of the RG is used to eliminate all the spurious states, while in sec- tion 4.2 the aggregation of states not connected by in- ternal transitions is avoided. The structured view of the RG of the original model presented in section 4 is ap- plied here to derive approximated values of throughput but it could be also an alternative technique to the ten- sor algebra-based solution presented in [2] for exact analy- sis, since it is based on the construction of an exact de- composed representation of the RG of the model. In section 5, an iterative response time approximation algo- rithm (similar to that presented in [1]) is explained as well as an example of application to a couple of non-trivial models. Some concluding remarks are stressed in sec- tion 6.

(2)

2. Structural decomposition of PN systems and two-level abstract views

In this section, we review a decomposition technique for general PN systems that was proposed in [2] in the framework of tensor algebra-based exact solution of SPN’s.

See [2] for the details.

2.1. Structured view of PN's (net level)

An arbitrary PN system can always be observed as a set of modules (disjoint simpler PN systems) that asynchro- nously communicate by means of a set of buffers (places).

Definition 1 (SAM) [2] A strongly connected PN system,

S=h

P

1[

:::

[

P

K[

B;T

1[

:::

[

T

K

; Pre ; Post ; m

0i, is

a System of Asynchronously Communicating Modules, or simply a SAM, if:

1.

P

i\

P

j=;for all

i;j

2f1

;:::;K

gand

i

6=

j

;

2.

T

i\

T

j =;for all

i;j

2f1

;:::;K

gand

i

6=

j

;

3.

P

i\

B

=;for all

i

2f1

;:::;K

g;

4.

T

i=

P

i[

P

ifor all

i

2f1

;:::;K

g.

The net systems hNi

; m

0ii =h

P

i

;T

i

; Pre

i

; Post

i

; m

0ii

with

i

2 f1

;:::;K

g are called modules of S (where

Pre

i,

Post

i, and

m

0i are the restrictions of

Pre

,

Post

,

and

m

0to

P

iand

T

i). Places in

B

are called buffers. Tran- sitions belonging to the setTI=

B

[

B

are called inter- face transitions. Remaining ones((

T

1[

:::

[

T

K)nTI)are

called internal transitions.

(a)

P11

B1

B2

B3

B4 P22

P21

P23 P14

P12 P13

I11

I12

I13

I14

I21

I22 T21

T22

I23

I24 T11

T12

H21 H11

(b)

P11

B1

B2

B3

B4 P14

P12 P13

I11

I12

I13

I14

I21

I22

I23

I24 T11

T12

H21 H11

Figure 1. (a) A SAM and (b) its LS1.

A SAM with two modules (the subnets generated by nodes whose tag starts with

P

i or

T

ifor

i

=1

;

2) and four

buffers (

B

1,

B

2,

B

3,

B

4) is depicted in Fig. 1.a.

All the strongly connected PN systems belong to the SAM class with the only addition of a structured view of the model (either given by construction or decided after obser- vation of the model). Many structured views are possible, ranging from the extreme consideration of each transition as a different module (all the places being buffers) to consider that the system is a single module (and there are no buffers).

With respect to timing interpretation, we assume that in- dependent, exponentially distributed random variables are associated to the firing of transitions with single-server se- mantics as in classical SPN’s [9]. The techniques presented in this paper can be easily extended to infinite-server se- mantics. We suppose that a unique steady-state behaviour exists to compute steady-state performance indices of the model. Even more, we restrict to structurally live, struc- turally bounded (therefore consistent and conservative) and reversible (therefore ergodic) PN systems.

2.2. Reduction rule and abstract views

In [2], the reduction rule that follows has been intro- duced for the internal behaviour of modules of a SAM.

Each module is decomposed into several pieces and each piece is substituted by a set of new special places called marking structurally implicit places (MSIP’s). Later, using that reduction, the original model can be decomposed into a collection of low level systems (LSi with

i

=1

;:::;K

)

and a basic skeleton (BS). In eachLSi, only one module is kept while the internal behaviour of the others is reduced.

In [2], the LSi and theBS are used for a tensor algebra- based exact computation of the underlying CTMC. In this paper, we adapt the decomposition for a non-exact but more efficient approximate analysis.

Definition 2 [2] LetS=h

P;T; Pre ; Post ; m

0ibe a SAM

with

P

=

P

1[

:::

[

P

K[

B

and

T

=

T

1[

:::

[

T

K. The

equivalence relation

R

is defined on

P

n

B

by:h

p;p

0i2

R

for

p;p

0 2

P

i iff there exists a non-directed pathinNi

from

p

to

p

0 such that \TI = ;(i.e., containing only internal transitions). The

r

(

i

)different equivalence classes defined in

P

i with

i

= 1

;:::;K

by the relation

R

are de-

noted as

P

ijwith

j

=1

;:::;r

(

i

).

The next step is to define and compute the sets of MSIP’s needed for the reduction process.

Definition 3 [5] LetN be a net and

p

be a place with in- cidence vector

l

p =

C

[

p;

]. The place

p

is a MSIP inN if there exists

y



0

such that

y

[

p

]=0and

l

p=

y



C

. The set

of places ink

y

kare called implying places of

p

(wherek

y

k,

called support of

y

, is the set of non-zero components of

y

).

An algorithm for the computation of a set

H

ijof MSIP’s

for each equivalence class

P

ijdefined in a module by means of relation

R

was proposed in [2]. The basic idea is to consider all the MSIP’s

p

y derived from the minimal

(3)

P

-semiflows

y

of the subnet induced by

P

ij (i.e.,

p

y is the

place with incidence vector

l

py =

y



C

, where

y

is such

that

y



C

[

P

ij

;T

ij]=0

; y

0,

y

has minimal support).

A place is implicit, under interleaving semantics, if it can be deleted without changing the firing sequences. Each MSIP of

H

ij added toN needs an initial marking for mak- ing it implicit. In [5], an efficient method for computing such marking is presented.

The next step for the definition of theLSiand theBSis to define an extended system (ES).

Definition 4 [2] LetS=h

P;T; Pre ; Post ; m

0ibe a SAM

with

P

=

P

1[

:::

[

P

K[

B

and

T

=

T

1[

:::

[

T

K. The

extended systemES is obtained from S by adding all the places in

H

ij,

j

=1

;:::;r

(

i

)

;i

=1

;:::;K

with their inci- dence vectors and the initial marking necessary for making them implicit.

Consider, for instance, the SAM given in Fig. 1.a.

The original net system S is the net without the places

H

11 and

H

21. These places are the MSIP’s computed to summarise the internal behaviour of the two modules.

Place

H

11summarises the module 1 (the subnet generated by nodes whose tags begin with

P

1 or

T

1), and place

H

21

summarises the module 2. The ES is the net system of Fig. 1.a (adding toSthe places

H

11and

H

21).

From theES, we can build theLSiandBS.

Definition 5 [2] LetS=h

P

1[

:::

[

P

K[

B;T

1[

:::

[

T

K

;

Pre ; Post ; m

0ibe a SAM andESits extended system.

i) The low level systemLSi for

i

= 1

;:::;K

ofS is the

net system obtained from ES by deleting all the nodes in

S

j6=i

(

P

j[(

T

jnTI))and their adjacent arcs.

ii) The basic skeleton BS ofS is the net system obtained fromESby deleting all the nodes in

S

K

j=1

(

P

j[(

T

jnTI))

and their adjacent arcs.

In eachLSiall the modulesNj with

j

6=

i

, are reduced to their interface transitions and to the implicit places that were added in the ES, while Ni is fully preserved. Sys- temsLSirepresent different low level views of the original model. In theBSall the modules are reduced, and it con- stitutes a high level view of the system.

In Fig. 1.b. theLS1 of Fig. 1.a is depicted. The BS is obtained by deleting from Fig. 1.b the nodes whose tags begin with

P

1and

T

1.

By construction, since the original net is conservative then theLSiand theBSare also conservative, so the reach- ability sets of all these subsystems are finite. The main re- sult about the behaviour of the constructed subsystems is the following.

Property 6 [2] LetSbe a SAM,LSiits low level systems for i=1,. . . , K,BSits basic skeleton, andL(S)the language of firing sequences ofS. Then:

i)L(S)jT i

[TI

L(LS

i

)for

i

=1

;:::;K

.

ii)L(S)jTI

L(BS).

The above property states that the reduction technique recalled here does not remove but possibly adds new paths between interface transitions.

3. Guaranteeing subsystems ergodicity

From the result stated in Property 6, it follows that the RG’s ofLSiandBSinclude at least the projections (on the corresponding preserved nodes) of the reachable markings of the original system. They also reproduce the projections on the preserved transitions of the firing sequences of the original system. But since the inclusion in the statement of Property 6 is not strict, the RG’s of the subsystems may possibly include new (let us say) spurious markings and fir- ing sequences that do not correspond to actual markings and firing sequences of the original system. In some cases, this non desired behaviour can lead to non ergodic systems. In this section we present a technique to avoid such undesired behaviour, guaranteeing ergodicity of the subsystems. Er- godicity of subsystems is needed to apply this decomposi- tion technique to approximate analysis since the underlying CTMC’s of subsystems must be solved.

Consider, for example, the system given in Fig. 1.a. Cut- ting the system through the places

B

1 to

B

4and applying the reduction technique of the previous section to the right hand side subnet, theLS1 of Fig. 1.b is obtained. In the original system after the firing of interface transition

I

22

only transition

I

23 can be fired, but inLS1 it is also pos- sible to fire transition

I

24after the firing of transition

I

22.

This new possible firing makesLS1non live (the sequence



=

I

12

I

22

I

24is firable inLS1and the marking produced by the firing of



is

B

4

P

13that is a total deadlock).

In other words, the underlying CTMC’s of the subsys- tems may be non ergodic.

There is a direct way to adjust these CTMC’s to assure ergodicity. In general, the RG’s of the subsystems may have several strongly connected components. To obtain an er- godic CTMC, only the strongly connected component of the initial marking in each subsystem must be selected. It will be proved that these strongly connected components in- clude, at least, all the projected states and firing sequences of the original net system.

Theorem 7 LetSbe a SAM,ES,LSi with

i

=1

;:::;K

andBS its extended, low level and the basic skeleton sys- tems, respectively. Let RG(LSi

) andRG(BS)be the strongly connected components ofRG(LSi

)andRG(BS), resp., that contain the initial marking. LetRS(LSi

)and

RS



(BS)be the states of RG(LSi

)andRG(BS), resp. Let

L



(LS

i

)andL(BS)be the language of firing sequences ofRG(LSi

)andRG(BS), respectively. Then:

i)L(S)jTi[TI

L



(LS

i

)for

i

=1

;:::;K

and

L(S)j

TI

L



(BS). ii)RS (ES)jP

i [H[B

RS



(LS

i

)for

i

=1

;:::;K

and

RS (ES)j

B[H

RS



(BS).

(4)

Proof: Consider the extended systemESofS. By definition, all the places inH =

S

K

i=1 H

iare implicit inES. ThereforeL(S)=L(ES). Since S is assumed reversible,

m

0 is a home state (if this is not the case, but S has home state, any home state can be considered as the new initial marking and the result is still true). Given a marking

m

2 RS(ES), by reversibility ofES, there exists; 2 L(ES)such that

m

0,!

m

,!

m

0. Let

m

0i=

m

0jPi[H[Bbe the initial marking ofLSiand

m

0 =

m

jPi[H[Bbe the projection of

m

over the places ofLSi. Let0 =jT

i

[TIand0 =jT i

[TI. It must be proved that

m

0 2 RS(LSi)and0 2 L(LSi). By definition ofES, it is clear that the marking of the places inH[Bis only changed by the firing of transitions inTI, and the marking of the places inPiis only changed by the firing of transitions inTi. Then, inLSi,

m

0i,!0

m

0,!0

m

0i, so

m

02RS(LSi)and02L(LSi). }

The strongly connected components of a directed graph can be efficiently computed with a time complexity of

O

(

max

(

n;

j

E

j)), where

n

is the number of nodes of the graph andj

E

jthe number of edges [7].

The above theorem gives a general technique applicable to any structurally live, structurally bounded and reversible SAM to obtain, from the subsystems, ergodic CTMC’s available for subsequent computations.

(a)

B1

P21

P22 B2

P12

P11 I21

T21 I22

I12 I11

T11 H21

H11

2

2 2 2

(b)

B1

B2 P12

P11 I21

I22 I12

I11

T11 H21

H11 2 2

(c)

B1

B2 I21

I22 I12

I11

H21 H11

Figure 2. (a) A SAM, (b) its LS1 and (c) its BS.

In the case of Fig. 1,RG(LS1

)has two strongly con- nected components. One of them with all the states but

B

4

P

13 and the other one with only the state

B

4

P

13 (the

deadlock marking). The strongly connected component of the initial marking is the first one and then, the deadlock marking

B

4

P

13is removed in the process.

It must be pointed out that RG(LSi

) andRG(BS) may still include spurious markings (and/or spurious firing sequences) that do not correspond to the projection of any marking (firing sequence) of the original system over the preserved nodes.

For example, in Fig. 2.a a weighted marked graph is de- picted. Cutting the system through the places

B

1 and

B

2

and applying the reduction technique of the previous sec- tion, the LS1 of Fig. 2.b is obtained. Now, the underly- ing CTMC of LS1 is ergodic, so by computing in it the strongly connected component of the initial marking, the entire CTMC is obtained. But in this CTMC, there are spu- rious markings and firing sequences that were not possible in the original system. For example, in the original system,

m

[

B

1]

m

[

B

2]=0, for any reachable marking, but inLS1, the marking

B

1

B

2is reachable. This marking is not a pro- jection of any reachable marking of the original system over the places ofLS1.

4. Structured view of PN’s (RG level)

In many cases the technique developed in previous sec- tion is enough for getting good approximations with itera- tive algorithms like that presented in section 5, but in some cases these approximations may be very poor. In our opin- ion, the explanation comes from the following two prob- lems: (P1) The introduction of spurious markings (reach- able markings in the subsystems that do not correspond to projections of reachable markings of the original system).

In the example of Fig. 2 the state

B

1

B

2is not reachable in the original system, but it becomes reachable in the subsys- tems. And the second problem (P2) is the ‘inadequate’ ag- gregation of different states of the original system (aggrega- tion of states not connected by internal transitions) into the same state in the subsystems. In the example of Fig. 2 the states

P

11

P

21and

P

12

P

22are aggregated in the same state

H

11

H

21in theBS. This aggregation in theBSintroduces spurious firing sequences in the submodel. Now, from state

H

11

H

21, it is possible to fire transitions

I

11 and

I

22 (this

situation was not possible in the original system). Making computations with this aggregated CTMC leads to very bad results. The same problems can appear in more complex nets.

In this section we develop the basis for the solution of these problems. First, a structured view of the RG of a SPN will be explained. With this view it is possible to compute and store in a decomposed manner the RG of the original model. Thus, this view can be applied not only for approx- imate analysis but also for other analysis techniques. After that, this representation of the RG of the original system is used for the generation of the subsystems. Several possible subsystems can be generated. In subsection 4.1 the prob- lem (P1) is completely solved (any reachable state of any subsystem is the projection of a state of the original system).

In subsection 4.2 also the second problem (P2) is solved.

(5)

Definition 8 Let S be a SAM and RG(S) its RG. Let

R

i

with

i

= 1

;:::;K

be the following equivalence relations defined on the set of vertices of RG(S): 8

s

1

;s

2vertices of RG(S),h

s

1

;s

2i2

R

iiff there exists a non-directed path in RG(S) from

s

1to

s

2containing only transitions in

T

jnTI

with

j

6=

i

. Let

R

0be the following equivalence relation defined on the set of vertices of RG(S): 8

s

1

;s

2vertices of RG(S),h

s

1

;s

2i2

R

0iff there exists a non-directed path in RG(S) from

s

1to

s

2containing only transitions in

T

nTI.

The following property trivially follows from the defini- tion.

Property 9 Let S be a SAM and

R

i with

i

= 0

;:::;K

the equivalence relations defined above. Then for each

i

=1

;:::;K

we have

R

i 

R

0. Let

D

iwith

i

=1

;:::;K

be the set of states of RG(S) belonging to an arbitrary equivalence class induced by

R

i. Then, there exists an equivalence class

D

0induced by

R

0such that

D

i

D

0.

Definition 10 Let

G

1 = (

V

1

;E

1

;L

1),

G

2 = (

V

2

;E

2

;L

2)

be two directed labelled graphs. The product

G

of

G

1and

G

2(denoted by

G

1

G

2) is another directed labelled graph

G

=(

V;E;L

)such that:

V

=

V

1

V

2 (Cartesian prod- uct),

L

=

L

1 [

L

2 and

E

((

s

11

;s

21)

;

(

s

12

;s

22)) =

t

iff

(

s

11 =

s

12 and

E

2(

s

21

;s

22) =

t

) or (

s

21 =

s

22 and

E

1(

s

11

;s

12)=

t

).

x y a3b1 a5b1

a1b1

a1b2 a3b2 a5b2

a4b1

a4b2 a2b1

a2b2

z t

r r

r r

r

x y z t

X =

b1

b2

x y a5 r

a1

a4 a2

z t

a3

Figure 3. Product of directed labelled graphs Fig. 3 shows the product of two directed labelled graphs.

Definition 11 Let S be a SAM and RG(S) its RG. Let

D

be the directed labelled subgraph of RG(S) generated by the states with a common given fixed marking in the buffers (the subgraph composed by the states and the labelled edges joining them). A breadth-first search in RG(S) induces a breadth-first search in

D

. Consider the breadth-first span- ning forest computed in

D

. The root

H

of a tree of the span- ning forest is a head of

D

iff there is not any cross edge1 arriving at

H

.

1See [7] for the definition of cross edge in a breadth-first search.

Property 12 LetSbe a SAM and RG(S) its RG. Let

D

be

the directed labelled subgraph of RG(S) generated by the states with a common given fixed marking in the buffers.

Let

H

be a head of

D

,

D

H be the directed labelled sub- graph generated by the set of successors of

H

in

D

and

D

Hi

with

i

= 1

;:::;K

the aggregation of

D

H induced by

R

i

(the quotient set

D

H

R

i). Then

D

H =

D

1H

D

KH.

Proof: LetHiwith i = 1;:::;K be the equivalence class ofH in

D

H



Ri. LetJ 2 DH. Then there exists such thatH,!Jand composed only by internal transitions ofS. Letiwithi=1;:::;Kbe the projection ofon the internal transitions ofNiandJibe such that

H i



i

,! J

i(iis firable fromHiinDi

H

by concurrency among the inter- nal transitions ofNiandNjwithi6=j). ThenJ =(J1;:::;JK))

J2D 1

H

D K

H

. Let(J1;:::;JK) 2 D1

H

D K

H

. Then there existsi with

i = 1;:::;Ksuch thatHi,!i J

i. Let = 1



K. By concur- rency among internal transitions inNiandNjwithi 6=j,is firable fromHinDH. LetJbe such thatH,!

J. ThenJ=(J1;:::;JK))

(J 1

;:::;J K

)2D

H. }

The above property exploits the concurrency among in- ternal transitions in a SAM to compute the successors of a head locally in each module and storing only the aggregated classes in each subnet so reducing the time and memory re- quirements for the computation of these states.

Property 13 Let S be a SAM and RG(S) its RG. Let

D

be the directed labelled subgraph of RG(S) generated by the set of states with a common given fixed marking in the buffers. Let

H

1

;:::;H

n be the set of heads of

D

,

and

D

Hi with

i

= 1

;:::;n

the directed labelled sub- graph generated by the successors of

H

i in

D

. Then

D

=Sni=1

D

Hi1 

D

KHi, where

D

Hji

with

i

=1

;:::;n

and

j

= 1

;:::;K

is the aggregated subgraph of

D

Hi by

means of

R

j.

This property immediately follows from the previous one. Then the minimum information needed to generate the states of an equivalence class of

R

0 is the set of heads of the class with their corresponding heads in each aggregated class. In different classes of the original RG the same head can appear in an aggregated class, so locally each aggre- gated class can be computed and stored only once, exploit- ing the concurrency of internal transitions at the maximum degree.

Now we need to know what happens with the interface transitions.

Property 14 LetSbe a SAM and RG(S) its RG. Let

D

be

the directed labelled subgraph of RG(S) generated by the states with a common given fixed marking in the buffers.

Let

H

be a head of

D

,

D

H the directed labelled subgraph generated by the set of successors of

H

in

D

and

D

iHwith

i

= 1

;:::;K

the aggregation of

D

H by means of rela- tion

R

i. Let

S

2

D

Hi . An interface transition

t

2

T

j\TI

with

i

6=

j

is enabled in

S

iff there exists

S

02

D

jHsuch that

t

is enabled in

S

0.

(6)

Proof: ))LetS0 be the state ofDj

H

in whichtis enabled andHi the class of H in Di

H

(the head ofDi

H

). By property 12 the state

M = (:::;H i

;:::;S 0

;:::) 2 D. tis enabled inM so, by concur- rency among internal transitions ofNiand interface transitions ofNjwith

i6=j,tis enabled in all the states ofDi

H

, thustis enabled inS.

()Iftis enabled inS, sinceSis an equivalence class inD, there exists a stateM = (:::;S;:::;S0;:::) 2 D such thattis enabled inM (SandS0are theiandj-component ofM). Aggregating by means ofRj,

S 0

2D j

H

andtis enabled inS0. }

Last property allows to compute locally in each mod- ule

i

the interface transitions ofNi that can be fired in a given local marking

D

iHand exporting them to all the local markings of the other modules

D

jH with

j

6=

i

. Again, in different classes of RG(S) by means of

R

0 the same head can appear in an aggregated class, so taking into account the marking of buffers and the internal state inNi(in other words the class

D

iH) is enough to compute the interface transitions enabled in

D

H. Moreover, a spurious interface transition is never computed because the interface transi- tions are computed in the corresponding module with all the information about its input places.

Now we can present the algorithm to compute the de- composed description of RG(S).

Algorithm 4.1 input: A SAMS

B

0

:=

m

0jB; initial marking on buffers fori:=1toKdo

Hi:=

m

0jPi; breadth-first search fromHiinNi

H:=(H1;:::;HK)

insert head(B0;H)in the queue while queue of heads non empty do

(B;H):=first head of the queue;L:=; forj:=1to K

L:=L[fIj2Tj\TIjIjenabled inHjg for eachIj2Ldo

for each successorhjofHjinNjs. t.Ijis enabled do

(B;hj) I

j

,! (B

0

;H 0

j

);H0:=(H1;:::;Hj0

;:::;HK)

ifHj0is new then breadth-first search fromHj0inNj ifB0is new then insert head(B0;H0)

else isnew := TRUE

for eachH00s. t.(B0;H00)is head do ifH00,!

H

0,TnTIthen isnew := FALSE else ifH0,!

H

00withTnTIthen replaceH00byH0; isnew = FALSE else ifH0andH00have a common successor then

makeH0andH00related inB0 if isnew = TRUE then insert head(B0;H0) output:Set of heads

RG(S)jN

ifori=1;:::;K

In the above algorithm given the initial marking of a SAM, all the firing sequences composed only by internal transitions are computed locally in each module by means of a breadth-first search in each module. The local states computed in each module are stored locally (not all the pos- sible combinations among them). Then a queue of unex- plored heads is maintained in the while-loop. A head in the output of the algorithm is a state ofSthat is reachable only

after the firing of an interface transition. During the algo- rithm the heads are replaced by other ones at the moment in which a predecessor by means of internal transitions is computed. In each iteration of the while-loop, the first head

(

B;H

) of the queue is studied.

B

is the marking of the buffers and

H

=(

H

1

;:::;H

K)the local markings in each module. Given a head

H

, locally in each module

j

, the

set of interface transitions of

T

j that can be fired after any firing sequence of internal transitions are computed. The union of these sets is the set

L

of interface transitions en- abled in the equivalence class of(

B;H

)by means of

R

0.

After that, each transtition

I

j of the set

L

is fired (

j

is

the number of the module). The firing of

I

j only changes buffers (

B

to

B

0) and the local marking of module

j

. In

general several successors

h

j of

H

j inNj can enable

I

j.

Then for each

h

j we must fire

I

j to produce a new local marking

H

j0. The next step is to check if the local mark- ing

H

j0 is new. If this is the case a new local breadth-first search is done in module

j

computing and storing new local states. Then we must test if the reached marking(

B

0

;H

0)

is a new head to insert in the queue. To do that we test if

B

0 is new (then it is clearly a new head). If

B

0 is not

new, we must compare

H

0with all the computed heads of the form(

B

0

;H

00). Four cases are possible. If(

B

0

;H

0)is

reachable from (

B

0

;H

00)by means of internal transitions

(

B

0

;H

0)is erased. If(

B

0

;H

00)is reachable from(

B

0

;H

0)

then(

B

0

;H

0)replaces(

B

0

;H

00). If(

B

0

;H

00)and(

B

0

;H

0)

have a common successor then we mark the two heads as related. It is important to store this information for the sub- sequent phase. In other case(

B

0

;H

0)is a new head. The previous tests about reachability between states can also be done locally in each module.

The output of this algorithm is a decomposed descrip- tion of RG(S) (computed with less memory and time re- quirements than in the classical way). Applying proper- ties 12 and 14 we could precisely compute RG(S). Now, we apply this reduced description of RG(S) to generate the RG’s of the reduced submodelsLSi andBS. Two differ- ent reduced submodels will be computed. In subsection 4.1 the projections of the markings of RG(S) on the preserved nodes in the submodels will be computed and in subsec- tion 4.2 the aggregations of RG(S) by means of relations

R

i

with

i

=0

;:::;K

will be computed.

4.1. Reducing spurious markings

In this subsection we use the decomposed description of the RG(S) computed with algorithm 4.1 for the generation of the projections of RG(S) on the preserved places ofLSi

andBS. So, the difference of this second decomposition technique with respect to the first one presented in section 3 is that the subsystems have no spurious states (thus, solv- ing the first problem P1 mentioned in the beginning of this section). In this way we obtain the smallest possible RS for each subsystem.

Referencias

Documento similar

The independent variables that best relate to the bulk density of metallic pieces produced by selective laser melting and are therefore included in the dimensional analysis

In the “big picture” perspective of the recent years that we have described in Brazil, Spain, Portugal and Puerto Rico there are some similarities and important differences,

To achieve a transformation from the original space to a feature space useful for classification, oriented principal component analysis (OPCA) is presented as the solution of

This chapter aims at explaining the importance of power electronics in our society, its main applications, the used semiconductor devices and the most relevant packaging

The Dwellers in the Garden of Allah 109... The Dwellers in the Garden of Allah

Since ccRCC is the most prevalent and lethal histological subtype of renal cell carcinoma (RCC) and the molecular mechanisms behind its tumorigenesis remain unclear, we aimed

In the preparation of this report, the Venice Commission has relied on the comments of its rapporteurs; its recently adopted Report on Respect for Democracy, Human Rights and the Rule

No obstante, como esta enfermedad afecta a cada persona de manera diferente, no todas las opciones de cuidado y tratamiento pueden ser apropiadas para cada individuo.. La forma