DEVS

From Wikipedia, the free encyclopedia

Jump to: navigation, search

DEVS abbreviating Discrete Event System Specification is a modular and hierarchical formalism for modeling and analyzing general systems that can be discrete event systems which might be described by state transition tables, and continuous state systems which might be described by differential equations, and hybrid continuous state and discrete event systems.

Contents

[edit] History

DEVS is a formalism for modeling and analysis of discrete event systems (DESs). DEVS formalism was invented by Dr. Bernard P. Zeigler who is currently a professor at the University of Arizona in 2007, and was introduced to the public in his first book Theory of Modeling and Simulation in 1976 when he was an associate professor at University of Michigan. DEVS can be seen as an extension of Moore machine [1] which is a finite state automaton where the outputs are determined by the current state alone (and do not depend directly on the input). The extension was done by

  1. associating the lifespan with each state [Zeigler76],
  2. providing a hierarchical concept with an operation, called coupling [Zeigler84].

Since the lifespan of each state is a real number (more precisely, non-negative real) or infinity, it is distinguished from discrete time systems, sequential machine or Moore machine in which time is determined by a tick time multiplied by non-negative integers. Moreover, this lifespan can be a random variable for example the lifespan of a given state can be distributed by exponentially or uniformly. In addition to the time advance function, state transition and output functions of DEVS can be stochastic.

Zeigler proposed a hierarchical simulation algorithm for DEVS model simulation in 1984 [Zeigler84] which was published in Simulation journal in 1987. Since then, many extended formalism from DEVS have been introduced with their own purposes: DESS/DEVS for combined continuous and discrete event systems, P-DEVS for parallel DESs, G-DEVS for piecewise linear state trajectory modeling of DESs, RT-DEVS for realtime DESs, Cell-DEVS for cellular DESs, Fuzzy-DEVS for fuzzy DESs, Dynamic Structuring DEVS for DESs changing their coupling structures dynamically, and so on. In addition to its extensions, there are some subclasses such as SP-DEVS and FD-DEVS have been researched for achieving decidability of system properties.

Due to the modular and hierarchical modeling views as well as its simulation-based analysis capability, DEVS formalism and its variations have been used in many application of engineering (such as hardware design, hardware/software codesign, communications systems, manufacturing systems) and science (such as biology, and sociology)

[edit] Formalism

Fig. 1. A DEVS Model for Ping-Pong Game
Intuitive Example

DEVS defines system behavior as well as system structure. System behavior in DEVS formalism is described using input and output events as well as states. For example, for the ping-pong player of Fig. 1, the input event is ?receive, and the output event is !send. Each player, A, B, has its states: Send and Wait. Send state takes 0.1 seconds to send back the ball that is the output event !send, while Wait lasts the state until the player receives the ball that is the input event ?receive.

The structure of ping-pong game is to connect two players: Player A 's output event !send is transmitted to Player B 's input event ?receive, and vice versa.

In the classic DEVS formalism, Atomic DEVS captures the system behavior, while Coupled DEVS describes the structure of system.

The following formal definition is for Classic DEVS [ZKP00]. In this article, we will use the time base,  \mathbb{T}=[0,\infty) that is the set of non-negative real numbers; the extended time base, \mathbb{T}^\infty=[0,\infty] that is the sent of non-negative real numbers plus infinity.

[edit] Atomic DEVS

An atomic DEVS model is defined as a 7-tuple

M = < X,Y,S,taextint,λ >

where

  • X is the set of input events;
  • Y is the set of output events;
  • S is the set of sequential states (or also called the set of partial states);
  • ta:S \rightarrow \mathbb{T}^\infty is the time advance function which is used to determine the lifespan of a state;
  • \delta_{ext}:Q \times X \rightarrow  S is the external transition function which defines how an input event changes a state of the system, where Q=\{(s,t_e)|s \in S, t_e \in (\mathbb{T} \cap [0, ta(s)])\} is the set of total states, and te is the elapsed time since the last event;
[2]
  • \delta_{int}:S \rightarrow S is the internal transition function which defines how a state of the system changes internally (when the elapsed time reaches to the lifetime of the state);
  • \lambda:S \rightarrow  Y^\phi is the output function where Y^\phi=Y \cup \{\phi\} and  \phi \not\in Y is a silent event or an unobserved event. This function defines how a state of the system generates an output event (when the elapsed time reaches to the lifetime of the state);

[edit] Deterministic DEVS and Non-deterministic DEVS

Let A and B be two arbitrary sets. Then function f:A
\rightarrow B is called deterministic if for a \in
A, f(a) is identical any time. Otherwise, f is called non-deterministic.

A DEVS M = < X,Y,S,taextint,λ > is called deterministic if ta, δext, δint and λ are deterministic. Otherwise, M is called non-deterministic.

The atomic DEVS Model for Ping-Pong Players

The atomic DEVS model for player A of Fig. 1 is given Player= < X,Y,S,s0,taextint,λ > such that

 X = \{?receive\}\,

Y=\{!send\}\,

S=\{(d,\sigma)| d \in \{Wait,Send\}, \sigma \in \mathbb{T}^\infty\}\, and s_0=(Send,0.1)\,

