Behavior of coupled DEVS explained

In theoretical computer science, DEVS is closed under coupling [Zeigper84] [ZPK00]. In other words, given a coupled DEVS model

N

, its behavior is described as an atomic DEVS model

M

. For a given coupled DEVS

N

, once we have an equivalent atomic DEVS

M

, behavior of

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,\{Mi\},Cxx,Cyx,Cyy,Select>

, its behavior is described as an atomic DEVS model

M=<X,Y,S,s0,ta,\deltaext,\deltaint,λ>

where

X

and

Y

are the input event set and the output event set, respectively.

S=\underset{i\inD} x Qi

is the partial state set where

Qi=\{(si,tei)|si\inSi,tei\in(T\cap[0,tai(si)])\}

is the total state set of component

i\inD

(Refer to View1 of Behavior of DEVS), where

T=[0,infty)

is the set of non-negative real numbers.

s0=\underset{i\inD} x q0i

is the initial state set where

q0i=(s0i,0)

is the total initial state of component

i\inD

.

ta:STinfty

is the time advance function, where

Tinfty=[0,infty]

is the set of non-negative real numbers plus infinity. Given

s=(\ldots,(si,tei),\ldots)

,

ta(s)=min\{tai(si)-tei|i\inD\}.

\deltaext:Q x XS

is the external state function. Given a total state

q=(s,te)

where

s=(\ldots,(si,tei),\ldots),te\in(T\cap[0,ta(s)])

, and input event

x\inX

, the next state is given by

\deltaext(q,x)=s'=(\ldots,(si',tei'),\ldots)

where

(si',tei')=\begin{cases} (\deltaext(si,tei,xi),0)&if(x,xi)\inCxx\\ (si,tei)&otherwise. \end{cases}

Given the partial state

s=(\ldots,(si,tei),\ldots)\inS

, let

IMM(s)=\{i\inD|tai(si)=ta(s)\}

denote the set of imminent components. The firing component

i*\inD

which triggers the internal state transition and an output event is determined by

i*=Select(IMM(s)).

\deltaint:SS

is the internal state function. Given a partial state

s=(\ldots,(si,tei),\ldots)

, the next state is given by

\deltaint(s)=s'=(\ldots,(si',tei'),\ldots)

where

(si',tei')=\begin{cases} (\deltaint(si),0)&ifi=

*\\ (\delta
i
ext

(si,tei,xi),0)&if

(λ
i*
(s
i*

),xi)\inCyx\\ (si,tei)&otherwise. \end{cases}

λ:SY\phi

is the output function. Given a partial state

s=(\ldots,(si,tei),\ldots)

,

λ(s)= \begin{cases}\phi&if

λ
i*
(s
i*

)=\phi\\ Cyy

(λ
i*
(s
i*

))&otherwise. \end{cases}

View2: Total states = states * lifespan * elapsed times

Given a coupled DEVS model

N=<X,Y,D,\{Mi\},Cxx,Cyx,Cyy,Select>

, its behavior is described as an atomic DEVS model

M=<X,Y,S,s0,ta,\deltaext,\deltaint,λ>

where

X

and

Y

are the input event set and the output event set, respectively.

S=\underset{i\inD} x Qi

is the partial state set where

Qi=\{(si,tsi,tei)|si\inSi,tsi\inTinfty,tei\in(T\cap[0,tsi])\}

is the total state set of component

i\inD

(Refer to View2 of Behavior of DEVS).

s0=\underset{i\inD} x q0i

is the initial state set where

q0i=(s0i,tai(s0i),0)

is the total initial state of component

i\inD

.

ta:STinfty

is the time advance function. Given

s=(\ldots,(si,tsi,tei),\ldots)

,

ta(s)=min\{tsi-tei|i\inD\}.

\deltaext:Q x XS x \{0,1\}

is the external state function. Given a total state

q=(s,ts,te)

where

s=(\ldots,(si,tsi,tei),\ldots),ts\inTinfty,te\in(T\cap[0,ts])

, and input event

x\inX

, the next state is given by

\deltaext(q,x)=((\ldots,(si',tsi',tei'),\ldots),b)

where

(si',tsi',tei')=\begin{cases} (si',tai(si'),0)&if(x,xi)\inCxx,\deltaext(si,tsi,tei,xi)=(si',1)\\ (si',tsi,tei)&if(x,xi)\inCxx,\deltaext(si,tsi,tei,xi)=(si',0)\\ (si,tsi,tei)&otherwise \end{cases}

and

b= \begin{cases} 1&if\existsi\inD:(x,xi)\inCxx,\deltaext(si,tsi,tei,xi)=(si',1)\\ 0&otherwise. \end{cases}

Given the partial state

s=(\ldots,(si,tsi,tei),\ldots)\inS

, let

IMM(s)=\{i\inD|tsi-tei=ta(s)\}

denote the set of imminent components. The firing component

i*\inD

which triggers the internal state transition and an output event is determined by

i*=Select(IMM(s)).

\deltaint:SS

is the internal state function. Given a partial state

s=(\ldots,(si,tsi,tei),\ldots)

, the next state is given by

\deltaint(s)=s'=(\ldots,(si',tsi',tei'),\ldots)

where

(si',tsi',tei')=\begin{cases} (si',tai(si'),0)&ifi=

*,\delta
i
int

(si)=si',\\ (si',tai(si'),0)&if

(λ
i*
(s
i*

),xi)\inCyx,\deltaext(si,tsi,tei,xi)=(s',1)\\ (si',tsi,tei)&if

(λ
i*
(s
i*

),xi)\inCyx,\deltaext(si,tsi,tei,xi)=(s',0)\\ (si,tsi,tei)&otherwise. \end{cases}

λ:SY\phi

is the output function. Given a partial state

s=(\ldots,(si,tsi,tei),\ldots)

,

λ(s)= \begin{cases}\phi&if

λ
i*
(s
i*

)=\phi\\ Cyy

(λ
i*
(s
i*

))&otherwise. \end{cases}

Time passage

Since in a coupled DEVS model with non-empty sub-components, i.e.,

|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,te)\inQ

where

s=(\ldots,(si,tei),\ldots)

\omega

is the null event segment, i.e.

\omega=\epsilon[t,

, the state trajectory in terms of Timed Event System is

\Delta(q,\omega)=((\ldots,(si,tei+dt),\ldots),te+dt).

For View2 Given a total state

q=(s,ts,te)\inQ

where

s=(\ldots,(si,tsi,tei),\ldots)

\omega

is the null event segment, i.e.

\omega=\epsilon[t,

, the state trajectory in terms of Timed Event System is

\Delta(q,\omega)=((\ldots,(si,tsi,tei+dt),\ldots),ts,te+dt).

Remarks

  1. The behavior of a couple DEVS network whose all sub-components are deterministic DEVS models can be non-deterministic if

Select(IMM(s))

is non-deterministic.

See also

References