Skip to content

Commit 5dfe47f

Browse files
authored
Merge pull request #314 from RoseauTechnologies/develop
Version 0.12.0-alpha
2 parents ea15961 + e548d80 commit 5dfe47f

File tree

178 files changed

+3391
-4347
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+3391
-4347
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
env:
1818
CI: true
1919
UV_SYSTEM_PYTHON: 1
20+
COVERAGE_CORE: sysmon
2021

2122
jobs:
2223
build:
@@ -51,7 +52,7 @@ jobs:
5152
git lfs prune --verify-remote
5253
5354
- name: Install uv
54-
uses: astral-sh/setup-uv@v4
55+
uses: astral-sh/setup-uv@v5
5556
with:
5657
enable-cache: true
5758

@@ -66,7 +67,7 @@ jobs:
6667
6768
- name: Test with pytest
6869
run: |
69-
uv run pytest -vv -n=auto --durations=25 --cov-report html --cov-config pyproject.toml roseau
70+
uv run pytest -vv -n=auto --durations=25 --cov --cov-report=html roseau
7071
env:
7172
ROSEAU_LOAD_FLOW_LICENSE_KEY: ${{ secrets.ROSEAU_LOAD_FLOW_LICENSE_KEY }}
7273

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ repos:
1111
- id: end-of-file-fixer
1212
- id: trailing-whitespace
1313
- repo: https://github.com/astral-sh/uv-pre-commit
14-
rev: 0.5.5
14+
rev: 0.5.16
1515
hooks:
1616
- id: uv-lock
1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: v0.8.1
18+
rev: v0.8.6
1919
hooks:
2020
- id: ruff
2121
args: [--fix]
@@ -27,7 +27,7 @@ repos:
2727
files: ^doc/.*\.md$
2828
args: [-l 90]
2929
- repo: https://github.com/rbubley/mirrors-prettier
30-
rev: v3.4.1
30+
rev: v3.4.2
3131
hooks:
3232
- id: prettier
3333
args: ["--print-width", "120"]

