The second of the two case studies in the POWADIMA research project, the Valencia water-distribution network, serves a population of approximately 1.2 million and is supplied by surface water via two treatment plants which have significantly different production costs. The only storage available is located at the treatment plants, each of which has its own pumping station. The management of the network is a complex operation involving 4 pressure zones and 49 operating valves, 10 of which are routinely adjusted. The electricity tariff structure varies with the hour of the day and month of the year. The EPANET hydraulic simulation model of the network has 725 nodes, 10 operating valves, 2 storage tanks and 17 pumps grouped at the two pumping stations. The control system that has been implemented comprises an artificial neural network predictor in place of the EPANET model and a dynamic genetic algorithm to optimize the control settings of pumps and valves up to a 24 h rolling operating horizon, in response to a highly variable demand. The results indicate a potential operational-cost saving of 17.6% over a complete (simulated) year relative to current practice, which easily justifies the cost of implementing the control system developed.