Release notes for Roseau Load Flow version 0.14.0.
This version requires Python 3.12+. It introduces several new features, improvements, bug fixes as well as the removals of deprecated functionality and support for older dependency versions.
Plotting Improvements
This release includes major improvements and adds many new features to the plotting module.
Voltage Profile Plotting
The new function rlf.plotting.voltage_profile plots the voltage profile of a network. This function returns an object with plot_matplotlib() and plot_plotly() methods to create plots using either Matplotlib or Plotly.
Contributed in PR 429 and PR 424
Plotting Results on an Interactive Map
The new function rlf.plotting.plot_results_interactive_map plots a network with load flow results on an interactive map. This function works similarly to rlf.plotting.plot_interactive_map, but colors the buses according to their voltage levels and the lines and transformers according to their loading levels. It also include the results in the tooltips and popups of the network elements.
Contributed in PR 426
Improvements to Interactive Map Styles
The rlf.plotting.plot_interactive_map function has been improved with several style changes to visually distinguish different voltage levels, line types, and network elements.
- Different voltage levels are represented with different marker sizes and line widths
- Nominal voltages are used to determine the voltage levels automatically (HV, MV, LV). If nominal voltages are not available, they are inferred from the transformers and sources
- Underground lines are dashed while other lines are solid including lines with unknown line type
- Transformers are represented with a square icon with a divider in the middle and with both HV and LV buses information in the tooltip and popup
- Sourcers are represented with a bigger square icon
Note that the markers of buses, transformers and sources now use the folium.DivIcon icon which means the style function must now return a style dictionary of the form {'html': ...} for these elements.
The function also gained the fit_bounds parameter that, when set to True (default), causes the bounds of the map to be automatically adjusted using folium.FitOverlays to fit the network elements.
Contributed in PR 418
LV Line Parameters in the Catalogue
This release adds several low voltage (LV) line parameters to the line catalogue. LV line parameters include a neutral conductor and generate 4x4 matrices by default. You can create an LV line parameter using its name from the catalogue, e.g. rlf.LineParameters.from_catalogue("U_AL_3x150+70"). All added LV lines parameters have a name in the format <Type>_<Material>_3x<PhaseSection>+<NeutralSection>. You can get all added LV lines with the following regular expression:
rlf.LineParameters.get_catalogue(r"^[UOT]_[A-Z]+_3x(\d+)\+(\d+(?:\.\d+)?)$")Contributed in PR 434
Optional Neutral Elimination When Converting Line Parameters to Symmetrical Components
When calling the to_sym method of rlf.LineParameters, you can now pass eliminate_neutral=True to optionally eliminate the neutral conductor using Kron's reduction. This is useful when converting the line parameters to other software that do not support neutral conductors like pandapower. Converting to software that support neutral conductors like PowerFactory should not eliminate the neutral conductor.
Additionally, the new function rlf.converters.kron_reduction performs Kron reduction on any nxn matrix reducing it to an (n-1)x(n-1) matrix by eliminating the last row and column.
Contributed in PR 436
Removal of Deprecated Functionality
The following deprecated functionality has been removed.
- The
sideparameter ofrlf.GroundConnection,rlf.plotting.plot_voltage_phasorsandrlf.plotting.plot_symmetrical_voltagesis removed. Pass a branch side directly instead (e.g.rlf.GroundConnection(ground=ground, element=transformer.side_hv)). - The
potentialsattribute and constructor parameter ofBusis removed. Useinitial_potentialsinstead. - The
busof a disconnected load or source no longer returnsNone. Use the newis_disconnectedproperty to check if the load or source is disconnected. - The
phaseparameter ofrlf.PotentialRefis removed. Usephasesinstead. - The
res_voltages_hvandres_voltages_lvattributes ofrlf.Transformerare removed. Use<side>.res_voltagesinstead. - Deprecated names in
rlf.constants,rlf.typesandrlf.symmodules are removed. - Deprecated modules in the
rlf.utilspackage are removed. This package is for internal use only and should not be considered stable.
Contributed in PR 425
Dropping Support for Older Python and Dependency Versions
roseau-load-flow version 0.14.0 requires Python 3.12 or newer. Additionally, the minimum supported versions of some dependencies have been bumped as per SPEC-0.
The minimum supported versions of required dependencies are now:
- certifi>=2023.5.7
- geopandas>=1.0.0
- numpy>=1.21.5
- pandas>=1.4.0
- numpy>=2.0.0
- pandas>=2.1.0
- pint>=0.21.0
- platformdirs>=4.0.0
- pyproj>=3.3.0
- roseau-load-flow-engine>=0.19.0
- shapely>=2.0.0
- typing-extensions>=4.6.2
Contributed in PR 419 and PR 420
Miscellaneous Improvements and Bug Fixes
- Add missing transformer tap to the edge data in the graph generated by
ElectricalNetwork.to_graph. Contributed in PR 427 - Improve initial voltage guesses in the Newton algorithm for networks involving delta connected sources. Contributed in PR 421
- Fix filtering catalogues using compiled regular expressions with newer versions of pandas. Contributed in PR 404
- Restore bus and layers to the layer control in the interactive map plot. This was broken in version 0.13.0. Contributed in PR 413
What's Changed
- ENH: Add the
tombitool by @benoit9126 in #410 - [single] Performance improvements of setters by @Saelyos in #411
- Bump actions/setup-python from 5 to 6 by @dependabot[bot] in #412
- Restore bus and line in interactive map layer control by @alihamdan in #413
- Bump astral-sh/setup-uv from 6 to 7 by @dependabot[bot] in #414
- Bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in #415
- Replace mention of entire french network by representative networks by @alihamdan in #416
- Run tests on dev and free-threaded pythons by @alihamdan in #404
- Bump actions/checkout from 5 to 6 by @dependabot[bot] in #417
- Improve interactive map plots by @alihamdan in #418
- Drop support for Python 3.11 by @alihamdan in #419
- Simplify finding external modules for warnings by @alihamdan in #420
- Improve voltage propagation involving delta sources by @alihamdan in #421
- Factorize results plotting in preparation for voltage profiles by @alihamdan in #424
- Enforce some deprecations by @alihamdan in #425
- Interactive map plotting with results by @alihamdan in #426
- Add missing transformer tap to the networkx graph by @alihamdan in #427
- Make unit wrapped functions more ty friendly by @alihamdan in #428
- Add voltage profile plotting by @alihamdan in #429
- Bump actions/upload-artifact from 5 to 6 by @dependabot[bot] in #432
- Bump actions/cache from 4 to 5 by @dependabot[bot] in #431
- ENH: Reduce file size by @benoit9126 in #433
- Add LV cables to the catalogue by @alihamdan in #434
- Optional Kron reduction when converting to symmetrical components by @alihamdan in #436
- Simplify rlfs line parameters by @alihamdan in #437
- Version 0.14.0 by @benoit9126 in #438
Full Changelog: v0.13.1...v0.14.0