This paper presents a new approach for the real-time, near-optimal control of water-distribution networks, which forms an integral part of the POWADIMA research project. The process is based on the combined use of an artificial neural network for predicting the consequences of different control settings and a genetic algorithm for selecting the best combination. By this means, it is possible to find the optimal, or at least near-optimal, pump and valve settings for the present time-step as well as those up to a selected operating horizon, taking account of the short-term demand fluctuations, the electricity tariff structure and operational constraints such as minimum delivery pressures, etc. Thereafter, the near-optimal control settings for the present time-step are implemented. Having grounded any discrepancies between the previously predicted and measured storage levels at the next update of the monitoring facilities, the whole process is repeated on a rolling basis and a new operating strategy is computed. Contingency measures for dealing with pump failures, pipe bursts, etc., have also been included. The novelty of this approach is illustrated by the application to a small, hypothetical network. Its relevance to real networks is discussed in the subsequent papers on case studies.