Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Project Proposal - Grid2Op #287

Open
BDonnot opened this issue Nov 12, 2024 · 0 comments
Open

New Project Proposal - Grid2Op #287

BDonnot opened this issue Nov 12, 2024 · 0 comments

Comments

@BDonnot
Copy link

BDonnot commented Nov 12, 2024

Mission Statement

Grid2op is an open-source project that provides a highly customizable framework for simulating and optimizing real-time power grid operations. It leverages the power of Markov Decision Processes (MDPs) to model sequential decision-making in power grid management.

Description

Its flexibility allows users to test and compare various strategies for operating grids of different sizes under different scenarios with various fidelity.

Key Features of Grid2op:

  • Modularity: Grid2op is built with modularity in mind. It consists of four main components:

    • Agent: This component makes decisions based on the current grid state (observation) and past performance (reward). It can also (if available) leverage some forecasts.
    • Time Series: This module encodes external factors like demand and generation forecasts.
    • Backend (Physics Solver): This component handles the physical calculations to ensure the grid state remains physically possible.
    • Environment: This component acts as the orchestrator, managing interactions between other components and ensuring adherence to user-defined rules.
  • Customizable Agent Design: Grid2op allows users to implement their agents, enabling comparisons of different strategies like:

    • Expert rules and heuristics
    • Optimization algorithms
    • Machine learning and AI models
  • Flexible Scenario Design: Grid2op can handle time-dependent scenarios crucial for modern grids with increasing renewable energy penetration and demand-side management. It allows feeding pre-designed scenarios with future information to the agent, facilitating realistic simulations.

  • Customizable physics simulation: Unlike other frameworks, grid2op does not assume anything about the underlying physics (steady state, transient, AC, or DC) nor the physics solver. Users can run experiments with grid2op with various levels of fidelity, from the DC approximation up until transient simulation. As of writing, 2 fully working are available, the default backend is based on the pandapower library (which was the only robust powerflow implementation in 2019 when the grid2op project started) and another one called lightsim2grid (which implements a subset of pandapower in C++ for speed). At the time of writing two other Backends are being implemented, one leveraging the PowSyBl framework from LF Energy and another one using the GridPack solver from PNNL.

  • Openness and Collaboration: Grid2op promotes collaboration between academia and industry.

    • Researchers can develop solutions using fast, open-source backends, while utilities can test these solutions with their high-fidelity physics engines.
    • The ability to compare different physics solvers within the same framework provides a valuable tool for advancing power grid simulation techniques.

Main Benefits of Grid2op:

  • Standardized Benchmarking: Grid2op facilitates reproducible experiments and benchmarks for comparing power grid operation strategies and physics solver performance.
  • Reduced Research-to-Industry Gap: By facilitating the reuse of agents, Grid2op can help bridge the gap between cutting-edge research and real-world applications, reducing development costs and "time to industrialization"

Overall, Grid2op presents a valuable platform for researchers, utilities, and other stakeholders in the power grid domain. Its modularity, customizability, and open-source nature make it a powerful tool for advancing power grid management.

Is this a new project or an existing one?

This is an existing project, available publically on GitHub at https://github.com/Grid2Op/grid2op.

Current lead(s)

As of today, the current lead is RTE-France, in the person of Benjamin DONNOT ([email protected])

Sponsoring organization(s), along with any other key contributing individuals and/or organizations

The main contributions come from RTE-France for the core package as of today.

