Skip to content

Releases: Grid2op/lightsim2grid

Release: 0.12.2

06 Feb 08:14
c983af9

Choose a tag to compare

[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_renew information.
  • [IMPROVED] test coverage on shunts (a test needed to be skipped due to float comparison in grid2op)

Release: 0.12.1

09 Jan 16:39
da45850

Choose a tag to compare

[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_powerflow property 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 to False

Release: 0.12.0

06 Jan 11:06
2b7ae34

Choose a tag to compare

[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 with gridmodel.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_backend public attribute is now private (called now _init_pp_backend) and
    optional, meaning it's None when 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
    of update_slack_weights_by_id cpp 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 the sub_id / pos_topo_vect (for LoadInfo, SGenInfo, GenInfo, StorageInfo, ShuntInfo)
    and sub1_id / sub2_id / pos1_topo_vect / pos2_topo_vect (for LineInfo, TrafoInfo and DCLineInfo)

  • [ADDED] possibility to load the pypowsybl grid with extra key-words arguments (by using pypowsybl_load_kwargs in the
    loader_kwargs of LightSimBackend)

  • [ADDED] possibility to initialize LightSimBackend with an already loaded grid (by using the grid key of the
    loader_kwargs of 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 LineInfo and TrafoInfo: yac_11, yac_12,
    yac_21, yac_22, ydc_11, ydc_12, ydc_21, and ydc_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) or gridmodel.set_ignore_status_global(False)). If set
      to False (default) the the "global" status is synch with all the others. For example you can deactivate both sides of a line by
      deactivating status_global and conversely if you deactivate both side of a given line, then its "status_global" is set
      to "activated". If ignore_status_global is set to True then global_status is not updated at all and ignored (NB in
      this case, calling gridmodel.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 to True (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").
      If synch_status_both_side is False then 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 / GridModelBusId and / or SolverBusId)

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

09 Dec 11:42
39ae306

Choose a tag to compare

  • [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

28 Apr 08:02
3ef8e56

Choose a tag to compare

  • [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
    LightSimBackend was 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

07 Mar 14:19
c452f76

Choose a tag to compare

  • [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 LightSimBackend automatically 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)

13 Feb 08:37
3fd7724

Choose a tag to compare

Fix a compatibility issue with pypowsybl >= 1.10

Release v0.10.1

04 Feb 19:50
a0b8c7a

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

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

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