Skip to main content

Additional tools for cgmes2pgm_converter to integrate PowerGridModel with the Common Grid Model Exchange Standard (CGMES)

Project description

CGMES2PGM-Suite

cgmes2pgm_suite provides additional tools for cgmes2pgm_converter to integrate PowerGridModel with the Common Grid Model Exchange Standard (CGMES). It focuses on performing the state estimation on CGMES datasets.

Features

  • Start an Apache Jena Fuseki as docker container
  • Upload Datasets to a SPARQL endpoint
  • Human readable exports of PGM Datasets in TXT and Excel
  • Create SV-Profile from PGM Results
  • Debug state estimation by manipulating datasets (e.g., subnet splitting)
  • Configure conversion and state estimation via a configuration file
  • Simulate measurements:
    • when real measurements are not provided via an Operation Profile, but a State Variable (SV) Profile is available
    • generates an Operation Profile with distorted measurements based on the SV Profile

Installation

The package can be installed via pip:

pip install cgmes2pgm_suite

To start an Apache Jena Fuseki server via this package, Docker is required. See Docker installation guide.

Usage

This package can be run as a standalone application, performing the conversion and running PGM's state estimation. To do so, you need to install the package and then run the following command:

python -m cgmes2pgm_suite --config <path_to_config_file>

The provided configuration file contains the dataset configuration and the parameters for the conversion and state estimation. An example configuration file can be found in /example.

Quick Start

For a quick start, we recommend cloning this project and using the provided test cases.

If the project is cloned, setup the environment and install the package:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e ".[dev]"
pre-commit install

To run the Conformity Datasets, you need to download Test Configurations v3.0.3 from ENTSO-E CIM Conformity and Interoperability respecting their License. Place the rdf/xml files of each dataset in the respective subdirectory of tests/datasets.

Afterwards, you can run all datasets using:

pytest -m "integration"

Note: Running the tests creates a Fuseki Docker container on port 3030. The container is automatically removed after the tests are finished.

The results of the tests can be found in the tests/out directory.

If you want to add your own datasets, the following steps are required:

  • Place the rdf/xml files in the tests/data/ directory
  • Create a configuration file in the tests/configs/ directory, by copying an existing one
  • Update the name, output directory and location of the rdf/xml files in the new configuration file

Datasets

The conversion, measurement simulation and state estimation has been tested with the CGMES conformity datasets.

The following datasets have been tested:

Dataset Size (Nodes) Estimation Result Comment
PowerFlow 2 🟢
PST 2 🟢 All three Scenarios
MiniGrid 13 🟢
MicroGrid 13 🟢 PST with AsymmetricalPhaseTapChanger (BE-TR2_2) has been split
SmallGrid 167 🟢
Svedala 191 🟢
RealGrid 6051 🟡 Requires smaller sigmas in measurement simulation to converge
FullGrid 26 ? SV-Profile does not contain power flows for all branches, resulting in an insufficient amount of simulated measurements

Dataset Version: CGMES Conformity Assessment Scheme Test Configurations v3.0.2

The used configuration files can be found in the /tests/configs directory.

License

This project is licensed under the Apache License 2.0.

Dependencies

This project includes third-party dependencies, which are licensed under their own respective licenses.

This project includes code from jena-fuseki-docker in the src/cgmes2pgm_suite/resources/docker directory, which is redistributed under the original Apache License 2.0. See the root‑level NOTICE file for full attribution.

Commercial Support and Services

For organizations requiring commercial support, professional maintenance, integration services, or custom extensions for this project, these services are available from SOPTIM AG.

Please feel free to contact us via powergridmodel@soptim.de.

Contributing

We welcome contributions to improve this project. Please see our Contributing Guide for details on how to submit pull requests, report issues, and suggest improvements.

Code of Conduct

This project adheres to a code of conduct adapted from the Apache Foundation's Code of Conduct. We expect all contributors and users to follow these guidelines to ensure a welcoming and inclusive community.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cgmes2pgm_suite-0.3.0.tar.gz (70.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cgmes2pgm_suite-0.3.0-py3-none-any.whl (104.9 kB view details)

Uploaded Python 3

File details

Details for the file cgmes2pgm_suite-0.3.0.tar.gz.

File metadata

  • Download URL: cgmes2pgm_suite-0.3.0.tar.gz
  • Upload date:
  • Size: 70.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for cgmes2pgm_suite-0.3.0.tar.gz
Algorithm Hash digest
SHA256 369e16b48c944826f3758c3be2bacb4a444c5add30541cff801ff5f0139ac8a7
MD5 d0dd0f6030ce30a3422f27cdd566190e
BLAKE2b-256 3ce10d9634cd0a33e9db277d9bce3102778cadc4385094f734ea57a3470226b3

See more details on using hashes here.

File details

Details for the file cgmes2pgm_suite-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cgmes2pgm_suite-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d2f52d7cf50bd2e5f6ba3d41a68e213dbbc9b433521cf37d6fe6132adc3e033
MD5 c5fd3cb6f03e9a584ff40035897129fc
BLAKE2b-256 40e69f061c5ff3c46d7249cf88a1fdf10460db0babc4ef588e3852d995a29986

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page