Behavior of coupled DEVS

From HandWiki

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,δext,δint,λ>

where

  • X and Y are the input event set and the output event set, respectively.
  • S=×iDQi is the partial state set where Qi={(si,tei)|siSi,tei(𝕋[0,tai(si)])} is the total state set of component iD (Refer to View1 of Behavior of DEVS), where 𝕋=[0,) is the set of non-negative real numbers.
  • s0=×iDq0i is the initial state set where q0i=(s0i,0) is the total initial state of component iD.
  • ta:S𝕋 is the time advance function, where 𝕋=[0,] is the set of non-negative real numbers plus infinity. Given s=(,(si,tei),),
    ta(s)=min{tai(si)tei|iD}.


  • δext:Q×XS is the external state function. Given a total state q=(s,te) where s=(,(si,tei),),te(𝕋[0,ta(s)]), and input event xX, the next state is given by
    δext(q,x)=s=(,(si,tei),)

where

(si,tei)={(δext(si,tei,xi),0)if (x,xi)Cxx(si,tei)otherwise.

Given the partial state

s=(,(si,tei),)S

, let

IMM(s)={iD|tai(si)=ta(s)}

denote the set of imminent components. The firing component

i*D

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

i*=Select(IMM(s)).
  • δint:SS is the internal state function. Given a partial state s=(,(si,tei),), the next state is given by
    δint(s)=s=(,(si,tei),)

where

(si,tei)={(δint(si),0)if i=i*(δext(si,tei,xi),0)if (λi*(si*),xi)Cyx(si,tei)otherwise.
  • λ:SYϕ is the output function. Given a partial state s=(,(si,tei),),
    λ(s)={ϕif λi*(si*)=ϕCyy(λi*(si*))otherwise.

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,δext,δint,λ>

where

  • X and Y are the input event set and the output event set, respectively.
  • S=×iDQi is the partial state set where Qi={(si,tsi,tei)|siSi,tsi𝕋,tei(𝕋[0,tsi])} is the total state set of component iD (Refer to View2 of Behavior of DEVS).
  • s0=×iDq0i is the initial state set where q0i=(s0i,tai(s0i),0) is the total initial state of component iD.
  • ta:S𝕋 is the time advance function. Given s=(,(si,tsi,tei),),
    ta(s)=min{tsitei|iD}.


  • δext:Q×XS×{0,1} is the external state function. Given a total state q=(s,ts,te) where s=(,(si,tsi,tei),),ts𝕋,te(𝕋[0,ts]), and input event xX, the next state is given by
    δext(q,x)=((,(si,tsi,tei),),b)

where

(si,tsi,tei)={(si,tai(si),0)if (x,xi)Cxx,δext(si,tsi,tei,xi)=(si,1)(si,tsi,tei)if (x,xi)Cxx,δext(si,tsi,tei,xi)=(si,0)(si,tsi,tei)otherwise

and

b={1if iD:(x,xi)Cxx,δext(si,tsi,tei,xi)=(si,1)0otherwise.

Given the partial state

s=(,(si,tsi,tei),)S

, let

IMM(s)={iD|tsitei=ta(s)}

denote the set of imminent components. The firing component

i*D

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

i*=Select(IMM(s)).
  • δint:SS is the internal state function. Given a partial state s=(,(si,tsi,tei),), the next state is given by
    δint(s)=s=(,(si,tsi,tei),)

where

(si,tsi,tei)={(si,tai(si),0)if i=i*,δint(si)=si,(si,tai(si),0)if (λi*(si*),xi)Cyx,δext(si,tsi,tei,xi)=(s,1)(si,tsi,tei)if (λi*(si*),xi)Cyx,δext(si,tsi,tei,xi)=(s,0)(si,tsi,tei)otherwise.
  • λ:SYϕ is the output function. Given a partial state s=(,(si,tsi,tei),),
    λ(s)={ϕif λi*(si*)=ϕCyy(λi*(si*))otherwise.

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)Q where s=(,(si,tei),)

If unit event segment ω is the null event segment, i.e. ω=ϵ[t,t+dt], the state trajectory in terms of Timed Event System is

Δ(q,ω)=((,(si,tei+dt),),te+dt).
For View2

Given a total state q=(s,ts,te)Q where s=(,(si,tsi,tei),)

If unit event segment ω is the null event segment, i.e. ω=ϵ[t,t+dt], the state trajectory in terms of Timed Event System is

Δ(q,ω)=((,(si,tsi,tei+dt),),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

  • [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.