ePowCoRe is a Python framework for converting electrical power-system models between different modeling and simulation environments.
At its core, ePowCoRe uses the Generic Data Format (GDF) as a platform-independent intermediate representation.
Source Model
│
▼
┌─────────────────────┐
│ Generic Data Format │
│ (GDF) │
└─────────────────────┘
│
▼
Target Model
Using GDF as the intermediate representation separates platform-specific import and export logic from the generic grid model.
This allows conversion modules to operate around a common representation instead of implementing direct converters between every pair of supported platforms.
- Python 3.11
- uv
The project currently declares:
Python >=3.11,<3.12
git clone https://github.com/KIT-IAI/ePowCoRe.git
cd ePowCoReInstall the environment from the committed lock file:
uv sync --lockedRun Python inside the project environment with:
uv run python --versionAdditional dependency groups are available for specific integrations.
For PyPSA:
uv sync --locked --group pypsaFor MATLAB / Simscape:
uv sync --locked --group simscapeConversion scripts are available in scripts/.
For example, to convert a PowerFactory model to GDF:
uv run python scripts/pf_to_gdf.pyTo convert an existing GDF model to JMDL:
uv run python scripts/gdf_to_jmdl.pySeveral conversion scripts currently contain model names, input paths, output paths, or other configuration directly in the script. Adjust the corresponding script for the model being converted before execution.
Generated models are typically written below:
output/
The repository currently provides scripts for the following conversion paths:
| Source | Target | Script |
|---|---|---|
| PowerFactory | GDF | pf_to_gdf.py |
| GDF | PowerFactory | gdf_to_pf.py |
| JMDL | GDF | jmdl_to_gdf.py |
| GDF | JMDL | gdf_to_jmdl.py |
| GDF | GeoJSON | gdf_to_geojson.py |
| PowerFactory | GeoJSON | pf_to_geojson.py |
| GDF | MATPOWER | gdf_to_matpower.py |
| GDF | pandapower | gdf_to_pandapower.py |
| GDF | PyPSA | gdf_to_pypsa.py |
| GDF | RSCAD / RTDS | gdf_to_rscad.py |
| GDF | Simscape | gdf_to_simscape.py |
Support depends on the available component mappings for each platform and conversion direction.
See the documentation for platform-specific details.
ePowCoRe/
│
├── epowcore/
│ ├── gdf/
│ ├── generic/
│ ├── geo_json/
│ ├── jmdl/
│ ├── matpower/
│ ├── pandapower/
│ ├── power_factory/
│ ├── rscad/
│ └── simscape/
│
├── scripts/
├── tests/
├── tests_slow/
├── documentation/
├── config/
│
├── pyproject.toml
├── uv.lock
├── .pre-commit-config.yaml
├── STYLEGUIDE.md
└── README.md
| Path | Purpose |
|---|---|
epowcore/gdf |
Generic Data Format and core power-system model |
epowcore/generic |
Platform-independent model operations |
epowcore/geo_json |
GeoJSON conversion |
epowcore/jmdl |
JMDL integration |
epowcore/matpower |
MATPOWER integration |
epowcore/pandapower |
pandapower integration |
epowcore/power_factory |
DIgSILENT PowerFactory integration |
epowcore/rscad |
RSCAD / RTDS integration |
epowcore/simscape |
MATLAB Simscape integration |
scripts |
Conversion and utility scripts |
tests |
Automated tests |
tests_slow |
Slower or environment-dependent tests |
documentation |
Sphinx documentation sources |
Project dependencies and tool configuration are defined in:
pyproject.toml
Resolved dependency versions are stored in:
uv.lock
After modifying dependencies:
uv lock
uv syncCommit both pyproject.toml and uv.lock when dependency resolution changes.
The GitHub Actions workflow runs:
uv run pytest tests/coreRun the same suite locally before submitting changes:
uv run pytest tests/coreTo run the broader test suite:
uv run pytest tests/Some integration tests require external software or platform-specific environments and may therefore not run on every development machine.
Run tests with coverage:
uv run pytest --cov=epowcore tests/Generate the XML coverage report:
uv run coverage xmlThe repository uses Black and isort, configured through pyproject.toml.
Run all configured pre-commit hooks with:
uv run pre-commit run --all-filesIndividual tools can also be run directly.
uv run black epowcore testsuv run isort epowcore testsCheck for whitespace errors before committing:
git diff --checkAdditional project conventions are documented in STYLEGUIDE.md.
The documentation is hosted on Read the Docs:
https://epowcore.readthedocs.io/
Documentation sources are located in:
documentation/source/
Build the HTML documentation locally with:
uv run sphinx-build \
-b html \
documentation/source \
documentation/build/html \
-c documentation/source/The generated documentation is available in:
documentation/build/html/
If you use ePowCoRe in academic work, cite the archived software release:
M. Weber, A. Kocher, H. K. Çakmak, and V. Hagenmeyer, “ePowCoRe: A Novel Generic Representation of Power Grids Enabling Open-Source Model Conversion Modules,” 2024 Open Source Modelling and Simulation of Energy Systems (OSMSES), Vienna, Austria, 2024, pp. 1–6. doi:
10.1109/OSMSES62085.2024.10668981
ePowCoRe is distributed under the MIT License.