ROADEF 2026>
Gems: A Framework for Versatile Configuration of Models in Multi-Energy Systems Planning Studies
Thomas Bittar  1@  , Antoine Oustry  1@  , Manuel Ruiz  1@  
1 : Réseau de Transport d'Electricité [Paris]
Réseau de Transport d'Electricité-RTE

As part of its public service mission, RTE (Réseau de Transport d'Électricité), the French transmission system operator, carries out prospective studies to assess the security of supply of electricity and to enlighten national strategic orientations for the evolution of the power system. Because prospective studies address the normative challenge of defining an economically efficient and low-carbon generation mix together with appropriate network development, they involve solving generation and transmission expansion planning problems.

To meet carbon neutrality ambitions, energy systems evolve rapidly: couplings between sectors are increasing and there is a growing need for flexibility due to the increasing share of variable renewable energies. To conduct studies with relevant representations of the systems' flexibilities, researchers and analysts need to easily adapt and test the modeling of system components.

There exists a whole range of open-source tools for energy systems modeling with sometimes impressive configurability possibilities (e.g. Antares Simulator, PyPSA, Calliope, OSeMOSYS, GenX.jl). However, in order to use a model that is not natively available in a software, it is required to write custom code (e.g. Python code for PyPSA or Calliope). As study analysts may not be software developers, enabling them to configure models by giving their natural mathematical description is a major lever to improve the efficiency in conducting studies. Moreover, a generic and model-agnostic interpreter code offers significant advantages in terms of development and maintenance costs, collaboration possibilities and code re-usability.

We propose GEMS (Generic Energy Systems Modeling Scheme), a modeling language for multi-energy systems adequacy assessment and planning. Models description are taken out of the code and accessible at the user's level in a YAML text file. Creating a new a model just boils down to writing this text file, declaring its variables, parameters, and constraints (rather than writing code). The language uses an abstract representation of time and scenarios to make it easier to use. Behind the scenes, mathematical expressions are parsed as Abstract Syntax Trees (AST). Using information on the optimization context (e.g. horizon, time blocks, scenarios), and associated study data, these ASTs are traversed to resolve the temporal and stochastic abstractions and generate the corresponding optimization problem. With this framework, adding a new type of object with its own mathematical behavior requires no development in the software code: models are data.

For now, GEMS is able to represent deterministic or two-stage linear stochastic problems, although its principle could be extended to cover a broader scope of problems (e.g. ACOPF problems).

To illustrate the flexibility and the generality of the modeling language and its interpreter, we show in a first use case that they can be used to represent and simulate the behavior of Antares or PyPSA. Two steps are needed:
- Once and for all, write the YAML file representing, in the GEMS language, the library of models of your favorite tool.
- Convert the study data (description of the network, values of components parameters) from your tool to the GEMS data format (data conversion script).
 
Then the GEMS interpreter can autonomously generate the problems corresponding to each successive time block of a given horizon, and calls an off-the-shelf optimization software to solve them. Using our generic interpreter code, we obtain the same numerical results as the original tools, demonstrating the versatility of the proposed language.

In a second use case, we demonstrate how the modeling language can be used to modify the Antares/PyPSA 'storage' objects, preventing simultaneous pumping and turbining, which leads to fictitious energy dissipation. This provides a more accurate representation of situations of energy surplus in the system. This model update is done by simply modifying the YAML model file of the storage. No code is required, unlike in the case where the modification is to be done in Antares or PyPSA.

This work is a first step towards an input format that can represent studies from different tools. It can help improving tools maintainability and interoperability, and fostering collaboration between practitioners and researchers working different tools.


Chargement... Chargement...