This study is on the inclusion of chemical water stability considerations in optimizing the operation of water distribution systems. The problem of chemical water instability arises in systems supplied by a mixture of desalinated, surface, and ground water. Such circumstances are commonly found in countries which utilize large scale seawater desalination plants within their water supply systems to mitigate water scarcity problems (e.g., Israel). The most known and problematic occurrence related to unstabilized water is the phenomenon of "red water" which describes a situation in which a layer of (mostly) iron oxides is detached from the internal surface of metal pipes into the water, which then reaches the consumer's taps with a characteristic yellow-brown-red color. Another well known problem is the deterioration of metal pipes due to slow corrosion. Beyond destroying the pipes, the products of corrosion consume chlorine products, rendering disinfection less efficient, it creates scales on the pipe 's surface that increase the energy required for pumping, it supports Biofilm growth and may produce suspensions of (mainly) iron particles that result in water that is not appealing to the consumer. The developed methodology in this work links a genetic algorithm, a hydraulic and water quality simulator, and a numerical scheme for computing the calcium carbonate precipitation potential (CCPP) [which is the quantitative measure of the precise potential of a solution to precipitate (or dissolve) CaCO3(s)], and the pH of the water. The model minimizes the cost of pumping and treatment of the water for an operational time horizon subject to required quantities, pressures, and CCPP andpH constraints. The methodology is demonstrated on an example application through base runs and sensitivity analysis.