Title: Theory and solver implementation of a general-purpose optimizer for large-scale water supply and distribution systems