Release v0.9.0
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 initializeGridModel
with pypowsybl or pandapower if you want). To make it both
cleaner and clearer the functionlightsim2grid.gridmodel.init
has been removed.
Please uselightsim2grid.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 thegridmodel
bus id which could cause issue when it was computed
on some grid configuration. It has now been fixed (so thegridmodel.get_ptdf
returns the
proper things). If you want the previous behaviour, you need to usegridmodel.get_ptdf_solver()
- [BREAKING] similarly,
gridmodel.get_Ybus()
,gridmodel.get_dcYbus()
,gridmodel.get_Sbus()
andgridmodel.get_dcSbus()
now return things in thegridmodel
bus ordering. For the previous
behaviour you can usegridmodel.get_Ybus_solver()
,gridmodel.get_dcYbus_solver()
,
gridmodel.get_Sbus_solver()
andgridmodel.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 theContingencyAnalysis
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
notgridmodel.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
orgridmodel.get_V
orgridmodel.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 theshunts_data_available
toFalse
- [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