A modular Python framework for rapid development of advanced control algorithms for energy systems - Eser, Steffen; Storek, Thomas; Wüllhorst, Fabian; Dähling, Stefan; Gall, Jan; Stoffel, Phillip; Müller, Dirk (Applied energy, 2025)
Due to the advance in energy engineering and necessary adaptations due to climate change, building energy systems are becoming increasingly complex, necessitating the development of advanced control strategies. However, there is often a gap between control algorithms developed in research and their practical adoption. To bridge this gap, we present AgentLib – a modular Python framework to aid the development, testing and deployment of advanced control systems for energy applications. AgentLib allows researchers and engineers to gradually scale up controller complexity, supporting the full development lifecycle from simulation and testing to distributed real-time implementation. The framework and its plugins provide a set of extensible modules for common agent functions like optimization, simulation and communication. Control engineers can leverage familiar tools for mathematical optimization and machine learning in Python. AgentLib is agnostic to specific communication protocols, allowing flexible interfacing with diverse energy systems and external services. To demonstrate the framework’s capabilities, we present a case study on developing a distributed model predictive controller from concept to real-world experiment. We showcase how AgentLib enables a true parallel implementation of cooperative agents and supports gradual transition from development to deployment. By analyzing the system’s performance, we highlight the real-world impacts of communication overhead on distributed control. The framework’s capability to bridge the gap between theoretical research and practical applications marks a significant step forward in deploying sophisticated control strategies within the building energy management sector, and possibly other domains. •Modular Python framework to implement advanced controllers for energy systems.•Accelerate the transfer of theoretical studies to practical implementation.•Gradual extension of functionalities and agnostic to communication protocols.•Distributed cloud-based real experiment on distributed model predictive control.•Analysis of communication delays on runtimes in distributed control.