ta(s)=\sigma \text{ for all } s \in S\,

\delta_{ext}(((Wait,\sigma),t_e),?receive)=(Send,0.1)\,

\delta_{ext}(((Send,\sigma),t_e),?receive)=(Send, \sigma-t_e)\,

\delta_{int}(Send,\sigma)=(Wait,\infty),\delta_{int}(Wait,\sigma)=(Send,0.1)\,

\lambda(Send,\sigma)=?send,\lambda_{int}(Wait,\sigma)=\phi\,

Both Player A and Player B are deterministic DEVS models.

[edit] Behavior of Atomic DEVS

Simply speaking, there are two cases that an atomic DEVS model M can change its state s \in S: (1) when an external input  x \in X comes into the system M; (2) when the elapsed time te reaches the lifespan of s which is defined by ta(s). (At the same time of (2), M generates an output  y \in Y which is defined by λ(s).) .

For formal behavior description of given an Atomic DEVS model, refer to the page Behavior of DEVS. Computer algorithms to implement the behavior of a given Atomic DEVS model are available at Simulation Algorithms for Atomic DEVS.

[edit] Coupled DEVS

The coupled DEVS defines which sub-components belong to it and how they are connected with each other. A coupled DEVS model is defined as a 8-tuple

N = < X,Y,D,{Mi},Cxx,Cyx,Cyy,Select >

where

  • X is the set of input events;
  • Y is the set of output events;
  • D is the name set of sub-components;
  • {Mi} is the set of sub-components where for each i \in D, M_i can be either an atomic DEVS model or a coupled DEVS model.
  • C_{xx}\subseteq X \times \bigcup_{i \in D} X_i is the set of external input couplings;
  • C_{yx}\subseteq \bigcup_{i \in D} Y_i \times \bigcup_{i \in D} X_i is the set of internal couplings;
  • C_{yy}: \bigcup_{i \in D} Y_i \rightarrow Y^\phi is the external output coupling function;
  • Select:2^D \rightarrow D is the tie-breaking function which defines how to select the event from the set of simultaneous events;
The coupled DEVS model for Ping-Pong Game

The ping-pong game of Fig. 1 can be modeled as an coupled DEVS model N = < X,Y,D,{Mi},Cxx,Cyx,Cyy,Select > where X = {};Y = {};D = {A,B}; MA and MB is described as above; Cxx = {}; Cyx = {(A.!send,B.?receive),(B.!send,A.?receive)}; and Cyy(A.!send) = φ,Cyy(B.!send) = φ.

[edit] Behavior of Coupled DEVS

Simply speaking, like the behavior of the atomic DEVS class, a coupled DEVS model N changes its components' states (1) when an external event x \in X comes into N; (2) when one of components Mi where  i \in D executes its internal state transition and generates its output  y_i \in Y_i. In both cases (1) and (2), a triggering event is transmitted to all influencees which are defined by coupling sets Cxx,Cyx, and Cyy.

For formal definition of behavior of the coupled DEVS, you can refer to Behavior of Coupled DEVS. Computer algorithms to implement the behavior of a given coupled DEVS mode are available at Simulation Algorithms for Coupled DEVS.

[edit] Analysis Methods

[edit] Simulation for Discrete Event Systems

The simulation algorithm of DEVS models considers two issues: time synchronization and message propagation. Time synchronization of DEVS is to control all models to have the identical current time. However, for an efficient execution, the algorithm makes the current time jump to the most urgent time when an event is scheduled to execute its internal state transition as well as its output generation. Message propagation is to transmit a triggering message which can be either an input or output event along the associated couplings which are defined in a coupled DEVS model. For more detailed information, the reader can refer to Simulation Algorithms for Atomic DEVS and Simulation Algorithms for Coupled DEVS.

[edit] Simulation for Continuous State Systems

By introducing a quantization method which abstracts a continuous segment as a piecewise const segment, DEVS can simulate behaviors of continuous state systems which are described by networks of differential algebraic equations. This research has been initiated by Zeigler in 90's[3] and many properties have been clarified by Prof. Kofman in 2000's and Dr. Nutaro. In 2006, Prof. Cellier who is the author of Continuous System Modeling[Cellier91], and Prof. Kofman wrote a text book, Continuous System Simulation[CK06] in which Chapters 11 and 12 cover how DEVS simulates continuous state systems. Dr. Nutaro's book [Nutaro10], is going to cover the discrete event simulation of continuous state systems too.

[edit] Verification for Discrete Event Systems

As an alternative analysis method against the sampling-based simulation method, an exhaustive generating approach, generally called verification has been applied for analysis of DEVS models. Based-on generating a finite-vertex reachability graph which is behaviorally isomorphic to a given DEVS model, (1) dead-lock and live-lock freeness as qualitative properties are decidable with Schedule-Preserving DEVS (SP-DEVS) and Finite & Deterministic DEVS (FD-DEVS), and (2) min/max processing time bounds as a quantitative property are decidable with SP-DEVS so far in 2007.

[edit] Variations of DEVS

[edit] Extensions

