## Appendix D Introduction to Discrete Event System Specification (DEVS)  
Adapted with permission from special issue on Advances in Modeling and Simulation Theory (TMS) follows the first conference (DEVS Francophone Days) organized by the DEVS (RED) network [49]. The DEVS formalism provides a rigorous formal framework to integrate different formalisms or modeling methods and to define the algorithms of their simulators. The DEVS formalism and its variations allow the system to be described from unambiguous modeling (model) and simulation (simulator) semantics. Here we provide a brief review of the DEVS formalism as it was first defined (known as Classic DEVS) and then as extended to full parallel simulation capability (Parallel DEVS). DEVS is based on the definition of two types of modeling components: the atomic models \(M\) (Equation (A10)) and the coupled models \(N\) (Equation (A11)). Atomic models describe the behavior of the system to be studied using behavioral functions. M evolves according to occurrences of events that generate transitions of internal or external states. It's a kind of state machine. The atomic model M is defined by the tuple:  
\[M=<\!X,\,Y,\,S,\,ta,\,\delta_{int},\,\delta_{ext},\,\lambda>,\] (A10)  
with:  
* \(X\): all the ports of entry;
* \(Y\): the set of output ports;
* \(S\): all the states of the system;
* \(ta\): the function of advancing the time (or lifetime of a state);
* \(\delta int\): the internal transition function. It makes it possible to go from a state s1 at time t1 to a state s2 at time t2 as long as no external event occurs during the life time of state ta(s1);
* \(\delta ext\): the external transition function. It specifies the change of state (transition from state s1 to state s2) when an external event occurs (x) before ta (s1) has elapsed; Q is the set of states such that _{(e,s)_ | \(s\) _in S, 0 \(\leq e\leq ta\) (s)_}; e is the time spent in the state. * \(\lambda\): the output function;  
Coupled models (N) describe the structure and set a priority between components of the model thanks to an adapted function named \"select\". They define how component models are interconnected (atomic or coupled) to form a new model (coupled). A hierarchy of composition is possible. A coupled model includes the following information:  
* the set of models that compose it, \(D\),
* all the input ports that will receive the external events \(X\),
* all the output ports that will emit the \(Y\) events,
* Couplings to input ports and output ports of the models that make up the coupled model. * \(N\) has the following structure:  
\[N=<\!X,\,Y,\,D,\,\{M_{d}/d\;in\;D\},\,EIC,\,EOC,\,IC,\,Select\!\!>\] (A11)  
The definitions of \(X\) and \(Y\) are identical to those of the atomic model. \(D\) is the set of component names (models) of the coupled model. \(Md\) is an atomic or coupled DEVS model. The variables representing the inputs and outputs of the model will be indexed by the model identifier. The inputs and outputs of the coupled model are connected to the inputs and outputs of the models that make up the coupled model. \(EIC\) represents the set of ipN input ports of the coupled model connected to the ipD input ports of the component models. We have the same situation for \(EOC\) output ports. Within the coupled model, the outputs of one model can be coupled to the inputs of the other \(IC\) models. An output of a model cannot be coupled to one of its inputs. Several modeling components can be interconnected with each other in a coupled model and simultaneous events can occur. However, in its original formulation, the DEVS formalism requires to break the causal link between components in the case of simultaneous events. If several interconnected components influence each other, the influencer output events will not be received by the influencers at the same time. This results from the definition of the \"select\" function preventing any possibility of simultaneity in the original DEVS model.