• We introduce a unified framework, named TwinAI, for optimal Water Distribution Network (WDN) management. TwinAI integrates a physically informed digital twin with an autonomous graph-based control agent, enabling real-time decision-making, anomaly handling, and what-if analysis of network behavior. • We present an improved version of Dyn-WNTR, an extension of the widely used WNTR simulator that supports dynamic interaction during runtime. This extension enables AI-based agents to interact and modify an ongoing simulation, ensuring consistency with hydraulic modeling practice while allowing real-time computational experiments. • We design a novel graph reinforcement learning agent capable of autonomously managing WDN operations. The agent observes network conditions and computes optimal control actions, such as flow rerouting, by leveraging the digital twin as a predictive model. Efficient management of water distribution networks is increasingly critical as aging infrastructure, limited sensing coverage and widespread leakages drive significant losses of treated water. Existing monitoring systems rely on sparse IoT deployments, and current analytical approaches for detection, localization and mitigation remain fragmented, with limited integration between hydraulic models, data-driven methods and real-time decision making. To address these limitations, this work proposes TwinAI, an integrated framework that couples a digital twin of the network with an autonomous graph reinforcement learning agent for real-time leakage management. The digital twin is implemented through Dyn-WNTR, an extension of the EPANET-based Water Network Tool for Resilience (WNTR) simulator that enables interactive, physically consistent hydraulic simulations. The agent observes network conditions, processes them through graph-based representations and performs control actions such as leak isolation and flow reconfiguration. This combination creates a unified environment for real-time anomaly response, continuous decision making and what-if analysis. Our proposed framework lays the groundwork for future intelligent water network management systems capable of operating robustly with sparse sensing and evolving conditions.
Locatell et al. (Sun,) studied this question.