Contents
Simulation algorithms for coupled DEVS
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 and elapsed time by introducing two other time variables, last event time,, and next event time with the following relations: and where denotes the current time. And the remaining time, is equivalently computed as apparently. Based on these relationships, the algorithms to simulate the behavior of a given Coupled DEVS are written as follows.
Algorithm
algorithm DEVS-coordinator Variables: parent // parent coordinator t_l: // time of last event t_n: // time of next event // the associated Coupled DEVS model when receive init-message(Time t) for each i \in D do send init-message(t) to child i ; ; when receive star-message(Time t) if t \ne t_n then error: bad synchronization; send star-message(t)to i^* ; ; when receive x-message(x \in X, Time t) if ( t_l \le t and t \le t_n ) == false then error: bad synchronization; for each do send x-message(x_i,t) to child i ; ; when receive y-message(y_i \in Y_i, Time t) for each do send x-message(x_i,t) to child i if then send y-message(C_{yy}(y_i), t) to parent; ; ;
This article is derived from Wikipedia and licensed under CC BY-SA 4.0. View the original article.
Wikipedia® is a registered trademark of the
Wikimedia Foundation, Inc.
Bliptext is not
affiliated with or endorsed by Wikipedia or the
Wikimedia Foundation.