A python-based tool for the design and analysis of hybrid AC/DC grids
Project description
PyFlow ACDC
A python-based tool for the design and analysis of hybrid AC/DC grids
PyFlow ACDC is a program worked on by ADOreD Project
This project has received funding from the European Union’s Horizon Europe Research and Innovation programme under the Marie Skłodowska-Curie grant agreement No 101073554.
Important
This project is experimental and under active development. Issue reports and contributions are very welcome.
Citation
If you use this package in your research, please cite the appropriate publication(s):
General usage:
B. C. Valerio, V. A. Lacerda, M. Cheah-Mane, P. Gebraad and O. Gomis-Bellmunt,
"An Optimal Power Flow Tool for AC/DC Systems, Applied to the Analysis of the
North Sea Grid for Offshore Wind Integration," in IEEE Transactions on Power Systems,
vol. 40, no. 5, pp. 4278-4291, Sept. 2025, doi: 10.1109/TPWRS.2025.3533889.
For market integration into optimal power flow:
Valerio B C, Lacerda V A, Cheah-Ma˜ne M, Gebraad P and Gomis-Bellmunt O 2025
Optimizing offshore wind integration through multi-terminal dc grids: a market-based opf
framework for the north sea interconnectors IET Conference Proceedings 2025(6) 150–155
URL https://digital-library.theiet.org/doi/abs/10.1049/icp.2025.1198
For transmission expansion planning:
B. C. Valerio, M. Cheah-Mane, V. A. Lacerda, P. Gebraad, and O. Gomis-
Bellmunt, “Transmission expansion planning for hybrid AC/DC grids using
a mixed-integer non-linear programming approach,” International Journal of
Electrical Power & Energy Systems, vol. 174, p. 111459, 2026. [Online]. Available:
https://www.sciencedirect.com/science/article/pii/S0142061525010075
For array optimization:
B. C. Valerio, P. M. Gebraad, M. Cheah-Mane, V. Lacerda, and O. Gomis-
Bellmunt, “Strategies for wind park inter-array optimisation through mixed in-
teger linear programming,” in Proceedings of the TORQUE 2026 Conference,
2026, to be published in Journal of Physics: Conference Series [under review].
Installation
Basic Installation
Install from PyPI:
pip install pyflow-acdc
Requirements: Python 3.10 or higher
For Users
To run examples, download the folder to your repository including the csv folders.
For Developers
Initial Setup
-
Install Git if you haven't already:
# For Ubuntu/Debian sudo apt-get install git # For Windows: Download from https://git-scm.com/download/win
-
Clone the repository:
git clone https://github.com/CITCEA-UPC/pyflow_acdc.git
cd pyflow_acdc
- Install in development mode:
pip install -e .
This installs the package in "editable" mode, allowing you to modify the code without reinstalling.
Making Changes
- Create a new branch for your changes:
git checkout -b new-branch-name
git push origin new-branch-name
- To push your changes to the remote repository:
git add .
git commit -m "Description of your changes"
git pull origin new-branch-name
git push origin new-branch-name
- To pull the latest changes from the remote repository:
git pull origin main
To merge your changes into the main branch please contact the repository owner.
TestPyPI Publishing (Collaborators)
Any collaborator with permission to run GitHub Actions can publish a test build to TestPyPI using the manual workflow.
- Open the repository on GitHub.
- Go to Actions -> Publish to TestPyPI (manual).
- Click Run workflow and confirm.
This publishes the current branch build to TestPyPI for validation without affecting the production PyPI package.
Optional Dependencies
You can install pyflow_acdc with optional dependencies using pip:
# Install with all optional dependencies
pip install pyflow-acdc[All]
# Or install specific optional dependency groups:
pip install pyflow-acdc[mapping] # For mapping features (folium, branca)
pip install pyflow-acdc[OPF] # For optimal power flow (pyomo)
pip install pyflow-acdc[Dash] # For Dash web applications
pip install pyflow-acdc[Array_OPT] # For array optimization (ortools, pyomo)
pip install pyflow-acdc[TEP_pymoo] # For TEP with pymoo (pymoo, pyomo)
pip install pyflow-acdc[Gurobi] # For Gurobi solver (requires license)
pip install pyflow-acdc[plotting] # For static image export (kaleido)
Or install individual packages manually:
For mapping:
pip install folium branca
For OPF:
pip install pyomo
conda install -c conda-forge ipopt
For Array Optimization:
pip install ortools pyomo
pip install highs # Optional: for HiGHS solver
For TEP with pymoo: (still in development)
pip install pymoo pyomo
Note: Both pymoo (for outer optimization) and pyomo (for inner OPF subproblems) are required.
For static image export (plotly):
pip install kaleido
pyflow_acdc has callback capabilities and has been tested with the following pyomo linked solvers:
ipopt
conda install -c conda-forge ipopt
highs
pip install highs
gurobi (requires external licensing)
pip install gurobipy
glpk
pip install glpk
cbc
conda install -c conda-forge coincbc
bonmin
conda install -c conda-forge coin-or-bonmin
Note: ipopt and bonmin are not available on PyPI and must be installed via conda-forge.
For Bonmin (Linux only):
# First install system package:
sudo apt update
sudo apt install coinor-libbonmin-dev
# Then install Python interface:
conda install -c conda-forge coin-or-bonmin
For Dash:
pip install dash
Test
Run the test suite:
pyflow-acdc-test
Test Flags:
--quick # Quick tests only
--tep # TEP tests only
--show-output # All tests with output
Documentation
Online documentation can be found at:
https://pyflow-acdc.readthedocs.io/
To build the latest documentation of a branch, build it locally.
To build the documentation:
cd docs
pip install -r requirements.txt
make html
Note: On Windows, you may need to use make.bat html or install make (e.g., via Chocolatey or WSL).
The documentation will be available in docs/_build/html/index.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyflow_acdc-0.5.1.tar.gz.
File metadata
- Download URL: pyflow_acdc-0.5.1.tar.gz
- Upload date:
- Size: 967.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aba26c17afc0eabdaf854d0ec627f4565ac18991a2847b44cb5c9e3e2f8461b2
|
|
| MD5 |
7745eb2972f452ed8ace9e1dd713eb13
|
|
| BLAKE2b-256 |
302bcf7e9c077b171d25101d18d7e2b32b949a58c6c4457550d739206d86c4b3
|
Provenance
The following attestation bundles were made for pyflow_acdc-0.5.1.tar.gz:
Publisher:
publish-to-pypi.yml on CITCEA-UPC/pyflow_acdc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyflow_acdc-0.5.1.tar.gz -
Subject digest:
aba26c17afc0eabdaf854d0ec627f4565ac18991a2847b44cb5c9e3e2f8461b2 - Sigstore transparency entry: 1074645025
- Sigstore integration time:
-
Permalink:
CITCEA-UPC/pyflow_acdc@46e6f3c10af57f667a27c74031f2dfd5630bff9a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CITCEA-UPC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@46e6f3c10af57f667a27c74031f2dfd5630bff9a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pyflow_acdc-0.5.1-py3-none-any.whl.
File metadata
- Download URL: pyflow_acdc-0.5.1-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf93cff3db35daadda6167a3cf72c305808fa1ac86e400ffecd8eb1ef0ecc35e
|
|
| MD5 |
54764d9512deb89bb759952a9f331bb6
|
|
| BLAKE2b-256 |
e0d53237666a417622463bfaad37a6b5a8c278bd67d6622e0f9eb150271fc957
|
Provenance
The following attestation bundles were made for pyflow_acdc-0.5.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on CITCEA-UPC/pyflow_acdc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyflow_acdc-0.5.1-py3-none-any.whl -
Subject digest:
cf93cff3db35daadda6167a3cf72c305808fa1ac86e400ffecd8eb1ef0ecc35e - Sigstore transparency entry: 1074645028
- Sigstore integration time:
-
Permalink:
CITCEA-UPC/pyflow_acdc@46e6f3c10af57f667a27c74031f2dfd5630bff9a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CITCEA-UPC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@46e6f3c10af57f667a27c74031f2dfd5630bff9a -
Trigger Event:
workflow_dispatch
-
Statement type: