  In this paper, we present a new control problem for optimizing pressure and
water quality operations in water distribution networks. Our problem imposes a
set of time-coupling constraints to manage temporal pressure variations, which
are exacerbated by the transition between pressure and water quality controls.
The resulting optimization problem is a nonconvex, nonlinear program with
nonseparable structure across time steps. This problem proves challenging for
state-of-the-art nonlinear solvers, often precluding their direct use for near
real-time control in large-scale networks. To overcome this computational
burden, we investigate a distributed optimization approach based on the
alternating direction method of multipliers (ADMM). In particular, we implement
and evaluate two algorithms: a standard ADMM scheme and a two-level variant
that provides theoretical convergence guarantees under mild assumptions for our
nonconvex setting. We use a benchmarking water network and a large-scale
operational network in the UK for our numerical experiments. The results
demonstrate good convergence behavior across all problem instances for the
two-level algorithm, whereas the standard ADMM approach struggles to converge
in some instances. With an appropriately tuned penalty parameter, however, both
distributed algorithms yield good quality solutions and computational times
compatible with near real-time (e.g. hourly) control requirements for
large-scale water networks.
