Skip to content

Releases: Grid2op/grid2op

Release: 1.12.4

28 Apr 09:47
d74b8e1

Choose a tag to compare

  • [BREAKING] the behaviour of grid2op environment when ENV_DOES_REDISPATCHING
    flag is turned on is changed and is now exactly the one
    described in the doc (before it completly skipped the redispathcing / curtailment
    storage)
  • [FIXED] copy on write issues in PandaPowerBackend
  • [FIXED] a bug causing Grid2op/lightsim2grid#128
  • [FIXED] some warnings in the docstrings (escaped character)
  • [FIXED] some issues spotted by sonarcloud (especially attribute names)
  • [FIXED] doc about the ENV_DOES_REDISPATCHING parameters. see issue
    #752
  • [ADDED] some tests that modification of load_p (for one load) only change this load
    (same for load_q and gen_v)
  • [IMPROVED] security in the way episode statistics are saved (to prevent malicious
    tempering with path)
  • [IMPROVED] use df.to_numpy() instead of df.values when df is a pandas dataframe
  • [IMPROVED] grid2op parameters now uses "slots" to avoid setting incorrect values
    not used by grid2op.

Release: 1.12.3

04 Feb 17:14
6a7bbe8

Choose a tag to compare

[1.12.3] - 2026-02-04

  • [FIXED] the warnings when building the documentation.
  • [FIXED] the deprecation warnings when importing grid2op
    with recent python versions (due to presence of math equation
    in some docstring)
  • [FIXED] issues when loading a grid with disconnected elements: grid2op
    did not know on which bus to reconnect them when only the "reconnect" bus was given.
  • [FIXED] an issue leading to wrong setpoint values for shunt_p and shunt_q in the previous
    stored state (EnvPreviousState)
  • [FIXED] a wrong type hints in _aux_check_finite_float of Backend (in Backend.py)
  • [ADDED] a test (in the AAA test) to assess that the backend._sh_vnkv is properly set if the shunts are
    handled by the backend.
  • [IMPROVED] code for AAA backend tests (avoid equality check for float)
  • [IMPROVED] doc when loading grid with disconnected elements

Release: 1.12.2

18 Nov 10:51
bae5813

Choose a tag to compare

  • [FIXED] an issue preventing to change the way
    the voltages are set
  • [FIXED] a test when using gymnasium>= 1.2.1 (AsynchVectEnv)
  • [ADDED] a convenience class to allow agent to override
    voltage setpoint from provided time seies (VCFromFileAgentOverrides)

Release: 1.12.1

28 Aug 15:25
777868b

Choose a tag to compare

Changelog

  • [BREAKING] (small impact) action "property" shunt_p, shunt_q and shunt_bus
    are now named _shunt_p, _shunt_q and _shunt_bus.
  • [BREAKING] (small impact): new convention for env._gen_uptime and
    env._gen_downtime: if a generator gen_id is disconnected, then
    env._gen_uptime[gen_id] = -1 and if it is connected, then
    env._gen_downtime[gen_id] = -1
  • [BREAKING] (small impact): new convention for env._gen_uptime and
    env._gen_downtime: they are 0 (and not 1) at the initial observation
    (env._gen_uptime is 0 after the env.reset for connected generator and
    still -1 - see point above- for disconnected ones)
  • [FIXED] when using the default action converter from gym_compat module,
    it only generates actions that can be performed by the user (authorized by
    the rules and the action class)
  • [FIXED] env._gen_uptime and env._gen_downtime are now properly updated
    after a generator has been detached from the grid.
  • [ADDED] the possibility to act on the backend directly from the action
    with the "act."
  • [ADDED] set pandas<3 in the dependencies, to make sure PandapowerBackend
    still work (ChainedAssignmentError still occur)
  • [IMPROVED] some pandas ChainedAssignmentError warning in pandapower backend
    (more work is required in this direction)
  • [IMPROVED] consistency between AmbiguousAction and IllegalAction exceptions:
    when an action cannot be built, it is ambiguous now and not illegal.
  • [IMPROVED] cleaner installation, relying only on "pyproject.toml"
  • [IMPROVED] documentation of "how to create a new grid2op observation"
    having different attributes.
  • [IMPROVED] documentation of the "action" class
  • [IMPROVED] computation speed, especially in cases of "do nothing"
  • [IMPROVED] if the same action is used multiple times, the "is_ambiguous()"
    method will be computed only once (results will be cached).
  • [IMPROVED] computation times at various places (eg by avoiding unnecessary copies)

