3 BACKGROUND
3.1 DEVS and DEVSimPy Framework
Since the seventies some formal work have been
directed in order to develop the theoretical base-
ments for the M&S of dynamical discrete-event sys-
tems (Zeigler, 2003). DEVS (Discrete EVent system
Specification) (Zeigler et al., 2000) has been intro-
duced as an abstract formalism for the modeling of
discrete-event systems, and allows a complete inde-
pendence from the simulator using the notion of ab-
stract simulator.
DEVS defines two kinds of models: atomic mod-
els and coupled models. An atomic model is a ba-
sic model with specifications for the dynamics of the
model. It describes the behavior of a component,
which is indivisible, in a timed state transition level.
Coupled models tell how to couple several compo-
nent models together to form a new model. This kind
of model can be employed as a component in a larger
coupled model, thus giving rise to the construction of
complex models in a hierarchical fashion. As in gen-
eral systems theory, a DEVS model contains a set of
states and transition functions that are triggered by the
simulator.
Figure 3: DEVS atomic model in action.
The Figure 3 describes the behaviour of a discrete-
event system as a sequence of deterministic transi-
tions between sequential states (S). The atomic model
(AM in Figure 3) reacts depending on two types of
events: external and internal events. When an input
event occurs (X), an external event (coming from an-
other model) trigger the external transition function
δ
ext
(X, S) of the atomic model in order to update its
state. If no input event occurs, an internal event trig-
ger the internal transition δ
int
(S) of the atomic model
in order to update its state. Then, the output function
λ(S) of the atomic model is executed to generate the
outputs (Y ). t
a
(S) is the time advance function which
determine the life time of a state.
DEVSimPy (Capocchi et al., 2011) is an open
Source project (under GPL V.3 license) supported by
the SPE (Science pour l’Environnement) team of the
UMR CNRS 6134 Lab. of the university of Corsica
”Pasquale Paoli”. This aim is to provide a GUI for
the M&S of PyDEVS and PyPDEVS (Li et al., 2011)
models. PyDEVS is an Application Programming
Interface (API) allowing the implementation of the
DEVS formalism in Python language (Perez et al., ).
PyPDEVS is the parallel version of PyDEVS based on
Parallel DEVS formalism (Chow and Zeigler, 1994)
which is an extension of DEVS formalism. The DE-
VSimPy environment has been developed in Python
with the wxPython (Rappin and Dunn, 2006) graphi-
cal library without strong dependencies other than the
Scipy (Jones et al., 2001) and the Numpy (Oliphant,
2007) scientific python libraries. The basic idea be-
hind DEVSimPy is to wrap the PyDEVS API with
a GUI allowing significant simplification of handling
PyDEVS/PyPDEVS models (like the coupling be-
tween models or their storage into libraries).
Figure 4: DEVSimPy with simulation dialogue window.
Figure 4 shows the DEVSimPy interface with four
interconnected DEVS atomic models (Lamp, Motion-
Gen, LightGen and SwitchGen on the right of the
interface) instantiated from the ”IoT” library frame
(left of the interface) into a coupled model called
”Diagram0”. The simulation is performed by using
the ”Diagram0 Simulator” dialogue windows and the
simulation trace is printed in the ”lamp logger” win-
dow. A plug-in manager is proposed in order to ex-
pand the functionalities of DEVSimPy allowing their
enabling/disabling through a dialog window. In this
paper, a plug-in is used to allow the transposition
of the execution machine strategies validated with
DEVS simulation to WComp environement.
3.2 WComp for IoT
Ubiquitous computing involves collaboration be-
tween all kinds of components to build dynamically
new applications that are adapted to the physical en-
vironment. The complexity of such a system to
sense and adapt to the environment involves solving
problems related to memory management, time con-
straints, etc., between all communicating objects.
SIMULTECH2015-5thInternationalConferenceonSimulationandModelingMethodologies,Technologiesand
Applications
46