Skip to content

Commit

Permalink
Merge pull request #634 from BDonnot/bd_dev
Browse files Browse the repository at this point in the history
Bd dev
  • Loading branch information
BDonnot authored Sep 16, 2024
2 parents fdbe084 + 03df698 commit d3a1c06
Show file tree
Hide file tree
Showing 56 changed files with 760 additions and 220 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@ Next release
- TODO in multi-mix increase the reset options with the mix the user wants
- TODO L2RPN scores as reward (sum loads after the game over and have it in the final reward)
- TODO on CI: test only gym, only gymnasium and keep current test for both gym and gymnasium
- TODO work on the reward class (see https://github.com/rte-france/Grid2Op/issues/584)


[1.10.4] - 2024-xx-yy
-------------------------

- [FIXED] an issue in the backend: if the backend failed to be
created the `_grid` attribute was set to `None` and not set back to
- [FIXED] the `self.skip_if_needed()` was missing for one of the test suite.

[1.10.3] - 2024-07-12
-------------------------
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ The complete test suit is run on linux with the latest numpy version on python 3

### 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.
Expand All @@ -316,6 +318,11 @@ Sometimes, on some configuration (python version) we do not recommend to use gri
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*:
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Benjamin Donnot'

# The full version, including alpha/beta/rc tags
release = '1.10.3'
release = '1.10.4.dev0'
version = '1.10'


Expand Down
6 changes: 3 additions & 3 deletions docs/data_pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ Results are reported in the table below:
============================== ================ ===================
Method used memory footprint time to perform (s)
============================== ================ ===================
Nothing (see `Basic Usage`_) low 44.6
set_chunk (see `Chunk size`_) ultra low 26.8
`MultifolderWithCache`_ high 11.0
Nothing (see Basic Usage ) low 44.6
set_chunk (see `Chunk size`_ ) ultra low 26.8
`MultifolderWithCache`_ high 11.0
============================== ================ ===================

As you can see, the default usage uses relatively little memory but takes a while to compute (almost 45s to perform
Expand Down
8 changes: 8 additions & 0 deletions docs/developer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. toctree::
:maxdepth: 1

developer/env_content
developer/create_an_environment
developer/createbackend

.. include:: final.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. |l2rpn_case14_sandbox_layout| image:: ./img/l2rpn_case14_sandbox_layout.png
.. |R2_full_grid| image:: ./img/R2_full_grid.png
.. |l2rpn_neurips_2020_track1_layout| image:: ./img/l2rpn_neurips_2020_track1_layout.png
.. |l2rpn_neurips_2020_track2_layout| image:: ./img/l2rpn_neurips_2020_track2_layout.png
.. |l2rpn_wcci_2022_layout| image:: ./img/l2rpn_wcci_2022_layout.png
.. |l2rpn_case14_sandbox_layout| image:: ../img/l2rpn_case14_sandbox_layout.png
.. |R2_full_grid| image:: ../img/R2_full_grid.png
.. |l2rpn_neurips_2020_track1_layout| image:: ../img/l2rpn_neurips_2020_track1_layout.png
.. |l2rpn_neurips_2020_track2_layout| image:: ../img/l2rpn_neurips_2020_track2_layout.png
.. |l2rpn_wcci_2022_layout| image:: ../img/l2rpn_wcci_2022_layout.png


Possible workflow to create an environment from existing time series
Expand Down
45 changes: 23 additions & 22 deletions docs/createbackend.rst → docs/developer/createbackend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@
.. _line_or_pos_topo_vect: ./space.html#grid2op.Space.GridObjects.line_or_pos_topo_vect
.. _line_ex_pos_topo_vect: ./space.html#grid2op.Space.GridObjects.line_ex_pos_topo_vect

.. |5subs_grid_layout| image:: ./img/5subs_grid_layout.jpg
.. |5subs_grid_1_sub| image:: ./img/5subs_grid_1_sub.jpg
.. |5subs_grid_2_loads| image:: ./img/5subs_grid_2_loads.jpg
.. |5subs_grid_3_gens| image:: ./img/5subs_grid_3_gens.jpg
.. |5subs_grid_4_lines| image:: ./img/5subs_grid_4_lines.jpg
.. |5subs_grid_5_obj_in_sub| image:: ./img/5subs_grid_5_obj_in_sub.jpg
.. |5subs_grid_layout_with_repr| image:: ./img/5subs_grid_layout_with_repr.jpg
.. |5subs_grid_n_el| image:: ./img/5subs_grid_n_el.jpg
.. |5subs_grid_5_sub_i| image:: ./img/5subs_grid_5_sub_i.jpg
.. |5subs_grid_load_to_subid| image:: ./img/5subs_grid_load_to_subid.jpg
.. |5subs_grid_el_to_subid| image:: ./img/5subs_grid_el_to_subid.jpg
.. |5subs_grid_sub0| image:: ./img/5subs_grid_sub0.jpg
.. |5subs_grid_sub0_final| image:: ./img/5subs_grid_sub0_final.jpg
.. |5subs_grid_sub1_final| image:: ./img/5subs_grid_sub1_final.jpg
.. |5subs_grid_loads_info| image:: ./img/5subs_grid_loads_info.jpg
.. |5subs_grid_sub1_topo| image:: ./img/5subs_grid_sub1_topo.jpg
.. |5subs_grid_sub1_2_topo| image:: ./img/5subs_grid_sub1_2_topo.jpg
.. |5subs_grid_suball_topo| image:: ./img/5subs_grid_suball_topo.jpg
.. |5subs_grid_ex_disco| image:: ./img/5subs_grid_ex_disco.jpg
.. |5subs_grid_ex_2buses| image:: ./img/5subs_grid_ex_2buses.jpg
.. |5subs_grid_layout| image:: ../img/5subs_grid_layout.jpg
.. |5subs_grid_1_sub| image:: ../img/5subs_grid_1_sub.jpg
.. |5subs_grid_2_loads| image:: ../img/5subs_grid_2_loads.jpg
.. |5subs_grid_3_gens| image:: ../img/5subs_grid_3_gens.jpg
.. |5subs_grid_4_lines| image:: ../img/5subs_grid_4_lines.jpg
.. |5subs_grid_5_obj_in_sub| image:: ../img/5subs_grid_5_obj_in_sub.jpg
.. |5subs_grid_layout_with_repr| image:: ../img/5subs_grid_layout_with_repr.jpg
.. |5subs_grid_n_el| image:: ../img/5subs_grid_n_el.jpg
.. |5subs_grid_5_sub_i| image:: ../img/5subs_grid_5_sub_i.jpg
.. |5subs_grid_load_to_subid| image:: ../img/5subs_grid_load_to_subid.jpg
.. |5subs_grid_el_to_subid| image:: ../img/5subs_grid_el_to_subid.jpg
.. |5subs_grid_sub0| image:: ../img/5subs_grid_sub0.jpg
.. |5subs_grid_sub0_final| image:: ../img/5subs_grid_sub0_final.jpg
.. |5subs_grid_sub1_final| image:: ../img/5subs_grid_sub1_final.jpg
.. |5subs_grid_loads_info| image:: ../img/5subs_grid_loads_info.jpg
.. |5subs_grid_sub1_topo| image:: ../img/5subs_grid_sub1_topo.jpg
.. |5subs_grid_sub1_2_topo| image:: ../img/5subs_grid_sub1_2_topo.jpg
.. |5subs_grid_suball_topo| image:: ../img/5subs_grid_suball_topo.jpg
.. |5subs_grid_ex_disco| image:: ../img/5subs_grid_ex_disco.jpg
.. |5subs_grid_ex_2buses| image:: ../img/5subs_grid_ex_2buses.jpg

.. _create-backend-module:

Expand Down Expand Up @@ -689,15 +689,16 @@ These functions can be used in the following manner:
And of course you do the same for generators and both ends of each powerline.

.. note:: About powerline, grid2op adopts the following convention: a powerline **cannot** be connected on one side
.. note::
About powerline, grid2op adopts the following convention: a powerline **cannot** be connected on one side
and disconnected on the other.

That being said, it's still possible to connect the extremity of a powerline "alone" on a busbar, which will have
the same effect of having it "disconnected at one ends only".

.. _vector-orders-create-backend:

***_infos() : Read back the results (flows, voltages etc.)
\*\*\*_infos() : Read back the results (flows, voltages etc.)
--------------------------------------------------------------
This last "technical" part concerns what can be refer to as "getters" from the backend. These functions allow to
read back the state of the grid and expose its results to grid2op in a standardize manner.
Expand Down
10 changes: 5 additions & 5 deletions docs/env_content.rst → docs/developer/env_content.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

.. |l2rpn_case14_sandbox_layout| image:: ./img/l2rpn_case14_sandbox_layout.png
.. |R2_full_grid| image:: ./img/R2_full_grid.png
.. |l2rpn_neurips_2020_track1_layout| image:: ./img/l2rpn_neurips_2020_track1_layout.png
.. |l2rpn_neurips_2020_track2_layout| image:: ./img/l2rpn_neurips_2020_track2_layout.png
.. |l2rpn_wcci_2022_layout| image:: ./img/l2rpn_wcci_2022_layout.png
.. |l2rpn_case14_sandbox_layout| image:: ../img/l2rpn_case14_sandbox_layout.png
.. |R2_full_grid| image:: ../img/R2_full_grid.png
.. |l2rpn_neurips_2020_track1_layout| image:: ../img/l2rpn_neurips_2020_track1_layout.png
.. |l2rpn_neurips_2020_track2_layout| image:: ../img/l2rpn_neurips_2020_track2_layout.png
.. |l2rpn_wcci_2022_layout| image:: ../img/l2rpn_wcci_2022_layout.png


Content of an environment
Expand Down
2 changes: 2 additions & 0 deletions docs/developer/final.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

.. include:: ../final.rst
19 changes: 13 additions & 6 deletions docs/grid2op.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ competitions.
This platform is still under development. If you notice a bug, let us know with a github issue at
`Grid2Op <https://github.com/rte-france/Grid2Op>`_

.. note:: Grid2op do not model any object on the powergrid. It has no internal modeling of the equations of the
.. note::
Grid2op do not model any object on the powergrid. It has no internal modeling of the equations of the
grids, or what kind of solver you need to adopt.

On the other hand, grid2op aims at representing the grid in a relatively "high level" point of view: it knows
Expand All @@ -43,6 +44,7 @@ This platform is still under development. If you notice a bug, let us know with

Objectives
-----------

The primary goal of grid2op is to model decision making process in power systems. Indeed, we believe that developing
new flexibilities on the grid would make the
"energy transition" an easier, less costly process.
Expand Down Expand Up @@ -72,7 +74,8 @@ Though grid2op has been primarily developed for the L2RPN competitions series, i
can also help developing and benchmarking new powerflow solvers for example.

Controlling the grid
--------------------
---------------------

Modeling all what happens in the powergrid would be an extremely difficult task. Grid2op focusing on controls
that could be done today by a human (happening with **a frequency of approximately the minute**). It does not
aim at simulation really high frequency control that are often automatic today. That being said, such controls
Expand Down Expand Up @@ -107,8 +110,10 @@ Other "flexibilities" (ways to act on the grid) are coming soon (-:
solver uses some physical laws to compute these "weights" from the amount of power produced / absorbed in
different part of the grid where generators and loads are connected).


What is modeled in an grid2op environment
-----------------------------------------
------------------------------------------

The simulator is able to emulate a power grid (of any size or characteristics) subject to a set of
temporal injections (productions and consumptions) or maintenance / hazards for discretized
time-steps (usually there is the equivalent of *5* minutes between two consective steps).
Expand Down Expand Up @@ -216,7 +221,8 @@ Module Name Main usage
============================= =========================================================================================

Properties of this environments
-------------------------------
--------------------------------

The grid2op environments have multiple shared properties:

- highly constrained environments: these environments obey physical laws. You cannot directly choose how much
Expand Down Expand Up @@ -398,7 +404,7 @@ If it fails between "now" and "12 steps from now" reward associated with alert w
negative (this is the situation where the agent should have told the human operator "help me").


Let's replay again (again ?) the same scenario again: same attack, same everything:
Let's replay again (again ?) the same scenario: same attack, same everything:

.. code-block:: python
Expand Down Expand Up @@ -457,7 +463,8 @@ that are available, without any installation thanks to
`Binder <https://mybinder.org/v2/gh/rte-france/Grid2Op/master>`_ . Feel free to visit the "getting_started" page for
more information and a detailed tour about the issue that grid2op tries to address.

.. note:: As of writing (december 2020) most of these notebooks focus on the "agent" part of grid2op. We would welcome
.. note::
As of writing (december 2020) most of these notebooks focus on the "agent" part of grid2op. We would welcome
any contribution to better explain the other aspect of this platform.

.. include:: final.rst
7 changes: 7 additions & 0 deletions docs/grid2op_dev.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. toctree::
:maxdepth: 1

grid2op_dev/action
grid2op_dev/observation

.. include:: final.rst
7 changes: 7 additions & 0 deletions docs/grid2op_dev/action.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
How to add a new type of action
===================================

Work in progress !


.. include:: final.rst
2 changes: 2 additions & 0 deletions docs/grid2op_dev/final.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

.. include:: ../final.rst
7 changes: 7 additions & 0 deletions docs/grid2op_dev/observation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
How to add a new attribute to the observation
==============================================

Work in progress !


.. include:: final.rst
Loading

0 comments on commit d3a1c06

Please sign in to comment.