This manuscript describes the methodology and application of a genetic algorithm scheme tailor-made to EPANET for optimizing the operation of water distribution systems with desalinated water sources, under unsteady water quality conditions. Many studies exist that describe potential problems that might occur when waters that have different chemical characteristics are blended, and especially when desalinated water sources are present. It can be shown that the chemical stability of the blend, as manifested by the Calcium Carbonate Precipitation Potential (CCPP) of the water, can become negative (i.e. un-stabilized water) when desalinated water are blended with ground water, even if both sources have a positive CCPP. The objective in this study is to minimize both the cost of pumping and of water treatment related expenses for a selected operational time horizon, while delivering the consumers the required quantities at acceptable qualities and pressures. The methodology is demonstrated on a small illustrative example.