HAL Id: hal-01315167
https://hal.archives-ouvertes.fr/hal-01315167
Submitted on 17 May 2016
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of
sci-entific research documents, whether they are
pub-lished or not. The documents may come from
teaching and research institutions in France or
L’archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d’enseignement et de
recherche français ou étrangers, des laboratoires
Specification of dynamic structure discrete event
systems using single point encapsulated control functions
Alexandre Muzy, Bernard P. Zeigler
To cite this version:
Alexandre Muzy, Bernard P. Zeigler. Specification of dynamic structure discrete event systems
us-ing sus-ingle point encapsulated control functions. International Journal of Modelus-ing, Simulation, and
Scientific Computing, World Scientific Publishing, 2014, 5 (3), �10.1142/S1793962314500123�.
�hal-01315167�
dis rete event systems using single point en apsulated ontrol fun tions
Alexandre Muzy*, Bernard P. Zeigler**
* I3SUMR CNRS 7271, Bio-infoteam, CS40121 -06903 Sophia-Antipolis Cedex,Fran e,Email: alexandre.muzy nrs.fr.
**ChiefS ientist,RTSyn Corp,530BartowDriveSuiteASierraVista,AZ 85635,United-StatesofAmeri a,Email: zeiglerrtsyn . om.
Abstra t
In Dis rete Event System Spe i ation (DEVS), the dynami s of a networkis onstitutedonlybythedynami sofitsbasi omponents.The stateofea h omponentisfullyen apsulated. Controlinthe networkis fullyde entralizedtoea h omponent. Atdynami stru turelevel,DEVS should permitthe samelevelofde entralization. However, itis hardto ensurestru ture onsisten ywhilelettingall omponentsa hievestru ture hanges. Besides, this solution anbe omplexto implement. Toavoid these di ulties, usual dynami stru ture approa hes ensure stru ture onsisten y allowing stru ture hanges to be done only by the network havingnewaddeddynami s hange apabilities. Thisisasafeandsimple way to a hieve dynami stru ture. However, it should be possible to simply allow omponents of a network to modify the stru tureof their network, other omponentsand/or theirownstru ture-withouthaving tomodifytheusualdenitionaDEVS network. Inthismanus riptitis shownthatasimplefullyde entralizedapproa hispossiblewhileensuring fullmodularityandstru ture onsisten y.
1 Introdu tion
Insystemstheorytradition,thedis reteeventspe i ationhassoughtformany yearstospe ifydynami stru turesytems:
•
Dynami Stru ture Dis rete Event System Spe i ation (DSDEVS)[1℄: Whereasingle entral ontrollerisin hargeofexe utingstru ture hanges. Having asinglelo us of ontrol forstru ture hanges onstitutes a rela-tivelysimplewayofensuringbothbehaviorandstru ture onsisten ies.•
Dynami DEVS[2℄: Where a sequential implementation allows lo al and de entralized internal stru ture hanges. Interfa e stru ture hanges as well asthe addition/deletion of omponentsare subsequentlyintegrated atnetworklevel.•
Variable stru tures[3℄: Contraryto thetwoprevious works this is not a formal approa h. However,it is anattempt to have manyde entralized lo iof ontrolfora hievingstru ture hanges. Lo al omponentsareable to sequentially1
modify thewhole stru ture ofother omponents, in the samenetwork.
•
Continuous FlowSystemSpe i ation(CFSS)[4℄: Wherethe implemen-tationofmultirateintegrationmethodsanddynami stu turemodels an bea hieved. CFSS omponentssample dire tlytheirinuen ers'states. To dealwith theautonomy of stru ture hanges, thenotion of singlepoint of ontrol isintrodu ed here. In asingle point of ontrol, at ea h time,only one omponentis responsibleofstru ture hanges. This omponent analwaysbe thesameforthewhole simulation(stati singlepoint)or an hange(dynami singlepoint).Thes opeofthepresent ontributionistwofold:
1. To onstitutea oherentframeworkforusualdynami stru tureformalisms. This framework would allow the dierent formalisms to be represented withthesameelementsandme hanisms. This isofinterestforthe om-munity,e.g.,to debatedieren esbetweenformalisms,
2. Topropose a fully de entralized modular approa h loserto reality and DEVS thusopeningnewex itingresear hperspe tives.
Themanus riptisorganizedasfollows. InSe tion2,bothstati anddynami stru turespe i ationsofdynami systemsaredened. InSe tion3,bothxed anddynami singlepointsof ontrolofstru ture hangesareusedto represent usualformalisms.InSe tion4afullymodularandautonomousapproa his pro-posed. Finally,in Se tion5, on lusion andperspe tives losethemanus ript.
2 Dis rete event and dynami stru ture spe i- ations of dynami systems
Stru ture hangesaredened asbasedondis reteeventtransitions.
2.1 Usual stati stru ture formalism
The stru ture of both network and basi dis rete event systems is presented here.
1
IntheDis reteEventSystemSpe i ation, on urrentevents( hangesofstates), o ur-ringatthesametime,areexe utedoneaftertheother. Ea h hangeofstateinuen ingother on urrentstate hanges,at urrenttime.
Denition2.1. Abasi Dis reteEventSystemSpe i ation(DEVS)isa stru -ture:
DEVS
= (X, Y, S, δ
ext
, δ
int
, λ, ta)
Where,
X
isthe setof inputevents,Y
istheset of output events,S
istheset of partial states,δ
ext
: Q × X → S
is the external transition fun tion withQ = {(s, e) | s ∈ S, 0 ≤ e ≤ ta(s)}
the set of total states,δ
int
: S → S
is the internal transition fun tion,λ : S → Y
is the output fun tion, andta : S → R
0,+
∞
isthetimeadvan e fun tion.2.1.2 Networkstru ture
Denition2.2. A
DEV S
networkisastru ture:N = (X, Y, D, {M
d
}, {I
d
}, {Z
i,d
}, Select)
Where
X
isthe setof inputevents,Y
is thesetof outputevents,D
is the setof omponentnames,forea hd ∈ D
,M
d
isabasi model(whosestru ture diers from one DEVS-basedformalism to another), for ea hd ∈ D ∪ {N }
,I
d
is theset of inuen ers ofd
su h thatI
d
⊆ D ∪ {N }, d /
∈ I
d
and, for ea hi ∈ I
d
,Z
i,d
isa ouplingfun tion,thei−
to−d
outputtranslation,denedfor: (i)externalinput ouplings:Z
self,d
: X
self
→ X
d
,withself
thenetworkname, (ii) internal ouplings:Z
i,j
: Y
i
→ X
j
, and (iii) external output ouplings:Z
d,self
: Y
d
→ Y
self
,andSelect : 2
D
− {
Ø
} → D ∪ {
Ø}
isthesequentialsele t fun tion (to sele t one omponent to exe ute its transition/output fun tions, among imminent omponents). Consideringaset of omponentsC
andidate forinternaltransition,thesequentialsele tfun tionhas onstraintSelect(C) ∈
C ∪ {
Ø}
, i.e., only one omponent or no omponents anbe sele ted among andidates.2.2 Dynami stru ture of dynami systems using a dis- rete event spe i ation
Bothnetworkandbasi dynami stru turesystemsarepresentedhere.
2.2.1 Basi dynami stru ture
Denition 2.3. Basi or atomi Dynami Stru ture Dis rete Event System Spe i ation (DYS-DEVS) stru ture
DYS-DEVS
= (M, S, τ )
Whereea h element
M ∈ M
is astru tureDEVS= (X, Y, S, δ
ext,
, δ
int
, λ, ta)
,S = ∐
M ∈M
S
M
is the disjoint union of their partial state sets, andτ : M × S → M × S
is the stru turetransition fun tion. Stru turefun tionτ
takesabasi DEVS anditsstatetoanewbasi DEVS' andanewstate( ouldbethesamealso):
τ (M, s) = (M
′
, s
′
)
. Thisrepresentsabasi hangein stru -ture whi h transforms abasi DEVS intoa newbasi DEVS',by hangingits stru turein someway(one ormany elements of
(X, Y, S, δ
ext
, δ
int
, λ, ta)
) and initializingthestateofthenewDEVS.TousethisrepresentationthesetsM
(of DEVS,it angenerate),S
(oftheirstates),andmappingτ
(howthestru ture hangeo urs)areidentiedafterin themanus ript.Atnetworklevel,basi stru ture omponentsare authorizedto modify the whole network. At lo al level, for abasi stru ture omponent, modifyingits interfa erequiresmodifyingrelated ouplings(inthe network) andrelated in-puts/outputs(inanother omponent). Theimpa tofinterfa estru ture hanges goesa littlebeyond the frontiers of the omponent. To a ount for these im-pa ts,the on eptofexternal andinternal models isdenedhere.
Denition 2.4. In abasi DYS-DEVS
= (M, S, τ )
a modelM ∈ M
anbe de omposedintoanexternal modelpartM
ext
andintoaninternalmodel partM
int
, and stru ture transition fun tionτ
an be de omposed into an exter-nal stru turetransition fun tionτ
ext
and into aninternal stru turetransition fun tionτ
int
,where:• M
ext
= (X, Y )
is hanged by the external stru ture transition fun tionτ
ext
(M
ext
, δ
ext
(s, e, x))
,and• M
int
= (S, δ
ext
, δ
int
, λ, ta)
is hangedbyinternalstru turetransition fun -tionτ
int
(M
int
, δ
int
(s))
.Example2.1. Internal stru ture hangesofabasi DYS-DEVS.
Assume basi omponentDYS-DEVS
= (M, S, τ )
is in state(M, s)
, withM
int
= (S, δ
ext
, δ
int
, λ, ta)
itsinternalmodel,whenitre eivesinputx = change
from another omponent. Then, a new state is obtained asδ
ext
(s, e, x) = changeInternalStructure
. Newstru tureM
′
int
= (S
′
, δ
′
ext
, δ
int
, λ, ta
′
)
isobtainedas
τ
int
(M
int
, s) = (M
′
in
, s
′
)
. Noti ethat dieren es between stru -turesM
int
andM
′
int
onsist in new setsS
′
, new external transition fun tion
δ
′
ext
,andnewtimeadvan efun tionta
′
.
2.2.2 Dynami stru turenetwork
Denition 2.5. Dynami Stru ture Dis rete Event Network System (DYS-DEN)stru ture
DYS-DEN
= (N , S, τ )
Where
N = {(X, Y, D, {M
d
}, {I
d
}, {Z
i,d
}, Select)}
isthe set ofnetwork stru -tures,whereea h omponentd ∈ D
isanatomi dynami stru turemodelM
d
=
(M
d
, S
d
, τ
d
)
,S = ∐
N ∈N
S
N
isthedisjointunionofpartialstatesetsofnetworkstru tures, with
S
N
= Π
d∈D
S
d
the partial stateset of a networkN ∈ N
is the rossprodu t of the partial state sets of its omponents, andτ : N × S → N × S
is the stru turetransition fun tion ofthenetwork.Example2.2. Simple hangesof networkstru ture( f. Figure1)
Figure1: Asimple hangeofnetwork stru ture
Consider a simple network stru ture
N = (D, {M
d
}, {I
d
}, {Z
i,d
}, Select)
, whereD = {a, b, c, d, e}
,I
c
= {a, b}
,I
d
= {c}
,I
e
= {c}
, andZ
a,c
: Y
a
→ X
c
,Z
b,c
: Y
b
→ X
c
,Z
c,d
: Y
c
→ X
d
,Z
c,e
: Y
c
→ X
e
. The state set of the omponents in the network isS = S
a
× S
b
× S
c
× S
d
× S
e
. Now assume that ea h omponent state set is{0, 1}
. Then, the state set of the network isS = {0, 1} × {0, 1} × {0, 1} × {0, 1} × {0, 1}
, with, e.g., parti ular states(0, 0, 0, 0, 0), (1, 0, 0, 0, 0), ...
,where the rst omponent is for omponenta
, the se ond omponentfor omponentb
,the third omponentfor omponentc
,et .Ataparti ularinstant, omponent
c
isremoved. Then,networkstru tureN denedas(D, {M
d
}, {I
d
}, {Z
i,d
}, Select)
hangestoN'denedas(D
′
, {M
d
′
}, {I
′
d
}, {Z
′
i,d
}, Select
′
)
, whereD
′
= {a, b, d, e}
,I
′
c
= I
′
d
= I
′
c
= {
Ø}
,{Z
′
i,d
} = {
Ø},
and{M
′
d
} =
{M
′
a
, M
′
b
, M
′
d
, M
′
e
}
. The state set of the omponents in networkN
′
is now
S
′
= S
a
× S
b
× S
d
× S
e
. Noti e that omponentsa, b
and omponentsd, e
areimpa tedbythedeletionof omponentc
havingrespe tivelytheir outputand inputsetsremoved.Nowsupposethat these stru ture hanges anbea hievedbynetwork stru -ture transition fun tion
τ (N, s) = τ (N, (1, 1, 0, 0, 0)) = N
′
. Assumealso that value
0
means no hangeintention andvalue1
means hangeintention. Fi-nally,τ (N, (1, 1, 0, 0, 0))
meansthatboth omponentsa
andb
havebothintention tomake the network stru ture hange toN
′
at the same time. It will be seen hereafterhowthiskindof simultaneouslo al hangesofstru tureinthenetwork anbe serialized.
Generallyspeaking, wewillshowthat,
Proposition 2.1. A network
N = (X, Y, D, {M
d
}, {I
d
}, {Z
i,d
}, Select)
,where forea hd ∈ D
,M
d
isabasi DYS-DEVSd
= (M
d
, S
d
, τ
d
)
, is equivalent to a resultant DYS-DEVS= (M, S, τ )
.In
DSDEV S
formalism, there isonly one omponentin everyinstan e ofM
thatmakesthede isionforthenextinstan e. Stru turetransitionfun tionτ
is dened bymimi king the hanges a hieved bytheexe utivein onetransition. On the other hand,DynamicDEV S
formalism allowsmultiple lo al de ision pointsbut hangesofnetworkstru turearedoneonlyatnetworklevel.DYS-DEVS uses the usual dynami me hanisms of DEVS, using states hangesforsyn hronizingdynami stru turetransitions. Serializationof stru -ture hanges is based on the notions of stati and dynami single points of ontrol for stru ture hanges.
Denition 3.1. A stati single point of ontrol onsists of having only one dynami stru ture omponent,alwaysthesame,inthewholenetwork.
Denition 3.2. A dynami single point of ontrol onsists of having many dynami stru ture omponents in the whole network. However, at ea h time step,onlyone omponent anbeauthorizedtoa hievestru ture hanges.
DSDEVS formalismis representedasa stati point of ontrol,while Dyn-DEVS formalismisrepresentedasadynami pointof ontrol. Moregenerally, itisshownthat,
Proposition 3.1. Dierent existing formalismsfor dynami stru ture
DEV S
an be represented in the Dynami Stru ture Formalism Framework (DYS-F) bydierent hoi es ofM, S
andτ
.3.1 Equivalen e of basi dynami stru ture omponent and basi dis rete event omponent
Theorem 3.1. Anatomi DYS-DEVS
= (M, S, τ )
isequivalenttoanatomi DEVS= (X, Y, S, δ
ext
, δ
int
, λ, ta)
, where thestateset isS = M × S
, withM
a set of basiDEV S
models andS
is the disjoint union of their state sets:S = ∐
M ∈M
S
M
.Proof. Wedes ribethedynami sofbothDYS-DEVS andDEVS dening the elementsofaDEVS in termsoftheelementsofaDYS-DEVS.
Theinternaltransitionfun tion ofaDYS-DEVS is
δ
int
(M, s) = τ (M, δ
int,M
(s))
i.e.,rstapplytheinternaltransitionfun tionofthe urrentstru ture
M ∈ M
tostates ∈ S
M
to getnew stateδ
int,M
(s)
, thenapply thestru ture transfor-mationtothis pairto getanewstru tureandanewstate(M
′
, s
′
)
. Similarly,theexternaltransitionfun tion isdenedby:λ(M, s) = λ
M
(s)
i.e.,outputfun tionofthe urrentstru ture
M ∈ M
sends urrentstates ∈ S
. Thetimeadvan efun tion ista(M, s) = ta
M
(s)
i.e.,timeadvan eofthe urrentstru ture
M ∈ M
isappliedtoitsstate,s ∈ S
, to omputetheo urren etimeofnextstate hange.Based on stru ture transition fun tion
τ
, a basi DYS-DEVS hanges a stru tureM ∈ M
, using partial states ∈ S
. A new state is obtained by the exe ution of one of the two usual transition fun tions:δ
ext,M
(s, e, x)
orδ
int,M
(s)
. Then,stru ture hangedependsontotalstate(s, e) ∈ S × R
0,+
∞
,and possiblyonexternalinputeventx ∈ X
.3.2 Stati single point
Centralized ontrolofstru ture hangesisinvestigatedhere. Stru ture hanges are ontrolled only by one omponent. No other omponent an hange the network stru ture.
Lemma3.1. Consideringaninitialnetwork
N = (X, Y, D, {M
d
}, {I
d
}, {Z
i,d
})
, where the set of omponent indexesD = {1, 2, ..., p}
and the state set of the networkisS = S
1
×S
2
×...×S
p
,whereS
1
isthestatesetofthe rst omponent,S
2
isthestatesetofthese ond omponent,et .,Ifasinglepointof ontrolisat rst omponentDYS-DEVS1
= (M
1
, S
1
, τ
1
)
,whileea hother omponenti ∈ D
, withi > 1
isabasi omponentDEV S
i
,the setofnetworksN
isequivalent to a resultantDYS-DEVS= (M, S, τ )
.Proof. A single point of ontrol at rst omponent DYS-DEVS
1
, would be thatτ
always a ounts for the state of DYS-DEVS1
to makeits de ision; soτ (s
1
, s
2
, ..., s
p
) = τ
1
(s
1
)
forsomeτ
1
. Then,theimageofτ
depends onthenew omponentsaddedtothenetworkornot(be ausethestatesofnew omponents havetobeinitialized).Denotingnewstru turesas
N
′
= (X
′
, Y
′
, D
′
, {M
′
d
}, {I
′
d
}, {Z
′
i,d
})
,stru ture transitionfun tionτ : M × S → M × S
redu estooneofthetwomaps:1. Forea h non- reated omponent
d ∈ D ∩ D
′
,
τ : S
1
→ M
, withτ (
...,s
d
,
...) = τ
1
(s
1
) = N
′
,
2. For ea h new omponent
i
∈
(D
′
− D)
( reated), ini-tialized to initial state
s
0,i
,τ
:
S
1
→
M × S
, withτ (
...,s
i
,
...) = τ
1
(s
1
) = (N
′
, (
...,s
0,i
,
...))
.Denition 3.3. A
DSDEV S
network[1℄ is astru tureDSDEN = (χ, M
χ
)
, with exe utive modelM
χ
= (X
χ
, Y
χ
, S
χ
, γ, Σ
∗
stru ture
Σ ∈ Σ∗
is given byΣ = γ(s
χ
) = (D, {M
d
}, {I
d
}, {Z
i,d
})
andγ :
Q
χ
→ Σ
∗
,withχ /
∈ D
.Corollary3.1. A
DSDEV S
networkisequivalenttoaDYS-DEVS= (M, S, τ )
havingasinglepointof ontrolDYS-DEVS1
in hargeof thestru ture hanges inanetworkN = (X, Y, D, {M
d
}, {I
d
}, {Z
i,d
})
,whereD = {1, 2, ..., p}
andfor ea h omponenti ∈ D
,withi > 1
,M
i
isabasiDEV S
model.Single pointof ontrol DSP-DEVS
1
an be des ribed in termsof exe utive modelM
χ
with:M
1
= Σ
∗
,
S
1
= S
χ
,D
χ
= proj
D
(γ(s
χ
) ∪ {χ}
,andτ
1
= γ
. In Continuous Flow System Spe i ation (CFSS)[4℄, omponents sample dire tlytheirinuen ers'states(inaone-steppro ess)whileusualDEVS om-ponents have to request and re eive their inuen ers' states (in a two-step pro ess)[5℄. Therefore, transforming a CFSS network into a DEVS one on-sistsofmappingea horiginal ouplingintotwo ouplings(oneforrequest,one for answer). Another soution would be, ontrary to CFSS, to break ompo-nents' modularity through the multi omponent approa h[6℄. In the dynami stru ture ontext, DYS-DEVS equivalen e anbe a hieved preserving modu-larity(at dynami stru turenetwork ontrollerlevel)addingextra oupling( f. Barros'des ription[5 ℄fordetails).3.3 Dynami single point
Example3.1. Dynami stru tureauthorization bytoken passing
Considernowasinglepointof ontrolpassingaround,a tivating,the om-ponents-justlikeatoken in networkwhereea hnodegetsa han e tosend whenit hasthetoken. Inthis examplethestateset of Example2.2 would be
S = {(1, 0, 0), (0, 1, 0), (0, 0, 1)}
withthetoken(authorization) goingfroma
tob
toc
ba k toa
, and soon in a yle. Instead of "sending"the node with the token andoanystru ture hangewiththeglobalstatebeinginitializedtothe nexttriple in the y le. Here,only one omponent among the omponentsof thenetwork, an bea tivatedat atime.Theorem3.2. Consider aninitial network
N = (X, Y, D, {M
d
}, {I
d
}, {Z
i,d
})
, where for ea hd ∈ D
,M
d
is a basi dynami stru ture DYS-DEVSd
and the stateset of the network isS = S
1
× S
2
× ... × S
p
,whereS
1
isthe stateset of the rst omponentDYS-DEVS1
,S
2
is the stateset of the se ond omponent DYS-DEVS2
,et . If adynami singlepointof ontrol isassigned sequentially and y li ally to ea h omponent DYS-DEVSd
for stru ture hanges on the omponents of the network, the set of networksN
is equivalent to a resultant DYS-DEVS= (M, S, τ )
.Proof. ExtendingLemma 3.1, itis simpleto onsider that a y le of dynami singlepointsof ontrolisre ursivelydenedbyglobalandlo alstru ture tran-sitionfun tions:
τ : (1, 0, 0, ..., 0) 7→ (N
′
, (0, 1, 0, ..., 0))
with τ
1
(1, 0, 0, ..., 0) = (N
′
, (0, 1, 0, ..., 0))
τ : (0, 1, 0, ..., 0) 7→ (N
′′
, (0, 0, 1, ..., 0))
with τ
2
(0, 1, 0, ..., 0) = (N
′′
, (0, 0, 1, ..., 0))
...
τ : (0, 0, 0, ..., 1, 0) 7→ (N
p
, (0, 0, 0, ..., 1))
with τ
p
(0, 0, 0, ..., 1, 0) = (N
p
, (0, 0, 0, ..., 1))
Then, the resultant DYS-DEVS
= (M, S, τ )
is dened withM = N
,S = {(1, 0, 0, ..., 0), (0, 1, 0, ..., 0), (0, 0, 1, ..., 0), ..., (0, 0, 0, ..., 1)}
,τ (s) = s+1mod
p
, withp
thenumberof omponentsandstates = {0, 1}
p
.
Remark 3.1. This isdierentfrom
DSDEV S
,whi h doesnotallowexpli itly hangingadynami singlepointof ontrol.Denition3.4. A
DynamicDEV S
networkisastru tureDynN DEV S = (X, Y, n
init
, N (n
init
))
Where
X, Y
areinputandoutputeventsets,n
init
∈N (n
init
)
istheinitialstru -ture,and
N (n
init
)
theleast(minimum)sethavingthestru ture{(D, ρ
N
, {dynDEV S
i
}, {I
i
}, {Z
i,j
}, Select)}
, with:• D, {I
i
}, {Z
i,j
}
asdened previously,• ρ
N
: S → N (n
init
)
is the network transition fun tion withS = Π
i∈D
(∐
m∈dynDEV S
i
S
m
)
, with
dynDEV S
i
the dynam-i DEVS modeli ∈ D
,• dynDEV S
i
= (X
i
, Y
i
, m
init,i
, M
i
(m
init,i
)
,with:
X
i
, Y
i
theinputandoutputeventsets,m
init
,i
∈M
i
(m
init,i
)
theinitial model,and
M
i
(m
init,i
)
the least (minimum) set of internal stru ture{(S
i
, δ
ext,i
, δ
int,i
, ρ
α,i
, λ
i
, ta
i
)}
ofusualatomiDEV S
,ex eptρ
α,i
: S
i
→ M
i
(m
init,i
)
themodeltransitionfun tion.• Select : 2
D
− {
Ø
} → D
isthesequential sele t fun tion.Corollary3.2. Usingasingledynami pointof ontrol,anetwork
DynN DEV S =
(X, Y, n
init
, N (n
init
))
anberepresentedbyaninitialnetworkN = (X, Y, D, {M
d
}, {I
d
}, {Z
i,d
})
whereD = {1, 2, ..., p}
,M
1
isadynami stru turenetworkDYS-DEN1
andea hother omponent
d ∈ D
, withd > 1
is a basi dynami stru ture omponent DYS-DEVSd
.A
DynN DEV S
network operates along two sequential steps: (i) Lo ally, basi omponentsdynDEV S
i
an hange only their internal model a ording to their model transition fun tionρ
α,i
: S
i
→ M
i
(m
init,i
)
, then (ii) Dyn-NDEVSnetwork an hangeitsstru ture(interfa es(X
i
, Y
i
)
andD, {I
i
}, {Z
i,j
}
,adding/removing omponents)throughthenetworktransitionfun tion
ρ
N
: S →
N (n
init
)
,withS = Π
d∈D
(∐
m∈dynDEV S
i
S
m
)
.
Ea h basi
dynDEV S
i
= (X
i
, Y
i
, m
init,i
, M
i
(m
init,i
)
an be representedby aDYS-DEVSd
= (M
d
, S
d
, τ
d
)
with orresponden es:M
d
= M
i
(m
init,i
)
, withM
d
∈ M
d
restri tedtointernal modelM
int,d
= (S
d
, δ
ext,d
, δ
int,d
, λ
d
, ta
d
)
,S
d
=
S
i
,τ
d
= ρ
α,i
restri ted toτ
d
: S
i
→ M
i
(m
init,i
)
.DynN DEV S
is represented bydynami stru turenetwork DYS-DEN1
= (N
1
, S
1
, τ
1
)
,with orresponden es:N
1
= N (n
init
)
,S
1
= ∐
N ∈N
S
N
withS
N
= Π
i∈D
S
i
= S
1
,τ
1
= ρ
N
restri ted toτ
1
: S
1
→ N (n
init
)
.Remark 3.2. TheDynami Stru tureFormalismFrameworkallowsrepresenting a
DynamicDEV S
network, limitating: (i) lo al stru ture hanges to beonly internal stru ture hanges ofatomi models, and(ii) global stru ture hanges tobea hievedonlybythedynami stru turenetwork.Another lassofdynami stru turesystems onsistsofmobileagents. Mod-elingmobileagentshasbeendoneusingtheHeterogeneousFlowSystem Spe -i ation(HFSS)formalism,whi h ombineswiththeContinuousFlowSystem Spe i ation (CFSS) to represent ontinuous ow systems and DEVS[7℄. A setof onne tednetworks(ea honeembeddinganexe utive)sequentiallyadd, transmit, and then destroy asingle migrating agent. It an be easily shown thatthisisequivalenttoadynami sequentialsinglepointof ontrol,ea hpoint a hievingonly self- hanges of stru ture. Forthe same lass of mobile agents, aDEVS-basedformalismhas been proposed: Mobile DEVS (MDEVS)[8℄. In this formalism,many agents an be added, transmitted,and then destroyed in thenetworks. It an be shown thatthis formalismis alsoequivalent to the aseofdynami singlepointsof ontrol.
4 De entralizationofstru ture hangeoperations Usingadynami singlepointof ontrolallowsenhan ingde entralizationattwo levels:
1. Globally:Havingea hdynami stru ture omponentoperatingatnetwork level. Thisisalreadyasteptowardde entralizationwithrespe ttousual dynami stru tureformalisms(whi hare entralizingnetworkoperations). However,wewill see that this approa h anbe onsiderered aspartially modular.
2. Lo ally: Havingea hdynami stru ture omponentoperatingatinterfa e and ouplingslevels(herewithinuen eepermission). Thisnewapproa h anbe onsidereredasfullymodular.
4.1 Counter-arguments to usual dynami stru ture mod-ularity
Thehierar hyofsystemsspe i ation[6℄isgroundedon omponentsmodularity: Thestateof omponents anonlybe hanged:(i)externally byanother
ompo- omputerprogrammingthis is alleden apsulation. Indynami stru ture sys-tems, hangingother-stru ture remainsamajor issue. Changing self-stru ture animpa tthestru tureofthenetworkandofother omponents(e.g.,deleting self-output requires deleting orresponding oupling and other-input of inu-en ee omponents). Then, be ause of stru ture hange propagation itis hard toensurestru ture onsisten yat omponentandnetworklevel.
As depi tedin previousse tion, onesolutionisto haveonlyone(network) omponentin hargeof oupling hanges(DynDEVS)orall stru ture hanges (DSDEVS).Authors'philosophy ouldbesumupbyargument: onlythe net-work an hangetheinterfa estru turesofits omponentstoensure modular-ity. However,it an bearguedamajor ounter-argument:
Allowingnetworkstoa hievestru ture/state hangeisaholisti hangeofperspe tive whiletheusualhierar hyofsystems spe i- ationispurelyredu tionnist(thenetworkhavingnoability to hange stru ture/state being merely a omposition of dynami omponents).
Then,allowingnetworksto hangethestru ture/stateof omponents ould alsobe onsideredasaviolationofthemodularity on eptsimplybe ausethen omponentsarenottheonlyonesto hangetheirstate.
Havingastati pointof ontrolisasimpli ationofpurelyautonomous sys-temsonlyintera tingthroughinterfa es. Allowingmany omponentsto hange ea h-otherstru turerequiresdeningsyn hronizationintera tionproto olsthat anrapidly be ome omplex to implement. Inthe nextsubse tions wedene su h proto ols forelementarystru ture hange operations. Theseme hanisms anbe automated and ombined to a hieve multiple stru ture hanges. Now let'srsta hievearststeptowardsde entralizationhavingea hdynami stru -ture omponentbeingableto operateat networklevel.
4.2 Global stru ture hange operations
Theorem 3.2 already showed that onsidering an initial network
N = (X, Y, D, {M
d
}, {I
d
}, {Z
i,d
})
,where ea h omponentd ∈ D
isabasi dy-nami stru ture omponentDYS-DEVSd
, ea h networkstru tureN ∈ N
an be rea hed byaresultant DYS-DEVS= (M, S, τ )
. However, theglobal state of omponents is used lo ally for omponentsele tion thus de reasing ontrol autonomy.Here,thewholesystemissimpliedensuringnetworkstru ture onsisten y andhavingmoreautonomyat omponentlevel. Ea h omponent
d ∈ D
of the networkisadynami stru turenetwork omponentDYS-DENd
= (N
d
, S
d
, τ
int,d
)
withτ
int,d
: S
d
→ N
d
. Noti ethat stu turetransitionfun tionsτ
int,d
are inter-nal ones,i.e., basedoninternalstatetransitions.Theorem4.1. Consider aninitial network
N = (X, Y, D, {M
d
}, {I
d
}, {Z
i,d
})
, where for ea hd
∈
D
,M
d
is a dynami stru ture network DYS-DEVNd
= (N
d
, S
d
, τ
int,d
)
, the state set of the networkisS = S
1
× S
2
×
... × S
p
, whereS
1
is the state set of the rst omponent DYS-DEVN1
,S
2
is the state set of the se ond omponent DYS-DEVN2
, et . If a dynami single pointof ontrol issu essively assignedtoonlyone omponent DYS-DEVNd
=
(N
d
, S
d
, τ
int,d
)
,thesetofnetworksN
isequivalenttoa resultantDYS-DEVS=
(M, S, τ
int
)
.Proof. Themaindieren ewithTheorem4.1isthatthereisno y leofdynami singlepointsof ontrol.Remembernowthattheexe utionofea hinternal stu -turetransition
τ
int,d
isdrivenbyaninternalstatetransitionτ
int,d
(δ
int,d
(s
d
))
. A omponent andidateforastru ture hangeisthus andidaterstforaninternal transition.AndhereistheinterestingpointinusualDEVS,atea hglobalstate transition,onlyone omponent, among andidates forinternal transitions2 , is hosenbySele t fun tion. Therefore, onlyone andidate forstru ture hange is hosenatea hglobalstatetransitionavoidingstru ture oni ts.
Finally,ea hresultantstru ture hange transition onsistsoftheexe ution ofonedynami stru ture network omponent
d
∗
= Select(IM M )
,i.e., 1. For ea h non- reated omponenti
∈
D ∩ D
′
,
τ (
...,s
i
,
...) = τ
d
∗
(s
d
∗
) = N
′
. 2. Forea h new omponent
i ∈ (D
′
− D)
, initializedto initialstate
s
0,i
,τ (
...,s
i
,
...) = τ
d
∗
(s
d
∗
) = (N
′
, (
...,
s
0,i
,
...))
.4.3 Lo al stru ture hange operations
Here omethetri kystru ture hangeoperationsa hievedbybasi omponents. Toensurestru ture onsisten y,atbothlo alandgloballevels,syn hronization me hanismsaredened.
4.3.1 Dynami stru turesyn hronization
Toensuremodularity, omponents annot hangeother-interfa es. Asforstate hanges,stru ture hanges anonlybeaskedthroughinterfa eintera tionsand a hieved by the omponent itself. Spe ial input query and spe ial output doneofbasi dynami stru ture omponentsareusedfor hange syn hroniza-tion.
Denition4.1. Stru ture hangesyn hronization onditions: 2
Candidatesforinternaltransition omposetheimminentset
I M M
= {σ
d
| d ∈ D ∧ σ
d
=
ta
(s)}
,with
σ
d
thetimeremainingtothenextevent
σ
d
= ta
d
(s
d
) − e
d
,andta
d
(s
d
)
thetime advan eofa omponentmodel.
•
Ea hdynami stru ture omponenthasextrastru turequery/done inter-fa e.•
Ea h dynami stru tureinuen erhasqueryoutgoing ouplinganddone in oming ouplingwithallitsinuen ees.•
Dynami stru ture omponents an:hange its external stru ture and orresponding outgoing ouplings after request/done proto ol (querying orresponding inuen ee to add/remove orrespondinginput),
hangeitsinternalstru ture, reate/removeother omponents,
queryitsinuen eesto performstru ture hanges.
Proposition 4.1. Changing other-stru ture an only be a hieved through in-terfa e intera tions. This respe ts totally modularity on ept as dened in the hierar hyof systemsspe i ation[6℄.
However, hangingtheexternalstru tureofa omponentaswellasadding/removing a oupled omponentrequiresthe omplian eofimpa tedinuen eesaswellas updating network stru ture while ensuring that this whole stru ture hange sequen e annotbeinterrupted. Toa hievethis goal,asyn hronization me h-anism anbeused.
Denition4.2. Lo ksyn hronizationofstru ture hangesisdepi tedin Fig-ure 2for two omponents. Component aaims ata hieving a stru ture hange impa ting the stru tureofinuen ee omponent b. Thisfollows the sequen e:
1. Component a sends a query messageto omponent b to hange stru ture,
2. Componentb hangesself-stru tureto omplywiththenew stru -tureaimedby omponenta,
3. Componentb sendsadone messageto omponenta,
4. Finally, omponenta hangesself-stru tureandupdatesnetwork stru ture.
fordynami stru ture hangebetween omponenta and omponentb.
Inthenextse tionsthissyn hronizationproto olisappliedtoadditionand deletionoperations.
4.3.2 Additionoperations
Example4.1. A omponentaaddsquery/done oupling witha omponentb. Therearenoquery/done ouplingsbetween omponentaand omponentb. However,asall dynami stru ture omponents, omponentsa and b have ex-istingquery/doneinterfa es. Asdes ribedinFigure3, omponenta needsrst to self-add aquery outgoing oupling with omponent b. After, omponent a requests omponentbtoself-addadoneoutgoing oupling. Finally, omponent b onrmstheadditionoperationsendingadone onrmationto omponenta.
omponenta and omponentb.
Example4.2. A omponentaaddsanoutgoingstate oupling witha ompo-nentb.
As des ribed in Figure 4, omponenta needsrst to request omponentb to add orresponding state input. After, omponent b onrms the addition operationsending adone onrmation to omponenta. Finally, omponent a self-adds orrespondingoutputandoutgoingstate ouplingwith omponentb.
omponenta and omponentb.
4.3.3 Deletionoperations
Example4.3. Mutualdeletionofquery/doneoutgoing ouplingsbetween om-ponentsa andb.
Asdes ribedinFigure5,Asforoutgoingstate ouplingaddition, omponent aneedsrsttorequest omponentbtodelete orrespondinginput. On e om-ponentare eivesthedone onrmationfrom omponentb,itself-deletesits out-putandoutgoing ouplingto omponentb. Forsymmetryreasons, omponent bself-deletes orrespondingdoneoutputandoutgoing ouplingsto omponent b.
between omponentaand omponentb.
Example4.4. A omponentb deletesitself.
Asdes ribedin Figure6, omponentb queriesrstallitsinuen ees ( om-ponent a) to self-delete their inputs from omponent b. After this deletion, omponentasendsadonemessageafterwhi h omponentbdeletesallits out-going ouplings and outputsto omponenta. After, omponenta follows the sameproto ol to remove its outputs and outgoing ouplings to omponent b. Finally, omponentb deletesitself.
ponentb self-deletion.
4.3.4 Independen eof lo alstru ture hanges
Proposition4.2. Basedonaquery/donemessageex hange proto ol, a stru -ture hangelo kisasyn hronizationme hanism ensuring: (i)nointerferen es between external stru ture hanges, and (ii) stru ture onsisten y at network level.
Lemma4.1. Lo al externalstru ture hanges do notinterfere.
Proof. At ea h global transition, only one imminent omponent is sele ted:
d
∗
= Select(IM M )
, with imminent omponentsIM M = {σ
d
| d ∈ D ∧ σ
d
=
ta(s)}
. Thebasi lo ksyn hronizationme hanismbetweentwodynami stru -ture omponents ( f. Figure 2) follows a zero time advan e sequen e. First, imminent omponenti
∗
is sele ted to send a query message to an inuen ee
j ∈ I
i
∗
. The latter a hieves an external stru ture hange transition(M
′
ext,j
, s
′
j
) = τ
ext,j
(M
ext,j
, δ
ext,j
(s
j
, e
j
, x
j
))
and s hedules an internal transi-tionδ
int,j
(s
j
)
. Atthe sametime, if omponentj
re eivesanotherquery mes-sage, as in lassiDEV S
,δ
ext,j
(δ
int,j
(s
j
), 0, x
j
)
, internal transitionδ
int,j
(s
j
)
is exe uted rst, and omponentj
∗
sends the done message to initial query-ing omponent
i ∈ I
j
∗
, whi h exe utes its external stru ture transition fun -tion. The latter rst hanges the external stru ture of omponenti ∈ D
as(M
ext,i
′
, s
′
i
) = τ
ext,i
(M
ext,i
, δ
ext,i
(s
i
, e
i
, x
i
))
and nally updates network stru -turebasedonnewstru turesM
′
ext,i
andM
′
ext,j
,i.e.,N
′
= τ
ext,i
(N, δ
ext,i
(s
i
, e
i
, x
i
))
.Proof. Obviousfromthedenitionofinternalmodels( f. Denition 2.4). Theorem4.2. Lo al dynami stru ture hanges do notinterfere.
Proof. ObviousfromLemma4.2andLemma 4.1.
Theorem 4.3. Considering an initial network
N = (X, Y, D, {M
d
}, {I
d
}, {Z
i,d
}, Select)
, where ea h omponentd ∈ D
is a basi dynami stru ture omponent DYS-DEVSd
,andwherethere aredynami singlelo alpointsof ontrolof stru ture hangesofmodelsM
d
= (M
ext,d
, M
int,d
)
,theset ofnetworksN
isequivalenttoa resultantDYS-DEVS= (M, S, τ )
. Proof. Aslo alstru ture hangesdonotinterfere( f. Theorem4.2),1. For ea h non- reated omponent
d
∈
D ∩ D
′
,
τ (..., M
d
, s
d
,
...) = (..., τ
d
(M
d
, s
d
), ...) = N
′
, 2. Forea hnew omponent
d ∈ (D
′
− D)
, initializedtoinitialstate
s
0,d
:τ (..., M
d
, s
d
,
...) = (..., τ
d
(M
d
, s
d
), ...) = (N
′
, (..., s
0,d
, ...))
.4.3.5 Closure under oupling
Theorem 4.4. DYS-DEVS formalism is losed under oupling, i.e., onsid-ering an initial network
N = (X, Y, D, {M
d
}, {I
d
}, {Z
i,d
}, Select)
,where ea h omponentd ∈ D
is a basi dynami stru ture omponent DYS-DEVSd
, and wheretherearedynami singlepointsof ontrol of stru ture hanges,thesetof networksN
isequivalenttoa resultantDEVS= (X, Y, S, δ
ext
, δ
int
, λ, ta)
. Proof. Letthetimeremaining tothenexteventσ
d
= ta
d
(s
d
) − e
d
,withta
d
(s
d
)
thetime advan e of a omponent modelM
d
,s
d
its urrent state,e
d
its time elapsed time sin e the last event. Then, the time advan e of the resultant ista(s) = min{σ
d
, | d ∈ D}
. External transitionss
′
= δ
ext
(s, e, x)
at resultantlevel an beexpressed at omponentlevelby:s
′
d
=
δ
ext,d
(s
d
e
d
, x
d
)
if
d ∈ D ∩ D
′
, N ∈ I
d
, x
d
6=
Øs
d,0
if
d ∈ (D − D
′
)
s
d
otherwise
Internal transitionss
′
= δ
int
(s)
at resultantlevel anbeexpressedat om-ponentlevelby:s
′
d
=
δ
ext,d
(s
d
e
d
, x
d
)
if
d ∈ D ∩ D
′
, d ∈ I
d
∗
, x
d
6=
Øδ
int,d
(s
d
)
if
d ∈ D ∩ D
′
, d
∗
= d
s
d,0
if
d ∈ (D − D
′
)
s
d
otherwise
General losureunder ouplingyieldsaDEVSwhi hisnotne essarilylegitimate -there ouldbealoopof omponentsthata tivateea hotherwithoutadvan ing time(ea h havingatransient(zero-time) statetooutput andthenwaitingfor input). Hen e,thesamesituation anholdforthenondynami stru turepart of a DYS-DEVS, onsidering dynami stru ture operations at network level. Therefore, onditionsofDYS-DEVS legitima yhavetobeexposed.
Theorem4.5. A DYS-DEN
= (N , S, τ )
islegitimate (i.e., orresponding dy-nami stru ture operations always terminate)if ea h networkN ∈ N
is legiti-mate,the resultantbeingalsolegitimate.Proof. ADEVSM islegitimate underfollowing onditions[6℄:
1. M isnite(partialstatesetS isnite): Every y leinthe state diagram ofinternal transitions
δ
int
ontainsa non-transitorystateta(s) > 0
(ne essary andsu ient ondi-tion).2. M isinnite: Thereisapositivelowerboundonthetime advan es,i.e.,
∃b ∀s ∈ S, ta(s) > b
(su ient ondition).Although,ithasbeenprovedinTheorem4.2that onuentdynami stru -tureoperations donotinterfere, forsake ofsimpli ityit is assumed herethat thereare no onuentdynami stru ture operationsfor ea h network
N ∈ N
. Then, at ea h time, ea h omponent an be on erned by only one dynami stru tureoperation.Also,itis assumedthat ea h network
N ∈ N
islegitimate, i.e., ea h orre-spondingresultantdoesnotgetstu kintimeandspe iesawell-deneddynami system.In anetwork, among basi dynami stru ture operations, self-deletion( f. Example 4.4) onsists of 9 onse utiveinternal and externaltransitions. It is thelongest sequen e of basi dynami stru ture operations. Ea h other basi dynami stru ture operation terminates in fewer (zero-time) transitions. To showthis,bothinternalandexternaldynami stru ture hanges anbe onsid-ered. Beingindependent,forone omponent
d ∈ D
, hangingitsinternalmodelM
int,d
onsists merely of 1 transition:(M
′
int,d
, s
′
d
) = τ
int,d
(M
int,d
, δ
int,d
(s
d
))
. Depending onthe intera tionof onerequesting omponenti ∈ D
andone an-swering omponentj ∈ D
, hanging external modelM
ext,i
implies hanging external modelM
ext,j
. This onsists of abasi lo k syn hronization message ex hanges ( f. Figure2), i.e.:1. Twotransitions for omponent
i ∈ D
: (a)δ
int,i
(request)
,(b)
(M
′
ext,i
, s
′
i
) = τ
ext,i
(M
ext,i
, δ
ext,i
(request, 0, done))
. 2. Twotransitions for omponentj ∈ D
:(a)
δ
int,j
(done)
, (b)(M
′
ext,j
, done) = τ
ext,j
(M
ext,j
, δ
ext,j
(s
j
, e
j
, request))
.Hen e, hanging external models onsists of 4 zero-time transitions. Finally, self-deletionofa omponent
i ∈ D
onsistsofsummingthefollowingsteps:1. Mutually hangingboth externalmodels
M
ext,j
withi ∈ I
j
(re-moving orrespondinginput/outputof omponentj ∈ D
and out-going ouplingsto omponenti ∈ D
)and external modelM
ext,i
(removing orresponding input/output of omponenti ∈ D
and outgoing ouplingsto omponentj ∈ D
)-8 zero-timetransitions; 2. Self-deletion nally onsisting of the deletion of internal modelM
int,i
(in ludingthe update ofnetwork stru ture) - 1 zero-time transition.Considering a DYS-DEN
= (N , S, τ )
, where ea h networkN ∈ N
is legiti-mate, orrespondingdynami stru tureoperationsalwaysterminateindividually inlessthan 9zero-timetransitions,thenthe resultantislegitimate.5 Con lusion and perspe tive
Usingsinglepointen apsulated ontrolfun tionsthisarti leprovesthatafully modularde entralizationofdynami stru turesystemsispossiblewhilekeeping theapproa hsimpleenough. Futhermore,anewwayofintegratingformalisms andspe ifyingdynami stru turedis reteeventsystemsisproposed.
Thegoalofthisworkisreallytopreserveandtoparti ipatetothediversity of the dynami stru ture resear h eld. Modeling the intera tions between stru tureandstatedynami sisnoteasy. However,thisshouldnotbeanex use for onstrainingtoomu hthe ontrolme hanisms. Otherwise,itiswellknown that toomu h onstraintskills diversityand usually leads to the sterilization ofaeld. It ishopedthat this ontributionwill betheo asionto sharenew perspe tives.
A rst perspe tive on erns the implementation of abstra t simulators to automaterequest/donemessageex hange proto ol. A se ond perpe tive on- ernsthegeneralizationofsinglepointsof ontroltomultiple pointsof ontrol allowingmanystru ture hangestoo urinparallel.
Referen es
515,1997.
[2℄ Adelinde Uhrma her. Dynami stru tures in modeling and simulation: a ree tive approa h. ACM Trans. Model. Comput. Simul., 11(2):206232, 2001.
[3℄ XiaolinHu, BernardP. Zeigler, andSaurabh Mittal. Variable stru ture in devs omponent-basedmodeling andsimulation. Simulation, 81(2):91102, February2005.
[4℄ F.J.Barros. Modeling andsimulationofdynami stru tureheterogeneous owsystems. SIMULATION,78(1):1827,January2002.
[5℄ Fernando J. Barrosand Bernard P. Zeigler. Model interoperability in the dis rete event paradigm: Representation of ontinuous models. Modeling andSimulationTheoryandPra ti e,pages103126,2003.
[6℄ H.PraehoferB.P.Zeigler,T.G.Kim. Theory ofModelingandSimulation. A ademi Press,2000.
[7℄ FernandoJ.Barros. Aformalrepresentationofhybridmobile omponents. Simulation,81(5):381393,2005.
[8℄ G.H. Kim and T.G. Kim. Framework for modeling/simulation of mobile agent systems. In Pro eedings of the 2000 Conferen e on AI, Simulation andPlanningin HighAutonomy Systems,pages5359,2000.