Skip to content

Conversation

@benoit9126
Copy link
Member

@benoit9126 benoit9126 commented Jan 21, 2026

This version 0.14.0 has some major improvements! Please note that some deprecated functions, packages and attributes have been removed in this version.

Changelog

  • BUG: rlf.LineParameters.to_sym() should perform Kron's reduction for 4-wire lines #435 Optional Kron reduction when converting to symmetrical components #436 Add rlf.converters.kron_reduction function to perform Kron reduction on any nxn matrix reducing it to an (n-1)x(n-1) matrix by eliminating the last row and column. Also add eliminate_neutral parameter to rlf.LineParameters.to_sym to optionally eliminate the neutral conductor using Kron's reduction when converting line parameters to symmetrical components.

  • Add LV cables to the catalogue #434 ENH: Add LV cables to the catalogue #422 Add LV line parameters to the catalogue (e.g. U_AL_3x150+70). You can get all added LV lines with rlf.LineParameters.get_catalogue(r"^[UOT]_[A-Z]+_3x(\d+)\+(\d+(?:\.\d+)?)$").

  • Add voltage profile plotting #429 ENH: A function to plot the voltage profile of a network #298 Add rlf.plotting.voltage_profile function to plot the voltage profile of a network. The function returns an object with plot_matplotlib() and plot_plotly() methods to create plots using Matplotlib or Plotly respectively.

  • Add missing transformer tap to the networkx graph #427 Add missing transformer tap to the edge data in the graph generated by ElectricalNetwork.to_graph.

  • Interactive map plotting with results #426 Add rlf.plotting.plot_results_interactive_map for plotting a network with load flow results on an
    interactive map. Buses are colored according to their voltage levels and lines are colored according to their loading
    levels.

  • Enforce some deprecations #425 Enforce the following deprecations:

    • The side parameter of rlf.GroundConnection, rlf.plotting.plot_voltage_phasors and
      rlf.plotting.plot_symmetrical_voltages is removed. Pass a branch side directly instead (e.g.
      rlf.GroundConnection(ground=ground, element=transformer.side_hv)).
    • The potentials attribute and constructor parameter of Bus is removed. Use initial_potentials instead.
    • The bus of a disconnected load or source no longer returns None. Use the new is_disconnected property to check
      if the load or source is disconnected.
    • The phase parameter of rlf.PotentialRef is removed. Use phases instead.
    • The res_voltages_hv and res_voltages_lv attributes of rlf.Transformer are removed. Use <side>.res_voltages instead.
    • Deprecated names in rlf.constants, rlf.types and rlf.sym modules are removed.
    • Deprecated modules in the rlf.utils package are removed. This package is for internal use only and should not be considered stable.
  • Improve voltage propagation involving delta sources #421 Improve initial voltage guesses in the Newton algorithm for networks involving delta connected sources.

  • Drop support for Python 3.11 #419 Simplify finding external modules for warnings #420 Require Python 3.12 or newer and bump the minimum supported versions of some dependencies per SPEC-0.

  • Improve interactive map plots #418 Many improvements to the styles of interactive map plots:

    • Different voltage levels are represented with different marker sizes and line widths. Nominal voltages are used to
      determine the voltage levels automatically. 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 now 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
    • If the new parameter fit_bounds is set to True (default), the bounds of the map will be automatically adjusted
      using folium.FitOverlays to fit the network elements.

    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.

  • Restore bus and line in interactive map layer control #413 Restore bus and layers to the layer control in the interactive map plot. This was broken in version 0.13.0.

  • Run tests on dev and free-threaded pythons #404 Fix filtering catalogues using compiled regular expressions with newer versions of pandas.

benoit9126 and others added 30 commits September 3, 2025 19:52
[single] Performance improvements of setters
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…ions/develop/actions/setup-python-6

Bump actions/setup-python from 5 to 6
Fixes a small bug introduced in the last release due to the use of
`folium.FeatureGroup`.
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 6 to 7.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@v6...v7)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…ions/develop/astral-sh/setup-uv-7

Bump astral-sh/setup-uv from 6 to 7
…ions/develop/actions/upload-artifact-5

