Skip to content

Commit

Permalink
Merge pull request #232 from rte-france/dev_1.6.0
Browse files Browse the repository at this point in the history
Upgrade to version 1.6.0
  • Loading branch information
BDonnot committed Jun 22, 2021
2 parents 559af47 + 1a9be19 commit 7060b2b
Show file tree
Hide file tree
Showing 141 changed files with 9,663 additions and 667 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,20 @@ test_can_make_opponent.py
enigma_nili.py
test_issue196.py
test_increasingreward.py
PlayWithRedispCurtail.ipynb
test_jorge/
grid2op/data_test/l2rpn_neurips_2020_track1_with_alert.zip
issue_208_res/
test_issue_208.py
test_issue_220.py
test_issue_*.py
res_alert/
env_debug_time_last_alarm_inconsistency.zip
env_debug_time_last_alarm_inconsistency/
OpponentCalibration.ipynb
grid2op/data_test/l2rpn_neurips_2020_track1_with_alert/_statistics_do_nothing/
save/
shorten_env.py

# profiling files
**.prof
48 changes: 47 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Change Log
[TODO]
--------------------
- [???] add multi agent
- [???] make observation read only / immutable for all its properties (and not just for `prod_p`)
- [???] better logging
- [???] shunts in observation too, for real (but what to do when backend is not shunt compliant to prevent the
stuff to break)
Expand All @@ -22,7 +23,52 @@ Change Log
- [???] "asynch" multienv
- [???] properly model interconnecting powerlines

[1.5.2] - 2021-xx-yy
[1.6.0] - 2021-06-yy
--------------------
- [BREAKING] (but transparent for everyone): the `disc_lines` attribute is now part of the environment, and is also
containing integer (representing the "order" on which the lines are disconnected due to protections) rather
than just boolean.
- [BREAKING] now the observation stores the information related to shunts by default. This means old logs computed with
the runner might not work with this new version.
- [BREAKING] the "Runner.py" file has been renamed, following pep convention "runner.py". You should rename your
import `from grid2op.Runner.Runner import Runner` to `from grid2op.Runner.runner import Runner`
(**NB** we higly recommend importing the `Runner` like `from grid2op.Runner import Runner` though !)
- [FIXED]: the L2RPN_2020 score has been updated to reflect the score used during these competitions (there was an
error between `DoNothingAgent` and `RecoPowerlineAgent`)
[see `Issue#228 <https://github.com/rte-france/Grid2Op/issues/228>`_ ]
- [FIXED]: some bugs in the `action_space.get_all_unitary_redispatch` and `action_space.get_all_unitary_curtail`
- [FIXED]: some bugs in the `GreedyAgent` and `TopologyGreedy`
- [FIXED]: `Issue#220 <https://github.com/rte-france/Grid2Op/issues/220>`_ `flow_bus_matrix` did not took into
account disconnected powerlines, leading to impossibility to compute this matrix in some cases.
- [FIXED]: `Issue#223 <https://github.com/rte-france/Grid2Op/issues/223>`_ : now able to plot a grid even
if there is nothing controllable in grid2op present in it.
- [FIXED]: an issue where the parameters would not be completely saved when saved in json format (alarm feature was
absent) (related to `Issue#224 <https://github.com/rte-france/Grid2Op/issues/224>`_ )
- [FIXED]: an error caused by the observation non being copied when a game over occurred that caused some issue in
some cases (related to `Issue#226 <https://github.com/rte-france/Grid2Op/issues/226>`_ )
- [FIXED]: a bug in the opponent space where the "`previous_fail`" kwargs was not updated properly and send wrongly
to the opponent
- [FIXED]: a bug in the geometric opponent when it did attack that failed.
- [FIXED]: `Issue#229 <https://github.com/rte-france/Grid2Op/issues/229>`_ typo in the `AlarmReward` class when reset.
- [ADDED] support for the "alarm operator" / "attention budget" feature
- [ADDED] retrieval of the `max_step` (ie the maximum number of step that can be performed for the current episode)
in the observation
- [ADDED] some handy argument in the `action_space.get_all_unitary_redispatch` and
`action_space.get_all_unitary_curtail` (see doc)
- [ADDED] as utils function to compute the score used for the ICAPS 2021 competition (see
`from grid2op.utils import ScoreICAPS2021` and the associate documentation for more information)
- [ADDED] a first version of the "l2rpn_icaps_2021" environment (accessible with
`grid2op.make("l2rpn_icaps_2021", test=True)`)
- [IMPROVED] prevent the use of the same instance of a backend in different environments
- [IMPROVED] `Issue#217 <https://github.com/rte-france/Grid2Op/issues/217>`_ : no more errors when trying to
load a grid with unsupported elements (eg. 3w trafos or static generators) by PandaPowerBackend
- [IMPROVED] `Issue#215 <https://github.com/rte-france/Grid2Op/issues/215>`_ : warnings are issued when elements
present in pandapower grid will not be modified grid2op side.
- [IMPROVED] `Issue#214 <https://github.com/rte-france/Grid2Op/issues/214>`_ : adding the shunt information
in the observation documentation.
- [IMPROVED] documentation to use the `env.change_paramters` function.

