A python toolbox for flexibility aggregation and disaggregation: PyFlexAD
Emrah Öztürk, Kevin Kaspar, Timm Faulwasser, Karl Worthmann, Peter Kepplinger, Klaus Rheinberger · Sustainable Energy Grids and Networks · 2025
The increasing penetration of volatile renewables and growing electricity demand pose several challenges for power systems. Simultaneously, flexible devices – so called distributed energy resources (DER) – are becoming more widespread, making them attractive for providing ancillary services. The flexibility of a single device can be represented by a set of reference power profiles, and the flexibility of multiple devices by the summation of individual flexibility sets. However, set addition, also known as the Minkowski sum, is usually computationally intractable. This has led to the development of various approximation methods in the literature. The current study improves upon our previously published vertex-based inner approximation, by extending it to more general storage devices and hierarchical aggregation settings. We validate the efficacy and accuracy of the method proposed through case studies using real data and provide the source code of the algorithm as a Python package that enables the (dis-)aggregation of various flexible devices in real-world scenarios. • An efficient flexibility (dis-)aggregation method for storage devices is presented. • Hierarchical aggregation and disaggregation is covered by simple vector-matrix operations. • The proposed method is provided as an open-source Python package. • The method is tested against the central control mechanism and an LP-based alternative. • The case study shows scalability with respect to the number of time periods and the number of devices.