- Source: Behavior of coupled DEVS
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=
, 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=
where
X
{\displaystyle X}
and
Y
{\displaystyle Y}
are the input event set and the output event set, respectively.
S
=
×
i
∈
D
Q
i
{\displaystyle S={\underset {i\in D}{\times }}Q_{i}}
is the partial state set where
Q
i
=
{
(
s
i
,
t
e
i
)
|
s
i
∈
S
i
,
t
e
i
∈
(
T
∩
[
0
,
t
a
i
(
s
i
)
]
)
}
{\displaystyle Q_{i}=\{(s_{i},t_{ei})|s_{i}\in S_{i},t_{ei}\in (\mathbb {T} \cap [0,ta_{i}(s_{i})])\}}
is the total state set of component
i
∈
D
{\displaystyle i\in D}
(Refer to View1 of Behavior of DEVS), where
T
=
[
0
,
∞
)
{\displaystyle \mathbb {T} =[0,\infty )}
is the set of non-negative real numbers.
s
0
=
×
i
∈
D
q
0
i
{\displaystyle s_{0}={\underset {i\in D}{\times }}q_{0i}}
is the initial state set where
q
0
i
=
(
s
0
i
,
0
)
{\displaystyle q_{0i}=(s_{0i},0)}
is the total initial state of component
i
∈
D
{\displaystyle i\in D}
.
t
a
:
S
→
T
∞
{\displaystyle ta:S\rightarrow \mathbb {T} ^{\infty }}
is the time advance function, where
T
∞
=
[
0
,
∞
]
{\displaystyle \mathbb {T} ^{\infty }=[0,\infty ]}
is the set of non-negative real numbers plus infinity. Given
s
=
(
…
,
(
s
i
,
t
e
i
)
,
…
)
{\displaystyle s=(\ldots ,(s_{i},t_{ei}),\ldots )}
,
δ
e
x
t
:
Q
×
X
→
S
{\displaystyle \delta _{ext}:Q\times X\rightarrow S}
is the external state function. Given a total state
q
=
(
s
,
t
e
)
{\displaystyle q=(s,t_{e})}
where
s
=
(
…
,
(
s
i
,
t
e
i
)
,
…
)
,
t
e
∈
(
T
∩
[
0
,
t
a
(
s
)
]
)
{\displaystyle s=(\ldots ,(s_{i},t_{ei}),\ldots ),t_{e}\in (\mathbb {T} \cap [0,ta(s)])}
, and input event
x
∈
X
{\displaystyle x\in X}
, the next state is given by
where
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
n
t
:
S
→
S
{\displaystyle \delta _{int}:S\rightarrow S}
is the internal state function. Given a partial state
s
=
(
…
,
(
s
i
,
t
e
i
)
,
…
)
{\displaystyle s=(\ldots ,(s_{i},t_{ei}),\ldots )}
, the next state is given by
where
λ
:
S
→
Y
ϕ
{\displaystyle \lambda :S\rightarrow Y^{\phi }}
is the output function. Given a partial state
s
=
(
…
,
(
s
i
,
t
e
i
)
,
…
)
{\displaystyle s=(\ldots ,(s_{i},t_{ei}),\ldots )}
,
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=
, 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=
where
X
{\displaystyle X}
and
Y
{\displaystyle Y}
are the input event set and the output event set, respectively.
S
=
×
i
∈
D
Q
i
{\displaystyle S={\underset {i\in D}{\times }}Q_{i}}
is the partial state set where
Q
i
=
{
(
s
i
,
t
s
i
,
t
e
i
)
|
s
i
∈
S
i
,
t
s
i
∈
T
∞
,
t
e
i
∈
(
T
∩
[
0
,
t
s
i
]
)
}
{\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}])\}}
is the total state set of component
i
∈
D
{\displaystyle i\in D}
(Refer to View2 of Behavior of DEVS).
s
0
=
×
i
∈
D
q
0
i
{\displaystyle s_{0}={\underset {i\in D}{\times }}q_{0i}}
is the initial state set where
q
0
i
=
(
s
0
i
,
t
a
i
(
s
0
i
)
,
0
)
{\displaystyle q_{0i}=(s_{0i},ta_{i}(s_{0i}),0)}
is the total initial state of component
i
∈
D
{\displaystyle i\in D}
.
t
a
:
S
→
T
∞
{\displaystyle ta:S\rightarrow \mathbb {T} ^{\infty }}
is the time advance function. Given
s
=
(
…
,
(
s
i
,
t
s
i
,
t
e
i
)
,
…
)
{\displaystyle s=(\ldots ,(s_{i},t_{si},t_{ei}),\ldots )}
,
δ
e
x
t
:
Q
×
X
→
S
×
{
0
,
1
}
{\displaystyle \delta _{ext}:Q\times X\rightarrow S\times \{0,1\}}
is the external state function. Given a total state
q
=
(
s
,
t
s
,
t
e
)
{\displaystyle q=(s,t_{s},t_{e})}
where
s
=
(
…
,
(
s
i
,
t
s
i
,
t
e
i
)
,
…
)
,
t
s
∈
T
∞
,
t
e
∈
(
T
∩
[
0
,
t
s
]
)
{\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}])}
, and input event
x
∈
X
{\displaystyle x\in X}
, the next state is given by
where
and
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
n
t
:
S
→
S
{\displaystyle \delta _{int}:S\rightarrow S}
is the internal state function. Given a partial state
s
=
(
…
,
(
s
i
,
t
s
i
,
t
e
i
)
,
…
)
{\displaystyle s=(\ldots ,(s_{i},t_{si},t_{ei}),\ldots )}
, the next state is given by
where
λ
:
S
→
Y
ϕ
{\displaystyle \lambda :S\rightarrow Y^{\phi }}
is the output function. Given a partial state
s
=
(
…
,
(
s
i
,
t
s
i
,
t
e
i
)
,
…
)
{\displaystyle s=(\ldots ,(s_{i},t_{si},t_{ei}),\ldots )}
,
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
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
Remarks
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
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.
Kata Kunci Pencarian:
- Behavior of coupled DEVS
- DEVS
- Behavior of DEVS
- Simulation algorithms for coupled DEVS
- Simulation algorithms for atomic DEVS
- Finite & Deterministic Discrete Event System Specification
- Hybrid system
- SP-DEVS
- Adolescent sexuality
- Oxytocin