Behavior of coupled DEVS
In theoretical computer science, DEVS is closed under coupling [Zeigper84] [ZPK00]. In other words, given a coupled DEVS model [math]\displaystyle{ N }[/math], its behavior is described as an atomic DEVS model [math]\displaystyle{ M }[/math]. For a given coupled DEVS [math]\displaystyle{ N }[/math], once we have an equivalent atomic DEVS [math]\displaystyle{ M }[/math], behavior of [math]\displaystyle{ M }[/math] 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 [math]\displaystyle{ N = \lt X,Y,D,\{M_i\},C_{xx}, C_{yx}, C_{yy}, Select\gt }[/math], its behavior is described as an atomic DEVS model [math]\displaystyle{ M = \lt X,Y,S,s_0,ta, \delta_{ext}, \delta_{int}, \lambda\gt }[/math]
where
- [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math] are the input event set and the output event set, respectively.
- [math]\displaystyle{ S=\underset{i \in D}\times Q_i }[/math] is the partial state set where [math]\displaystyle{ Q_i=\{(s_i,t_{ei})| s_i \in S_i, t_{ei} \in (\mathbb{T} \cap [0, ta_i(s_i)])\} }[/math] is the total state set of component [math]\displaystyle{ i \in D }[/math] (Refer to View1 of Behavior of DEVS), where [math]\displaystyle{ \mathbb{T}=[0,\infty) }[/math] is the set of non-negative real numbers.
- [math]\displaystyle{ s_0=\underset{i \in D}\times q_{0i} }[/math] is the initial state set where [math]\displaystyle{ q_{0i}=(s_{0i},0) }[/math] is the total initial state of component [math]\displaystyle{ i \in D }[/math].
- [math]\displaystyle{ ta:S \rightarrow \mathbb{T}^\infty }[/math] is the time advance function, where [math]\displaystyle{ \mathbb{T}^\infty=[0,\infty] }[/math] is the set of non-negative real numbers plus infinity. Given [math]\displaystyle{ s=(\ldots, (s_{i},t_{ei}),\ldots) }[/math], [math]\displaystyle{ ta(s)= \min\{ ta_i(si) - t_{ei}| i \in D\}. }[/math]
- [math]\displaystyle{ \delta_{ext}:Q \times X \rightarrow S }[/math] is the external state function. Given a total state [math]\displaystyle{ q=(s,t_e) }[/math] where [math]\displaystyle{ s=(\ldots, (s_{i}, t_{ei}),\ldots), t_e \in (\mathbb{T}\cap [0,ta(s)] ) }[/math], and input event [math]\displaystyle{ x \in X }[/math], the next state is given by [math]\displaystyle{ \delta_{ext}(q, x)=s'=(\ldots,(s_i', t_{ei}'), \ldots) }[/math]
where
Given the partial state [math]\displaystyle{ s=(\ldots,(s_i, t_{ei}),\ldots) \in S }[/math], let [math]\displaystyle{ IMM(s)=\{i \in D| ta_i(s_i) = ta(s) \} }[/math] denote the set of imminent components. The firing component [math]\displaystyle{ i^* \in D }[/math] which triggers the internal state transition and an output event is determined by
- [math]\displaystyle{ \delta_{int}:S \rightarrow S }[/math] is the internal state function. Given a partial state [math]\displaystyle{ s=(\ldots, (s_{i}, t_{ei}),\ldots) }[/math], the next state is given by [math]\displaystyle{ \delta_{int}(s)=s'=(\ldots,(s_i', t_{ei}'), \ldots) }[/math]
where
- [math]\displaystyle{ \lambda:S \rightarrow Y^\phi }[/math] is the output function. Given a partial state [math]\displaystyle{ s=(\ldots, (s_{i}, t_{ei}),\ldots) }[/math], [math]\displaystyle{ \lambda(s)= \begin{cases} \phi &\text{if } \lambda_{i^*}(s_{i^*})=\phi \\ C_{yy}(\lambda_{i^*}(s_{i^*})) &\text{otherwise}. \end{cases} }[/math]
View2: Total states = states * lifespan * elapsed times
Given a coupled DEVS model [math]\displaystyle{ N = \lt X,Y,D,\{M_i\},C_{xx}, C_{yx}, C_{yy}, Select\gt }[/math], its behavior is described as an atomic DEVS model [math]\displaystyle{ M = \lt X,Y,S,s_0,ta, \delta_{ext}, \delta_{int}, \lambda\gt }[/math]
where
- [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math] are the input event set and the output event set, respectively.
- [math]\displaystyle{ S=\underset{i \in D}\times Q_i }[/math] is the partial state set where [math]\displaystyle{ Q_i=\{(s_i,t_{si}, t_{ei})| s_i \in S_i, t_{si} \in \mathbb{T}^\infty, t_{ei} \in (\mathbb{T} \cap [0, t_{si}])\} }[/math] is the total state set of component [math]\displaystyle{ i \in D }[/math] (Refer to View2 of Behavior of DEVS).
- [math]\displaystyle{ s_0=\underset{i \in D}\times q_{0i} }[/math] is the initial state set where [math]\displaystyle{ q_{0i}=(s_{0i},ta_i(s_{0i}),0) }[/math] is the total initial state of component [math]\displaystyle{ i \in D }[/math].
- [math]\displaystyle{ ta:S \rightarrow \mathbb{T}^\infty }[/math] is the time advance function. Given [math]\displaystyle{ s=(\ldots, (s_{i},t_{si},t_{ei}),\ldots) }[/math], [math]\displaystyle{ ta(s)= \min\{ t_{si} - t_{ei}| i \in D\}. }[/math]
- [math]\displaystyle{ \delta_{ext}:Q \times X \rightarrow S \times \{0, 1\} }[/math] is the external state function. Given a total state [math]\displaystyle{ q=(s,t_s,t_e) }[/math] where [math]\displaystyle{ s=(\ldots, (s_{i}, t_{si},t_{ei}),\ldots), t_s \in \mathbb{T}^\infty, t_e \in (\mathbb{T}\cap [0,t_s] ) }[/math], and input event [math]\displaystyle{ x \in X }[/math], the next state is given by [math]\displaystyle{ \delta_{ext}(q, x)=((\ldots,(s_i', t_{si}', t_{ei}'), \ldots),b) }[/math]
where
and
Given the partial state [math]\displaystyle{ s=(\ldots,(s_i, t_{si}, t_{ei}),\ldots) \in S }[/math], let [math]\displaystyle{ IMM(s)=\{i \in D| t_{si} - t_{ei} = ta(s) \} }[/math] denote the set of imminent components. The firing component [math]\displaystyle{ i^* \in D }[/math] which triggers the internal state transition and an output event is determined by
- [math]\displaystyle{ \delta_{int}:S \rightarrow S }[/math] is the internal state function. Given a partial state [math]\displaystyle{ s=(\ldots, (s_{i},t_{si}, t_{ei}),\ldots) }[/math], the next state is given by [math]\displaystyle{ \delta_{int}(s)=s'=(\ldots,(s_i', t_{si}', t_{ei}'), \ldots) }[/math]
where
- [math]\displaystyle{ \lambda:S \rightarrow Y^\phi }[/math] is the output function. Given a partial state [math]\displaystyle{ s=(\ldots, (s_{i}, t_{si}, t_{ei}),\ldots) }[/math], [math]\displaystyle{ \lambda(s)= \begin{cases} \phi &\text{if } \lambda_{i^*}(s_{i^*})=\phi \\ C_{yy}(\lambda_{i^*}(s_{i^*})) &\text{otherwise}. \end{cases} }[/math]
Time passage
Since in a coupled DEVS model with non-empty sub-components, i.e., [math]\displaystyle{ |D|\gt 0 }[/math], 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 [math]\displaystyle{ q=(s,t_e) \in Q }[/math] where [math]\displaystyle{ s = (\ldots,(s_i, t_{ei}),\ldots) }[/math]
If unit event segment [math]\displaystyle{ \omega }[/math] is the null event segment, i.e. [math]\displaystyle{ \omega=\epsilon_{[t, t+dt]} }[/math], the state trajectory in terms of Timed Event System is
- For View2
Given a total state [math]\displaystyle{ q=(s,t_s,t_e) \in Q }[/math] where [math]\displaystyle{ s = (\ldots,(s_i, t_{si}, t_{ei}),\ldots) }[/math]
If unit event segment [math]\displaystyle{ \omega }[/math] is the null event segment, i.e. [math]\displaystyle{ \omega=\epsilon_{[t, t+dt]} }[/math], the state trajectory in terms of Timed Event System is
Remarks
- The behavior of a couple DEVS network whose all sub-components are deterministic DEVS models can be non-deterministic if [math]\displaystyle{ Select(IMM(s)) }[/math] is non-deterministic.
See also
- DEVS
- Behavior of Atomic DEVS
- Simulation Algorithms for Coupled DEVS
- Simulation Algorithms for Atomic DEVS
References
- [Zeigler84] Bernard Zeigler (1984). Multifacetted Modeling and Discrete Event Simulation. Academic Press, London; Orlando. ISBN 978-0-12-778450-2.
- [ZKP00] Bernard Zeigler; Tag Gon Kim; Herbert Praehofer (2000). Theory of Modeling and Simulation (second ed.). Academic Press, New York. ISBN 978-0-12-778455-7.
Original source: https://en.wikipedia.org/wiki/Behavior of coupled DEVS.
Read more |