Grid2op

Latest version: v1.10.5

Safety actively analyzes 702445 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 11

1.7.0

---------------------
- [BREAKING] the `L2RPNSandBoxScore`, `RedispReward` and `EconomicReward` now properly computes the cost of the grid
(there was an error between the conversion from MWh - cost is given in $ / MWh - and MW).
This impacts also `ScoreICAPS2021` and `ScoreL2RPN2020`.
- [BREAKING] in the "gym_compat" module the curtailment action type has
for dimension the number of dispatchable generators (as opposed to all generators
before) this was mandatory to fix issue https://github.com/Grid2Op/grid2op/issues/282
- [BREAKING] the size of the continuous action space for the redispatching in
case of gym compatibility has also been adjusted to be consistent with curtailment.
Before it has the size of `env.n_gen` now `np.sum(env.gen_redispatchable)`.
- [BREAKING] move the `_ObsEnv` module to `Environment` (was before in `Observation`).
- [BREAKING] adding the `curtailment_limit_effective` in the observation converted to gym. This changes
the sizes of the gym observation.
- [FIXED] a bug preventing to use `backend.update_from_obs` when there are shunts on the grid for `PandapowerBackend`
- [FIXED] a bug in the gym action space: see issue https://github.com/Grid2Op/grid2op/issues/281
- [FIXED] a bug in the gym box action space: see issue https://github.com/Grid2Op/grid2op/issues/283
- [FIXED] a bug when using `MultifolderWithCache` and `Runner` (see issue https://github.com/Grid2Op/grid2op/issues/285)
- [FIXED] a bug in the `env.train_val_split_random` where sometimes some wrong chronics
name were sampled.
- [FIXED] the `max` value of the observation space is now 1.3 * pmax to account for the slack bus (it was
1.01 of pmax before and was not sufficient in some cases)
- [FIXED] a proper exception is added to the "except" kwargs of the "info" return argument of `env.step(...)`
(previously it was only a string) when redispatching was illegal.
- [FIXED] a bug in `env.train_val_split_random` when some non chronics files where present in the
"chronics" folder of the environment.
- [FIXED] an error in the redispatching: in some cases, the environment detected that the redispatching was infeasible when it
was not and in some others it did not detect when it while it was infeasible. This was mainly the case
when curtailment and storage units were heavily modified.
- [FIXED] now possible to create an environment with the `FromNPY` chronixcs even if the "chronics" folder is absent.
- [FIXED] a bug preventing to converte observation as networkx graph with oldest version of numpy and newest version of scipy.
- [FIXED] a bug when using `max_iter` and `Runner` in case of max_iter being larger than the number of steps in the
environment and `nb_episode` >= 2.
- [FIXED] a bug in the hashing of environment in case of storage units (the characteristics of the storage units
were not taken into account in the hash).
- [FIXED] a bug in the `obs.as_dict()` method.
- [FIXED] a bug in when using the "env.generate_classe()" https://github.com/Grid2Op/grid2op/issues/310
- [FIXED] another bug in when using the "env.generate_classe()" on windows https://github.com/Grid2Op/grid2op/issues/311
- [ADDED] a function `normalize_attr` allowing to easily scale some data for the
`BoxGymObsSpace` and `BoxGymActSpace`
- [ADDED] support for distributed slack in pandapower (if supported)
- [ADDED] an attribute `self.infos` for the BaseEnv that contains the "info" return value of `env.step(...)`
- [ADDED] the possibility to shuffle the chronics of a `GymEnv` (the default behavior is now to shuffle them)
- [ADDED] two attribtues for the observation: `obs.gen_margin_up` and `obs.gen_margin_down`
- [ADDED] support for hashing chronix2grid related components.
- [ADDED] possibility to change the type of the opponent space type from the `make(...)` command
- [ADDED] a method to "limit the curtailment / storage" action depending on the availability of controllable generators
(see `act.limit_curtail_storage(...)`)
- [ADDED] a class to generate data "on the fly" using chronix2grid (for now really slow and only available for
a single environment)
- [ADDED] a first version (for testing only) for the `l2rpn_wcci_2022` environment.
- [ADDED] a method to compute the "simple" line reconnection actions (adding 2 actions per lines instead of 5)
in the action space (see `act_space.get_all_unitary_line_set_simple()`)
- [IMPROVED] better difference between `env_path` and `grid_path` in environments.
- [IMPROVED] addition of a flag to control whether pandapower can use lightsim2grid (to solve the powerflows) or not
- [IMPROVED] clean the warnings issued by pandas when used with pandapower
- [IMPROVED] doc of observation module (some attributes were missing)
- [IMPROVED] officially drop python 3.6 supports (which could not benefit from all the features)
- [IMPROVED] add support for setting the maximum number of iteration in the `PandaPowerBackend`
- [IMPROVED] when the curtailment / storage is too "strong" at a given step, the environment will now allow
every controllable turned-on generators to mitigate it. This should increase the possibility to act on the
curtailment and storage units without "breaking" the environment.
- [IMPROVED] have dedicated type of actions / observation for L2RPN competition environments,
defined in the "conf.py" file (to make possible the use of different
grid2op version transparently)
- [IMPROVED] on some cases, the routine used to compute the redispatching would lead to a "redispatch" that would
change even if you don't apply any, for no obvious reasons. This has been adressed, though it's not perfect.
- [IMPROVED] finer resolution when measuring exectution times

1.6.5

---------------------
- [BREAKING] the function "env.reset()" now reset the underlying pseudo random number generators
of all the environment subclasses (eg. observation space, action space, etc.) This change has been made to
ensure reproducibility between episodes: if `env.seed(...)` is called once, then regardless of what happens
(basically the number of "env.step()" between calls to "env.reset()")
the "env.reset()" will be generated with the same prng (drawn from the environment)
This effect the opponent and the chronics (when maintenance are generated "on the fly").
- [BREAKING] the name of the python files for the "Chronics" module are now lowercase (complient with PEP). If you
did things like `from grid2op.Chronics.ChangeNothing import ChangeNothing` you need to change it like
`from grid2op.Chronics.changeNothing import ChangeNothing` or even better, and this is the preferred way to include
them: `from grid2op.Chronics import ChangeNothing`. It should not affect lots of code (more refactoring of the kind
are to be expected in following versions).
- [BREAKING] same as above for the "Observation" module. It should not affect lots of code (more refactoring of the kind
are to be expected in following versions).
- [FIXED] a bug for the EpisodeData that did not save the first observation when
"add_detailed_output" was set to ``True`` and the data were not saved on disk.
- [FIXED] an issue when copying the environment with the opponent (see issue https://github.com/Grid2Op/grid2op/issues/274)
- [FIXED] a bug leading to the wrong "backend.get_action_to_set()" when there were storage units on the grid.
- [FIXED] a bug in the "BackendConverter" when there are storage on the grid
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/265
- [FIXED] issue https://github.com/Grid2Op/grid2op/issues/261
- [ADDED] possibility to "env.set_id" by giving only the folder of the chronics and not the whole path.
- [ADDED] function "env.chronics_handler.available_chronics()" to return the list of available chronics
for a given environment
- [ADDED] possibility, through the `Parameters` class, to limit the number of possible calls to `obs.simulate(...)`
see `param.MAX_SIMULATE_PER_STEP` and `param.MAX_SIMULATE_PER_EPISODE` (see issue https://github.com/Grid2Op/grid2op/issues/273)
- [ADDED] a class to generate a "Chronics" readable by grid2op from numpy arrays (see https://github.com/Grid2Op/grid2op/issues/271)
- [ADDED] an attribute `delta_time` in the observation that tells the time (in minutes) between two consecutive steps.
- [ADDED] a method of the action space to show a list of actions to get back to the original topology
(see https://github.com/Grid2Op/grid2op/issues/275)
`env.action_space.get_back_to_ref_state(obs)`
- [ADDED] a method of the action to store it in a grid2op independant fashion (using json and dictionaries),
see `act.as_serializable_dict()`
- [ADDED] possibility to generate a gym `DiscreteActSpace` from a given list of actions (see
https://github.com/Grid2Op/grid2op/issues/277)
- [ADDED] a class that output a noisy observation to the agent (see `NoisyObservation`): the agent sees
the real values of the environment with some noise, this could used to model inacurate
sensors.
- [IMPROVED] observation now raises `Grid2OpException` instead of `RuntimeError`
- [IMRPOVED] docs (and notebooks) for the "split_train_val" https://github.com/Grid2Op/grid2op/issues/269
- [IMRPOVED] the "`env.split_train_val(...)`" function to also generate a test dataset see
https://github.com/Grid2Op/grid2op/issues/276

1.6.4

---------------------
- [BREAKING] the name of the python files for the "agent" module are now lowercase (complient with PEP). If you
did things like `from grid2op.Agent.BaseAgent import BaseAgent` you need to change it like
`from grid2op.Agent.baseAgent import BaseAgent` or even better, and this is the preferred way to include
them: `from grid2op.Agent import BaseAgent`. It should not affect lots of code.
- [FIXED] a bug where the shunt had a voltage when disconnected using pandapower backend
- [FIXED] a bug preventing to print the action space if some "part" of it had no size (empty action space)
- [FIXED] a bug preventing to copy an action properly (especially for the alarm)
- [FIXED] a bug that did not "close" the backend of the observation space when the environment was `closed`. This
might be related to `Issue255 <https://github.com/Grid2Op/grid2op/issues/255>`_
- [ADDED] serialization of `current_iter` and `max_iter` in the observation.
- [ADDED] the possibility to use the runner only on certain episode id
(see `runner.run(..., episode_id=[xxx, yyy, ...])`)
- [ADDED] a function that returns if an action has any change to modify the grid see `act.can_affect_something()`
- [ADDED] a ttype of agent that performs predefined actions from a given list
- [ADDED] basic support for logging in environment and runner (more coming soon)
- [ADDED] possibility to make an environment with an implementation of a reward, instead of relying on a reward class.
- [ADDED] a possible implementation of a N-1 reward
- [IMPROVED] right time stamp is now set in the observation after the game over.
- [IMPROVED] correct current number of steps when the observation is set to a game over state.
- [IMPROVED] documentation to clearly state that the action_class should not be modified.
- [IMPROVED] possibility to tell which chronics to use with the result of `env.chronics_handler.get_id()` (this is also
compatible in the runner)
- [IMPROVED] it is no more possible to call "env.reset()" or "env.step()" after an environment has been closed: a clean error
is raised in this case.

1.6.3

--------------------
- [FIXED] a bug that allowed to use wrongly the function `backend.get_action_to_set()` even when the backend
has diverged (which should not be possible)
- [FIXED] a bug leading to non correct consideration of the status of powerlines right after the activation
of some protections (see `Issue245 <https://github.com/Grid2Op/grid2op/issues/245>`_ )
- [IMPROVED] the PandaPowerBackend is now able to load a grid with a distributed slack bus. When loaded though, the
said grid will be converted to one with a single slack bus (the first slack among the distributed)
- [IMPROVED] massive speed-ups when copying environment or using `obs.simulate` (sometimes higher than 30x speed up)
- [IMPROVED] **experimental** compatibility with different frameworks thanks to the possibility to serialize, as text
files the class created "on the fly" (should solve most of the "pickle" error). See `env.generate_classes()`
for an example usage. Every feedback is appreciated.

1.6.2

---------------------
- [ADDED] the complete support for pickling grid2op classes. This is a major feature that allows to use grid2op
way more easily with multiprocessing and to ensure compatibility with more recent version of some RL package
(*eg* ray / rllib). Note that full compatibility with "multiprocessing" and "pickle" is not completely done yet.

1.6.1

---------------------
- [FIXED] a bug in the "env.get_path_env()" in case `env` was a multimix (it returned the path of the current mix
instead of the path of the multimix environment)
- [FIXED] a bug in the `backend.get_action_to_set()` and `backend.update_from_obs()` in case of disconnected shunt
with backend that supported shunts (values for `p` and `q` were set even if the shunt was disconnected, which
could lead to undefined behaviour)
- [IMPROVED] now grid2op is able to check if an environment needs to be updated when calling `grid2op.update_env()`
thanks to the use of registered hash values.
- [IMPROVED] now grid2op will check if an update is available when an environment is being downloaded for the
first time.

Page 4 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.