Bump actions/upload-artifact from 4 to 5
This started failing again with newer versions of pandas
Run tests on dev and free-threaded pythons and fix passing a compiled regex to catalogue filters as it started failing with newer versions of pandas.
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…ions/develop/actions/checkout-6

Bump actions/checkout from 5 to 6
Many improvements to the styles of interactive map plots:

- Different voltage levels are represented with different marker sizes
and line widths. Nominal voltages are used to
determine the voltage levels automatically. 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 now 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
- If the new parameter `fit_bounds` is set to `True` (default), the
bounds of the map will be automatically adjusted
    using `folium.FitOverlays` to fit the network elements.

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.
Python 3.11 no longer supported in the engine
This fixes two bugs in our source voltage propagation logic:
- If the network has both delta and wye sources, we compare their pn
voltages to determine the source with higher voltages. Previously we
compared pp voltages to pn voltages.
- If a delta source is used to fill up potentials of missing phases, the
resulting potentials we off by a factor of $\sqrt 3$.
This PR factorizes results plotting in preparation for the addition of
voltage profiles plots.
- Add internal methods `bus/line/transformer._result_state_getter()` to
get a "state" of the results of the element (voltage or loading
very-high, high, ok, etc.)
- Define a color for each state
- Remove the folium colormaps in favor of the added methods and colors

Also a drive by change that increases line width for better visibility
in interactive maps

To do next:
- Add voltage profile plotting
- Add results plotting on a map for multi-phase networks
- Allow color customization of results (currently, colors are hardcoded)
Enforced some deprecations that are either too old or that are probably
not popular. I left important deprecations like `ground.connect` or
passing `bus1` instead of `bus_hv` to transformer for a future release.
Add `rlf.plotting.plot_results_interactive_map` for plotting a network
with load flow results on an interactive map. Buses are colored according
to their voltage levels and lines are colored according to their loading levels.
alihamdan and others added 9 commits December 29, 2025 11:03
Bumps
[actions/upload-artifact](https://github.com/actions/upload-artifact)
from 5 to 6.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Close #430

Several improvements:
1. PDF files of the documentation have been compressed using
`ghostscript` as described
[here](https://www.digitalocean.com/community/tutorials/reduce-pdf-file-size-in-linux)
using the `\ebook` setting (and for some of them, only the interesting
pages remain)
2. Patterns in the TikZ pictures have been replaced with a simple fill
colour to reduce the size of the SVG output.
3. PNG and JPG images of the documentation have been converted into
`webp` files using the commands

    ```bash
find . -name '*.jpg' -exec sh -c 'convert $1 ${1%.jpg}.webp' sh {} ';'
find . -name '*.png' -exec sh -c 'convert $1 ${1%.png}.webp' sh {} ';'
    ```

4. HTML files located in the `doc/_static/` folder have been minified
using the [minhtml](https://github.com/wilsonzlin/minify-html) command
line tool:

    ```bash
minhtml --keep-closing-tags --minify-css --minify-js --minify-doctype
doc/_static/**/*.html
    ```

    The biome formatter has been disabled for this folder.

5. The script to generate the HTML plots of the networks has been
updated to generate new static HTML files (considering #418 and #426).
The code to plot all the networks of the catalogue on the same map is
purely a large copy-paste of the code used to plot the networks
individually. Only a few lines of code are adapted, but I would rather
not refactor the entire plotting module for a single plot.
Resolves #422

---------

Co-authored-by: Benoît Vinot <benoit.vinot@roseautechnologies.com>
Closes #324

The rlfs impedance is now the positive-sequence impedance everywhere. I
simplified the code and clarified the docstrings to remove any
confusion.
@benoit9126 benoit9126 requested a review from Saelyos January 21, 2026 16:57
@benoit9126 benoit9126 added the enhancement New feature or request label Jan 21, 2026
@benoit9126 benoit9126 requested a review from alihamdan January 21, 2026 17:02
Copy link
Member

@alihamdan alihamdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s go 🚀

@benoit9126 benoit9126 merged commit 18b1fbe into main Jan 22, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants