GridConnect
GridConnect connects simulated building electricity demand to representative
distribution networks and prepares pandapower networks for electrical studies.
Full reference documentation: https://pages.persee.minesparis.psl.eu/planeterr/gridconnect/.
Main APIs
BuildingBusMatcher
BuildingBusMatcher assigns simulated buildings to the low- or medium-voltage
buses of a named pandapower feeder. It uses building, demand-profile, district,
and ORE line-geometry datasets, and returns a feeder-specific connection table.
from gridconnect.api.building_bus_matcher import BuildingBusMatcher
from gridconnect.matching.config import BuildingBusMatchConfig
matcher = BuildingBusMatcher(network, BuildingBusMatchConfig(...))
connections = matcher.run()
connections is a pandas/GeoPandas DataFrame with this stable schema:
| Field | Description |
|---|---|
cleabs, building_id, main_usage, floor_area |
Building identifiers and characteristics. |
annual_energy_mwh, peak_active_power_mw, peak_reactive_power_mvar, peak_apparent_power_mva |
Building demand. |
district, mv_feeder |
Source district and target feeder. |
bus, voltage_level, grid_distance |
Selected bus, LV/MV assignment, and connection distance in metres. |
NetworkManager
NetworkManager is the stateful API for populating a pandapower network with
loads, evaluating constraints, and applying corrective actions. Load creation,
load shifting, reinforcement, and reconfiguration modify the managed network.
from gridconnect.api.manager import NetworkManager
manager = NetworkManager.from_network(network)
load_profiles = manager.create_loads(
connections=connections,
profiles=profiles,
)
constraints = manager.run_power_flow()
Key operations:
create_loads(...)imports one network load per valid building connection.run_power_flow(...)runs AC power flow and returns constraint results. If some steps fail, valid results are retained for converged steps,convergedisFalse, andfailed_time_stepsidentifies the unavailable profile rows.run_power_proxy(...)screens constraints using the power-proxy method.run_load_shift(process)applies a selectedmv,trafo,line,bus, orvoltage_riskload-shifting process.run_reinforcement(...)reinforces constrained lines and/or transformers.run_reconfiguration(...)screens all profile rows with the power proxy and validates selected rows with AC power flow before iterating load shifting and reinforcement. After every network change, it re-screens all active profiles, selects fresh critical rows (or highest-power fallback rows), and validates them with AC power flow. If AC validation fails, it retains the fresh full-profile proxy constraints. It returns constraints before and after the process plus accumulated changes.
Input data
GridConnect expects a named pandapower distribution network plus the following
data. Default paths are configurable through BuildingBusMatchConfig and
NetworkManager.
| Input | Format | Required content |
|---|---|---|
| Building data | District Parquet files | Building identifiers, geometry, usage, and floor area. |
| Load profiles | energy_model_static_<district>.parquet and energy_model_hourly_<district>.parquet (building_eload >= 0.6.0), or a single legacy energy_model_<district>.parquet |
Static: building_id, name, main_usage, district, total_electricity_need, and floor_area. Hourly: building_id, datetime, and electricity_need (kW). A legacy file holds all of these columns. |
| Building-to-bus connections | Parquet or DataFrame | The connection schema returned by BuildingBusMatcher. |
| District areas | Parquet | District geometry used to resolve the feeder study area. |
| ORE network geometries | Parquet | Low- and medium-voltage overhead and underground line geometries. |
For in-memory load creation, pass both DataFrames together:
manager.create_loads(connections=connections, profiles=profiles)
For file-based loading, provide a connection Parquet file and a directory of district profile files:
manager.create_loads(
building_bus_file="path/to/building_bus_match.parquet",
load_profiles_dir="path/to/load_profiles",
)
Output data
The matching workflow produces a building-to-bus connection table. The network
workflow adds loads to the supplied pandapower network and returns typed result
containers containing:
- Time-indexed load profiles and maximum load powers.
- Line-current, transformer-power, and bus-voltage constraint results.
- Load-shift events and line/transformer reinforcement records.
- Network snapshots and before/after reconfiguration comparisons.
Power values are represented in MW, Mvar, or MVA as named; line current is in kA, voltage is per unit, and matching distance is in metres.
Build the full documentation
Install the documentation dependencies from the repository root:
uv sync --extra docs
Preview the documentation locally:
uv run mkdocs serve
Build the deployable static site with strict validation:
uv run mkdocs build --strict
The generated site is written to site/.
Metadata
Release files for gridconnect 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gridconnect-0.3.0.tar.gz | 103.7 kB | Without provenance | Details for gridconnect-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gridconnect-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for gridconnect-0.3.0-py3-none-any.whl |
Total release size: 220.9 kB
Release files / gridconnect-0.3.0.tar.gz
| Download URL | gridconnect-0.3.0.tar.gz |
|---|---|
| Size | 103.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d826bc132a604b3a37f7c744d1d967c5bf4dbafd77012e09c483da532d5d5b87
|
|
BLAKE2b-256 checksum How to use checksums |
e32f1aac95d9a035646c4382a0f62135d66829b6b067828fd7f61d04a7f2d720
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / gridconnect-0.3.0-py3-none-any.whl
| Download URL | gridconnect-0.3.0-py3-none-any.whl |
|---|---|
| Size | 117.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
946de0c1ee5b227c13b56c9bb8ff22c6cbcfd61484ffd369809e5389915cf499
|
|
BLAKE2b-256 checksum How to use checksums |
49508eecb3c0127136489715d908333fe262524611c33a5227f6e3f2475e09b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for gridconnect 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.