[1.5.2] - 2021-05-10
-----------------------
- [BREAKING]: allow the opponent to chose the duration of its attack. This breaks the previous "Opponent.attack(...)"
signature by adding an object in the return value. All code provided with grid2op are compatible with this
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
author = 'Benjamin Donnot'

# The full version, including alpha/beta/rc tags
release = '1.5.2'
version = '1.5'
release = '1.6.0.rc1'
version = '1.6'


# -- General configuration ---------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions docs/environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ You can then use, in the above case:
import grid2op
env_name = "l2rpn_case14_sandbox" # matching above
env_train = grid2op.make(env_name+"_train") to only use the "training chronics"
env_train = grid2op.make(env_name+"_train") # to only use the "training chronics"
# do whatever you want with env_train
And then, at time of validation:
Expand All @@ -574,8 +574,8 @@ And then, at time of validation:
import grid2op
env_name = "l2rpn_case14_sandbox" # matching above
env_train = grid2op.make(env_name+"_val") to only use the "training chronics"
# do whatever you want with env_train
env_val = grid2op.make(env_name+"_val") # to only use the "validation chronics"
# do whatever you want with env_val
As of now, grid2op do not support "from the API" the possibility to split with convenient
Expand Down
2 changes: 1 addition & 1 deletion docs/modeled_elements.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. |5subs_grid_layout| image:: ./img/5subs_grid_layout.jpg
.. |5subs_grid_5_sub1_graph| image:: ./img/5subs_grid_5_sub1_graph.jpg
.. |5subs_grid_all_1| image:: ./img/5subs_grid_all_1jpg
.. |5subs_grid_all_1| image:: ./img/5subs_grid_all_1.jpg
.. |5subs_grid_5_sub1_2_graph| image:: ./img/5subs_grid_5_sub1_2_graph.jpg

.. _modeled-elements-module:
Expand Down
15 changes: 14 additions & 1 deletion docs/observation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.. _n_sub: ./space.html#grid2op.Space.GridObjects.n_sub
.. _n_storage: ./space.html#grid2op.Space.GridObjects.n_storage
.. _dim_topo: ./space.html#grid2op.Space.GridObjects.dim_topo
.. _dim_alarms: ./space.html#grid2op.Space.GridObjects.dim_alarms
.. _year: ./observation.html#grid2op.Observation.BaseObservation.year
.. _month: ./observation.html#grid2op.Observation.BaseObservation.month
.. _day: ./observation.html#grid2op.Observation.BaseObservation.day
Expand Down Expand Up @@ -41,6 +42,13 @@
.. _storage_power: ./observation.html#grid2op.Observation.BaseObservation.storage_power
.. _gen_p_before_curtail: ./observation.html#grid2op.Observation.BaseObservation.gen_p_before_curtail
.. _curtailment: ./observation.html#grid2op.Observation.BaseObservation.curtailment
.. _curtailment_limit: ./observation.html#grid2op.Observation.BaseObservation.curtailment_limit
.. _is_alarm_illegal: ./observation.html#grid2op.Observation.BaseObservation.is_alarm_illegal
.. _time_since_last_alarm: ./observation.html#grid2op.Observation.BaseObservation.time_since_last_alarm
.. _last_alarm: ./observation.html#grid2op.Observation.BaseObservation.last_alarm
.. _attention_budget: ./observation.html#grid2op.Observation.BaseObservation.attention_budget
.. _max_step: ./observation.html#grid2op.Observation.BaseObservation.max_step
.. _current_step: ./observation.html#grid2op.Observation.BaseObservation.current_step

.. _observation_module:

Expand Down Expand Up @@ -117,7 +125,12 @@ Name(s)
`storage_power_target`_ float `n_storage`_
`storage_power`_ float `n_storage`_
`gen_p_before_curtail`_ float `n_gen`_
`curtailment`_ float `n_gen`_
`curtailment`_, `curtailment_limit`_ float `n_gen`_
`is_alarm_illegal`_ bool 1
`time_since_last_alarm`_ int 1
`last_alarm`_ int `dim_alarms`_
`attention_budget`_ int 1
`max_step`_ , `current_step`_ int 1
============================================================================= ========= ============

(*NB* for concision, if a coma ("*,*") is present in the "Name(s)" part of the column, it means multiple attributes
Expand Down
2 changes: 1 addition & 1 deletion getting_started/00_SmallExample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"metadata": {},
"outputs": [],
"source": [
"_ = plot_helper.plot_layout()"
"fig = plot_helper.plot_layout()"
]
},
{
Expand Down

0 comments on commit 7060b2b

Please sign in to comment.