Releases: Grid2op/lightsim2grid
Release: 0.12.2
[0.12.2] 2026-02-05
- [FIXED] an issue with shunt buses (was set to 1 even if they were disconnected)
- [FIXED] a warning when applying actions on generator votlage setpoints (due to NaN)
- [FIXED] pandapower grid could be modified when importing a grid from pandapower (extend fixes in #123)
- [FIXED] documentation issue about ContingencyAnalysis (see #124 )
- [IMPROVED] add a test to make sure generator types are available if using
dist_slack_non_renewinformation. - [IMPROVED] test coverage on shunts (a test needed to be skipped due to float comparison in grid2op)
Release: 0.12.1
[0.12.1] 2026-01-09
- [FIXED] phase shift transformers are now properly modeled
for both pandapower (new in this version) and pypowsybl (already
the case in previous version) - [FIXED] a performance issue for all "XXXSingleSlack" (eg KLUSingleSlack) algorithm (filling of the initial
Jacobian matrix was extremly slow due to the massive 'insert' of data in the eigen sparse matrix instead
of relying on the "setFromTriplets" method) - [FIXED] an normal "exception" was not catched in the
close()method of LightSimBackend in case the
backend was closed before any grid was loaded. - [ADDED] possibility to pickle independantly all part of the grid (eg gridmodel.get_lines()
can be pickled independantly from anything else) NB pickling and un-pickling
lightsim2grid objects can only be used for the same lightsim2grid version. - [ADDED] the
init_from_n_powerflowproperty for ContingencyAnalysis (and
ContingencyAnalysisCPP). It allows to chose if the computation of the contingencies
are initialized with the complex voltages resulting of the powerflow in N
(init_from_n_powerflow=True) or if they are initialized from the
given input vector (init_from_n_powerflow=False). Defaults toFalse
Release: 0.12.0
[0.12.0] 2026-01-06
-
[BREAKING] for better consistency, and following pypowsybl convention, trafo and lines "side"
are now called "1" and "2" instead of "hv" / "lv" (for trafo) or "or" / "ex" for powerlines.
For example, what used to be accessible withgridmodel.change_bus_powerline_or(...)is now called
gridmodel.change_bus1_powerline(). This affects powerlines, transformers and dc powerlines but also
"LineInfo", "TrafoInfo" and "DCPowerlineInfo". See below for a (should-be exhaustive) list of changes. -
[BREAKING] the
init_pp_backendpublic attribute is now private (called now_init_pp_backend) and
optional, meaning it'sNonewhen the grid is initialized from pypowsybl (for example). -
[FIXED] some issues with the "load_grid_from_pypowsybl" function (and making sure the graph of the structure
of the lightsim2grid gridmodel matches the one of the pypowsybl grid). -
[FIXED] an issue with the handling of the slack due to a not correct implementation
ofupdate_slack_weights_by_idcpp side (previous slacks were not removed, slacks get_slack_weights
were prop to target_p which caused issues when all slacks had targetp==0.) -
[FIXED] an issue with serialization / de serialization caused by an error in serializing the solver types.
-
[ADDED] in all "xxxInfo" (eg "LoadInfo") information about subtation and position in the topology
vector, with thesub_id/pos_topo_vect(forLoadInfo,SGenInfo,GenInfo,StorageInfo,ShuntInfo)
andsub1_id/sub2_id/pos1_topo_vect/pos2_topo_vect(forLineInfo,TrafoInfoandDCLineInfo) -
[ADDED] possibility to load the pypowsybl grid with extra key-words arguments (by using
pypowsybl_load_kwargsin the
loader_kwargsof LightSimBackend) -
[ADDED] possibility to initialize LightSimBackend with an already loaded grid (by using the
gridkey of the
loader_kwargsof LightSimBackend when loading it with pypowsybl) -
[ADDED] possibility to change the ratio (
rho) of transformers (gridmodel.change_ratio_trafo(trafo_id, new_rho)) -
[ADDED] possibility to change the phase shift (
alpha) of transformers (gridmodel.change_shift_trafo(trafo_id, new_alpha)) -
[ADDED] more consistency checkings to avoid "negative buses" cpp side.
-
[ADDED] information about the coefficients assigned on the Ybus matrix for
LineInfoandTrafoInfo:yac_11,yac_12,
yac_21,yac_22,ydc_11,ydc_12,ydc_21, andydc_22 -
[ADDED] possibility to have a powerline / transformer connected on only one side (for DC and Newton-Raphson algorithm, not implemented
for fast-decoupled yet). This means that powerlines / transformers have 3 statuses: one for each side and one "global". -
[ADDED] possibility to choose the way lightsim2grid will internally treat the powerlines status:
ignore_status_global(gridmodel.set_ignore_status_global(True)orgridmodel.set_ignore_status_global(False)). If set
toFalse(default) the the "global" status is synch with all the others. For example you can deactivate both sides of a line by
deactivatingstatus_globaland conversely if you deactivate both side of a given line, then its "status_global" is set
to "activated". Ifignore_status_globalis set toTruethenglobal_statusis not updated at all and ignored (NB in
this case, callinggridmodel.deactivate_line(...)will deactivate both sides but not the "global status")synch_status_both_side(self.model.set_synch_status_both_side(XXX)). If set toTrue(default) then the status of each
side of any given line will be synched. Meaning that if an action disconnects one side, it will also disconnect the "status_global"
and the other side (NB in this case if the same actions both connects one side and disconnect another, then the outcome is "undefined").
Ifsynch_status_both_sideisFalsethen each side of the powerline is independant from the other (which can lead to powerline /
transformer being connected at only one side).- The complete bahviour is tested in
tests/test_line_disco_one_side.py. Feel free to have a look if you need more information.
-
[IMPROVED] Eigen to version 5.0.1 (2025/11/11)
-
[IMPROVED] rename all ".h" file to ".hpp" for cpp headers (cpp side).
-
[IMPROVED] consistency of "bus labelling" cpp side (implement compile time check to prevent accidental conversion from
LocalBusId,GlobalBusId/GridModelBusIdand / orSolverBusId)
Table to upgrade the names:
============================= ======================= =======================
Class Name Old Attribute Name New Attribute Name
============================= ======================= =======================
TrafoContainer get_bus_from get_bus_id_side_1
TrafoContainer get_bus_to get_bus_id_side_2
TrafoInfo bus_hv_id bus1_id
TrafoInfo bus_lv_id bus2_id
TrafoInfo connected connected_global
TrafoInfo h_pu h1_pu or h2_pu
TrafoInfo is_tap_hv_side is_tap_side_1
TrafoInfo res_p_hv_mw res_p1_mw
TrafoInfo res_q_hv_mvar res_q1_mvar
TrafoInfo res_v_hv_kv res_v1_kv
TrafoInfo res_a_hv_ka res_a1_ka
TrafoInfo res_p_lv_mw res_p2_mw
TrafoInfo res_q_lv_mvar res_q2_mvar
TrafoInfo res_v_lv_kv res_v2_kv
TrafoInfo res_a_lv_ka res_a2_ka
TrafoInfo res_theta_hv_deg res_theta1_deg
TrafoInfo res_theta_lv_deg res_theta2_deg
LineContainer get_bus_from get_bus_id_side_1
LineContainer get_bus_to get_bus_id_side_2
LineInfo connected connected_global
LineInfo bus_or_id bus1_id
LineInfo bus_ex_id bus2_id
LineInfo h_pu removed
LineInfo h_or_pu h1_pu
LineInfo h_ex_pu h2_pu
LineInfo res_p_or_mw res_p1_mw
LineInfo res_q_or_mvar res_q1_mvar
LineInfo res_v_or_kv res_v1_kv
LineInfo res_a_or_ka res_a1_ka
LineInfo res_p_ex_mw res_p2_mw
LineInfo res_q_ex_mvar res_q2_mvar
LineInfo res_v_ex_kv res_v2_kv
LineInfo res_a_ex_ka res_a2_ka
LineInfo res_theta_or_deg res_theta1_deg
LineInfo res_theta_ex_deg res_theta2_deg
DCLineContainer get_bus_from get_bus_id_side_1
DCLineContainer get_bus_to get_bus_id_side_2
DCLineInfo connected connected_global
DCLineInfo bus_or_id bus1_id
DCLineInfo bus_ex_id bus2_id
DCLineInfo target_vm_or_pu target_vm1_pu
DCLineInfo target_vm_ex_pu target_vm2_pu
DCLineInfo gen_or gen1
DCLineInfo gen_ex gen2
DCLineInfo res_p_or_mw res_p1_mw
DCLineInfo res_q_or_mvar res_q1_mvar
DCLineInfo res_v_or_kv res_v1_kv
DCLineInfo res_p_ex_mw res_p2_mw
DCLineInfo res_q_ex_mvar res_q2_mvar
DCLineInfo res_v_ex_kv res_v2_kv
DCLineInfo res_theta_or_deg res_theta1_deg
DCLineInfo res_theta_ex_deg res_theta2_deg
============================= ======================= =======================
Release: 0.11.0
- [DEPRECATED] python 3.7 builds will no longer be available
- [FIXED] a bug in the import of the grid from pypowsybl
- [FIXED] a bug with phase shifters in case the tap was on the low voltage side
- [FIXED] a bug with active shunt values (wrong sign in the cpp part) and wrong Ybus diagonal coeff
- [FIXED] a bug in DC computation with shunt active values (wrong sign)
- [FIXED] a bug in DC computation with some phase shifters (when tap was not tagged on correct side)
- [FIXED] a bug in FDPF when phase tap changer was not on high voltage side
- [FIXED] a lots of bug in the conversion of pypowsybl grid when using
"old" pypowysbl versions. - [ADDED] compatibility with python 3.14 and python 3.14 build
- [ADDED] compatibility with pandapower >= 3 version when loading a grid
(pandapower changed the way it initilizes the transformers model parameters) - [ADDED] more kwargs arguments are possible in the LightSimBackend
loader_kwargs - [ADDED] name of the substations are now read from the grid when initializing from
pypowsybl. - [ADDED] support for multiple slack when reading a grid from pypowsybl.
- [IMPROVED] the way to initialize the transformers from pypowsybl
- [IMPROVED] possibility to load grid with phase shifters from pypowsybl
- [IMPROVED] function to initialize the grid from pypowsybl has now a
basic documentation.
Release 0.10.3
- [FIXED] remove deprecated use of numpy<2 function in LightSimBackend
- [FIXED] the "copy.deepcopy" of a lightsim2grid backend does not crash anymore
(see issues #36 and #97) - [FIXED] an issue that could lead to a "segfault" if the "runpf" method of
LightSimBackendwas called first with is_dc=True and then with is_dc=False - [IMPROVED] compat with grid2op 1.11.0
- [IMPROVED] now test proper compilation on clang 20 (was limited to clang 18 before)
Release v0.10.2
- [FIXED] an error when changing of bus one of the slack (did not trigger the
recompute of pv bus ids) - [FIXED] an issue when turning off a generator: it was still declared as "slack"
if it was one. - [FIXED] could not disconnect a generator when it was a slack bus
- [FIXED] voltage was -1 instead of 0 for disconnected elements (load, generator, storage units etc.)
- [ADDED] an option in
LightSimBackendautomatically disconnect load and generators
if they are not in the main connected component. - [IMPROVED] refactoring of the c++ side container element to reduce
code (for "one end" elements such as loads, generators, static generators and shunts)
Release v0.10.1 (post1)
Fix a compatibility issue with pypowsybl >= 1.10
Release v0.10.1
Merge pull request #104 from Grid2op/dev_0.10.1 Dev 0.10.1
Release v0.10.0
[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 theLightSimBackendwith
backend = LightSimBackend(..., stop_if_storage_disco=False) - [BREAKING] with the new
detachment_is_allowedfeature in grid2op, the kwargsstop_if_load_disco,
stop_if_gen_disco(andstop_if_storage_disco) are now optional. They are set up from the
call togrid2op.make(...)and are erased by theallow_detachmentkwargs. In other words,
you don't need to setstop_if_load_disco,stop_if_gen_discoorstop_if_storage_disco. It is
automatically set bygrid2op.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_discoto control (in legacy grid2op version) the behaviour
of the backend when a storage unit is disconnected.
Release v0.9.2.post2
[0.9.2.post2] 2024-11-29
- [FIXED] The attribute
can_output_theta(of baseBackendclass)
was not set toTrueif using the pypowsybl loader. - [FIXED] the github CI to work properly on many linux buit image
- [IMPROVED] build on python 3.13