Neha Patil (Editor)

Simulation algorithms for coupled DEVS

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

Given a coupled DEVS model, simulation algorithms are methods to generate the model's legal behaviors, which are a set of trajectories not to reach illegal states. (see behavior of a Coupled DEVS model.) [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:

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 , ∞ ] .

Based on these relationships, the algorithms to simulate the behavior of a given Coupled DEVS are written as follows.

Algorithms

DEVS-coordinator Variables: parent // parent coordinator t l : // time of last event t n : // time of next event N = ( X , Y , D , { M i } , C x x , C y x , C y y , S e l e c t ) // the associated Coupled DEVS model when receive init-message(Time t) for each i ∈ D do send init-message(t) to child i t l ← max { t l i : i ∈ D } ; t n ← min { t n i : i ∈ D } ; when receive star-message(Time t) if t ≠ t n then error: bad synchronization; i ∗ ← S e l e c t ( { i ∈ D : t n i = t n } ) ; send star-message(t)to i ∗ t l ← max { t l i : i ∈ D } ; t n ← min { t n i : i ∈ D } ; when receive x-message( x ∈ X , Time t) if ( t l ≤ t and t ≤ t n ) == false then error: bad synchronization; for each ( x , x i ) ∈ C x x do send x-message( x i ,t) to child i t l ← max { t l i : i ∈ D } ; t n ← min { t n i : i ∈ D } ; when receive y-message( y i ∈ Y i , Time t) for each ( y i , x i ) ∈ C y x do send x-message( x i ,t) to child i if C y y ( y i ) ≠ ϕ then send y-message( C y y ( y i ) , t) to parent; t l ← max { t l i : i ∈ D } ; t n ← min { t n i : i ∈ D } ;

References

Simulation algorithms for coupled DEVS Wikipedia


Similar Topics
×