Climate change and socioeconomic factors have increased the complexity of urban water supply systems. Thus, fresh water sources are being gradually diversified to improve the reliability and resilience of the systems. However, as the number of source blending options grows, optimization tools are needed to design drinking water supply systems that comply with indicators of cost, resilience, and water quality. This paper proposes a pioneering methodological approach, based on an ant-colony-optimization (ACO) algorithm, to optimize the blending of drinking water from different sources to minimize operational costs of a given system originating from a number of impaired water sources while complying with water quality standards. To evidence the potential of the ACO algorithm to solve such a system, a virtual case study was designed that considers eight fresh water sources, including seawater desalination and potable reuse. Seven scenarios were developed with different weightings to service outage, water conveyance and treatment costs while complying with water quality goals in regard to total organic carbon, nitrates, and total dissolved solids. It was shown that the cost per volumetric unit of water can vary considerably depending on the weightings of the three cost items. This paper provides a rigorous scientific approach to propose a methodology supporting the decision-making process of selecting a mixture of different sources to achieve the overall lowest system cost. Hence, this work contributes to improving the resilience and sustainability of urban water supplies.