Grid2Op


NameGrid2Op JSON
Version 1.10.5 PyPI version JSON
download
home_pagehttps://github.com/Grid2Op/grid2op
SummaryAn gymnasium compatible environment to model sequential decision making for powersystems
upload_time2024-10-15 12:45:15
maintainerNone
docs_urlNone
authorBenjamin DONNOT
requires_python>=3.8
licenseMozilla Public License 2.0 (MPL 2.0)
keywords ml powergrid optmization rl power-systems
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Grid2Op

[![Downloads](https://pepy.tech/badge/grid2op)](https://pepy.tech/project/grid2op)
[![PyPi_Version](https://img.shields.io/pypi/v/grid2op.svg)](https://pypi.org/project/Grid2Op/)
[![PyPi_Compat](https://img.shields.io/pypi/pyversions/grid2op.svg)](https://pypi.org/project/Grid2Op/)
[![LICENSE](https://img.shields.io/pypi/l/grid2op.svg)](https://www.mozilla.org/en-US/MPL/2.0/)
[![Documentation Status](https://readthedocs.org/projects/grid2op/badge/?version=latest)](https://grid2op.readthedocs.io/en/latest/?badge=latest)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/Grid2op/grid2op/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/Grid2op/grid2op/tree/master)
[![discord](https://discord.com/api/guilds/698080905209577513/embed.png)](https://discord.gg/cYsYrPT)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/grid2op/grid2op.git/master)

Grid2Op is a platform, built with modularity in mind, that allows to perform powergrid operation.
And that's what it stands for: Grid To Operate.
It is used as a library used for the Learning To Run Power Network [L2RPN](https://l2rpn.chalearn.org/),
but also for research purpose (especially by the Reinforcement Learning community applied to power system)

This framework allows to perform most kind of powergrid operations, from modifying the setpoint of generators,
to load shedding, performing maintenance operations or modifying the *topology* of a powergrid
to solve security issues.

Official documentation: the official documentation is available at
[https://grid2op.readthedocs.io/](https://grid2op.readthedocs.io/).

* [1 Installation](#installation)
  * [1.1 Setup a Virtualenv (optional)](#setup-a-virtualenv-optional)
  * [1.2 Install from source](#install-from-source)
  * [1.3 Install from PyPI](#install-from-pypi)
  * [1.4 Install for contributors](#install-for-contributors)
  * [1.5 Docker](#docker)
* [2 Main features of Grid2Op](#main-features-of-grid2op)
* [3 Getting Started](#getting-started)
  * [0 Basic features](getting_started/0_basic_functionalities.ipynb)
  * [1 BaseObservation Agents](getting_started/1_Observation_Agents.ipynb)
  * [2 BaseAction Grid Manipulation](getting_started/2_Action_GridManipulation.ipynb)
  * [3 Training An BaseAgent](getting_started/3_TrainingAnAgent.ipynb)
  * [4 Study Your BaseAgent](getting_started/4_StudyYourAgent.ipynb)
* [4 Citing](#citing)
* [5 Documentation](#documentation)
* [6 Contribute](#contributing)
* [7 Test and known issues](#tests-and-known-issues)
* [8 License information](#license-information)

## Installation

### Requirements

* Python >= 3.6

### Setup a Virtualenv (optional)

#### Create a virtual environment

```commandline
cd my-project-folder
pip3 install -U virtualenv
python3 -m virtualenv venv_grid2op
```

#### Enter virtual environment

```commandline
source venv_grid2op/bin/activate
```

### Install from PyPI

```commandline
pip3 install grid2op
```

### Install from source

```commandline
git clone https://github.com/grid2op/Grid2Op.git
cd Grid2Op
pip3 install -U .
cd ..
```

### Install for contributors

```commandline
git clone https://github.com/grid2op/Grid2Op.git
cd Grid2Op
pip3 install -e .
pip3 install -e .[optional]
pip3 install -e .[docs]
```

### Docker

Grid2Op docker containers are available on [dockerhub](https://hub.docker.com/r/bdonnot/grid2op/tags).

To install the latest Grid2Op container locally, use the following:

```commandline
docker pull bdonnot/grid2op:latest
```

## Main features of Grid2Op

### Core functionalities

Built with modulartiy in mind, Grid2Op is a library used for the "Learning To Run Power Network" [L2RPN](https://l2rpn.chalearn.org/)
competitions series. It can also

Its main features are:

* emulates the behavior of a powergrid of any size at any format (provided that a *backend* is properly implemented)
* allows for grid modifications (active and reactive load values, generator voltages setpoints, active production but most
  importantly grid topology beyond powerline connection / disconnection)
* allows for maintenance operations and powergrid topological changes
* can adopt any powergrid modeling, especially Alternating Current (AC) and Direct Current (DC) approximation to
  when performing the compitations
* supports changes of powerflow solvers, actions, observations to better suit any need in performing power system operations modeling
* has an RL-focused interface, compatible with [OpenAI-gym](https://gym.openai.com/): same interface for the
  Environment class.
* parameters, game rules or type of actions are perfectly parametrizable
* can adapt to any kind of input data, in various format (might require the rewriting of a class)

### Powerflow solver

Grid2Op relies on an open source powerflow solver ([PandaPower](https://www.pandapower.org/)),
but is also compatible with other *Backend*. If you have at your disposal another powerflow solver,
the documentation of [grid2op/Backend](grid2op/Backend/Backend.py) can help you integrate it into a proper "Backend"
and have Grid2Op using this powerflow instead of PandaPower.

## Getting Started

Some Jupyter notebook are provided as tutorials for the Grid2Op package. They are located in the
[getting_started](getting_started) directories.

TODO: this needs to be redone, refactorize and better explained for some of them.

These notebooks will help you in understanding how this framework is used and cover the most
interesting part of this framework:

* [00_Introduction](getting_started/00_Introduction.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/00_Introduction.ipynb)
  and [00_SmallExample](getting_started/00_SmallExample.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/00_SmallExample.ipynb)
  describe what is
  adressed by the grid2op framework (with a tiny introductions to both power systems and reinforcement learning)
  and give and introductory example to a small powergrid manipulation.
* [01_Grid2opFramework](getting_started/01_Grid2opFramework.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/01_Grid2opFramework.ipynb)
  covers the basics
  of the
  Grid2Op framework. It also covers how to create a valid environment and how to use the
  `Runner` class to assess how well an agent is performing rapidly.
* [02_Observation](getting_started/02_Observation.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/02_Observation.ipynb)
  details how to create
  an "expert agent" that will take pre defined actions based on the observation it gets from
  the environment. This Notebook also covers the functioning of the BaseObservation class.
* [03_Action](getting_started/03_Action.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/03_Action.ipynb)
  demonstrates
  how to use the BaseAction class and how to manipulate the powergrid.
* [04_TrainingAnAgent](getting_started/04_TrainingAnAgent.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/04_TrainingAnAgent.ipynb)
  shows how to get started with
  reinforcement learning with the grid2op environment. It shows the basic on how to train a "PPO" model operating the grid relying on "stable baselines 3" PPO implementation.
* [05_StudyYourAgent](getting_started/05_StudyYourAgent.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/05_StudyYourAgent.ipynb)
  shows how to study an BaseAgent, for example
  the methods to reload a saved experiment, or to plot the powergrid given an observation for
  example. This is an introductory notebook. More user friendly graphical interface should
  come soon.
* [06_Redispatching_Curtailment](getting_started/06_Redispatching_Curtailment.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/06_Redispatching_Curtailment.ipynb)
  explains what is the
  "redispatching" and curtailment from the point
  of view of a company who's in charge of keeping the powergrid safe (aka a Transmission System Operator) and how to
  manipulate this concept in grid2op. Redispatching (and curtailment) allows you to perform **continuous**
  actions on the powergrid
  problem.
* [07_MultiEnv](getting_started/07_MultiEnv.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/07_MultiEnv.ipynb)
  details how grid2op natively support a single agent interacting
  with multiple environments at the same time. This is particularly handy to train "asynchronous" agent in the
  Reinforcement Learning community for example.
* [08_PlottingCapabilities](getting_started/08_PlottingCapabilities.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/08_PlottingCapabilities.ipynb)
  shows you the different ways with which you
  can represent (visually) the grid your agent interact with. A renderer is available like in many open AI gym
  environment. But you also have the possibility to post process an agent and make some movies out of it, and we also
  developed a Graphical User Interface (GUI) called "[grid2viz](https://github.com/mjothy/grid2viz)" that allows
  to perform in depth study of your agent's behaviour on different scenarios and even to compare it with baselines.
* [09_EnvironmentModifications](getting_started/09_EnvironmentModifications.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/09_EnvironmentModifications.ipynb)
  elaborates on the maintenance,
  hazards
  and attacks. All three of these represents external events that can disconnect some powerlines. This notebook
  covers how to spot when such things happened and what can be done when the maintenance or the attack is over.
* [10_StorageUnits](getting_started/10_StorageUnits.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/10_StorageUnits.ipynb)
  details the usage and behaviour of the storage units
  in grid2op.
* [11_IntegrationWithExistingRLFrameworks](getting_started/11_IntegrationWithExistingRLFrameworks.ipynb)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/11_IntegrationWithExistingRLFrameworks.ipynb)
  explains how to use grid2op with other reinforcement learning framework. TODO: this needs to be redone

Try them out in your own browser without installing
anything with the help of mybinder:
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)

Or thanks to google colab (all links are provided near the notebook description)

## Citing

If you use this package in one of your work, please cite:

```text
@software{grid2op,
    author = {B. Donnot},
    title = {{Grid2op- A testbed platform to model sequential decision making in power systems. }},
    url = {\url{https://GitHub.com/Grid2Op/grid2op}},
    year = {2020},
    publisher = {GitHub},
}
```

## Documentation

The official documentation is available at
[https://grid2op.readthedocs.io/](https://grid2op.readthedocs.io/).

### Build the documentation locally

A copy of the documentation can be built if the project is installed *from source*:
you will need Sphinx, a Documentation building tool, and a nice-looking custom
[Sphinx theme similar to the one of readthedocs.io](https://sphinx-rtd-theme.readthedocs.io/en/latest/). These
can be installed with:

```commandline
pip3 install -U grid2op[docs]
```

This installs both the Sphinx package and the custom template.

Then, on systems where `make` is available (mainly gnu-linux and macos) the documentation can be built with the command:

```commandline
make html
```

For windows, or systems where `make` is not available, the command:

```commandline
sphinx-build -b html docs documentation
```

This will create a "documentation" subdirectory and the main entry point of the document will be located at
[index.html](documentation/html/index.html).

It is recommended to build this documentation locally, for convenience.
For example, the  "getting started" notebooks referenced some pages of the help.

<!-- sphinx-build -b html docs documentation-->

## Contributing

Please consult the "CONTRIBUTING.md" file for extra information. This is a summary and
in case of conflicting instructions, follow the one given in the `CONTRIBUTING.md` file
and discard these ones.


We welcome contributions from everyone. They can take the form of pull requests for smaller changed.
In case of a major change (or if you have a doubt on what is "a small change"), please open an issue first
to discuss what you would like to change.

To contribute to this code, you need to:

1. fork the repository located at <https://github.com/Grid2Op/grid2op>
2. synch your fork with the "latest developement branch of grid2op". For example, if the latest grid2op release
   on pypi is `1.6.5` you need to synch your repo with the branch named `dev_1.6.6` or `dev_1.7.0` (if
   the branch `dev_1.6.6` does not exist). It will be the highest number in the branches `dev_*` on
   grid2op official github repository.
3. implement your functionality / code your modifications or anything else
4. make sure to add tests and documentation if applicable
5. once it is developed, synch your repo with the last development branch again (see point 2 above) and
   make sure to solve any possible conflicts
6. write a pull request and make sure to target the right branch (the "last development branch")

Code in the contribution should pass all the tests, have some dedicated tests for the new feature (if applicable)
and documentation (if applicable).

Before implementing any major feature, please write a github issue first.

## Tests and known issues

### Tests performed currently

Grid2op is currently tested on windows, linux and macos.

The unit tests includes testing, on linux machines the correct integration of grid2op with:

* python 3.8
* python 3.9
* python 3.10
* python 3.11
* python 3.12

On all of these cases, we tested grid2op on all available numpy versions >= 1.20 (**nb** available numpy versions depend
on python version).

The complete test suit is run on linux with the latest numpy version on python 3.10.

### Known issues


#### Multi processing
Due to the underlying behaviour of the "multiprocessing" package on windows based python versions,
the "multiprocessing" of the grid2op "Runner" is not supported on windows. This might change in the future,
but it is currently not on our priorities.

A quick fix that is known to work include to set the `experimental_read_from_local_dir` when creating the
environment with `grid2op.make(..., experimental_read_from_local_dir=True)` (see doc for more information)

Sometimes, on some configuration (python version) we do not recommend to use grid2op with pandas>=2.2
If you encounter any trouble, please downgrade to pandas<2.2. This behaviour occured in our continuous 
integration environment for python >=3.9 but could not be reproduced locally.

#### python 3.11
Some version of grid2op (*eg* 1.6.3) are not compatible with python 3.10 or 3.11.

Either use python version 3.8 or 3.9 or upgrade grid2op (1.6.5 works) if that is the case.

### Perform tests locally

Provided that Grid2Op is installed *from source*:

#### Install additional dependencies

```commandline
pip3 install -U grid2op[optional]
```

#### Launch tests

```commandline
cd grid2op/tests
python3 -m unittest discover
```

## License information

Copyright 2019-2020 RTE France
RTE: <http://www.rte-france.com>

This Source Code is subject to the terms of the Mozilla Public License (MPL) v2 also available
[here](https://www.mozilla.org/en-US/MPL/2.0/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Grid2Op/grid2op",
    "name": "Grid2Op",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ML powergrid optmization RL power-systems",
    "author": "Benjamin DONNOT",
    "author_email": "benjamin.donnot@rte-france.com",
    "download_url": "https://files.pythonhosted.org/packages/87/cf/2c97f93027f2fbb92d80005fd5d2f2add98e1af7d653cbb18b48947770f8/grid2op-1.10.5.tar.gz",
    "platform": null,
    "description": "# Grid2Op\n\n[![Downloads](https://pepy.tech/badge/grid2op)](https://pepy.tech/project/grid2op)\n[![PyPi_Version](https://img.shields.io/pypi/v/grid2op.svg)](https://pypi.org/project/Grid2Op/)\n[![PyPi_Compat](https://img.shields.io/pypi/pyversions/grid2op.svg)](https://pypi.org/project/Grid2Op/)\n[![LICENSE](https://img.shields.io/pypi/l/grid2op.svg)](https://www.mozilla.org/en-US/MPL/2.0/)\n[![Documentation Status](https://readthedocs.org/projects/grid2op/badge/?version=latest)](https://grid2op.readthedocs.io/en/latest/?badge=latest)\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/Grid2op/grid2op/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/Grid2op/grid2op/tree/master)\n[![discord](https://discord.com/api/guilds/698080905209577513/embed.png)](https://discord.gg/cYsYrPT)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/grid2op/grid2op.git/master)\n\nGrid2Op is a platform, built with modularity in mind, that allows to perform powergrid operation.\nAnd that's what it stands for: Grid To Operate.\nIt is used as a library used for the Learning To Run Power Network [L2RPN](https://l2rpn.chalearn.org/),\nbut also for research purpose (especially by the Reinforcement Learning community applied to power system)\n\nThis framework allows to perform most kind of powergrid operations, from modifying the setpoint of generators,\nto load shedding, performing maintenance operations or modifying the *topology* of a powergrid\nto solve security issues.\n\nOfficial documentation: the official documentation is available at\n[https://grid2op.readthedocs.io/](https://grid2op.readthedocs.io/).\n\n* [1 Installation](#installation)\n  * [1.1 Setup a Virtualenv (optional)](#setup-a-virtualenv-optional)\n  * [1.2 Install from source](#install-from-source)\n  * [1.3 Install from PyPI](#install-from-pypi)\n  * [1.4 Install for contributors](#install-for-contributors)\n  * [1.5 Docker](#docker)\n* [2 Main features of Grid2Op](#main-features-of-grid2op)\n* [3 Getting Started](#getting-started)\n  * [0 Basic features](getting_started/0_basic_functionalities.ipynb)\n  * [1 BaseObservation Agents](getting_started/1_Observation_Agents.ipynb)\n  * [2 BaseAction Grid Manipulation](getting_started/2_Action_GridManipulation.ipynb)\n  * [3 Training An BaseAgent](getting_started/3_TrainingAnAgent.ipynb)\n  * [4 Study Your BaseAgent](getting_started/4_StudyYourAgent.ipynb)\n* [4 Citing](#citing)\n* [5 Documentation](#documentation)\n* [6 Contribute](#contributing)\n* [7 Test and known issues](#tests-and-known-issues)\n* [8 License information](#license-information)\n\n## Installation\n\n### Requirements\n\n* Python >= 3.6\n\n### Setup a Virtualenv (optional)\n\n#### Create a virtual environment\n\n```commandline\ncd my-project-folder\npip3 install -U virtualenv\npython3 -m virtualenv venv_grid2op\n```\n\n#### Enter virtual environment\n\n```commandline\nsource venv_grid2op/bin/activate\n```\n\n### Install from PyPI\n\n```commandline\npip3 install grid2op\n```\n\n### Install from source\n\n```commandline\ngit clone https://github.com/grid2op/Grid2Op.git\ncd Grid2Op\npip3 install -U .\ncd ..\n```\n\n### Install for contributors\n\n```commandline\ngit clone https://github.com/grid2op/Grid2Op.git\ncd Grid2Op\npip3 install -e .\npip3 install -e .[optional]\npip3 install -e .[docs]\n```\n\n### Docker\n\nGrid2Op docker containers are available on [dockerhub](https://hub.docker.com/r/bdonnot/grid2op/tags).\n\nTo install the latest Grid2Op container locally, use the following:\n\n```commandline\ndocker pull bdonnot/grid2op:latest\n```\n\n## Main features of Grid2Op\n\n### Core functionalities\n\nBuilt with modulartiy in mind, Grid2Op is a library used for the \"Learning To Run Power Network\" [L2RPN](https://l2rpn.chalearn.org/)\ncompetitions series. It can also\n\nIts main features are:\n\n* emulates the behavior of a powergrid of any size at any format (provided that a *backend* is properly implemented)\n* allows for grid modifications (active and reactive load values, generator voltages setpoints, active production but most\n  importantly grid topology beyond powerline connection / disconnection)\n* allows for maintenance operations and powergrid topological changes\n* can adopt any powergrid modeling, especially Alternating Current (AC) and Direct Current (DC) approximation to\n  when performing the compitations\n* supports changes of powerflow solvers, actions, observations to better suit any need in performing power system operations modeling\n* has an RL-focused interface, compatible with [OpenAI-gym](https://gym.openai.com/): same interface for the\n  Environment class.\n* parameters, game rules or type of actions are perfectly parametrizable\n* can adapt to any kind of input data, in various format (might require the rewriting of a class)\n\n### Powerflow solver\n\nGrid2Op relies on an open source powerflow solver ([PandaPower](https://www.pandapower.org/)),\nbut is also compatible with other *Backend*. If you have at your disposal another powerflow solver,\nthe documentation of [grid2op/Backend](grid2op/Backend/Backend.py) can help you integrate it into a proper \"Backend\"\nand have Grid2Op using this powerflow instead of PandaPower.\n\n## Getting Started\n\nSome Jupyter notebook are provided as tutorials for the Grid2Op package. They are located in the\n[getting_started](getting_started) directories.\n\nTODO: this needs to be redone, refactorize and better explained for some of them.\n\nThese notebooks will help you in understanding how this framework is used and cover the most\ninteresting part of this framework:\n\n* [00_Introduction](getting_started/00_Introduction.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/00_Introduction.ipynb)\n  and [00_SmallExample](getting_started/00_SmallExample.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/00_SmallExample.ipynb)\n  describe what is\n  adressed by the grid2op framework (with a tiny introductions to both power systems and reinforcement learning)\n  and give and introductory example to a small powergrid manipulation.\n* [01_Grid2opFramework](getting_started/01_Grid2opFramework.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/01_Grid2opFramework.ipynb)\n  covers the basics\n  of the\n  Grid2Op framework. It also covers how to create a valid environment and how to use the\n  `Runner` class to assess how well an agent is performing rapidly.\n* [02_Observation](getting_started/02_Observation.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/02_Observation.ipynb)\n  details how to create\n  an \"expert agent\" that will take pre defined actions based on the observation it gets from\n  the environment. This Notebook also covers the functioning of the BaseObservation class.\n* [03_Action](getting_started/03_Action.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/03_Action.ipynb)\n  demonstrates\n  how to use the BaseAction class and how to manipulate the powergrid.\n* [04_TrainingAnAgent](getting_started/04_TrainingAnAgent.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/04_TrainingAnAgent.ipynb)\n  shows how to get started with\n  reinforcement learning with the grid2op environment. It shows the basic on how to train a \"PPO\" model operating the grid relying on \"stable baselines 3\" PPO implementation.\n* [05_StudyYourAgent](getting_started/05_StudyYourAgent.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/05_StudyYourAgent.ipynb)\n  shows how to study an BaseAgent, for example\n  the methods to reload a saved experiment, or to plot the powergrid given an observation for\n  example. This is an introductory notebook. More user friendly graphical interface should\n  come soon.\n* [06_Redispatching_Curtailment](getting_started/06_Redispatching_Curtailment.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/06_Redispatching_Curtailment.ipynb)\n  explains what is the\n  \"redispatching\" and curtailment from the point\n  of view of a company who's in charge of keeping the powergrid safe (aka a Transmission System Operator) and how to\n  manipulate this concept in grid2op. Redispatching (and curtailment) allows you to perform **continuous**\n  actions on the powergrid\n  problem.\n* [07_MultiEnv](getting_started/07_MultiEnv.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/07_MultiEnv.ipynb)\n  details how grid2op natively support a single agent interacting\n  with multiple environments at the same time. This is particularly handy to train \"asynchronous\" agent in the\n  Reinforcement Learning community for example.\n* [08_PlottingCapabilities](getting_started/08_PlottingCapabilities.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/08_PlottingCapabilities.ipynb)\n  shows you the different ways with which you\n  can represent (visually) the grid your agent interact with. A renderer is available like in many open AI gym\n  environment. But you also have the possibility to post process an agent and make some movies out of it, and we also\n  developed a Graphical User Interface (GUI) called \"[grid2viz](https://github.com/mjothy/grid2viz)\" that allows\n  to perform in depth study of your agent's behaviour on different scenarios and even to compare it with baselines.\n* [09_EnvironmentModifications](getting_started/09_EnvironmentModifications.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/09_EnvironmentModifications.ipynb)\n  elaborates on the maintenance,\n  hazards\n  and attacks. All three of these represents external events that can disconnect some powerlines. This notebook\n  covers how to spot when such things happened and what can be done when the maintenance or the attack is over.\n* [10_StorageUnits](getting_started/10_StorageUnits.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/10_StorageUnits.ipynb)\n  details the usage and behaviour of the storage units\n  in grid2op.\n* [11_IntegrationWithExistingRLFrameworks](getting_started/11_IntegrationWithExistingRLFrameworks.ipynb)\n  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Grid2Op/grid2op/blob/master/getting_started/11_IntegrationWithExistingRLFrameworks.ipynb)\n  explains how to use grid2op with other reinforcement learning framework. TODO: this needs to be redone\n\nTry them out in your own browser without installing\nanything with the help of mybinder:\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Grid2Op/grid2op/master)\n\nOr thanks to google colab (all links are provided near the notebook description)\n\n## Citing\n\nIf you use this package in one of your work, please cite:\n\n```text\n@software{grid2op,\n    author = {B. Donnot},\n    title = {{Grid2op- A testbed platform to model sequential decision making in power systems. }},\n    url = {\\url{https://GitHub.com/Grid2Op/grid2op}},\n    year = {2020},\n    publisher = {GitHub},\n}\n```\n\n## Documentation\n\nThe official documentation is available at\n[https://grid2op.readthedocs.io/](https://grid2op.readthedocs.io/).\n\n### Build the documentation locally\n\nA copy of the documentation can be built if the project is installed *from source*:\nyou will need Sphinx, a Documentation building tool, and a nice-looking custom\n[Sphinx theme similar to the one of readthedocs.io](https://sphinx-rtd-theme.readthedocs.io/en/latest/). These\ncan be installed with:\n\n```commandline\npip3 install -U grid2op[docs]\n```\n\nThis installs both the Sphinx package and the custom template.\n\nThen, on systems where `make` is available (mainly gnu-linux and macos) the documentation can be built with the command:\n\n```commandline\nmake html\n```\n\nFor windows, or systems where `make` is not available, the command:\n\n```commandline\nsphinx-build -b html docs documentation\n```\n\nThis will create a \"documentation\" subdirectory and the main entry point of the document will be located at\n[index.html](documentation/html/index.html).\n\nIt is recommended to build this documentation locally, for convenience.\nFor example, the  \"getting started\" notebooks referenced some pages of the help.\n\n<!-- sphinx-build -b html docs documentation-->\n\n## Contributing\n\nPlease consult the \"CONTRIBUTING.md\" file for extra information. This is a summary and\nin case of conflicting instructions, follow the one given in the `CONTRIBUTING.md` file\nand discard these ones.\n\n\nWe welcome contributions from everyone. They can take the form of pull requests for smaller changed.\nIn case of a major change (or if you have a doubt on what is \"a small change\"), please open an issue first\nto discuss what you would like to change.\n\nTo contribute to this code, you need to:\n\n1. fork the repository located at <https://github.com/Grid2Op/grid2op>\n2. synch your fork with the \"latest developement branch of grid2op\". For example, if the latest grid2op release\n   on pypi is `1.6.5` you need to synch your repo with the branch named `dev_1.6.6` or `dev_1.7.0` (if\n   the branch `dev_1.6.6` does not exist). It will be the highest number in the branches `dev_*` on\n   grid2op official github repository.\n3. implement your functionality / code your modifications or anything else\n4. make sure to add tests and documentation if applicable\n5. once it is developed, synch your repo with the last development branch again (see point 2 above) and\n   make sure to solve any possible conflicts\n6. write a pull request and make sure to target the right branch (the \"last development branch\")\n\nCode in the contribution should pass all the tests, have some dedicated tests for the new feature (if applicable)\nand documentation (if applicable).\n\nBefore implementing any major feature, please write a github issue first.\n\n## Tests and known issues\n\n### Tests performed currently\n\nGrid2op is currently tested on windows, linux and macos.\n\nThe unit tests includes testing, on linux machines the correct integration of grid2op with:\n\n* python 3.8\n* python 3.9\n* python 3.10\n* python 3.11\n* python 3.12\n\nOn all of these cases, we tested grid2op on all available numpy versions >= 1.20 (**nb** available numpy versions depend\non python version).\n\nThe complete test suit is run on linux with the latest numpy version on python 3.10.\n\n### Known issues\n\n\n#### Multi processing\nDue to the underlying behaviour of the \"multiprocessing\" package on windows based python versions,\nthe \"multiprocessing\" of the grid2op \"Runner\" is not supported on windows. This might change in the future,\nbut it is currently not on our priorities.\n\nA quick fix that is known to work include to set the `experimental_read_from_local_dir` when creating the\nenvironment with `grid2op.make(..., experimental_read_from_local_dir=True)` (see doc for more information)\n\nSometimes, on some configuration (python version) we do not recommend to use grid2op with pandas>=2.2\nIf you encounter any trouble, please downgrade to pandas<2.2. This behaviour occured in our continuous \nintegration environment for python >=3.9 but could not be reproduced locally.\n\n#### python 3.11\nSome version of grid2op (*eg* 1.6.3) are not compatible with python 3.10 or 3.11.\n\nEither use python version 3.8 or 3.9 or upgrade grid2op (1.6.5 works) if that is the case.\n\n### Perform tests locally\n\nProvided that Grid2Op is installed *from source*:\n\n#### Install additional dependencies\n\n```commandline\npip3 install -U grid2op[optional]\n```\n\n#### Launch tests\n\n```commandline\ncd grid2op/tests\npython3 -m unittest discover\n```\n\n## License information\n\nCopyright 2019-2020 RTE France\nRTE: <http://www.rte-france.com>\n\nThis Source Code is subject to the terms of the Mozilla Public License (MPL) v2 also available\n[here](https://www.mozilla.org/en-US/MPL/2.0/)\n",
    "bugtrack_url": null,
    "license": "Mozilla Public License 2.0 (MPL 2.0)",
    "summary": "An gymnasium compatible environment to model sequential decision making for powersystems",
    "version": "1.10.5",
    "project_urls": {
        "Homepage": "https://github.com/Grid2Op/grid2op"
    },
    "split_keywords": [
        "ml",
        "powergrid",
        "optmization",
        "rl",
        "power-systems"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f60b7d02e2f3feca7dd857e7a47a941f24f30bc6682046cd2083f417269ef18",
                "md5": "be553a12616a103339300fb67b38d794",
                "sha256": "421d96ad3ba88e6e2ca9c441d672eb279a65fdaab5438688f0a39d7fa0c48597"
            },
            "downloads": -1,
            "filename": "Grid2Op-1.10.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "be553a12616a103339300fb67b38d794",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 16760658,
            "upload_time": "2024-10-15T12:45:49",
            "upload_time_iso_8601": "2024-10-15T12:45:49.466654Z",
            "url": "https://files.pythonhosted.org/packages/3f/60/b7d02e2f3feca7dd857e7a47a941f24f30bc6682046cd2083f417269ef18/Grid2Op-1.10.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "87cf2c97f93027f2fbb92d80005fd5d2f2add98e1af7d653cbb18b48947770f8",
                "md5": "5ae238fbc203e2d409f8ad5b389b187a",
                "sha256": "d9bfedd4cc5efc7e8678c53f53fbcd3e62fcf2fb359ceb0b06313a2f2ef5da70"
            },
            "downloads": -1,
            "filename": "grid2op-1.10.5.tar.gz",
            "has_sig": false,
            "md5_digest": "5ae238fbc203e2d409f8ad5b389b187a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 16008394,
            "upload_time": "2024-10-15T12:45:15",
            "upload_time_iso_8601": "2024-10-15T12:45:15.754326Z",
            "url": "https://files.pythonhosted.org/packages/87/cf/2c97f93027f2fbb92d80005fd5d2f2add98e1af7d653cbb18b48947770f8/grid2op-1.10.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-15 12:45:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Grid2Op",
    "github_project": "grid2op",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "lcname": "grid2op"
}
        
Elapsed time: 0.39262s