Skip to content

Releases: Grid2op/lightsim2grid

Release v0.10.1 (post1)

13 Feb 08:37
3fd7724
Compare
Choose a tag to compare

Fix a compatibility issue with pypowsybl >= 1.10

Release v0.10.1

04 Feb 19:50
a0b8c7a
Compare
Choose a tag to compare
Merge pull request #104 from Grid2op/dev_0.10.1

Dev 0.10.1

Release v0.10.0

17 Dec 09:52
46e04b9
Compare
Choose a tag to compare

[0.10.0] 2024-12-17

  • [BREAKING] disconnected storage now raises errors if some power is produced / absorbed, when using legacy grid2op version,
    you can retrieve the previous behaviour by initializing the LightSimBackend with
    backend = LightSimBackend(..., stop_if_storage_disco=False)
  • [BREAKING] with the new detachment_is_allowed feature in grid2op, the kwargs stop_if_load_disco,
    stop_if_gen_disco (and stop_if_storage_disco) are now optional. They are set up from the
    call to grid2op.make(...) and are erased by the allow_detachment kwargs. In other words,
    you don't need to set stop_if_load_disco, stop_if_gen_disco or stop_if_storage_disco. It is
    automatically set by grid2op.make(..., allow_detachment=XXX) to have the correct bahaviour.
  • [FIXED] an issue with the storage units (when asking it to produce / consume
    but deactivating them with the same action the grid did not diverge)
  • [IMPROVED] add the grid2op "detachement" support (loads and generators are allowed
    to be disconnected from the grid)
  • [ADDED] a kwargs stop_if_storage_disco to control (in legacy grid2op version) the behaviour
    of the backend when a storage unit is disconnected.

Release v0.9.2.post2

29 Nov 14:11
919994d
Compare
Choose a tag to compare

[0.9.2.post2] 2024-11-29

  • [FIXED] The attribute can_output_theta (of base Backend class)
    was not set to True if using the pypowsybl loader.
  • [FIXED] the github CI to work properly on many linux buit image
  • [IMPROVED] build on python 3.13

Release v0.9.2.post1

28 Nov 14:05
7e3172e
Compare
Choose a tag to compare

[0.9.2.post1] 2024-11-27

Fix a bug when reading data from pypowsybl linked with a mismatch between powsybl documentation and the behaviour of pypowsybl.

Release v0.9.2

18 Oct 16:50
535a65b
Compare
Choose a tag to compare

[0.9.2] 2024-10-18

  • [ADDED] support loading a grid when everything is NOT on the same bus
    (topo_vect used to be wrong in this case). This is especially usefull
    for grid loaded with pypowsybl
  • [ADDED] a file benchmarking the timings for running powerflow on different
    grid sizes.
  • [UPDATED] urls to match the new repo location
  • [UPDATED] urls to match new grid2op location

Release v0.9.1

30 Sep 18:03
275569f
Compare
Choose a tag to compare
  • [FIXED] a bug due to wrong type (in a numpy array) for the element name which lead in turn
    to a fail assertion (equality between two numpy arrays returning a bool and not an array)
  • [FIXED] a bug when init a grid from pypowsybl: the wrong value was used for trafos h (double)
  • [FIXED] a bug when init a grid from pypowsybl: wrong values for _ls_to_orig and _orig_to_ls
    was set (and later used)
  • [FIXED] yet another bug when init a grid from pypowsybl: the voltage in kV (not in pu)
    could be set due to "wrong" labelling of the bus ids
  • [FIXED] yet another bug when init a grid from pypowsybl: the ratio of the transformers
    sent in lightsim2grid did not take into account the "rated_u1 rated_u2" on both side
    (only used on one side)
  • [FIXED] yet another bug when init a grid from pypowsybl: the ratio of the transformers
    sent in lightsim2grid did not take into account the ratio in the pypow_net.get_ratio_tap_changers()
  • [ADDED] a method for the ContingencyAnalysisCPP class that returns, for all contingencies
    in the contingency list, which will be simulated and which causes the grid to be disconnected.
  • [ADDED] it is now possible to use "one substation" (voltage level) pypowsybl side is
    one substation in lightsim2grid.
  • [IMPROVED] removing a weird 1j * h_ when initializing powerlines and transformers. This was
    part of a pandapower "hack" which is not present anymore (see
    #88 (comment))

Release v0.9.0

29 Jul 08:20
Compare
Choose a tag to compare

Major focus on this release:

  • wheels are now compiled with numpy 2 to make them compatible with both numpy 1.something and 2.something
  • some accelaration on the DC powerflows, especially the PTDF and LODF with some bug fixes there
  • clearer interface to make the difference when data are retrieved with bus id sent to the solver (internal, should not be used) and bus id from the gridmodel

Breaking changes

  • [BREAKING] installing pandapower lightsim2grid does not require anymore to install
    pandapower (you can initialize GridModel with pypowsybl or pandapower if you want). To make it both
    cleaner and clearer the function lightsim2grid.gridmodel.init has been removed.
    Please use lightsim2grid.gridmodel.init_from_pandapower or
    lightsim2grid.gridmodel.init_from_pypowsybl from now on
  • [BREAKING] the previous gridmodel.get_ptdf() function was wrongly labelled with the
    "solver" bus id and not the gridmodel bus id which could cause issue when it was computed
    on some grid configuration. It has now been fixed (so the gridmodel.get_ptdf returns the
    proper things). If you want the previous behaviour, you need to use gridmodel.get_ptdf_solver()
  • [BREAKING] similarly, gridmodel.get_Ybus(), gridmodel.get_dcYbus(), gridmodel.get_Sbus()
    and gridmodel.get_dcSbus() now return things in the gridmodel bus ordering. For the previous
    behaviour you can use gridmodel.get_Ybus_solver(), gridmodel.get_dcYbus_solver(),
    gridmodel.get_Sbus_solver() and gridmodel.get_dcSbus_solver()
  • [BREAKING] the more rational logic above also extends to all the functions listed in the
    table below:
Function with behaviour change Name of the new function having the same behaviour
gridmodel.get_ptdf() gridmodel.get_ptdf_solver()
gridmodel.get_Ybus() gridmodel.get_Ybus_solver()
gridmodel.get_dcYbus() gridmodel.get_dcYbus_solver()
gridmodel.get_Sbus() gridmodel.get_Sbus_solver()
gridmodel.get_dcSbus() gridmodel.get_dcSbus_solver()
gridmodel.get_pv() gridmodel.get_pv_solver()
gridmodel.get_pq() gridmodel.get_pq_solver()
gridmodel.get_slack_ids() gridmodel.get_slack_ids_solver()
gridmodel.get_slack_ids_dc() gridmodel.get_slack_ids_dc_solver()
gridmodel.get_slack_weights() gridmodel.get_slack_weights_solver()
gridmodel.get_V() gridmodel.get_V_solver()
gridmodel.get_Va() gridmodel.get_Va_solver()
gridmodel.get_Vm() gridmodel.get_Vm_solver()
gridmodel.get_J() gridmodel.get_J_solver()
gridmodel.get_Bf() gridmodel.get_Bf_solver()

Bug fixes

  • [FIXED] the change_solver in the ContingencyAnalysis did not work correctly.
    More specifically the solver type used might not be correct if changed which could
    lead to wrong Ybus being passed to the solver.
  • [FIXED] some compatibility mode with python 3.7
  • [FIXED] a bug when "turned off" generator were not PV (slack was
    "turned off" when its target P was 0. But still the slack so ends up producing something...)
  • [FIXED] (consistency with pandapower) when an intial powerflow is run
    to initialized an AC powerflow, the initial voltages are 1 pu (and
    not gridmodel.get_init_vm_pu() as previously).
  • [FIXED] gridmodel.get_ptdf() now have the
    normal "gridmodel" bus id representation and not the "solver" bus ordering.
  • [FIXED] gridmodel.get_lodf() issue wrong results in case of some
    topological modification
  • [FIXED] calls to methods such as gridmodel.get_pv or gridmodel.get_V
    or gridmodel.get_Ybus could lead to severe crashes (segmentation fault)
    on some (rare) cases. Now an exceptions should be thrown in these cases.
  • [FIXED] basic backward compatibility is ensured and tested for legacy grid2op >= 0.9.1.post1
    Not all features are tested and only 1.x versions are tested
    (ie 1.1 or 1.2 but not 1.2.1, 1.2.2, 1.2.3 etc.) and only for python 3.11
  • [FIXED] a bug when using LightSimBackend with some old (but not too old) grid2op
    versions.

New features

  • [ADDED] it is now possible to deactivate the support for shunts by
    subclassing the LightSimBackend class and setting the shunts_data_available
    to False
  • [IMPROVED] in the ContingencyAnalysis class, the underlying cpp model will now
    perform an initial powerflow.

Improvements

  • [IMPROVED] distributed wheels are now compiled (whenever possible) with numpy 2.
    This makes them compatible with both numpy 1.x.y and numpy 2.z.t versions.
  • [IMPROVED] tests are now performed when lightsim2grid is compiled with
    the latest clang (18) and gcc (14) versions on the CI using python 3.11

Release v0.8.2

22 Apr 18:09
26ad409
Compare
Choose a tag to compare
  • [FIXED] CI was broken after migration to artifact v4, set it back to v3
    (and make the names of the folder clearer)
  • [FIXED] CI when using latest pandapower version (2.14) which broke some previous tests
  • [ADDED] the computation of the LODF (line outage distribution factor) in
    lightsim2grid
  • [ADDED] some convenience functions to retrieve in a vectorized way the
    buses to which each elements of a given container is connected
    (eg gridmodel.get_lines().get_bus_from())
  • [ADDED] more binaries (windows arm64 and macos arm64)
  • [IMPROVED] remove some compilation warnings for clang
  • [IMPROVED] possibility to specify generator used as slack by its name when initializing
    from pypowsybl.
  • [IMPROVED] removing some warnings when grid2op is not installed
    (it should not raise any warning as lightsim2grid does not require grid2op)

Release v0.8.1

26 Mar 09:55
bca579e
Compare
Choose a tag to compare
  • [FIXED] a bug with shunts when nb_busbar_per_sub >= 2
  • [FIXED] some bugs preventing backward compatibility
  • [FIXED] an issue in the computation of gen_q when intialized with pypowsybl
    (some overflow cpp side leading to infinite number in gen_q)
  • [FIXED] a bug in the "containers" cpp side (wrong bus was assigned)
    when elements was disconnected, which lead to wrong computations for
    time series or contingency analysis.
  • [FIXED] another bug in ContingencyAnalysis (cpp side) leading to wrong computation
    when a powerline was disconnected
  • [FIXED] some broken imports when grid2op was not installed
  • [FIXED] missing "typing_extension" as required when installation
  • [ADDED] some information of compilation directly in the cpp module
  • [ADDED] some information of compilation available in the python compilation_options
    module python side
  • [ADDED] some convenient methods for ContingencyAnalysis python side (most
    notably the possibility to initialize it from a LightSimBackend and to
    change the topology of the grid)
  • [ADDED] a "reward" module in lightsim2grid with custom reward
    based on lightsim2grid.
  • [ADDED] a class N1ContingencyReward that can leverage lightsim2grid to
    assess the number of safe / unsafe N-1.
  • [IMPROVED] time measurments in python and c++
  • [IMPROVED] now test lightsim2grid with oldest grid2op version
  • [IMPROVED] speed, by accelerating the reading back of the data (now read only once and then
    pointers are re used)
  • [IMPROVED] c++ side avoid allocating memory (which allow to gain speed python side too)
  • [IMPROVED] type hinting in LightSimBackend for all 'public' methods (most
    notably the one used by grid2op)
  • [IMPROVED] now the benchmarks are more verbose (detailing some compilation options)