Samiksha Jaiswal (Editor)

Simulation algorithms for atomic DEVS

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

Given an atomic DEVS model, simulation algorithms are methods to generate the model's legal behaviors which are trajectories not to reach to illegal states. (see Behavior of DEVS). [Zeigler84] originally introduced the algorithms that handle time variables related to lifespan t s [ 0 , ] and elapsed time t e [ 0 , ) by introducing two other time variables, last event time, t l [ 0 , ) , and next event time t n [ 0 , ] with the following relations:

Contents

t e = t t l

and

t s = t n t l

where t [ 0 , ) denotes the current time. And the remaining time,

t r = t s t e

is equivalently computed as

t r = t n t

, apparently t r [ 0 , ] .

Since the behavior of a given atomic DEVS model can be defined in two different views depending on the total state and the external transition function (refer to Behavior of DEVS), the simulation algorithms are also introduced in two different views as below.

Common parts

Regardless of two different views of total states, algorithms for initialization and internal transition cases are commonly defined as below.

DEVS-simulator variables: parent // parent coordinator t l // time of last event t n // time of next event A = ( X , Y , S , t a , δ e x t , δ i n t , λ ) // the associated Atomic DEVS model when receive init-message(Time t ) t l t ; t n t l + t a ( s ) ; when receive star-message(Time t ) if t t n then error: bad synchronization; y λ ( s ) ; send y-message( y , t ) to parent; s δ i n t ( s ) t l t ; t n t l + t a ( s ) ;

View 1: total states = states * elapsed times

As addressed in Behavior of Atomic DEVS, when DEVS receives an input event, right calling δ e x t , the last event time, t l is set by the current time, t , thus the elapsed time t e becomes zero because t e = t t l .

when receive x-message( x X , Time t ) if ( t l t and t t n ) == false then error: bad synchronization; s δ e x t ( s , t t l , x ) t l t ; t n t l + t a ( s ) ;

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

Notice that as addressed in Behavior of Atomic DEVS, depending on the value of b return by δ e x t , last event time, t l , and next event time, t n ,consequently, elapsed time, t e , and lifespan t n , are updated (if b = 1 ) or preserved (if b = 0 ).

when receive x-message( x X , Time t ) if ( t l t and t t n ) == false then error: bad synchronization; ( s , b ) δ e x t ( s , t t l , x ) if b = 1 then t l t ; t n t l + t a ( s ) ;

References

Simulation algorithms for atomic DEVS Wikipedia