Numerous extensions of the classic DEVS formalism have been developed in the last decades. Among them formalisms which allow to have changing model structures while the simulation time evolves.

Cell-DEVS [Wainer09], Dynamic Structuring DEVS, dynDEVS, Fuzzy-DEVS, G-DEVS, GK-DEVS, ml-DEVS, Symbolic DEVS, Parallel DEVS, Real-Time DEVS, rho-DEVS

[edit] Restrictions

There are some sub-classes known as Schedule-Preserving DEVS (SP-DEVS) and Finite and Deterministic DEVS (FD-DEVS) which were designated to support verification analysis. SP-DEVS and FD-DEVS whose expressiveness are E(SP-DEVS) \subset E(FD-DEVS)\subset E(DEVS) where E(formalism) denotes the expressiveness of formalism.

[edit] See also

[edit] DEVS Related Articles

[edit] Other Formalisms

[edit] External links to DEVS Research Groups

Alphabetical Order

[edit] DEVS Tools

  • adevs: A C++ library for constructing discrete event simulations based on the Parallel DEVS and Dynamic DEVS (dynDEVS) formalisms
  • CD++ An environment for development of DEVS and Cellular DEVS formalisms.
  • CD++Modeler A graphical interface for modeling DEVS and Cell-DEVS applications (with source code).
  • CD++Builder An Eclipse Plugin for developing DEVS and Cell-DEVS models (with source code).
  • CoSMo-Sim: A unified logical, visual, and persistence environment for specifying families of DEVS, Cellular Automata, and XML models. It supports simulation of parallel DEVS models.
  • DEVS++: C++ Open Source Library of DEVS Formalism for simulation analysis
  • DEVS#: C# Open Source Library of DEVS Formalism for simulation and verification analysis
  • DEVS/C++
  • DEVS/HLA
  • DEVSJAVA
  • DEVSim++
  • DEVS-Suite Next generation of DEVSJAVA supporting automated design of experiments in combination with animating models and generating data trajectories at run-time
  • GALATEA
  • JAMES II M&S Framework for many different formalisms including PDEVS and ml-DEVS.
  • JDEVS
  • LSIS DME
  • Mimosa
  • PF3S
  • PowerDEVS
  • Python DEVS
  • SimBeans
  • SmallDEVS
  • VLE

[edit] Footnotes

  1. ^ automata were the mathematical models of Dr. Zeigler's Ph.D. thesis [Zeigler68]
  2. ^ We can also define the external transition function as \delta_{ext}:Q \times X \rightarrow S \times \{0,1\} where  Q = S \times \mathbb{T}^\infty \times \mathbb{T} such that for a total state (s, t_s, t_e) \in Q, s \in S is a partial state,  t_s \in \mathbb{T}^\infty is the lifespan of s, and  t_e \in (\mathbb{T} \cap [0,t_s]) is the elapsed time since last update of ts. For more how to understand this function, refer to the article, Behavior of DEVS.
  3. ^ the use of quantized values in order to simulate continuous systems by means of a discrete event method was empirically tried out a few years sooner - in the early 90's - by a french engineer. He was then working for a company spun off from University of Valenciennes and Hainaut-Cambresis, and now part of the Schneider Electric. This quantization is a feature of a simulation software of which this engineer is the conceptor and main developer, that is used for PLC programs checking.

[edit] References

  • [Cellier91] Francois E. Cellier (1991). Continuous System Modeling (first ed.). Springer. ISBN 978-0387975023. 
  • [CK06] Francois E. Cellier and Ernesto Kofman (2006). Continuous System Simulation (first ed.). Springer. ISBN 978-0387261027. 
  • [Nutaro10] James Nutaro (2010). Building Software for Simulation: Theory, Algorithms, and Applications in C++ (first ed.). Wiley. 
  • [Sarjoughian09] Hessam S. Sarjoughian and Vignesh Elamvazhuthi (2009). CoSMoS: A Visual Environment for Component-Based Modeling, Experimental Design, and Simulation. Proceedings of the International Conference on Simulation Tools and Techniques. 
  • [Wainer09] Gabriel A. Wainer (2009). Discrete-Event Modeling and Simulation: A Practitioner's Approach (first ed.). CRC Press. ISBN 978-1420053364. 
  • [Zeiger68] Bernard Zeigler (1968). On the Feedback Complexity of Automata (Ph.D. Thesis ed.). University of Michigan. 
  • [Zeigler76] Bernard Zeigler (1976). Theory of Modeling and Simulation (first ed.). Wiley Interscience, New York. 
  • [Zeigler84] Bernard Zeigler (1984). Multifacetted Modeling and Discrete Event Simulation. Academic Press, London; Orlando. ISBN 978-0127784502. 
  • [Zeigler87] Bernard Zeigler (1987). "Hierarchical, modular discrete-event modelling in an object-oriented environment". Simulation 49: 219–230. doi:10.1177/003754978704900506. 
  • [ZKP00] Bernard Zeigler, Tag Gon Kim, Herbert Praehofer (2000). Theory of Modeling and Simulation (second ed.). Academic Press, New York. ISBN 978-0127784557.