Modular Simulator for DAE-Based Systems Using DEVS Formalism
Aya Attia
a
, Cl
´
ement Foucher
b
and Luiz Fernando Lavado Villa
c
LAAS-CNRS, Universit
´
e de Toulouse, UPS, Toulouse, France
Keywords:
Theory of Modeling and Simulation, Differential-Algebraic Equation, Model Transformation, DEVS,
Symbolic Computations, Graph Grammar, Load Flow Analysis.
Abstract:
Modeling and Simulation of dynamic structure systems present some difficulties, particularly those repre-
sented by Differential-Algebraic Equations (DAEs), as structural changes often require modifying equations.
To address this, we propose a methodology to build simulators based on Theory of Modeling and Simulation,
laying as a foundation for rigorously handling such systems. Our proposal consists of a modular, domain-
independent simulator where system’s behavior can be represented by DAEs. Systems are represented as
graphs, dynamically updated at each step based on predefined scenarios. The simulator automatically gener-
ates and processes equations using transformation rules applied to input graphs. To demonstrate the feasibility
of our proposal, we apply it to the domain of power systems, particularly the Load Flow Analysis process.
1 INTRODUCTION
Dynamic structure systems are characterized by a
composition and internal connections that can evolve
over time. The ever-changing nature of dynamic
structure systems leads to difficulties to provide a
formal representation that can be adjusted to fit sys-
tem’s structural changes, notably, in systems where
models are represented by DAEs. Adapting to these
structural changes often requires modifying the equa-
tions themselves, which represent a break in the sim-
ulation flow. Power systems are a concrete exam-
ple of dynamic structure systems that can be repre-
sented by DAEs. These systems may undergo struc-
tural changes when there is a fault, a black start or
a grid expansion. This challenge highlights the need
for formal approaches that provide seamless integra-
tion of mathematical rigor with practical adaptability.
The Theory of Modeling and Simulation (Zeigler
et al., 2018) provides a robust framework for this pur-
pose. Notably, the Discrete Event System Specifica-
tion (DEVS) formalism provides a root approach to
build models. Despite the theoretical strength of the
DEVS formalism, in practice its implementation re-
mains a significant challenge. Due to the very low
level of the formalism, it may be hard to provide
a mathematical description of the model, therefore,
a
https://orcid.org/0000-0002-8610-1851
b
https://orcid.org/0000-0001-9566-4173
c
https://orcid.org/0000-0002-7157-5106
developers usually go straight to the implementation
without building a formal model (Blas et al., 2023).
This difficulty highlights a recurring issue: the gap
between a strong mathematical formalism and its ac-
tual concrete implementation.
To address this, our goal is to take a formal
approach for the conception of a generic simulator
adapted to various fields of applications. This sim-
ulator should be conceived in a way that allows it to
handle structure changes in the systems using a set
of rules. In this article, we present the first step to-
ward this approach: the root structure of a simulator
built using the DEVS formal specification. It bridges
the gap between theoretical formalism and practical
implementation, offering a structured method for cre-
ating models and implementing them. To achieve
this, we base our simulator on the DEVS formal-
ism by providing a generic library of DEVS com-
ponents that can be assembled to create the simula-
tor. Input models of the simulator are represented
as graphs, a powerful yet simple formalism for rep-
resenting components and their connections. Finally,
using model transformations directly within the sim-
ulator, the graphs are turned into DAEs and processed
using symbolic computations. Symbolic computa-
tions ensure that executable description of system’s
components is conform to formal one. Our proposal
can be tailored to various domains using the provided
components that can be customized to carry on the
specific computations needed by a particular domain.
270
Attia, A., Foucher, C. and Villa, L. F. L.
Modular Simulator for DAE-Based Systems Using DEVS Formalism.
DOI: 10.5220/0013514100003970
In Proceedings of the 15th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH 2025), pages 270-277
ISBN: 978-989-758-759-7; ISSN: 2184-2841
Copyright © 2025 by Paper published under CC license (CC BY-NC-ND 4.0)
2 BACKGROUND AND RELATED
WORK
This section provides an overview of the key concepts
and techniques underlying our proposed approach.
2.1 The Theory of Modeling and
Simulation
Complex systems modeling and simulation repre-
sent a major challenge in various fields. The The-
ory of Modeling and Simulation (TM&S) provides a
structured approach using formalisms such as DEVS.
DEVS is a modular formalism that uses discrete
events to trigger computations at specific points in
time. However, as it is very low-level, it may be hard
to express complex models purely in terms of DEVS
models. DEVS has been provided various extensions,
and we will here use the Parallel-DEVS (PDEVS)
variant (Chow and Zeigler, 1994) that allows for par-
allelism in models execution.
In the TM&S approach, the term model can refer
to two representations of a system: formal model or
executable model. The formal model, also known
as mathematical or abstract model, is a type of rep-
resentation that follows the mathematical grammar of
the formalism in order to provide a formal represen-
tation of the system model. On the other hand, the
executable model, or concrete model, is derived by
translating abstract models into computer programs,
which are then integrated with a simulator capable of
executing the defined functions of these models. The
formal definition of a PDEVS model uses the follow-
ing description: M =< X,Y, S, δ
ext
, δ
int
, δ
con
, λ,ta >
In a DEVS formalism, a model is defined by sets
and functions. The sets include the inputs X, the out-
puts Y, and the internal state S. The behavior of the
model is described through core functions that gov-
ern its dynamics. The external transition function
(δ
ext
) updates the system’s state in reaction to input
events. The internal transition function (δ
int
) man-
ages the system’s autonomous transitions and is in-
voked when the time allocated to a state (t
a
(s)) ex-
pires, also triggering the output function (λ). As the
PDEVS formalism is an extension of DEVS that han-
dles concurrent events, it uses the confluent transition
function (δ
con
) to resolve conflicts.
Formal models are translated to executable code
that can be run using simulators. The goal of simu-
lators is to reproduce the behavior of a real system in
a virtual environment, using models, input data, and
specific parameters. TM&S constituents and their re-
lationships can be represented by Figure 1. In this
figure, we explicitly make the difference between the
Meta-model
Abstract models syntax Abstract simulator
Formal model
Executable models Executable simulator
realization
implemented
as
implemented
into
represented
by
realization
System of interest
Software implementation
0..*
instance of
1
1..*
1
1..*
1 1
1
0..1
0..*
Figure 1: TM&S structural diagram.
formal model, which uses the mathematical syntax of
the meta-model, and the executable model which is an
implementation of the abstract model within a soft-
ware simulation tool. However, it is often the case
that the formal model definition is skipped in favor of
describing the model directly into the simulator (Blas
et al., 2023). While this should not be an issue if the
simulator conforms to the formalism, problems arise
when the simulator allows for some flexibilities that
are not present in the formalism. The modeler can
then be at risk of accidentally breaking the rules of
the formalism without noticing it, which can lead to
fundamentally incorrect models that behave in an un-
predictable way over the simulation course.
2.2 Symbolic Computations
Symbolic computation, or computer algebra, deals
with the automatic generation using computer algo-
rithms of mathematical equations, functions and for-
mulas based on symbols and algebra rules (Buch-
berger, 1996). Through the use of symbolic compu-
tation, mathematical expressions can be represented
with the same strictness as they would be in an ab-
stract model. Symbolic computations can be provided
by various software tools like SymPy (Meurer et al.,
2017), Mathematica (Trott, 2007), Maple (Caravantes
et al., 2019), etc. In this work, we chose to use sym-
bolic equations as the base data that will be acted on
by our simulator. The components of the simulator
will communicate data between each other in the form
of equations, variables and values that they will use to
compute the results of the simulation.
2.3 Graphs
Graphs (Bickle, 2020) are mathematical structures
that can be used to model complex systems in various
domains. The modeling process using graphs consists
in sets of vertices, also called nodes, which repre-
sent system components, and edges, also called links,
which represent the relationships between system’s
Modular Simulator for DAE-Based Systems Using DEVS Formalism
271
components. The interactions between components
are provided by the incidence function ψ which maps
an edge to a pair of vertices. Graph grammar (Xu,
2013) is described by: G = (V, E, ψ), where V and E
are finite sets that represent the vertices and edges re-
spectively, and ψ a mapping function with domain E
and co-domain V ×V .
Combining graph grammar and Chomsky’s gener-
ative grammars (Chomsky, 1956), it is possible to in-
troduce dynamic structure to the system thanks to pro-
duction rules that define how the system’s structure
and composition change over time (Bouassida Ro-
driguez et al., 2010). These evolving graphs can be
represented as follows: G =< AX, NT, T, P >, where
AX is the axiom, NT denotes the set of non-terminal
vertices, T the set of terminal vertices, and P the set
of transformation rules. Figure 2 visualizes the con-
cept of graph grammar and its transformation using
Chomsky’s generative grammars.
V
1
V
2
vertices
graphs
transformation
V
3
V
4
V
1
V
2
V
5
V
4
V
3
edges
Figure 2: Graph grammar and its transformation.
We chose graphs as the base grammar for systems
representation for their simplicity and ability to rep-
resent system changes based on transformation rules.
2.4 Power Systems and LFA
Power systems is a field of electrical engineering that
studies energy distribution and management (Weedy
et al., 2012), typically involve three main elements:
electrical components (such as generators and loads)
that either consume or produce electrical energy,
buses that interconnect nearby electrical components,
and transmission lines that ensure the transfer of
electrical flow between buses over long distances.
Load Flow Analysis (Albadi and Volkov, 2020),
also known as power flow analysis, is a method used
in the electrical engineering field to evaluate and an-
alyze the behavior of electrical networks. This tech-
nique aims to check the steady-state of operating con-
ditions of a power system. A power system is char-
acterized by the following variables: voltage magni-
tudes V (the amplitude of voltage at a bus), angles
δ (the phase shift of a bus voltage relative to a refer-
ence bus), active power P (the power transmitted to
system loads), and reactive power Q (the non-useful
power required to maintain system operation).
The generated results of Load Flow Analysis are
used to make important decisions in planning, design-
ing and operating electrical networks. In particular,
equipment sizes, load flows optimization and evalua-
tion of the stability of the system in response to load
variations and external perturbations.
Many simulators were developed in order to
model power systems, including many based on
MATLAB/Simulink such as (Chaturvedi, 2017). An-
other example of power systems modeling based
on mathematical equations as models can be found
in (Sadnan and Dubey, 2021). This work aims to
model power system using equations that represent
the behavior and interactions of various components
in the power distribution system. Numerous soft-
ware tools dedicated for power systems were created
like RAPSIM (P
¨
ochacker and Elmenreich, 2014),
HOMER (Energy, 1993). Despite their powerful fea-
tures, these are closed tools that must be used as they
are (de Durana et al., 2014). This prevents checking
the simulator itself for flaws in the design or simula-
tion algorithm.
3 FORMAL APPROACH FOR
M&S DAE-BASED SYSTEMS
Our approach focuses on creating a simulator for
DAE-based systems. Our contribution aims to pro-
vide a proposal that is formally defined and can be
used in diverse domains and applications. Applied to
LFA, this simulator is able to simulate static power
grid, and represents a preliminary for future work
on simulating dynamic-structure grids. This proposal
is designed around solid bases such as graphs, the
DEVS formalism and symbolic computations. The
approach we propose consists in three layers, each
addressing a different aspect for M&S of DAE-based
systems as shown in Figure 3. Each layer builds on
rules and structures defined in its underlying layers.
layer 3:
system
specication
layer 2:
specic-domain
abstraction
layer 1:
context-free framework
Figure 3: Multi-layer proposed approach for M&S.
3.1 Layer 1 - Context-Free Framework
The context-free framework represents the root layer
of our approach. This layer consist in a general simu-
lator architecture and a library of generic DEVS com-
ponents. It is defined once and for all and is indepen-
SIMULTECH 2025 - 15th International Conference on Simulation and Modeling Methodologies, Technologies and Applications
272
dent from the domain of application and the simulated
systems. This general simulator architecture can be
adapted to various fields by assembling and special-
izing the generic components in order to perform the
specific computations required by the domain.
This architecture, presented in Figure 4, is com-
posed of a clock and three primary blocks: the data
management, the mathematical symbols generator
and the computational engine.
data
management
mathematical
symbols
generator
computational
engine
clock
Figure 4: Proposed simulator architecture.
The clock orchestrates the simulation by provid-
ing time steps to data management block. The data
management block treats the input data, runs the
given scenarios (that represent how changes occur
in systems properties over time, these scenarios are
specified in the third layer), and prepares the nec-
essary outputs for the next steps in the simulation
workflow. The output data of this block is sent to
the mathematical symbols generator block to gener-
ate mathematical symbols that represent system prop-
erties. The computational engine proceed to compu-
tations related to specific needs described into the spe-
cific domain abstraction layer. Each block has to be
specified in the second layer as an assembly of com-
ponents from the library in order to define a base al-
gorithm for a specific domain. We further detail the
library of components available to build each of these
blocks in Section 4.
3.2 Layer 2 - Specific Domain
Abstraction
This second layer focuses on developing the abstract
requirements related to a specific domain. This layer
has to be done once for each domain of application we
want to support with our approach. This currently has
been done for LFA, as will be presented in Section 5.
One aspect of this layer is the definition of a
Domain-Specific Modeling Language (DSML) (Blas
et al., 2023), which rigorously identifies the main con-
stituents of any given domain. Within this layer, we
define the key properties and characteristics of a spe-
cific domain to achieve the following objectives:
1. Build a graph-based DSML for the domain.
2. Define the transformation rules that allow to trans-
form graph-based models into equations.
3. Implement an actual simulator for the domain,
based on simulator structure defined in first layer.
The graph-based syntax is defined by specifying the
nodes and edges properties in order to provide a rep-
resentation of systems from the target domain that
contains all the information required to generate the
equations to solve. We also have to specify the trans-
formation rules that guide the conversion from graph
syntax to obtain the DAEs that represent the system.
In order to implement a simulator for a given do-
main, we study the base algorithms that describe the
workflow in use within that domain. These algo-
rithms, as well as the transformation rules defined pre-
viously, are used to build the simulator. This is done
by assembling the generic DEVS components avail-
able in the component library and specifying their ab-
stract parameters.
3.3 Layer 3 - System Specification
The third and final layer consists in representing a
specific system in the domain of interest, as well as
a scenario that represents the system evolution over
time. A graph representing the system is injected into
the simulator that was built for the domain, along with
the scenario. The execution of the scenario over the
base system generates the necessary data for the evo-
lution of values directly within the simulator. The
simulator then outputs the results in the form of new
graphs with updated values at each time step.
4 LIBRARY OF GENERIC
COMPONENTS
We have organized the simulator into distinct blocks,
each representing a core functionality as represented
in Figure 4. To build each block, we provide a library
of generic components. The set of components pre-
sented here forms a basis, but is not extensive yet. It
still needs extension to provide all the required tools
that may be necessary for comprehensive support of
symbolic computation. For now, only the components
required by our target domain were defined.
Each of the components described here is for-
mally specified using the DEVS mathematical syn-
tax. These formal definitions are available in the
documentation of our git repository (Attia, 2025).
The components also have a concrete implementa-
tions that was done using the PyPDEVS simula-
tor (Van Tendeloo and Vangheluwe, 2015) and are
available in the demonstrator for the LFA use case,
also provided in the same git repository. For the con-
crete implementation of these components, the sym-
bolic computation part is taken care of by SymPy. Ad-
ditionally, system’s graph representation is carried out
Modular Simulator for DAE-Based Systems Using DEVS Formalism
273
using GraphML (Brandes et al., 2010). In the follow-
ing, we detail each block of the simulator, and the
base components available as of today in the library.
In the data management block, the data genera-
tor component provides input data to the simulator as
a graph representing the system and simulation sce-
narios. The execution result produces input data in the
form of a graph with updated property values reflect-
ing system’s current state. The process data com-
ponent receives these generated graphs, extracts their
nodes and edges, and organizes them into structured
data usable by other components.
The mathematical symbols generator block in-
cludes three components. The symbols genera-
tor component receives structured data and gener-
ates mathematical symbols for the system’s proper-
ties. The equations generator takes structured data
and the set of symbols as inputs to generate equations
addressing the core computations of a particular do-
main. The mapping symbols values component gen-
erates, from the structured data and received symbols,
a set of pairs containing symbols and their associated
numerical values.
In the computational engine block, the compute
equations component performs specific calculations
needed to solve particular domain equations, often in-
volving iterative algorithms or domain-specific math-
ematical operations. It substitutes symbols with their
concrete values and evaluates equations. The conver-
gence checker determines whether calculated values
will diverge or converge. If convergence is achieved,
the solving process has reached a steady state and it-
erative computations are stopped. Otherwise, it sends
a message to other components to continue iterative
computations and adjusts simulation parameters.
Components from the library are generic and thus
make use of parameters. The parameters can be val-
ues, variables or functions which are initially abstract,
meaning that they are not yet specified. These param-
eters are specified at layer 2 when building the simu-
lator for a specific domain.
All the components, except for the clock, are time-
less. From a DEVS perspective, this means that their
internal state change (δ
int
) is carried on either in-
stantly (t
a
= 0) or never (t
a
= ). In that second case,
the state change can only be triggered by an exter-
nal event (δ
ext
). From the simulation perspective, this
means that the simulated time will never evolve as a
result of a component changing its state. Only the
clock has a function of time t
a
that will make the sim-
ulator time evolve. This behavior is dictated by the
fact that the components we deal with here are not part
of a system simulation, they rather are the simulator.
Of course, working with components whose evolution
is done in zero-time can lead to issues such as infi-
nite events being triggered without the time advanc-
ing, leading to a stuck simulation. In our case, this
is solved by carefully designing the abstract compo-
nents so that they wait for all their required data to be
received before emitting events themselves. As this
precaution is taken at the generic component level,
the specialized components used in an actual simu-
lator won’t have to deal with that issue.
5 APPLICATION: LFA OF
POWER SYSTEMS
In this section, we apply our approach to the domain
of power systems by building a simulator able to con-
duct a LFA. The traditional workflow for conducting
a LFA is represented in the Figure 5. The process be-
No
Δ[unkown_parameters]
(k)
-> 0
Write the admittance, P, Q and Jacobian
matrices containing the respective equations
Evaluate equations of admittance and Jacobian matrices
Evaluate P
(k)
and Q
(k)
of given parameters
Compute ΔP
(k)
and ΔQ
(k)
of given parameters
Compute Δ[unknown_values]
(k)
= [Jacobian_matrix]
-1
* Δ[P_Q_values]
(k)
Compute V
(k)
and δ
(k)
from Δ[unknown_values]
(k)
Update buses data with new values of V and δ computed
k = k + 1
Evaluate unknowns (P and Q) that will be computed with resolved values
k=1
Yes
Figure 5: Flowchart of a typical LFA process.
gins with formulating the mathematical structures re-
quired for LFA (yellow frame). Then, an iterative pro-
cess is conducted (gray frame) that corresponds to the
Newton-Raphson method (Akram and Ann, 2015).
This flowchart will be used as a base to conduct the
application.
5.1 Power Systems Graph DSML
Using the characteristics of power systems as defined
in Section 2.4, we establish the abstract syntax of
power systems as graphs. The usual representation
of power systems have a quite natural translation to
graphs, as illustrated in Figure 6.
We define the syntax of the graph as follows:
- Nodes (Vertices) V : is the set of buses. Each bus
SIMULTECH 2025 - 15th International Conference on Simulation and Modeling Methodologies, Technologies and Applications
274
L
Bus 1
Bus 2
represented
as graph
Bus 3
G
1
G
2
Figure 6: Power system representation with graph.
can contain one or multiple interconnected electrical
components (e.g., load, battery, wind turbine, etc.).
Each node v
i
V has several attributes that describe
its electrical properties: bus type (bus type), bus num-
ber (bus no), active power (P), reactive power (Q),
voltage magnitude (V ), voltage angle (δ). To these in-
trinsic characteristics, we add the list of unknown it-
erative variables (it unknown), which refers to the set
of variables whose values are initially unknown and
have to be determined iteratively. During the analysis,
these variables are updated repeatedly using compu-
tational algorithm until the solution converges. Each
node can be described formally as:
v
i
= {bus type, bus no, P, Q,V, δ, it unknown}
- Edges E: is the set of electrical transmission
lines that ensures the connection between two nodes.
Each edge e
i j
E represents an electrical connection
between two buses and has the following attributes:
resistance (R), reactance (X), line charging capacity
(L), and transformer tap (T ).
Formally, an edge between nodes v
i
and v
j
is de-
scribed as: e
i j
= {R, X,L, T}
- Mapping function ψ: this function associates to
each edge the pair of nodes it connects. It operates as
follows: e
i j
E, ψ(e
i j
) = (v
i
, v
j
)
5.2 Graph to Equations Transformation
Rules
Based on the LFA workflow (Figure 5), we have to
produce a few transformation rules to generate the
mathematical objects required to conduct the analy-
sis. As shown in Figure 7, the first rule consists in
generating the admittance matrix from graph’s edges.
The second rule aims to map graph’s nodes to gener-
ate P and Q equations. Finally, the third rule consist
in generating the Jacobian matrix from graph’s nodes
and the generated P and Q equations.
5.3 Simulator Specification
By following these transformation rules as well as the
Newton-Raphson algorithm as defined in Figure 5, we
specify a simulator that is represented on Figure 8.
We developed this simulator by exploiting the library
of generic components described into Section 4.
V
n
V
1
Rule 2: nodes mathematical symbols (P , Q, V , δ)
Vertice properties:
- bus_type
- bus_no
- P
- Q
- V
- δ
Edges properties: R, X, L, T
Rule 1: edges admittance matrix Y
Rule 3: nodes iteration mathematical symbols (P , Q, V , δ)
Figure 7: Transformation rules.
The data management block generates a graph
that represents the system’s data. The mathematical
symbols generator block receives this data and imple-
ments the transformation rules. We used the symbols
generator component to create symbolic representa-
tions of the system’s essential data, including the volt-
age, resistance, reactance, P, Q etc. Multiple instances
of the equations generator component exploit these
symbols to generate the admittance, P, Q and Jaco-
bian matrices equations In addition, to provide sys-
tem’s data values we use the symbols numerical val-
ues component to introduce the corresponding values
of defined symbols.
The iterative process is implemented within the
computational engine block of the simulator. This
block instantiate the compute equations component
that use the data provided by the mathematical sym-
bols generator block to compute the admittance, P,
Q and Jacobian matrices, and another instance of the
same component uses this data to process to the global
LFA computations. The iterative process is achieved
by an event sent by convergence checker to inform the
other components if convergence is reached or not.
Once convergence is reached, the system uses yet
another instance of compute equations to compute the
specified P and Q equations that should be computed
as results, along with the associated variables, and
reinjects the results into the data management block.
Using data received from the computational en-
gine block and the evolution scenario of the power
system, the data management block generates a new
graph. This graph represents the updated state of the
system that can be used in the next simulation step.
Modular Simulator for DAE-Based Systems Using DEVS Formalism
275
Figure 8: Architecture of Load Flow Analysis simulator.
6 APPLICATION RESULTS AND
ANALYSIS
In this section, we present an example of simulated
power systems composed of 14 buses. Figure 9 il-
lustrates the architecture of simulated power system
represented using the previously defined DSML.
S: Slack
G: Generator
L: Load
S
G
1
L
3
L
4
L
5
L
1
L
6
G
2
L
2
G
3
G
4
L
6
L
7
L
8
Figure 9: Architecture of simulated power system.
For its evolution, we use a scenario in which
we assume that the power generation capacity of the
simulated system, represented as P generator, varies
throughout the day, as follows:
P
generator
=
0 if t = 0,
α
init
+ α
1
× P
generator
, if 1 t < 7,
α
2
× P
generator
, if 7 t < 15,
α
3
× P
generator
, if 15 t < 24.
Where α
init
, α
1
, α
2
and α
3
are constants used to spec-
ify the generator’s performance during different peri-
ods of the day. The variable t corresponds to the hour
within a 24-hour day and is used in the simulator as
the simulation time step.
For this system, the following constants define
the variations of the P generator parameter: α
init
= 0.1;0.2;0.05;0.0011 respectively for its four gen-
erators. The other constants values are: α
1
= 1.1,
α
2
= 1.2, α
3
= 0.9. In these examples, P generator
increases during the morning and decreases in the
evening, similarly as a photovoltaic production.
By injecting the systems specifications and the
scenarios into the LFA simulator, we obtain various
results, including the charts as illustrated in Figure 10.
In these charts, blue color presents slack’s power,
green color presents generator’s power and other col-
ors present the load’s power. The simulation results,
according to a specific scenario described in section 5,
Figure 10: P and Q variations of 14-bus power system.
exhibit the key patterns of power system behavior
across different network configurations. For instance,
as shown in Figure 10, during daytime (t [1,14]) the
generated electrical power by the generator (e.g pho-
tovoltaic panel) increases. During evening periods (t
15), the generated power decreases. These varia-
tions reflect a daily power generation pattern.
The simulation results highlight the slack bus’s
crucial role in system stability. As generation in-
creases in the morning, slack power (P and Q) de-
creases. In the evening, as generation decreases, slack
power rises to compensate, ensuring balance between
consumption and generation.
The simulation results validate key aspects of our
proposed approach: the graph-based representation
successfully captures system topology across config-
urations, revealing component relationships and tem-
poral evolution; transformation rules ensure faithful
conversion of graph structures to mathematical equa-
tions, properly generating the necessary system rep-
resentations; and the modular simulator architec-
ture demonstrates flexibility in handling different net-
work configurations for DAE-based systems. Out of
lack of space, only one example can be provided here.
However, various test cases have been defined and are
available in our git repository (Attia, 2025).
Although the proposed simulator has been suc-
cessfully implemented for M&S of LFA, certain as-
pects require further attention such as the integration
of dynamic structure systems. We are now on the pro-
cess of adding the structure change rules required to
make this a complete, dynamic structure simulator. It
SIMULTECH 2025 - 15th International Conference on Simulation and Modeling Methodologies, Technologies and Applications
276
will then be able to represent a system and simulate its
internal structure changes over time. To address this,
we are exploring a graph tool called GMTE (Han-
nachi et al., 2013) that is able to automatically gener-
ate new system structures according to specified rules.
7 CONCLUSION AND FUTURE
WORKS
This paper presents a formal approach to build sim-
ulators and models for DAE-based systems. Our ap-
proach proposes a methodology as well as building
blocks that can be used to address simulation in var-
ious domains. The proposed methodology is built
upon three layers: context-free framework, domain-
specific abstraction and system specification.
To demonstrate the practical application of this ap-
proach, we implemented a simulator for LFA, mod-
eled power systems with a graph-based DSML. We
built the domain-specific abstraction based on LFA
methodology, developed transformation rules, and
specified the simulator for the domain.
In summary, this work presents a flexible frame-
work for building models and simulators for DAE-
based systems. The layered structure is thought with
adaptability of the framework to various domains and
applications in mind.
Future work will focus on the integration of dy-
namic structure systems, which is still an ongoing
process. Another major work to come is to apply the
approach depicted in this article to other domains. Po-
tential candidate domains include power electronics
and electric vehicle charging, which represent differ-
ent scales of power systems.
REFERENCES
Akram, S. and Ann, Q. U. (2015). Newton raphson method.
International Journal of Scientific & Engineering Re-
search, 6(7):1748–1752.
Albadi, M. and Volkov, K. (2020). Power flow analysis.
Computational Models in Engineering, pages 67–88.
Attia, A. (2025). Approach to model simulate load
flow analysis. https://gitlab.laas.fr/aattia/load flow
analysis simulator.
Bickle, A. (2020). Fundamentals of graph theory, vol-
ume 43. American Mathematical Soc.
Blas, M. J., Gonnet, S., Kim, D., and Zeigler, B. P. (2023).
A context-free grammar for generating full classic
devs models. In 2023 Winter Simulation Conference
(WSC), pages 2579–2590. IEEE.
Bouassida Rodriguez, I., Drira, K., Chassot, C., Guennoun,
K., and Jmaiel, M. (2010). A rule-driven approach for
architectural self adaptation in collaborative activities
using graph grammars. International Journal of Auto-
nomic Computing, 1(3):226–245.
Brandes, U., Eiglsperger, M., Lerner, J., and Pich, C.
(2010). Graph markup language (graphml).
Buchberger, B. (1996). Symbolic computation: Computer
algebra and logic. In Frontiers of Combining Systems:
First International Workshop, Munich, March 1996,
pages 193–219. Springer.
Caravantes, J., Sendra, J. R., and Sendra, J. (2019). A maple
package for the symbolic computation of drazin in-
verse matrices with multivariate transcendental func-
tions entries. In Maple Conference, pages 156–170.
Springer.
Chaturvedi, D. K. (2017). Modeling and simulation of sys-
tems using MATLAB and Simulink. CRC press.
Chomsky, N. (1956). Three models for the description of
language. IRE Transactions on information theory,
2(3):113–124.
Chow, A. C. H. and Zeigler, B. P. (1994). Parallel devs:
A parallel, hierarchical, modular modeling formal-
ism. In Proceedings of Winter Simulation Conference,
pages 716–722. IEEE.
de Durana, J. M. G., Barambones, O., Kremers, E., and
Varga, L. (2014). Agent based modeling of en-
ergy networks. Energy Conversion and Management,
82:308–319.
Energy, H. (1993). Homer energy: Hybrid optimization of
multiple energy resources. Accessed: 2025-01-23.
Hannachi, M. A., Bouassida Rodriguez, I., Drira, K., and
Pomares Hernandez, S. E. (2013). Gmte: A tool for
graph transformation and exact/inexact graph match-
ing. In International Workshop on Graph-Based
Representations in Pattern Recognition, pages 71–80.
Springer.
Meurer, A., Smith, C. P., Paprocki, M.,
ˇ
Cert
´
ık, O., Kir-
pichev, S. B., Rocklin, M., Kumar, A., Ivanov, S.,
Moore, J. K., Singh, S., et al. (2017). Sympy: sym-
bolic computing in python. PeerJ Computer Science,
3:e103.
P
¨
ochacker, M. and Elmenreich, W. (2014). Rapsim: A sim-
ulation tool for microgrids. Accessed: 2025-01-23.
Sadnan, R. and Dubey, A. (2021). Learning optimal power
flow solutions using linearized models in power distri-
bution systems. In 2021 IEEE 48th Photovoltaic Spe-
cialists Conference (PVSC), pages 1586–1590. IEEE.
Trott, M. (2007). The Mathematica guidebook for symbol-
ics. Springer Science & Business Media.
Van Tendeloo, Y. and Vangheluwe, H. (2015). Python-
PDEVS: a distributed parallel devs simulator. In Pro-
ceedings of the Symposium on Theory of Modeling
& Simulation: DEVS Integrative M&S Symposium,
pages 91–98.
Weedy, B. M., Cory, B. J., Jenkins, N., Ekanayake, J. B.,
and Strbac, G. (2012). Electric power systems. John
Wiley & Sons.
Xu, J. (2013). Theory and application of graphs, volume 10.
Springer Science & Business Media.
Zeigler, B., Muzy, A., and Kofman, E. (2018). Theory of
Modeling and Simulation: Discrete Event & Iterative
System Computational Foundations. Academic press.
Modular Simulator for DAE-Based Systems Using DEVS Formalism
277