README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,32 @@
44
![pre-commit](https://github.com/RoseauTechnologies/Roseau_Load_Flow/actions/workflows/pre-commit.yml/badge.svg)
55
[![Documentation Status](https://readthedocs.org/projects/roseau-load-flow/badge/?version=latest)](https://roseau-load-flow.readthedocs.io/en/latest/?badge=latest)
66

7-
_Roseau Load Flow_ is a powerful multi-phase load flow solver for unbalanced power flow analysis that
8-
offers:
7+
<!-- start rlf-pitch -->
98

10-
- Multi-phase, unbalanced power flow analysis
11-
- Performance optimized solver written in C++
9+
_Roseau Load Flow_ is a powerful load flow solver and static analysis tool that offers:
10+
11+
- **Multi-phase**, **unbalanced** power flow analysis
12+
- A performance optimized solver written in C++
1213
- A catalogue of real-world transformer and line models
13-
- An ergonomic object-oriented Python interface
14+
- An ergonomic object-oriented Python interface with unit-aware quantities
1415
- A comprehensive documentation with code examples
1516
- Real-world distribution network data samples in the library (with more available on request)
1617

17-
In addition to the following _unique_ set of features:
18+
In addition to the following **unique** set of features:
1819

19-
- Support for floating neutrals for loads and sources
20+
- Support for _floating neutrals_ for loads and sources
2021
- Four-wire multi-phase modelling with no Kron's reduction, no transformations, no assumptions on the
2122
network topology and no implicit earthing everywhere
22-
- Support for flexible, voltage-dependent, loads directly in the Newton algorithm for better convergence
23+
- Support for **flexible**, voltage-dependent, loads directly in the Newton algorithm for better
24+
convergence and stability
25+
26+
<!-- end rlf-pitch -->
2327

2428
This project is compatible with Python version 3.10 and newer. The
25-
[installation instructions](https://roseau-load-flow.roseautechnologies.com/Installation.html)
29+
[installation instructions](https://roseau-load-flow.roseautechnologies.com/en/latest/Installation.html)
2630
will guide you through the installation process. If you are new to _Roseau Load Flow_, we recommend
2731
you start with the
28-
[getting started tutorial](https://roseau-load-flow.roseautechnologies.com/usage/Getting_Started.html).
32+
[getting started tutorial](https://roseau-load-flow.roseautechnologies.com/en/latest/usage/Getting_Started.html).
2933
You can find the complete documentation at https://roseau-load-flow.roseautechnologies.com/.
3034

3135
## License
@@ -39,15 +43,19 @@ at [contact@roseautechnologies.com](mailto:contact@roseautechnologies.com).
3943
> Licenses are given free of charge for **students and teachers**. Please contact us at
4044
> contact@roseautechnologies.com for more information.
4145
42-
Read more at [License](https://roseau-load-flow.roseautechnologies.com/License.html).
46+
Read more at [License](https://roseau-load-flow.roseautechnologies.com/en/latest/License.html).
4347

4448
## Network data
4549

50+
<!-- start rlf-networks -->
51+
4652
_Roseau Load Flow_ ships with a sample of 20 low-voltage and 20 medium-voltage feeder networks. Each
4753
network is provided with its summer and winter load points. At _Roseau Technologies_, we can provide
4854
the major part of the French medium and low voltage networks on demand. For more information, please
4955
contact us at contact@roseautechnologies.com.
5056

57+
<!-- end rlf-networks -->
58+
5159
<div align="center">
5260
<img alt="Catalogue of networks" src="https://github.com/RoseauTechnologies/Roseau_Load_Flow/blob/main/doc/_static/Network/Catalogue.png?raw=True" />
5361
</div>

doc/Changelog.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,42 @@ og:description: See what's new in the latest release of Roseau Load Flow !
1717

1818
# Changelog
1919

20+
## Version 0.12.0-alpha
21+
22+
- Some improvements of the underlying engine:
23+
- Simplify the center-tapped transformer model in order to improve the convergence speed (especially in case of a
24+
short-circuit).
25+
- Add the backward-forward algorithm for the single-phase transformers.
26+
- Improve the error message if a singular matrix is detected.
27+
- Build the engine using the `manylinux_2_34` image for Linux distributions (previously it was `manylinux_2_28`).
28+
- {gh-pr}`311` Add French aliases to line enumeration types.
29+
- {gh-pr}`311` Fix `TypeError`s in the `LineParameters.from_coiffier_model`. The error message of
30+
invalid models now indicates whether the line type or the conductor material is invalid.
31+
- {gh-pr}`310` {gh-issue}`308` Support star and zig-zag windings with non-brought out neutral. In
32+
earlier versions, vector groups like "Yd11" were considered identical to "YNd11".
33+
- {gh-pr}`307` {gh-issue}`296` Make `line.res_violated` and `bus.res_violated` return a boolean array
34+
indicating if the corresponding phase is violated. This is consistent with the dataframe results
35+
`en.res_lines` and `en.res_buses_voltages`. For old behavior, use `line_or_bus.res_violated.any()`.
36+
- {gh-pr}`305` Add missing `tap` column to `en.transformers_frame`.
37+
- {gh-pr}`305` Add `element_type` column to `en.potential_refs_frame` to indicate if the potential
38+
reference is connected to a bus or a ground.
39+
- {gh-pr}`305` Add missing information to `results_to_dict` with `full=True`. This adds `loading` to
40+
lines and transformers, `voltage_levels` to buses, and `voltages` to loads and sources.
41+
- {gh-pr}`305` Improve the performance of `res_violated` of buses, lines and transformers.
42+
- {gh-pr}`304` Add top-level modules `rlf.constants` and `rlf.types`. The old modules in the `utils`
43+
package are deprecated and will be removed in a future release. The `utils` package is for internal
44+
use only and should not be considered stable.
45+
- {gh-pr}`304` Add top-level module `rlf.sym` for symmetrical components utilities. The `sym_to_phasor`,
46+
`phasor_to_sym` and `series_phasor_to_sym` functions are moved from the `rlf.converters` module to
47+
this module. The old functions are deprecated and will be removed in a future release.
48+
- {gh-pr}`303` Fix missing `voltage_level` in `en.res_buses_voltages` when the buses define nominal
49+
voltage but not voltage limits.
50+
- {gh-pr}`303` Add `rlf.SQRT3` constant for the square root of 3. It can be useful for the conversion
51+
between phase-to-phase and phase-to-neutral voltages.
52+
- {gh-pr}`303` Improve the performance of some dataframe properties.
53+
- {gh-pr}`301` {gh-issue}`299` Improve the error message when the Jacobian matrix contains infinite
54+
or NaN values.
55+
2056
## Version 0.11.0
2157

2258
This release adds official support for Python 3.13 and adds a new experimental backward-forward solver.

doc/Installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ the corresponding functions. They can be installed with the
114114
If you are using Jupyter Notebooks, you can install `roseau-load-flow` directly from a notebook
115115
cell with:
116116

117-
```python-console
117+
```ipython
118118
In [1]: %pip install roseau-load-flow
119119
```
120120

doc/License.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ variable:
124124
ROSEAU_LOAD_FLOW_LICENSE_KEY="A8C6DA-9405FB-E74FB9-C71C3C-207661-V3"
125125
```
126126
2. Add a cell to the beginning of your notebook with the following content and execute it:
127-
```python-console
127+
```ipython
128128
%pip install python-dotenv
129129
%load_ext dotenv
130130
%dotenv

doc/conf.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# list see the documentation:
55
# https://www.sphinx-doc.org/en/master/usage/configuration.html
66

7+
import os
8+
79
# -- Path setup --------------------------------------------------------------
810

911

@@ -22,8 +24,8 @@
2224
# author = "Benoît Vinot"
2325

2426
# The full version, including alpha/beta/rc tags
25-
version = "0.11"
26-
release = "0.11.0"
27+
version = "0.12"
28+
release = "0.12.0-alpha"
2729

2830
# -- General configuration ---------------------------------------------------
2931

@@ -41,7 +43,6 @@
4143
"sphinx_inline_tabs",
4244
"sphinxcontrib.googleanalytics",
4345
"sphinxcontrib.bibtex",
44-
"sphinx_sitemap",
4546
"sphinxext.opengraph",
4647
]
4748
myst_enable_extensions = ["deflist", "smartquotes", "replacements", "dollarmath"]
@@ -105,6 +106,9 @@
105106
],
106107
}
107108

109+
# See https://docs.readthedocs.io/en/stable/canonical-urls.html
110+
html_baseurl = os.getenv("READTHEDOCS_CANONICAL_URL", "https://roseau-load-flow.roseautechnologies.com/page/")
111+
108112
# Add any paths that contain custom static files (such as style sheets) here,
109113
# relative to this directory. They are copied after the builtin static files,
110114
# so a file named "default.css" will overwrite the builtin "default.css".
@@ -132,7 +136,16 @@
132136

133137
# -- Options for AutoAPI -------------------------------------------------
134138
autoapi_dirs = ["../roseau"]
135-
autoapi_ignore = ["**/tests/**", "**/conftest.py", "__about__.py"]
139+
autoapi_ignore = [
140+
# Tests
141+
"**/tests/**",
142+
"**/conftest.py",
143+
# Cruft
144+
"**/roseau/load_flow/__about__.py",
145+
# Internal utilities
146+
"**/roseau/load_flow/utils/**",
147+
"**/roseau/load_flow/io/**",
148+
]
136149
autoapi_options = ["members", "show-inheritance", "show-module-summary", "imported-members"]
137150
autoapi_python_class_content = "both" # without this, the __init__ docstring is not shown
138151
autoapi_python_use_implicit_namespaces = True
@@ -173,11 +186,6 @@
173186
"gh-pr": ("https://github.com/RoseauTechnologies/Roseau_Load_Flow/pull/%s", "PR%s"),
174187
}
175188

176-
177-
# -- Options for sphinx-sitemap -----------------------------------------
178-
html_baseurl = "https://roseau-load-flow.roseautechnologies.com/"
179-
sitemap_url_scheme = "{link}" # default is {lang}{version}{link}
180-
181189
# -- Options for sphinx-opengraph -----------------------------------------
182-
ogp_site_url = "https://roseau-load-flow.roseautechnologies.com/"
183-
ogp_image = "https://roseau-load-flow.roseautechnologies.com/_static/Roseau_Load_Flow_Stacked.svg"
190+
ogp_site_url = "https://roseau-load-flow.roseautechnologies.com/page/"
191+
ogp_image = "https://roseau-load-flow.roseautechnologies.com/page/_static/Roseau_Load_Flow_Stacked.svg"

doc/index.md

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,15 @@ myst:
1515

1616
# Welcome to the Roseau Load Flow documentation
1717

18-
_Roseau Load Flow_ is a powerful multi-phase load flow solver for unbalanced power flow analysis that
19-
offers:
20-
21-
- Multi-phase, unbalanced power flow analysis
22-
- Performance optimized solver written in C++
23-
- A catalogue of real-world transformer and line models
24-
- An ergonomic object-oriented Python interface
25-
- A comprehensive documentation with code examples
26-
- Real-world distribution network data samples in the library (with more available on request)
27-
28-
In addition to the following _unique_ set of features:
29-
30-
- Support for floating neutrals for loads and sources
31-
- Four-wire multi-phase modelling with no Kron's reduction, no transformations, no assumptions on the
32-
network topology and no implicit earthing everywhere
33-
- Support for flexible, voltage-dependent, loads directly in the Newton algorithm for better convergence
34-
35-
This software is developed by [Roseau Technologies](https://www.roseautechnologies.com/en).
36-
<a href="https://www.linkedin.com/company/roseau-technologies/"><i class="fa-brands fa-linkedin" ></i></a>
37-
<a href="https://github.com/RoseauTechnologies/"><i class="fa-brands fa-github" ></i></a>
38-
39-
_Roseau Load Flow_ ships with a sample of 20 low-voltage and 20 medium-voltage feeder networks. Each
40-
network is provided with its summer and winter load points. At _Roseau Technologies_, we can provide
41-
the major part of the French medium and low voltage networks on demand. For more information, please
42-
contact us at
43-
[contact@roseautechnologies.com](mailto:contact@roseautechnologies.com).
18+
```{include} ../README.md
19+
:start-after: <!-- start rlf-pitch -->
20+
:end-before: <!-- end rlf-pitch -->
21+
```
22+
23+
```{include} ../README.md
24+
:start-after: <!-- start rlf-networks -->
25+
:end-before: <!-- end rlf-networks -->
26+
```
4427

4528
<iframe src="./_static/Network/Catalogue.html" height="600px" width="100%" frameborder="0"></iframe>
4629

doc/models/Bus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ lp = rlf.LineParameters(id="lp", z_line=rlf.Q_((0.3 + 0.35j) * np.eye(4), "ohm/k
8080
line = rlf.Line(id="line", bus1=bus1, bus2=bus2, parameters=lp, length=rlf.Q_(1, "km"))
8181

8282
# A voltage source on the first bus
83-
un = 400 / np.sqrt(3)
83+
un = 400 / rlf.SQRT3
8484
vs = rlf.VoltageSource(id="source", bus=bus1, voltages=rlf.Q_(un, "V"))
8585

8686
# The neutral of bus1 is fixed at potential 0

doc/models/Line/ShuntLine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ line = rlf.Line(
121121
)
122122

123123
# A voltage source on the first bus
124-
un = 400 / np.sqrt(3)
124+
un = 400 / rlf.SQRT3
125125
vs = rlf.VoltageSource(id="source", bus=bus1, voltages=rlf.Q_(un, "V"))
126126

127127

0 commit comments

Comments
 (0)