Processing time improvment

With python 3.11 on a laptop, by running :

python profiler_do_nothing.py --use_ls --no_test --name l2rpn_case14_sandbox
python profiler_do_nothing.py --use_ls --no_test --name l2rpn_idf_2023

for different grid2op version, the results (number of steps per second) are:

grid2op version ieee14 ieee118
1.9.8 1720 1150
1.10.5.post1 1700 1170
1.11.0 810 250
1.12.0 882 250
1.12.1 1780 1220

Release: 1.12.0

24 Jul 17:52
d87c5d1

Choose a tag to compare

  • [BREAKING] the info returned argument of env.step(...) function
    does not have the unclear is_redispatching_illegal key. This key has been
    replaced (without any change to its signification) with failed_redispatching
  • [FIXED] issue 713
  • [FIXED] pandapower 3 compatibility
  • [ADDED] compatibility with numpy 2, scipy >= 1.14 and python 3.13
  • [ADDED] some examples showing how grid2op can be use to solve some specific
    kind of problem (related to N-1 safety and phase shift transformer).
  • [IMPROVED] clarity of the failed_redispatching key of the info returned value
    of the env.step function (previously called is_redispatching_illegal which
    was not clear)
  • [IMPROVED] way to load back class stored in json format
  • [IMPROVED] the way the Observation class can be overriden

Release: 1.11.0

15 Apr 11:57
6aa8500

Choose a tag to compare

This is rather large release, including (but not limited too):

A whole new feature: it is now possible to continue an episode if a load or a generator is disconnected by an Agent (this is called detachement) This feature is disabled by default, unless the kwargs allow_detachment=True is passed when an environment is created). This comes with added action and observation attributes.

Different bugfixes, including some for the "protections" module and the SOFT_OVERFLOW_THRESHOLD parameters.

The ability to tell an environment not to perform redispatching and let either the Agent take care of it (if the agent actions is correct) or the Environment (in case the action does not lead to an equilibrium)

And some quality of life feature, for example being able to retrieve information about objects based on their names or ids, some methods are now correctly spelled (eg check_kirchoff) or improved type hinting.

Full changes are:

  • [BREAKING] Change for FromMultiEpisodeData that disables the caching by default
    when creating the data.
  • [BREAKING] deprecation of backend.check_kirchoff in favor of backend.check_kirchhoff
    (fix the typo in the name)
  • [BREAKING] change the name of the generated classes: now by default the backend class
    name is added. This behaviour can be turned off by passing _add_cls_nm_bk=False
    when calling grid2op.make(...). If you develop a new Backend, you can also
    customize the added name by overloading the get_class_added_name class method.
  • [BREAKING] it is now forbidden to create environment with arguments.
    Only key-word arguments are allowed.
  • [BREAKING] the way actions is serialized has been changed with respect to the from_vect /
    to_vect method. This might introduce some issues when loading previously saved actions
    with this methods.
  • [BREAKING] first kwargs of backend.apply_action method is now spelled backend_action
    (instead of backendAction)
  • [BREAKING] (not yet) rationalization of the backend public / private API part. The
    environment (and simulator, forecast env etc.) will always call the method _public
    for example load_grid_public, reset_public, copy_public and apply_action_public.
    These function of the base Backend should NOT be overriden, and will internally call
    the functions load_grid, reset, copy and apply_action which were part of the public
    API. These last member functions will be renamed (in a later version) _load_grid,
    _reset, _copy and _apply_action to reflect this change. NOT for this version however !
  • [BREAKING] removal of the rest_server grid2op module (it will be release as a separate package instead)
    It has been removed from grid2op core package for securtiy reasons.
  • [FIXED] issue #657
  • [FIXED] missing an import on the MaskedEnvironment class
  • [FIXED] a bug when trying to set the load_p, load_q, gen_p, gen_v by names.
  • [FIXED] the obs.get_forecast_env : in some cases the resulting first
    observation (obtained from for_env.reset()) did not have the correct
    topology.
  • [FIXED] issue #665 (obs.reset()
    was not correctly implemented: some attributes were forgotten)
  • [FIXED] issue #667 (act.as_serializable_dict()
    was not correctly implemented AND the _aux_affect_object_int and _aux_affect_object_float
    have been also fixed - weird behaviour when you give them a list with the exact length of the
    object you tried to modified (for example a list with a size of n_load that affected the loads))
  • [FIXED] a bug when using the DoNothingHandler for the maintenance and the
    environment data
  • [FIXED] an issue preventing to set the thermal limit in the options
    if the last simulated action lead to a game over
  • [FIXED] some bugs in act.from_json(...) due to the handling of the injection modifications.
  • [FIXED] logos now have the correct URL
  • [FIXED] deprecated call to tostring_rgb (replaced tostring_argb) in the env.render function.
  • [FIXED] warnings not properly issued in the AAA test when backend failed to call
    can_handle_XXX functions (eg can_handle_more_than_2_busbar() or can_handle_detachment())
  • [FIXED] an issue with obs.get_forecast_env with changeNothing and DoNothingHandler time series
  • [FIXED] a bug in updating the shunt in PandaPowerBackend (depdending on pandas version)
  • [FIXED] a bug when action that reconnect loads, storage units or shunts are done
    in the "obs.simulate" (results could depend from previous "obs.simulate" calls)
  • [FIXED] a bug in "obs.simulate" and "obs.get_forecast_env" : when a line was disconnected
    and the user tried to reconnect it (without specifying on which bus) it could do something
    different than "env.step" (with the same action)
  • [FIXED] a powerflow is run when the environment is first created even before the initial "env.step"
    function is called. This is to ensure proper behaviour if env is used without being reset.
  • [FIXED] no error was catched if the backend could not properly apply the action sent by the environment.
  • [FIXED] an issue in the AAA tests: when backend does not support storages, some tests were skipped not correctly
  • [FIXED] an issue when computing the cascading failure routine, in case multiple iterations were performed,
    the cooldowns were not updated correctly.
  • [FIXED] cascading failure could be started at the first observation (t=0, just after a reset).
  • [FIXED] a bug when "SOFT_OVERFLOW_THRESHOLD" was not 1.: it also impacted "instantaneous overcurrent protections"
    (it was triggered when flow > SOFT_OVERFLOW_THRESHOLD * HARD_OVERFLOW_THRESHOLD * th_lim)
  • [FIXED] a bug when "SOFT_OVERFLOW_THRESHOLD" was not 1.: the backend routine to compute the protections
    disconnected the lines with a counter based on flow > th_lim and not flow > th_lim * SOFT_OVERFLOW_THRESHOLD
  • [ADDED] Possibility to disconnect loads, generators and storage units (if proper flag set in the environment).
    See documentation.
  • [ADDED] possibility to set the "thermal limits" when calling env.reset(..., options={"thermal limit": xxx})
  • [ADDED] possibility to retrieve some structural information about elements with
    with gridobj.get_line_info(...), gridobj.get_load_info(...), gridobj.get_gen_info(...)
    or , gridobj.get_storage_info(...)
  • [ADDED] codacy badge on the readme
  • [ADDED] a method to check the KCL (obs.check_kirchhoff) directly from the observation
    (previously it was only possible to do it from the backend). This should
    be used for testing purpose only
  • [ADDED] parameters to disable the "redispatching routine" of the environment
    (see params.ENV_DOES_REDISPATCHING)
  • [ADDED] parameters to stop the episode when one of the constraints of one of the
    generators is not met (see params.STOP_EP_IF_SLACK_BREAK_CONSTRAINTS)
  • [ADDED] possibility to set the initial time stamp of the observation in the env.reset
    kwargs by using env.reset(..., options={"init datetime": XXX})
  • [ADDED] the ChangeNothing time series class now supports forecast
  • [ADDED] test coverage on the CI
  • [ADDED] the obs.timestep_protection_triggered counter which counts whether or not the
    "time overcurrent protection" (soft overflow) will be triggered: lines will be disconnected
    if time overcurrent protection > parameters.NB_TIMESTEP_POWERFLOW_ALLOWED
  • [IMPROVED] possibility to set the injections values with names
    to be consistent with other way to set the actions (eg set_bus)
  • [IMPROVED] error messages when creating an action which changes the injections
  • [IMPROVED] (linked to #657) the way the
    "chronics_hander" in the ObsEnv behaves (it now fully implements the public interface of
    a "real" chronic_handler)
  • [IMPROVED] error message in the FromNPY class when the backend is checked
  • [IMRPOVED] the FromMultiEpisodeData class with the addition of the caching
    kwargs to allow / disable caching (which was default behavior in previous version)
  • [IMPROVED] the FromMultiEpisodeData class that now returns also the path of the data
  • [IMPROVED] the classes inherited from GreedyAgent with the added possibility to
    do the obs.simulate on a different time horizon (kwarg simulated_time_step)
  • [IMPROVED] some type hints for some agent class
  • [IMPROVED] the backend.update_from_obs function to work even when observation
    does not have shunt information but there are not shunts on the grid.
  • [IMPROVED] consistency of MultiMixEnv in case of automatic_classes (only one
    class is generated for all mixes)
  • [IMRPOVED] handling of disconnected elements in the backend no more
    raise error. The base Backend class does that.
  • [IMPROVED] the act.as_serializable_dict() to be more 'backend agnostic'as
    it nows tries to use the name of the elements in the json output
  • [IMPROVED] the way shunt data are digested in the BaseAction class (it is now
    possible to use the same things as for the other types of element)
  • [IMPROVED] grid2op does not require the chronics folder when using the FromHandlers
    class
  • [IMPROVED] the function action.get_topological_impact(...) has now a "caching" mechanism
    that allows not to recompute it over and over again (this is internal API please do not change
    it... unless you know what you are doing)
  • [IMPROVED] ForecastEnv is now part of the public API.
  • [IMPROVED] no need to call self._compute_pos_big_top() at the end of the implementation of backend.load_grid()
  • [IMPROVED] type hints in various files.
  • [IMPROVED] documentation of the backend
  • [IMRPOVED] SOFT_OVERFLOW_THRESHOLD can now be lower than 1

Pre release: 1.11.0.dev4

07 Mar 15:16
066f782

Choose a tag to compare

Pre-release

Pre release that robustifies the "detachment" feature.

Release v1.10.5

15 Oct 12:37
e7422c6

Choose a tag to compare

  • [FIXED] new pypi link (no change in code)
  • [FIXED] mybinder environment
  • [FIXED] update all the links in the README.md (for the new grid2op location)
  • [FIXED] update all the links in the docs and the grid2op source files
    (to match new location: Grid2op/grid2op.git)
  • [FIXED] the link in the make_env and update_env to point to
    https://api.github.com/repos/Grid2Op/grid2op-datasets/
  • [IMPROVED] clarity of the "work in progress" in this CHANGELOG

Release v1.10.4

14 Oct 13:35
v1.10.4
9bb03c8

Choose a tag to compare

  • [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.
  • [FIXED] an error in the descirption of the educ_case14_storage environment
    (wrong sign for the slack generator)
  • [FIXED] the environment would not load in case of an incorrect "layout.json"
    instead of raising a warning.
  • [FIXED] some issue with gym_compat module for "newest" version of
    gymnasium (1.0.0)
  • [FIXED] github ci (v1 and v2 artifact are now deprecated)
  • [ADDED] a code of conduct from github
  • [ADDED] a "CONTRIBUTING.md" files (instead of having contribution instructions
    in the readme)
  • [ADDED] numpy 2 support (now that pandapower allows it)
  • [IMPROVED] error message when forecasts are not correctly set-up

Release v1.10.3

12 Jul 07:29

Choose a tag to compare

  • [BREAKING] env.chronics_hander.set_max_iter(xxx) is now a private function. Use
    env.set_max_iter(xxx) or even better env.reset(options={"max step": xxx}).
    Indeed, env.chronics_hander.set_max_iter() will likely have
    no effect at all on your environment.
  • [BREAKING] for all the Handler (eg CSVForecastHandler) the method set_max_iter is
    now private (for the same reason as the env.chronics_handler). We do not recommend to
    use it (will likely have no effect). Prefer using env.set_max_iter instead.
  • [BREAKING] now the runner.run() method only accept kwargs argument
    (because it should always have been like this)
  • [BREAKING] to improve pickle support and multi processing capabilities, the attribute
    gym_env.observation_space._init_env and gym_env.observation_space.initial_obs_space
    have been deleted (for the Dict space only, for the other spaces like the Box they
    were not present in the first place)
  • [BREAKING] in the GymEnv class now by default the underlying grid2op environment has no
    forecast anymore in an attempt to make this wrapper faster AND more easily pickle-able. You can
    retrieve the old behaviour by passing gym_env = GymEnv(grid2op_env, with_forecast=True)
  • [FIXED] a bug in the MultiFolder and MultifolderWithCache leading to the wrong
    computation of max_iter on some corner cases
  • [FIXED] the function cleanup_action_space() did not work correctly when the "chronics_hander"
    was not initialized for some classes
  • [FIXED] the _observationClass attribute of the "observation env" (used for simulate and forecasted env)
    is now an Observation and not an Action.
  • [FIXED] a bug when deep copying an "observation environment" (it changes its class)
  • [FIXED] issue on seed and MultifolderWithCache which caused
    #616
  • [FIXED] another issue with the seeding of MultifolderWithCache: the seed was not used
    correctly on the cache data when calling chronics_handler.reset multiple times without
    any changes
  • [FIXED] Backend now properly raise EnvError (grid2op exception) instead of previously
    EnvironmentError (python default exception)
  • [FIXED] a bug in PandaPowerBackend (missing attribute) causing directly
    #617
  • [FIXED] a bug in Environment: the thermal limit were used when loading the environment
    even before the "time series" are applied (and before the user defined thermal limits were set)
    which could lead to disconnected powerlines even before the initial step (t=0, when time
    series are loaded)
  • [FIXED] an issue with the "max_iter" for FromNPY time series generator
  • [FIXED] a bug in MultiMixEnvironment : a multi-mix could be created even if the underlying
    powergrids (for each mix) where not the same.
  • [FIXED] a bug in generate_classes (experimental_read_from_local_dir) with alert data.
  • [FIXED] a bug in the Runner when using multi processing on macos and windows OS: some non default
    parameters where not propagated in the "child" process (bug in runner._ger_params)
  • [ADDED] possibility to skip some step when calling env.reset(..., options={"init ts": ...})
  • [ADDED] possibility to limit the duration of an episode with env.reset(..., options={"max step": ...})
  • [ADDED] possibility to specify the "reset_options" used in env.reset when
    using the runner with runner.run(..., reset_options=xxx)
  • [ADDED] the argument mp_context when building the runner to help pass a multiprocessing context in the
    grid2op Runner
  • [ADDED] the time series are now able to regenerate their "random" part
    even when "cached" thanks to the addition of the regenerate_with_new_seed of the
    GridValue class (in public API)
  • [ADDED] MultifolderWithCache now supports FromHandlers time series generator
  • [IMPROVED] more consistency in the way the classes are initialized at the creation of an environment
  • [IMPROVED] more consistency when an environment is copied (some attributes of the copied env were
    deep copied incorrectly)
  • [IMPROVED] Doc about the runner
  • [IMPROVED] the documentation on the time series folder.
  • [IMPROVED] now the "maintenance from json" (eg the JSONMaintenanceHandler or the
    GridStateFromFileWithForecastsWithMaintenance) can be customized with the day
    of the week where the maintenance happens (key maintenance_day_of_week)
  • [IMPROVED] in case of "MultiMixEnvironment" there is now only class generated for
    all the underlying mixes (instead of having one class per mixes)
  • [IMPROVED] the EpisodeData have now explicitely a mode where they can be shared accross
    processes (using fork at least), see ep_data.make_serializable
  • [IMPROVED] chronix2grid tests are now done independantly on the CI