Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

cimhub_matpower

Bidirectional converter between MATPOWER (.m case files) and CIM (IEC 61970) using the cim17v40 profile.

Usage

MATPOWER to CIM (Import)

import os
os.environ['CIMG_CIM_PROFILE'] = 'cim17v40'

from cimhub_matpower.importer.matpower_to_cim import matpower_to_cim

network = matpower_to_cim("case9.m")

CIM to MATPOWER (Export)

from cimhub_matpower.exporter.cim_to_matpower import cim_to_matpower

cim_to_matpower(network, "output.m")

Equipment Coverage

MATPOWER Field CIM Class(es)
bus TopologicalNode, ConnectivityNode, BaseVoltage
gen SynchronousMachine, GeneratingUnit
branch ACLineSegment, PowerTransformer
gencost GrossToNetActivePowerCurve
areas ControlArea

Unit Conventions

MATPOWER uses per-unit impedances on the system MVA base. The converter handles the z_base = base_kv² / base_mva conversion automatically — do not manually multiply by baseMVA.

Generator sign convention: MATPOWER Pg is positive for generation (power out). CIM Terminal.p is positive for power flowing into equipment — the converter negates when crossing the boundary.

Running Tests

uv run pytest cimhub_matpower/tests/ -v

Status

  • Importer: functional for buses, generators, branches, gencost, areas.
  • Exporter: implemented; full roundtrip tests in progress.
  • Known gap: reactive power limits (Qmin/Qmax) and transformer tap ratios need validation.

Download files

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

Source Distribution

cimhub_matpower-2.0.0a1.tar.gz (45.4 kB view details)

Uploaded Source

Built Distribution

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

cimhub_matpower-2.0.0a1-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file cimhub_matpower-2.0.0a1.tar.gz.

File metadata

  • Download URL: cimhub_matpower-2.0.0a1.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cimhub_matpower-2.0.0a1.tar.gz
Algorithm Hash digest
SHA256 6a0a0939753d08d0d805c0facd8dd3c99d3d67226cc4c78684713428ab37b15a
MD5 c4cfe376339afe8bd0694b08ea89214b
BLAKE2b-256 fda0f355be5feb3d655c24e83d0dc7a761de793d47b69c451c89a4fd63f3099f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cimhub_matpower-2.0.0a1.tar.gz:

Publisher: publish-cimhub-matpower.yml on PNNL-CIM-Tools/CIMHub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cimhub_matpower-2.0.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for cimhub_matpower-2.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 f999e149f9cd157b7006c310569b637e37ca5c7afd62eb3443caf594a685085f
MD5 ee290c8617b2e0b95f5256010de4fddb
BLAKE2b-256 2950d7c98702de308ab1c584e5fc21688a4596884337835822a705082dbcb376

See more details on using hashes here.

Provenance

The following attestation bundles were made for cimhub_matpower-2.0.0a1-py3-none-any.whl:

Publisher: publish-cimhub-matpower.yml on PNNL-CIM-Tools/CIMHub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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