Behavior of coupled DEVS

(Learn how and when to remove this message)

In theoretical computer science, DEVS is closed under coupling [Zeigper84] [ZPK00]. In other words, given a coupled DEVS model N {\displaystyle N} , its behavior is described as an atomic DEVS model M {\displaystyle M} . For a given coupled DEVS N {\displaystyle N} , once we have an equivalent atomic DEVS M {\displaystyle M} , behavior of M {\displaystyle M} can be referred to behavior of atomic DEVS which is based on Timed Event System.

Similar to behavior of atomic DEVS, behavior of the Coupled DEVS class is described depending on definition of the total state set and its handling as follows.

View1: Total states = states * elapsed times

Given a coupled DEVS model N =< X , Y , D , { M i } , C x x , C y x , C y y , S e l e c t > {\displaystyle N=<X,Y,D,\{M_{i}\},C_{xx},C_{yx},C_{yy},Select>} , its behavior is described as an atomic DEVS model M =< X , Y , S , s 0 , t a , δ e x t , δ i n t , λ > {\displaystyle M=<X,Y,S,s_{0},ta,\delta _{ext},\delta _{int},\lambda >}

where


where

( s i , t e i ) = { ( δ e x t ( s i , t e i , x i ) , 0 ) if  ( x , x i ) C x x ( s i , t e i ) otherwise . {\displaystyle (s_{i}',t_{ei}')={\begin{cases}(\delta _{ext}(s_{i},t_{ei},x_{i}),0)&{\text{if }}(x,x_{i})\in C_{xx}\\(s_{i},t_{ei})&{\text{otherwise}}.\end{cases}}}

Given the partial state s = ( , ( s i , t e i ) , ) S {\displaystyle s=(\ldots ,(s_{i},t_{ei}),\ldots )\in S} , let I M M ( s ) = { i D | t a i ( s i ) = t a ( s ) } {\displaystyle IMM(s)=\{i\in D|ta_{i}(s_{i})=ta(s)\}} denote the set of imminent components. The firing component i D {\displaystyle i^{*}\in D} which triggers the internal state transition and an output event is determined by

i = S e l e c t ( I M M ( s ) ) . {\displaystyle i^{*}=Select(IMM(s)).}

where

( s i , t e i ) = { ( δ i n t ( s i ) , 0 ) if  i = i ( δ e x t ( s i , t e i , x i ) , 0 ) if  ( λ i ( s i ) , x i ) C y x ( s i , t e i ) otherwise . {\displaystyle (s_{i}',t_{ei}')={\begin{cases}(\delta _{int}(s_{i}),0)&{\text{if }}i=i^{*}\\(\delta _{ext}(s_{i},t_{ei},x_{i}),0)&{\text{if }}(\lambda _{i^{*}}(s_{i^{*}}),x_{i})\in C_{yx}\\(s_{i},t_{ei})&{\text{otherwise}}.\end{cases}}}

View2: Total states = states * lifespan * elapsed times

Given a coupled DEVS model N =< X , Y , D , { M i } , C x x , C y x , C y y , S e l e c t > {\displaystyle N=<X,Y,D,\{M_{i}\},C_{xx},C_{yx},C_{yy},Select>} , its behavior is described as an atomic DEVS model M =< X , Y , S , s 0 , t a , δ e x t , δ i n t , λ > {\displaystyle M=<X,Y,S,s_{0},ta,\delta _{ext},\delta _{int},\lambda >}

where


where

( s i , t s i , t e i ) = { ( s i , t a i ( s i ) , 0 ) if  ( x , x i ) C x x , δ e x t ( s i , t s i , t e i , x i ) = ( s i , 1 ) ( s i , t s i , t e i ) if  ( x , x i ) C x x , δ e x t ( s i , t s i , t e i , x i ) = ( s i , 0 ) ( s i , t s i , t e i ) otherwise {\displaystyle (s_{i}',t_{si}',t_{ei}')={\begin{cases}(s_{i}',ta_{i}(s_{i}'),0)&{\text{if }}(x,x_{i})\in C_{xx},\delta _{ext}(s_{i},t_{si},t_{ei},x_{i})=(s_{i}',1)\\(s_{i}',t_{si},t_{ei})&{\text{if }}(x,x_{i})\in C_{xx},\delta _{ext}(s_{i},t_{si},t_{ei},x_{i})=(s_{i}',0)\\(s_{i},t_{si},t_{ei})&{\text{otherwise}}\end{cases}}}

and

b = { 1 if  i D : ( x , x i ) C x x , δ e x t ( s i , t s i , t e i , x i ) = ( s i , 1 ) 0 otherwise . {\displaystyle b={\begin{cases}1&{\text{if }}\exists i\in D:(x,x_{i})\in C_{xx},\delta _{ext}(s_{i},t_{si},t_{ei},x_{i})=(s_{i}',1)\\0&{\text{otherwise}}.\end{cases}}}

Given the partial state s = ( , ( s i , t s i , t e i ) , ) S {\displaystyle s=(\ldots ,(s_{i},t_{si},t_{ei}),\ldots )\in S} , let I M M ( s ) = { i D | t s i t e i = t a ( s ) } {\displaystyle IMM(s)=\{i\in D|t_{si}-t_{ei}=ta(s)\}} denote the set of imminent components. The firing component i D {\displaystyle i^{*}\in D} which triggers the internal state transition and an output event is determined by

i = S e l e c t ( I M M ( s ) ) . {\displaystyle i^{*}=Select(IMM(s)).}

where

( s i , t s i , t e i ) = { ( s i , t a i ( s i ) , 0 ) if  i = i , δ i n t ( s i ) = s i , ( s i , t a i ( s i ) , 0 ) if  ( λ i ( s i ) , x i ) C y x , δ e x t ( s i , t s i , t e i , x i ) = ( s , 1 ) ( s i , t s i , t e i ) if  ( λ i ( s i ) , x i ) C y x , δ e x t ( s i , t s i , t e i , x i ) = ( s , 0 ) ( s i , t s i , t e i ) otherwise . {\displaystyle (s_{i}',t_{si}',t_{ei}')={\begin{cases}(s_{i}',ta_{i}(s_{i}'),0)&{\text{if }}i=i^{*},\delta _{int}(s_{i})=s_{i}',\\(s_{i}',ta_{i}(s_{i}'),0)&{\text{if }}(\lambda _{i^{*}}(s_{i^{*}}),x_{i})\in C_{yx},\delta _{ext}(s_{i},t_{si},t_{ei},x_{i})=(s',1)\\(s_{i}',t_{si},t_{ei})&{\text{if }}(\lambda _{i^{*}}(s_{i^{*}}),x_{i})\in C_{yx},\delta _{ext}(s_{i},t_{si},t_{ei},x_{i})=(s',0)\\(s_{i},t_{si},t_{ei})&{\text{otherwise}}.\end{cases}}}

Time passage

Since in a coupled DEVS model with non-empty sub-components, i.e., | D | > 0 {\displaystyle |D|>0} , the number of clocks which trace their elapsed times are multiple, so time passage of the model is noticeable.

For View1

Given a total state q = ( s , t e ) Q {\displaystyle q=(s,t_{e})\in Q} where s = ( , ( s i , t e i ) , ) {\displaystyle s=(\ldots ,(s_{i},t_{ei}),\ldots )}

If unit event segment ω {\displaystyle \omega } is the null event segment, i.e. ω = ϵ [ t , t + d t ] {\displaystyle \omega =\epsilon _{[t,t+dt]}} , the state trajectory in terms of Timed Event System is

Δ ( q , ω ) = ( ( , ( s i , t e i + d t ) , ) , t e + d t ) . {\displaystyle \Delta (q,\omega )=((\ldots ,(s_{i},t_{ei}+dt),\ldots ),t_{e}+dt).}
For View2

Given a total state q = ( s , t s , t e ) Q {\displaystyle q=(s,t_{s},t_{e})\in Q} where s = ( , ( s i , t s i , t e i ) , ) {\displaystyle s=(\ldots ,(s_{i},t_{si},t_{ei}),\ldots )}

If unit event segment ω {\displaystyle \omega } is the null event segment, i.e. ω = ϵ [ t , t + d t ] {\displaystyle \omega =\epsilon _{[t,t+dt]}} , the state trajectory in terms of Timed Event System is

Δ ( q , ω ) = ( ( , ( s i , t s i , t e i + d t ) , ) , t s , t e + d t ) . {\displaystyle \Delta (q,\omega )=((\ldots ,(s_{i},t_{si},t_{ei}+dt),\ldots ),t_{s},t_{e}+dt).}

Remarks

  1. The behavior of a couple DEVS network whose all sub-components are deterministic DEVS models can be non-deterministic if S e l e c t ( I M M ( s ) ) {\displaystyle Select(IMM(s))} is non-deterministic.

See also

References