Water distribution networks comprise interconnected components such as pipes, tanks, and pumps, whose hydraulic behavior is inherently nonlinear and nonconvex. Modeling head loss in pipes and pump performance curves is a major challenge for optimization-based planning and operations. These challenges arise, for instance, when solving the Optimal Water Flow (OWF) problem, which aims to determine pump schedules that minimize energy costs while satisfying hydraulic and operational constraints. While various approximation techniques exist, they often lack sufficient accuracy, raising concerns about their reliability in practice. To address this, we propose a hybrid approach that integrates deep learning with mathematical optimization to solve the OWF problem. We design a modified Input Convex Neural Network (ICNN) capable of capturing complex nonlinear relationships, focusing on pipe friction losses and pump hydraulics. To ensure tractable optimization, we introduce a novel regularization that enforces input convexity, enabling neural network inference to be reformulated as a linear program. This convex approximation is embedded into the OWF formulation, enabling end-to-end optimization with standard solvers. Empirical results demonstrate significant improvements in accuracy and scalability over existing OWF approximations, offering a practical tool for cost-effective, energy-efficient water distribution management. Read more here: https://doi.org/10.1016/j.wroa.2025.100479
