This paper attempts to solve the problem of optimal design of both water collection and distribution networks, using a Modular In-core Nonlinear Optimization System (MINOS). Both models are user oriented, arrive at a discrete solution and can handle large systems efficiently. Pre- and post-processors are used to handle input and output data respectively. Network optimal design aspects such as transformation of variables, loop defining algorithms, reliability of redundant links, and the discretization problem are discussed. Four examples are solved to demonstrate the proposed model's capabilities.