![]()
Contribution type: Lightning talk and Poster
NPAP - Network Partitioning and Aggregation Package
Presenter: Benjamin Stöckl
Description:
The Network Partitioning and Aggregation Package (NPAP) is an open-source, standalone Python library designed to standardize the reduction of spatial complexity in network graphs for optimization models. A core design principle of NPAP is the explicit decoupling of the spatial reduction pipeline into two distinct stages: network partitioning (which maps nodes to disjoint clusters) and network aggregation (which reduces the topology based on that mapping). Built on a modular strategy design pattern, NPAP enables users to independently swap, customize, or extend partitioning and aggregation algorithms without altering the core codebase.
While its fundamental architecture is general-purpose, NPAP features specialized tools tailored for power system optimization. It introduces advanced physical constraints critical for large-scale transmission networks, notably AC-island awareness and voltage-aware clustering. These features automatically detect and independently partition AC grids connected solely by DC links and actively prevent the assignment of nodes with distinct voltage levels to the same cluster. This preserves critical physical infrastructure details, such as multiple distinct voltage levels and their connecting transformers, ensuring more accurate investment decisions in aggregated grids.
Background:
As optimization models representing real-world networks exhibit high complexity, they frequently become computationally intractable. To regain computational efficiency, modelers widely use spatial aggregation. However, a significant research gap exists: existing spatial reduction tools are typically tightly embedded into specific modeling frameworks, which heavily limits their independent reusability and makes cross-framework comparisons difficult.
To maximize the impact of our solution and make the tool available on a large scale, we are currently integrating the package into the well-established PyPSA framework via an open pull request. This ongoing integration has already been used to successfully demonstrate NPAP’s scalability on the full pan-European high-voltage transmission network. In our European case study, NPAP demonstrated that voltage-aware aggregation preserves up to 70% of the transformer expansion costs in the aggregated model compared to the full grid model, significantly outperforming traditional voltage-unaware methods.
Optional links:
NPAP is available on GitHub. Additionally a preprint, which is currently under review at the Journal of Open Source Software (JOSS), is available on arXiv. Another preprint, which was accepted for the EEM conference, showcases the advantages of the voltage-aware aggregation methods over typical voltage-unaware methods.