Suvarna Garge (Editor)

Behavior of DEVS

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

Behaviors of a given DEVS model is a set of sequences of timed events including null events, called event segments which make the model move one state to another within a set of legal states. To define this way, the concept of a set of illegal state as well a set of legal states are needed to be introduced.

Contents

In addition, since the behaviors of a given DEVS model needs to define how the state transition change both when time is passed by and when an event occurs, it has been described by a much general formalism, called general system [ZPK00]. In this article, we use a sub-class of General System formalism, called timed event system instead.

Depending on how to define the total state and its external state transition function of DEVS, two ways to define the behavior of a DEVS model using Timed Event System. Since behavior of a coupled DEVS model is defined as an atomic DEVS model, behavior of coupled DEVS class is defined by timed event system.

View 1: total states = states * elapsed times

Suppose that a DEVS model, M =< X , Y , S , s 0 , t a , δ e x t , δ i n t , λ > has

  1. the external state transition δ e x t : Q × X S .
  2. the total state set Q = { ( s , t e ) | s S , t e ( T [ 0 , t a ( s ) ] ) } where t e denotes elapsed time since last event and T = [ 0 , ) denotes the set of non-negative real numbers, and

Then the DEVS model, M is a Timed Event System G =< Z , Q , Q 0 , Q A , Δ > where

  • The event set Z = X Y ϕ .
  • The state set Q = Q A Q N where Q N = { s ¯ S } .
  • The set of initial states Q 0 = { ( s 0 , 0 ) } .
  • The set of accepting states Q A = M . Q .
  • The set of state trajectories Δ Q × Ω Z , [ t l , t u ] × Q is defined for two different cases: q Q N and q Q A . For an non-accepting state q Q N , there is no change together with any even segment ω Ω Z , [ t l , t u ] so ( q , ω , q ) Δ .
  • For a total state q = ( s , t e ) Q A at time t T and an event segment ω Ω Z , [ t l , t u ] as follows.

    If unit event segment ω is the null event segment, i.e. ω = ϵ [ t , t + d t ]

    ( q , ω , ( s , t e + d t ) ) Δ .

    If unit event segment ω is a timed event ω = ( x , t ) where the event is an input event x X ,

    ( q , ω , ( δ e x t ( q , x ) , 0 ) ) Δ .

    If unit event segment ω is a timed event ω = ( y , t ) where the event is an output event or the unobservable event y Y ϕ ,

    { ( q , ω , ( δ i n t ( s ) , 0 ) ) Δ if   t e = t a ( s ) , y = λ ( s ) ( q , ω , s ¯ ) otherwise .

    Computer algorithms to simulate this view of behavior are available at Simulation Algorithms for Atomic DEVS.

    View 2: total states = states * lifespans * elapsed times

    Suppose that a DEVS model, M =< X , Y , S , s 0 , t a , δ e x t , δ i n t , λ > has

    1. the total state set Q = { ( s , t s , t e ) | s S , t s T , t e ( T [ 0 , t s ] ) } where t s denotes lifespan of state s , t e denotes elapsed time since last t s update, and T = [ 0 , ) { } denotes the set of non-negative real numbers plus infinity,
    2. the external state transition is δ e x t : Q × X S × { 0 , 1 } .

    Then the DEVS Q = D is a timed event system G =< Z , Q , Q 0 , Q A , Δ > where

  • The event set Z = X Y ϕ .
  • The state set Q = Q A Q N where Q N = { s ¯ S } .
  • The set of initial states Q 0 = { ( s 0 , t a ( s 0 ) , 0 ) } .
  • The set of acceptance states Q A = M . Q .
  • The set of state trajectories Δ Q × Ω Z , [ t l , t u ] × Q is depending on two cases: q Q N and q Q A . For a non-accepting state q Q N , there is no changes together with any segment ω Ω Z , [ t l , t u ] so ( q , ω , q ) Δ .
  • For a total state q = ( s , t s , t e ) Q A at time t T and an event segment ω Ω Z , [ t l , t u ] as follows.

    If unit event segment ω is the null event segment, i.e. ω = ϵ [ t , t + d t ]

    ( q , ω , ( s , t s , t e + d t ) ) Δ .

    If unit event segment ω is a timed event ω = ( x , t ) where the event is an input event x X ,

    { ( q , ω , ( s , t a ( s ) , 0 ) ) Δ if   δ e x t ( s , t s , t e , x ) = ( s , 1 ) , ( q , ω , ( s , t s , t e ) ) Δ otherwise,i.e.   δ e x t ( s , t s , t e , x ) = ( s , 0 ) .

    If unit event segment ω is a timed event ω = ( y , t ) where the event is an output event or the unobservable event y Y ϕ ,

    { ( q , ω , ( s , t a ( s ) , 0 ) ) Δ if   t e = t s , y = λ ( s ) , δ i n t ( s ) = s , ( q , ω , s ¯ ) Δ otherwise .

    Computer algorithms to simulate this view of behavior are available at Simulation Algorithms for Atomic DEVS.

    Features of View1

    View1 has been introduced by Zeigler [Zeigler84] in which given a total state q = ( s , t e ) Q and

    t a ( s ) = σ

    where σ is the remaining time [Zeigler84] [ZPK00]. In other words, the set of partial states is indeed S = { ( d , σ ) | d S , σ T } where S is a state set.

    When a DEVS model receives an input event x X , View1 resets the elapsed time t e by zero, if the DEVS model needs to ignore x in terms of the lifespan control, modellers have to update the remaining time

    σ = σ t e

    in the external state transition function δ e x t that is the responsibility of the modellers.

    Since the number of possible values of σ is the same as the number of possible input events coming to the DEVS model, that is unlimited. As a result, the number of states s = ( d , σ ) S is also unlimited that is the reason why View2 has been proposed.

    If we don't care the finite-vertex reachability graph of a DEVS model, View1 has an advantage of simplicity for treating the elapsed time t e = 0 every time any input event arrives into the DEVS model. But disadvantage might be modelers of DEVS should know how to manage σ as above, which is not explicitly explained in δ e x t itself but in Δ .

    Features of View2

    View2 has been introduced by Hwang and Zeigler[HZ06][HZ07] in which given a total state q = ( s , t s , t e ) Q , the remaining time, σ is computed as

    σ = t s t e .

    When a DEVS model receives an input event x X , View2 resets the elapsed time t e by zero only if δ e x t ( q , x ) = ( s , 1 ) . If the DEVS model needs to ignore x in terms of the lifespan control, modellers can use δ e x t ( q , x ) = ( s , 0 ) .

    Unlike View1, since the remaining time σ is not component of S in nature, if the number of states, i.e. | S | is finite, we can draw a finite-vertex (as well as edge) state-transition diagram [HZ06][HZ07]. As a result, we can abstract behavior of such a DEVS-class network, for example SP-DEVS and FD-DEVS, as a finite-vertex graph, called reachability graph [HZ06][HZ07].

    References

    Behavior of DEVS Wikipedia