With the rapid increase of water demand in urban life, ecology and production sectors, the problem of water resources allocation has become increasingly prominent. It has hindered the sustainable development of urban areas. Based on the supply of various water sources and the water demand of different water users, a multi-objective optimal allocation model for urban water resources was proposed. The model was solved using the algorithm of particle swarm optimization (PSO). The algorithm has a fast convergence and is both simple and efficient. In this paper, the conflict over Kunming's water resources allocation was taken as an example. The PSO algorithm was used to obtain optimized water resources allocation plans in the year 2020 and 2030, under the circumstances of a dry year (inflow guarantee rate p = 0.825) and an unusually dry year (inflow guarantee rate p = 0.885), respectively. The results showed that those allocation plans can lower the future potential water shortage rates of Kunming. At the same time, the interests of different sectors can all be satisfied. Therefore, conflicts over urban water use can be effectively alleviated.Sustainability 2020, 12, 1337 2 of 16 of urban industrial and agricultural water, residential water and ecological water was 70.7%, 23.7% and 5.6%, respectively, compared to 71%, 23.2% and 5.8% in the previous year. This indicates that the gap between production water and residential water and between ecological environment water consumption is shrinking. This trend will continue. With the rapid development of the economy, enterprises in the field of industry and agriculture usually generate a large amount of water demand, which has impacts on urban life and ecological water. However, due to inefficient water pricing and unreasonable rates, cities have a lot of water losses [2]. Even in the dry period, high-water consumption industries such as car washes and bathing still develop, which intensifies competition among water users. This conflict over water resources allocation not only hinders the flow of water from low-value industries to high-value industries, but also leads to cities being unable to maintain sustainable levels of water resources. The question of how to alleviate conflicts over water resource allocations in cities through optimization is a problem that must be focused on to ensure the sustainable development of society.At present, some research has already been carried out on the optimal allocation of water resources. Chen et al. [3] established a joint scheduling model for different water sources (surface water, groundwater and rainfall) to improve the water use efficiency of the Sanjiang Plain planting area. Yang et al. [4] used grounder modeling systems (GMS) to establish the Weihe River groundwater flow model, which provides decision support for multi-source water resources scheduling in Jinghe River. Li et al. [5] proposed a multi-stage fuzzy stochastic programming model for water resources management research. Zhang et al. [6] constructed a two-stage allocat...