Other individuals and organizations (often having heard of grid2op thanks to the yearly L2RPN competitions) are today participating in the development of the core package (grid2op):

  • Priya Donti’s research group at MIT (https://priyadonti.com/) and Georgia Tech Scientific Software Engineering Center (SSEC) (https://ssecenter.cc.gatech.edu/), via the Schmidt Sciences Virtual Institute for Scientific Software (VISS) (https://www.schmidtsciences.org/viss/). A "Letter of Intent" (LOI) has been written and they will make some pull requests into the grid2op repository in the coming month (especially by making it faster to integrate grid2op with other "reinforcement learning" libraries such as gymnasium).
  • A doctoral student from KTH, Xavier Weiss https://www.kth.se/profile/xavierw?l=en is also using grid2op for his research project and plans to add some important features to it (especially demand side flexibility). One of the pull-request is open at the moment (at the "work in progress" stage).

There are also smallest contributions from different individuals, for example, fixing typos in the doc or small mistakes in the code.

Grid2op main usage has been through the annual organization of competition to put forward the operation and control of powergrids (see section Has this project been announced or promoted in any press? for more information). RTE is not the only organizer of these competitions, for example:

  • Inria / Universite Paris Saclay and especially the team from Isabelle Guyon has been a key partner in the organization of these competitions. They did not participate in the development of the core of grid2op provide key contributions in terms of advertising but also supporting the hosting of some data for some environments. They also provided compute power to host the competition (both CPU and GPU) when competitions are running
  • EPRI Europe, especially Adrian Kelly is also sponsoring this project by hosting some public data or their server.
  • TU Delft University also organized a competition in 2023

From the beginning, grid2op has been thought as an open ecosystem. Individuals and organizations are participating in this ecosystem in different manners from "side projects" or by making code that can be integrated into grid2op and be used by others. Main examples of such contributions are:

  • open sourcing of the winning agent to an L2RPN competition. There are dozens of such grid2op agents available publically, mainly on GitHub, some examples are listed eg https://l2rpn-baselines.readthedocs.io/en/latest/external_contributions.html
  • a grid2op "backend" leveraging the PowSyBl framework (project hosted at LF Energy here https://github.com/Grid2op/pypowsybl2grid) is being developed and tested by RTE after a first Proof of Concept has been made by Artelys (finance by the European Union’s Horizon 2020 research and innovation program under grant agreement No 101016508 as shown here) (already discussed in the Description section)
  • a grid2op backend based on GridPack is also being developed by the Pacific Northwest National Laboratory (PNNL) "GridPack-Wind" team (also briefly mentioned in the Description section)
  • grid2op is also being used for some European Projects, for example, https://ai4realnet.eu/ where it's the main "digital environment" for the "electricity network" use-case. It is unclear at this very moment how this European project will contribute to grid2op but we expect some pull requests for some added features.
  • the grid2op ecosystem has also been used by the French research laboratory "IRT System X" (https://www.irt-systemx.fr/en/) in the context of the IA2 program ("Intelligence Artificielle et Ingénierie Augmentée" which can translate to "AI2: Artificial Intelligence and Augmented Engineering") especially the CAB (https://www.irt-systemx.fr/projets/cab/) and HSA (https://www.irt-systemx.fr/projets/hsa/) projects

Detail any existing community infrastructure, including:

  • Github/GitLab, or other location where the code is hosted
  • Website and/or docs
  • Communication channels ( such as Mailing lists, Slack, IRC )
  • Social Media Accounts

Recently, we tried to gather every project related to grid2op under the same GitHub organization available at https://github.com/Grid2Op The grid2op core library is available at https://github.com/Grid2Op/grid2op.

There are plenty of tutorials available in the form of Jupyter "notebooks", for example here https://github.com/Grid2op/grid2op/tree/master/getting_started

The official documentation is available on "read the docs" here https://grid2op.readthedocs.io/en/latest/ This documentation is almost exhaustive when it comes to describing the behavior of the public function that the users need to be aware of, with most of the time examples on how to use said function.

In general, the documentation lacks some "getting started" and an overview to be clearer for newcomers.

If required, this documentation can be converted to PDF (currently producing a PDF of more than 800 A4 pages)

There is also a discord set up for grid2op, opened for everyone available at https://discord.gg/cYsYrPT. General communications (announcements of new versions, main changes since the last release, etc.) are made on Discord with a link to the Changelog (https://github.com/Grid2op/grid2op/blob/master/CHANGELOG.rst) that summarizes all the meaningful changes since the end of 2019.

For a few weeks now, the "future developments" are also included at the top of this changelog. We believe this might help potential contributors to know what topics might require some help.

Being the main software used in the L2RPN competition series, grid2op also benefits from the different communication channels when a competition is hosted. This includes a website l2rpn.chalearn.org/, a dedicated page for the current competition, for example, https://www.codabench.org/competitions/1891/. The L2RPN organizing team also has a dedicated mailing list. Finally, when a new contest is organized lots of new explanatory notebooks are also created to reduce as much as possible the entry cost for newcomers.

Are there any specific infrastructure needs or requests outside of what is provided normally by LF Energy ? If so please detail them.

As of today, grid2op comes with some "environments" that are based on open-source power grids on which generated time series have been invented for each generator and load. Today part of these data are hosted by Isabelle Guyon's team and the other part is hosted by EPRI Europe.

These datasets should be as accessible as possible (right now everyone in the capacity to perform a get HTTP request can download and use them). Maybe the LFE can help us gather all these data in one place and offer a longer term. As of today, these data sets represent less than 50 GB.

Why would this be a good candidate for inclusion in LF Energy?

Grid2op has been developed around the "L2RPN competitions" as a way to introduce power system operation and planning to the "Artificial Intelligence" community.

This software offers now really interesting capabilities for some industrial use cases, for example by lowering the requirements to build AI to operate real powergrids.

Grid2op could also help promote LF Energy projects in the AI community thanks to its flexibility and capacity to integrate data and simulators from different origins.

How would this benefit from inclusion in LF Energy?

Grid2op inclusion into the LF Energy would allow to detach its name from RTE France and help with its adoption of some of its functionalities outside of RTE.

For example, as far as we know, the German / Dutch TSO Tennet made a custom (closed source) backend based on the closed-source "PowerFactory" solver. This backend is not available (to your knowledge) outside of Tennet. The lack of open open-source neutral "container", such as LF Energy, is a key element in the impossibility of releasing such a Backend more openly.

We also believe that the inclusion in the LF Energy would also help some other companies to collaborate on these topics, including vendors or other TSOs / DSOs.

In addition to the better visibility offered by a possible inclusion in the LF Energy, this project would benefit from the LF Energy experience in the management of open-source communities as well as more rigorous project management.

Provide a statement on alignment with the mission in the LF Energy charter.

From its origin, grid2op has always been focused on providing an open-source ecosystem to promote the operations of power grids.

It aligns quite nicely with LF Energy's mission "to developing non-differentiating code that can enable the world’s power systems to transform rapidly to electrification". Also, most of the current projects using grid2op are using some type of Artificial Intelligence, which is one of the "Special Interest Groups" of LF Energy.

What specific need does this project address?

This project aims at democratizing (including, but not limited to the AI community) the issues related to the operation of powergrid mainly in low-carbon settings.

In particular, grid2op allows to leveraging physics-based simulation, currently mainly running for a single snapshot, to the creation of scenarios for which an action at a given time might have an impact later on.

Grid2op allows the decoupling between simulation of physics (especially with different levels of fidelity), from the problem to solve (depending on the grid, the energy mix, and the metrics used to assess the performance of the methods) itself distinguished from the actual algorithm that solves the issue. This split between these different entities was inspired by what is often done in the "optimization" / "operational research" area where the "solver" is decoupled from the "modeler" and that allows to solve many complex problems. We hope similar gains can be achieved with the proposed solution.

Describe how this project impacts the energy industry.

One of the key objectives of this project is to lower the "time to market" between the design of an advanced solution (for example by start-ups or researchers) that can operate a powergrid efficiently (eg in terms of economic cost or greenhouse gas emission) up until the implementation of this solution into industrial products used by TSOs or DSOs for example in the control room.

This project could then be part of an ecosystem of tools (see for example some examples reported in the next paragraph) to help make the energy transition.

Describe how this project intersects with other LF Energy projects/working groups/special interest groups.

This project focuses on Grid Operation, one of the SIGs of the LF Energy.

As of today, most of the methods developed using the grid2op framework have a strong emphasis on Artificial Intelligence, another Special Interest Group of the LF Energy.

With its permissive architecture, grid2op can also use different projects of the LF Energy, for example:

  • projects related to "grid simulation", such as "PowSyBl" (in the process of being integrated) but also "DynaFlow" (can be also integrated into grid2op thanks to the integration of pypowsybl). Other simulators could be used when focusing on DSO, for example, "GridLAB-D" or "Power Grid Model" which have not been integrated because today grid2op focuses on TSO
  • the use of projects such as "Carbon Data Specification" could also be put forward in grid2op. As of today, "agents" / "controllers" focus mainly on operating the grid safely and securely while being incentivized to reduce the cost (economical). One could use the work in the CDS to also rank agents based on the CO2-eq of the grid (and not only the cost)
  • grid2op needs time series data as realistic as possible. For now, an "ad hoc" methodology has been used to generate such data. Some projects hosted at the LFE could naturally be used in such generation, for example, the "OpenSynth" projects can be used to generate realistic data consumption, or the "openstef" project can be used to generate forecast made available to the "agent" / "controller" in the observation.
  • for now, most synthetic powergrids are used, with only a limited number of substations and branches. In this setting, feeding data in the form of CSV is sufficient. But for more realistic use cases, the grid size will most likely increase. In this case, the RTDIP LF Energy project would allow grid2op to work better on this "big data" setting.

Grid2op could be used by other LF Energy projects, for example, grid2op can be used to detect issues on some grid snapshots. Then an algorithm (eg based on AI) could provide a list of possible solutions. A real human operator could then, for example, use the "OperatorFabric" LF Energy project to choose the best action to perform (among a list of actions pre-selected by an AI).

Also, grid2op could be integrated with LF Energy candidates such as:

  • GridFM (GridFM #260) where GridFM could provide data for grid2op. But also, grid2op could be used to assess if the generated data are realistic or not. For example, GridFM would generate demand and generation for each producer/consumer/storage on the grid. Then grid2op could be used to compute the flows resulting from this demand and generation. A metric to compare the quality of the distribution could, in this setting, be added in the form of a metric between the generated flows and flows in the training database.
  • GridCal (Grid Edge Interoperability & Security Alliance (GEISA) #230) can be used as both a grid2op Backend (some early experiments have been made in this direction, see https://github.com/SanPen/Grid2OpBackends). Gridcal, especially its optimizers could also be used to create some "agents" for grid2op. More generally also, if a backend based on GridCal is used, the entire GridCal ecosystem could be leveraged which includes a nice graphical user interface, support for different data formats, and more accurate powerflow methods.

If we dive into the "Special Interest Groups": "Artificial Intelligence" of the LF Energy, grid2op could benefit largely from the availability of open data. And it can participate in creating large and public benchmarks for powergrid operations (which has been the major usage of grid2op as of today). Such benchmarks could both leverage acceleration in optimization and simulation (whenever available) or be a component that helps the development of such accelerated methods (as showcased in this competition )

Who are the potential benefactors of this project?

Benefactors of this project are:

  • research or academic organizations by having easy access to data and "environment" for emulating powergrid operations and planning. Researchers in Machine Learning and Artificial Intelligence are particularly concerned
  • IT service providers as they could also be interested in making products based on the latest research without having to recode everything. This last point is crucial in the AI community as advances are made rapidly and it can be hard to keep up with the state of the art as new methods are released frequently
  • TSO / DSO can also benefit from this project with the reuse, at a lower cost, of advanced methods developed by academics/researchers and cast into a more industrial and robust setting by IT service providers (for example)

What other organizations in the world should be interested in this project?

Government, NGOs, policymakers, or regulators can also be interested in grid2op for various use cases.

For example, regulators could try to assess the impact of a new regulation by simulating what could have happened if this new rule had been implemented in the past.

Plan for growing in maturity if accepted within LF Energy

The growth of the grid2op ecosystem could start by starting discussions with the LF Energy projects listed in the section Describe how this project intersects with other LF Energy projects/working groups/special interest groups. to see if some common interest can be pursued.

If accepted within LF Energy, some "PoC" made around grid2op, for example about simulation on accelerators, or integration of other commercial solvers that have been stopped (often because the grid2op ecosystem was too closely related to RTE) could be further continued (if still relevant today).

Project license

The project is currently licensed under the Mozilla Public License v2 (MPL v2)

Is the project's code available now? If so provide a link to the code location.

The code is hosted on GitHub https://github.com/Grid2op/grid2op.git.

Does this project have ongoing public (or private) technical meetings?

There are no regular technical meetings currently.

However, every user is encouraged to propose new features:

  • either publically through GitHub discussion or the grid2op discord
  • or privately by reaching the lead developers directly by mail (publically available on PyPi or GitHub).

Does this project's community venues have a code of conduct? If so, please provide a link to it?

The code of conduct has been updated to match the GitHub "default" code of conduct and is available here https://github.com/Grid2op/grid2op?tab=coc-ov-file.

Describe the project's leadership team and decision-making process.

When users reach out about a new feature or a new idea (either by mail, through Discord, or directly via GitHub), they are encouraged to write a GitHub issue (feature request) explaining what they need and their motivation.

The feature requests are then regularly processed and new code is added this way into grid2op.

All reported bug issues are processed preferably and dealt with in the shortest time possible. Once reported, a bug fix will in most cases be added in the next release.

Does this project have public governance (more than just one organization)?

Not at this stage.

Does this project have a development schedule and/or release schedule?

We try to deliver a new grid2op version every month. As of writing there as been around 70 grid2op releases from November 2019 until November 2024 (6 years, 72 months).

Sometimes the releases are more frequent, for example when multiple bugs have been reported, when critical bugs are spotted, or when a new l2rpn competition is being organized.

A more rigorous release schedule will be made as part of the inclusion in the LF Energy ecosystem.

Does this project have dependencies on other open source projects? Which ones?

Grid2op is a Python project, coded exclusively in Python (for the core package).

To run it on a computer, users need to install the python3 software. Then the project has the following python dependencies:

  • numpy, BSD License
  • scipy, BSD License
  • pandas, 3-Clause BSD license
  • pandapower, BSD License (this dependency will be made optional shortly)
  • tqdm, MIT License, Mozilla Public License 2.0
  • networkx, 3-Clause BSD license
  • requests, Apache Software License
  • packaging, Apache Software License, BSD License
  • typing_extension, Python Software Foundation License

Some grid2op optional features also depend on other Python packages:

  • nbformat, 3-Clause BSD license
  • jupyter-client, 3-Clause BSD license
  • jyquickhelper, MIT License
  • numba, BSD License
  • matplotlib, Python Software Foundation License
  • plotly, MIT License
  • seaborn, BSD License
  • imageio, 2-Clause BSD license
  • pygifsicle, MIT License
  • psutil, 3-Clause BSD license
  • gymnasium, MIT License
  • lightsim2grid, Mozilla Public License 2.0
  • numpydoc, BSD License
  • sphinx, BSD License
  • sphinx-rtd-theme, MIT License
  • sphinxcontrib-trio, Apache Software License, MIT License (MIT -or- Apache License 2.0)
  • autodocsumm, Apache Software License 2
  • gym, MIT License
  • flask, BSD License
  • flask_wtf, BSD License
  • ujson, BSD License
  • jinja2, BSD License
  • chronix2grid, Mozilla Public License 2.0
  • stable-baselines3, MIT License

In all cases, everything is used as from xxx import yyy or import xxx in grid2op python code.

None of these dependencies are directly embedded (in the distrubuted package) nor copy pasted, even in the published grid2op version.

Describe the project's documentation.

There is a complete technical documentation available on "read the docs" at https://grid2op.readthedocs.io/en/latest/

There are also around 10 explanatory jupyter notebooks that people can interact with without any installation (thanks to Google Colab) in the project GitHub listed here https://github.com/Grid2Op/grid2op?tab=readme-ov-file#getting-started

The necessary license, code of conducts and way to contribute are also included in the main GitHub repository.

Describe any trademarks associated with the project.

There are no current trademarks associated with the project.

Do you have a project roadmap? If so please attach or provide a link.

The next few features are announced in the "changelog" of the main repository available publically here https://github.com/Grid2op/grid2op/blob/master/CHANGELOG.rst#work-in-progress

This "roadmap" is however subject to change, depending on the new issues posted for example.

Are this project's roadmap and meeting minutes public posted?

There is today no decisive roadmap.

As previously mentioned, the "roadmap" is for now written in the changelog in the Work "in progress" section available publically here https://github.com/Grid2op/grid2op/blob/master/CHANGELOG.rst#work-in-progress

The community is also informed when a new release is available in Discord. The main modifications brought forth by this new release are put forward.

Does this project have a legal entity and/or registered trademarks?

No, it currently does not.

Has this project been announced or promoted in any press?

This project has been promoted through different "competitions" organized yearly since 2019 in the context of different conferences in machine learning (in general). As of writing, public competitions have been hosted in :

  • in 2020 at WCCI
  • in 2020 at Neurips
  • in 2021 at ICAPS
  • in 2022 at WCCI again
  • in 2023:
    • one reboot of the 2022 competition organized by TU Delft in the context of the PowerWeb conference conference
    • one new competition on more realistic and operational consideration co-organized by RTE and the "IDF" region (Paris region area)

All of these competitions have been announced officially by the conference organizer, on the "l2rpn" website, in the l2rpn mailing list, and in the grid2op Discord.

The winners of these competitions have often been academic teams that have published their method in either the conference proceedings or within blog articles and more generally in specialized journals.

For each L2RPN competition, the co-organizers also promote the competition (and indirectly grid2op) on social media (eg Linked-In or X / Twitter) but also on their website (eg https://www.epri.com/l2rpn or https://guyon.chalearn.org/projects/humania )

Does this project compete with other open source projects or commercial products?

Not to our knowledge.

@github-project-automation github-project-automation bot moved this to Future Meeting Agenda Items in LF Energy TAC Meeting Agenda Nov 12, 2024
@BDonnot BDonnot changed the title New Project Proposal - PROJECT NAME New Project Proposal - Grid2Op Nov 12, 2024
@jmertic jmertic moved this from Future Meeting Agenda Items to On Hold in LF Energy TAC Meeting Agenda Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: On Hold
Development

No branches or pull requests

1 participant