Multi-Objective Optimal Allocation of Urban Water Resources While Considering Conﬂict Resolution Based on the PSO Algorithm: A Case Study of Kunming, China

: 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 di ﬀ erent 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 e ﬃ cient. In this paper, the conﬂict 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 (inﬂow guarantee rate p = 0.825) and an unusually dry year (inﬂow 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 di ﬀ erent sectors can all be satisﬁed. Therefore, conﬂicts over urban water use can be e ﬀ ectively alleviated.


Introduction
In recent years, China's water resources situation has generally become more severe. According to a survey of China's water security situation in 2016, China's per capita water resources are far below the global average of 2354.9 m 3 . In addition, only 62.8% of China's total water resources and 22.2% of lake water quality in China can be drinkable [1]. About two-thirds of the country's cities have different degrees of water shortages. Moreover, with the acceleration of urbanization in China and the continuous growth of population, the water consumption by urban municipal and health systems is on the rise. According to the data of China Water Resources Bulletin in 2017, the proportion of domestic water and artificial ecological supplements increased from 13.6% and 2.4% to 14.3% and 3.3%, respectively. China's agricultural and industrial water still makes up a large proportion of these supplements. The contradiction between supply and demand of water resources has further deepened. Especially in the areas facing drought and water shortages, the urban water shortage situation is not optimal. Taking Kunming, a city that typically suffers from drought, as an example, according to the Kunming Water Resources Bulletin in 2017, the total water consumption of the city reached 1.832 billion m 3 , and experienced a decrease of 3.5% over the previous year. Specifically, the proportion the practice of water resources optimization allocation in Kunming, China. The water distribution in the year 2020 and 2030 under the circumstances of a dry year (p = 0.825) and an unusually dry year (p = 0.885) is allocated among life, production and ecology sectors. The results can provide decisionmaking basis for the future specific water resources planning in Kunming, China.

Study Area
Kunming (Figure 1), the capital of Yunnan Province, China, is located at 102 ° 10 ′ ~ 103 ° 40 ′ E and 24 ° 23 ′ ~ 26 ° 22 ′ N. It is 237.5km long from north to south and 152km wide from east to west. The total area is 21,473km 2 . It is the gateway to Southeast Asia, the Middle East, Africa and Europe, which has unique geographical advantages. According to 2018 Kunming National Economic and Social Development Statistical Bulletin, the existing population in the city is 6.85 million. According to Kunming CLIMATE BULLETIN 2018, the mean annual precipitation in the region is 918 mm. According to 2017 Kunming Water Resources Bulletin, the comprehensive water consumption per capita is 270 m 3 . The domestic water consumption per capita of urban residents (excluding urban public water consumption) is 134 L/day and that of rural residents is 89 L/day. Kunming belongs to the typical temperate monsoon climate, with obvious dry and wet seasons in the rainfall distribution time of the whole year. The rainy season is from May to October and the dry season is from November to April. The precipitation accounts for 85% and 15% respectively. There is no great river crossing in Kunming. The city is located at the boundary of the Jinsha River, Yuanjiang River and Nanpan River. The water resources mainly depend on natural lakes, reservoirs, precipitation and groundwater, which makes the available water limited. With the rapid development of the economy, the acceleration of urbanization and the growth of population, the amount of water used for urban life and ecology is on the rise, which intensifies the competition among different water use sectors. How to optimize the scheme design of water resources allocation in Kunming to alleviate the contradiction between supply and demand and improve the efficiency of water use has a certain practical significance for local water resources planning.

Data Sources
The information about water cost was collected from the water price standard of Kunming Water

Data Sources
The information about water cost was collected from the water price standard of Kunming Water Group Co., Ltd (http://www.kmwatersupply.com/channel/xxgk_detail.action?id= 8a4280a34b58a876014b58d7a2580011&menuId=402891816a5fbdb3016a5fcfbc710012). The data on the water consumption and GDP output value in the field of agriculture and industry was gathered from Kunming Statistical Yearbook [29]. The data on the total water consumption control index of Kunming in 2020 and 2030 was collected from municipal government bulletin of Kunming Municipal People's Government (http://www.km.gov.cn/c/2014-07-02/603600.shtml). The runoff data and distributable water data were collected from Kunming Statistical Yearbook and Kunming Water Resources Bulletin (http://shuiwu.km.gov.cn/c/2018-12-13/2850356.shtml).

Urban Water Optimization Allocation Model
The optimal allocation of urban water resources refers to the processes which include establishing an optimal allocation model that meets certain conditions based on the supply and demand of water resources in cities, solving the model by computer technology and obtaining a specific scientific water resources allocation plan. When water resources are scarce, the total water quantity required by different water users is greater than the total current water resources for distribution. In this situation, it is necessary to optimize the allocation of water resources. The optimal allocation of water resources is based on the demand and supply of water resources, so it can effectively alleviate the degree of water conflicts. It has become one of the effective means to resolve conflicts in water resources allocation. This study designs the corresponding urban water resources allocation model according to the specific local hydrological conditions and the water use efficiency of each water sector.

Objective Functions
Urban water resources allocation is a multi-subject decision-making problem involving the water needs of the life, ecological and production sectors. It is necessary to consider the relevant interests of different stakeholders to ensure the fairness, rationality and effectiveness of water resources allocation. At the same time, it is also necessary to take into account the different macroscopic goals of the city's economy, society and ecology and promote the sustainable development of water resources in the city. Therefore, the optimal allocation of urban water is a complex project involving multiple subjects and objectives. Assuming that the urban water sources are mainly surface water and groundwater, the water sectors mainly include the life, ecological and production sectors [30]. The surface water and groundwater are respectively represented by i=1 and 2 and the life, ecological and production sectors are also described by j=1, 2 and 3. The objective functions are constructed as follows.
(1) Maximize Economic Benefits Economic development can provide the necessary material basis for the sustainable development of regional water resources. Therefore, it is necessary to ensure that the city's economic benefits are maximized, that is, to ensure that the production, life and ecological sectors have their own greatest economic benefits. In general, the cost of water and the benefit of water are used to represent economic benefits according to Equation (1): where q ij and b ij are the amount of water and the benefit coefficient provided by the water source i to the j-type water sector, respectively. c ij is the cost coefficient for the unit water supply from the water source i to the j-type water sector. β ij is the order coefficient of water supply i to the j-type water sector-usually ranging in [0, 1], which reflects the priority of distribution. The index is determined by the principle of urban water resources allocation.
(2) Maximize Social Benefits Water resource is an important factor restricting social development. The absolute value of the difference between the water supply and the water demand can be used to measure the social benefits. When the value is larger, it reflects that the social water demand gap is larger or the social water supply is excessive. It is easy to cause water-use waste and other improper water activities. At this time, the social benefit is smaller. On the contrary, the smaller the absolute value, the greater the social benefit. Only when the water supply is equal to the water demand, the social benefit is the greatest. The specific formula is shown in Equation (2): where D j represents the water demand of the j-type water sector and Q satisfies Q = j=1 i=1 q ij .
(3) Maximize Ecological Benefits Due to the unreasonable use of water resources, the pollution of water quality directly affects the balance of ecological environment. Therefore, the allocation of urban water resources cannot ignore the impact of water resources allocation plans on ecosystems. In general, some important water pollution indicators are applied to indicate the amount of pollutant emissions such as chemical oxygen demand, chemical oxygen demand (COD) and other water quality indicators to describe the target as follows: where p 0 represents the discharge coefficient of total urban wastewater,p j is the proportion of wastewater discharge of j-type water user, h j is the content of chemical oxygen demand (COD) in unit sewage discharge of the j-type water use sector.
In summary, the total objective function can be obtained by weighting based on the importance of economic, social, and ecological goals. Assume the weight of economic, social, and ecological benefits' targets be λ 1 , λ 2 , λ 3 respectively, which is obtained by the Delphi method , so the total objective function is shown as follows:

Constraints
In a certain period, the city's total water resources are limited and so does the water supply capacity. Therefore, the actual water supply cannot exceed the total water supply of the city. Under China's most stringent water management system, the water supply must meet the total water control indicators of management system in the region. In addition, in order to meet the basic water demand of the city, the actual water supply has a minimum water supply value and a certain water supply guarantee must be satisfied.
(1) Urban Water Demand Constraint Sustainability 2020, 12, 1337 6 of 16 (a) When j = 1, D 1 represents the demand for domestic water. Domestic water is the basic water for local life and production. It must be guaranteed. The urban water resources allocation is required to meet the urban domestic water demand. Therefore, the water constraint for domestic water supply should be minD 1 = i q i1 = maxD 1 .
(b) When j = 2, D 2 represents the demand for ecological water. Urban ecological environment water is mainly used for urban ecological protection such as greening, forestry ecological construction and urban sewage reuse. Therefore, the demand for environmental water should be guaranteed, so the ecological water demand constraint is minD 2 = i q i2 = maxD 2 .
(c) When j = 3, D 3 represents the demand for production water. Due to the special situation of production water, the demand for production water is constrained and meets (2) Available for Water Constraints where Q i is the distributable water volume of different water sources in the city.
(3) Non-negative Constraints Therefore, the water resource optimization allocation model is shown as follows:

Coefficients of Model
(1) Water Benefit Coefficient The water benefit coefficient reflects the GDP value produced by the unit water. The production water benefit mainly includes the agricultural water benefit and the industrial benefit. The production water benefit coefficient can be calculated according to the industrial and agricultural GDP and the industrial and agricultural water consumption, as described in the Equation (9): where b 1 represents the production water benefit coefficient; Q A and Q D represent agricultural water and industrial water consumption, respectively; g A and g D represent the GDP of agriculture and industry accordingly. The formula for calculating the benefit coefficient of industrial water is shown in Equation (10): where b D represents the industrial water benefit coefficient. Because of the multi-purpose and multi-stakeholder of life and ecological water use, water benefit is often difficult to calculate. This paper Sustainability 2020, 12, 1337 7 of 16 considers that the city gives priority to the protection of residential and ecological water use generally, assuming that the life and ecological water benefits are equal to the industrial water use benefits.
(2) Water Cost Coefficient The water price paid by the general water user includes the water resource fee of the water conservancy project, the sewage treatment fee of the water supply department and the production and processing fee of the water plants. According to the different nature of urban water, urban water can be divided into residential water, administrative water (including landscaping, sanitation and environmental protection), industrial and commercial water (including industrial and mining enterprises, agricultural water) and special water (including a sauna and car wash water).
(3) Coefficient of Water Supply Order for Water Users Coefficient of water supply order for water users β ij reflects the priority of urban water resources allocation. At present, there are subjective methods, objective methods and subjective and objective hybrid methods to determine the weights. In order to make the weight more objective, this study uses the objective weighting method. The formula is shown in Equation (11).
where n i ij is the order of water supply from water source i to j-type water users; n i max is the largest water supply serial number of water source i. In the period of water shortage, the urban water sector gives priority to ensuring the water needs of residents' life and ecological sectors. Therefore, the principle of priority for urban water use is that the domestic water is superior to ecological water and ecological water is superior to production water.

PSO Algorithm Design
There are many optimization algorithms in the field of water resources, genetic algorithms and simulated annealing algorithms have been applied maturely. At the same time, new algorithms such as PSO algorithm, ant colony algorithm and annealing algorithm have been deeply applied to the field of water resources optimization allocation. Compared with other optimization algorithms, the PSO algorithm does not need to adjust each parameter and its convergence speed is fast. The operation is simple and the implementation is more efficient. Therefore, this paper uses PSO algorithm to design an urban water resources optimal allocation plan.

Principle of PSO Algorithm
PSO is an intelligent optimization algorithm proposed by Kennedy and Eberhart in 1995, which was inspired by bird predation behavior [31]. Suppose a group of birds are looking for food in the forest, there is only one piece of food and no bird knows the specific location of the food. The problem is how to find the best way to find food. Based on the consideration of the behavior of birds' predation, PSO algorithm was generated. The optimization question is seen as a flock of birds. The main body of the basic motion in the algorithm is called "particles" (with speed and position). Particles are like predatory birds. Birds adjust their flight direction and speed by distance from food. The corresponding particle searches for the optimal solution of the model by velocity and position. The optimal solution of the model is the "food" of the birds. In the actual optimization question, each particle is a possible solution to the question. The function reflects the quality of the solution. Usually, the fitness function is determined by the objective function of the question. The specific principle is shown in Figure 2: particle is a possible solution to the question. The function reflects the quality of the solution. Usually, the fitness function is determined by the objective function of the question. The specific principle is shown in Figure 2: Particles rely on their own experience and the experience of the entire particle swarm to adjust flight behavior, so they are getting closer and closer to the goal. This process is a process of continuously updating and iterating based on individual best values and global best values. The mathematical model can be expressed as follows: in the M-dimensional search space, there are n particles in the particle group. The kth particle can be represented by   , kk xv The position and velocity of the particle are reflected by the abscissa and the ordinate, namely where  is the inertia factor. The increase of  can enhance the global search ability of the particle swarm algorithm and the reduction of  can enhance the local search ability.  define the maximum range of the individual optimal position and global optimal position. If the learning factor is too small, the particles are difficult to get close to the optimal target very quickly; if the learning factor is too large, the particles will fly out and exceed the optimal target.
In addition, the algorithm also involves the size of the population n, which is artificially determined according to the question. As n increases, the stability of the algorithm can be improved to a certain extent until it cannot be increased.

PSO Algorithm Design
The specific PSO algorithm is designed based on the characteristics of urban water resources optimization allocation model. Where the water quantity allocated by water source i to the j-type department is ij q . Suppose i Ni   and j Sj   , then each particle in the PSO algorithm can be coded into a matrix of S rows and N columns. The particle coding is as follows: Particles rely on their own experience and the experience of the entire particle swarm to adjust flight behavior, so they are getting closer and closer to the goal. This process is a process of continuously updating and iterating based on individual best values and global best values. The mathematical model can be expressed as follows: in the M-dimensional search space, there are n particles in the particle group. The kth particle can be represented by (x k , v k ) The position and velocity of the particle are reflected by the abscissa and the ordinate, namely x k = (x k1 , x k2 , · · ·, x km ) T and v k = (v k1 , v k2 , · · ·, v km ) T . The fitness function in the PSO algorithm is denoted as F(x). The best position in the flight of the ith particle is evaluated according to the function, which is expressed as p g = p g1 , p g2 , · · ·, p gm T . The best of global optimal position of the particle swarm is expressed as p k = (p k1 , p k2 , · · ·, p km ) T . The particle updates its position and velocity based on these two extreme values, as shown in Equation (12): where ω is the inertia factor. The increase of ω can enhance the global search ability of the particle swarm algorithm and the reduction of ω can enhance the local search ability. r 1 and r 2 ([0, 1]) are random numbers to ensure the randomness of the search. c 1 and c 2 are learning factors used to define the maximum range of the individual optimal position and global optimal position. If the learning factor is too small, the particles are difficult to get close to the optimal target very quickly; if the learning factor is too large, the particles will fly out and exceed the optimal target. In addition, the algorithm also involves the size of the population n, which is artificially determined according to the question. As n increases, the stability of the algorithm can be improved to a certain extent until it cannot be increased.

PSO Algorithm Design
The specific PSO algorithm is designed based on the characteristics of urban water resources optimization allocation model. Where the water quantity allocated by water source i to the j-type department is q ij . Suppose N = i i and S = j j, then each particle in the PSO algorithm can be coded into a matrix of S rows and N columns. The particle coding is as follows: q 11 q 12 · · · q 1N q 21 q 22 · · · q 2N · · · · · · · · · · · · q S1 q S2 · · · q SN where S is the total number of water sources and N is the amount of the water sectors. The use of two-dimensional arrays directly reflects the distribution of different water sources in various water sectors. From the horizontal point of view, the addition of the same row is the actual total distribution of a certain water source. While in the vertical direction, the addition of the same column is the actual total water distribution of a certain department.
The PSO algorithm for the urban water resources optimization allocation model has the following steps: Step 1: Let the fitness function of the algorithm be equal to the total objective function, namely, Step 2: Initialize the model parameters. According to the optimization, the inertia factor ω, the population size n, the learning factors c 1 and c 2 and the maximum allowable iteration number T are respectively set. A group of particles are randomly generated.p i of each initial particle is set to the current value.
Step 3: Calculate the fitness of each particle separately.
Step 4: The fitness calculated in Step 3 is compared with the individual optimal position p i . If it is better, then the value is used to replace p i . Otherwise, it is not changed.
Step 5: The individual optimal position p i is compared with the global optimal position p g . If it is better, p g is replaced. Then it is updated according to Equation (12).
Step 6: If it is less than T, continue with Step 3, otherwise exit.

Results and Analysis
This paper takes the optimal allocation of water resources in Kunming, Yunnan Province in China as an example. The city is under different water supply guaranteed rates in different dry years. The purpose is to illustrate the application of PSO algorithm in urban water quantity optimization allocation.

Calculation of Model Parameters
According to the nature of water use, Kunming divides urban water into four categories: residential water, administrative water (such as landscaping, sanitation and environmental protection), industrial and commercial water (such as industrial and mining enterprises, agricultural water) and special water (such as sauna and the car wash industry). According to the data and estimates of the Kunming Water Supply Group, the water cost for residential water, administrative water, and industrial and commercial water is 3.45 yuan/m 3 , 4.85 yuan/m 3 and 5.6 yuan/m 3 , respectively. The water cost includes water price and sewage treatment fee. Since the water fee is mainly controlled by the price of the water supply company, it is often difficult to predict. So it is assumed that the water cost will remain unchanged in 2020 and 2030. According to the statistics and literature of Kunming and the literature [32], combined with Equations (9) and (10), the benefit coefficient of production water in Kunming in 2020 is 84.00 yuan/m 3 and the coefficient of ecological and domestic water is 140.54 yuan/m 3 . In 2030, the production water benefit is 156.84 yuan/m 3 and the ecological and domestic water use benefit coefficient is 262.40 yuan/m 3 . According to the actual needs, Kunming's constraint on production water ρ is 0.75, which not only ensures the demand for production water, but also plays a certain role in restricting production water. The allocation principles for priority use of water in Kunming are firstly domestic water, secondly ecological water and thirdly production water. It is assumed that the water supply order of different water sources to the same type of water users is equal. Calculated by Equation (11), the coefficients of water supply order are 0.5, 0.33 and 0.17, respectively. The weight coefficients of respective targets are 0.45, 0.3 and 0.25, respectively.
In 2013, the Yunnan government issued the total water consumption indicators for Kunming in the year 2020 and 2030, namely 3.388 billion m 3 and 3.708 billion m 3 . Specifically, in 2020, Yangtze River, Pearl River and Honghe Rivers are limited respectively to 2.809, 0.565 and 0.014 billion m 3 . While in 2030, the three major river basins are controlled within 3.118, 0.572 and 0.018 billion m 3 , respectively. Based on the actual water consumption statistics of various water sectors in Kunming and combined with relevant planning results and statistical yearbooks [32][33][34], the water demand of the city's life, ecological and production sectors in the year 2020 and 2030 will be obtained in Table 1, and the different proportions of water demand are obtained in Figure 3. principles for priority use of water in Kunming are firstly domestic water, secondly ecological water and thirdly production water. It is assumed that the water supply order of different water sources to the same type of water users is equal. Calculated by Equation (11), the coefficients of water supply order are 0.5, 0.33 and 0.17, respectively. The weight coefficients of respective targets are 0.45, 0.3 and 0.25, respectively. In 2013, the Yunnan government issued the total water consumption indicators for Kunming in the year 2020 and 2030, namely 3.388 billion m 3 and 3.708 billion m 3 . Specifically, in 2020, Yangtze River, Pearl River and Honghe Rivers are limited respectively to 2.809, 0.565 and 0.014 billion m 3 . While in 2030, the three major river basins are controlled within 3.118, 0.572 and 0.018 billion m 3 , respectively. Based on the actual water consumption statistics of various water sectors in Kunming and combined with relevant planning results and statistical yearbooks [32][33][34], the water demand of the city's life, ecological and production sectors in the year 2020 and 2030 will be obtained in Table 1, and the different proportions of water demand are obtained in Figure 3.  According to the results of the runoff statistics of the statistical yearbook of Kunming in the past years, this paper selects the partially dry year (inflow guarantee rate p=0.825) and the extraordinarily dry year (inflow guarantee rate p=0.885). Under these circumstances, water in Kunming are in short supply. According to the statistical yearbook of Kunming and other materials, the water distribution of different watersheds under different water supply guarantee rates in the year 2020 and 2030 is calculated, as shown in Table 2 and Figure 4.  According to the results of the runoff statistics of the statistical yearbook of Kunming in the past years, this paper selects the partially dry year (inflow guarantee rate p=0.825) and the extraordinarily dry year (inflow guarantee rate p=0.885). Under these circumstances, water in Kunming are in short supply. According to the statistical yearbook of Kunming and other materials, the water distribution of different watersheds under different water supply guarantee rates in the year 2020 and 2030 is calculated, as shown in Table 2 and Figure 4. Source: Kunming statistical yearbook and estimation.

Solution of Water Resources Optimization Allocation Model
The PSO algorithm is used to obtain the water distribution plans in Kunming in the partially dry year (inflow guarantee rate p=0.825) and extraordinarily dry year (inflow guarantee rate p = 0.885) of year 2020 and 2030. The results are shown in Table 3 and Figure 5, Table 4 and Figure 6:      It can be seen from Tables 3 and 4 that urban water supply prioritizes the need for domestic and ecological water use, and water shortage is only reflected in production water. Regardless of the partially dry year (p=0.825) or the extraordinarily dry year (p = 0.885), the water shortage rate of production water is maintained at around 25%. Under the same guaranteed rate of water supply, the water shortage rate of the allocation plan in 2030 is about 20.5%, which is about 0.9% lower than the water shortage rate in 2020. It indicates that the water shortage rate has a decreasing trend, so the optimal allocation plan can alleviate the future water shortage in Kunming to a certain extent.
In addition, the PSO algorithm is used to solve the optimal allocation model under different water guaranteed supply rates in Kunming in the year 2020 and 2030. The optimal allocation results given in this study are only a set of possible optimal allocation plans. This study does not set the distribution ratio of the Yangtze River, Pearl River and Red River Basin, but it can obtain the optimal allocation plan that meets the distribution ratio of certain watersheds according to actual needs. At the same time, the water guaranteed supply rate and other related parameter values can be adjusted to get the corresponding water resource allocation plan, which shows that the PSO algorithm is operability and practicality.
In view of the lack of water for production in Kunming, the local government should focus on building water source projects to fully exploit the water supply potential of the project. In the agricultural sector, water is supposed to be saved. Canal reconstructions are urgent to be carried out; rainwater resources should be effectively used; crop planting structures are adjusted as a result of improving agriculture and so on. In the industry, water-saving technology and water-saving equipment should be actively promoted; leakage of water supply pipe network production is supposed to reduce water consumption; wastewater treatment rate and reuse rate of water should be improved as a result of improving the efficiency of industrial production water. It can be seen from Tables 3 and 4 that urban water supply prioritizes the need for domestic and ecological water use, and water shortage is only reflected in production water. Regardless of the partially dry year (p=0.825) or the extraordinarily dry year (p = 0.885), the water shortage rate of production water is maintained at around 25%. Under the same guaranteed rate of water supply, the water shortage rate of the allocation plan in 2030 is about 20.5%, which is about 0.9% lower than the water shortage rate in 2020. It indicates that the water shortage rate has a decreasing trend, so the optimal allocation plan can alleviate the future water shortage in Kunming to a certain extent.
In addition, the PSO algorithm is used to solve the optimal allocation model under different water guaranteed supply rates in Kunming in the year 2020 and 2030. The optimal allocation results given in this study are only a set of possible optimal allocation plans. This study does not set the distribution ratio of the Yangtze River, Pearl River and Red River Basin, but it can obtain the optimal allocation plan that meets the distribution ratio of certain watersheds according to actual needs. At the same time, the water guaranteed supply rate and other related parameter values can be adjusted to get the corresponding water resource allocation plan, which shows that the PSO algorithm is operability and practicality.
In view of the lack of water for production in Kunming, the local government should focus on building water source projects to fully exploit the water supply potential of the project. In the agricultural sector, water is supposed to be saved. Canal reconstructions are urgent to be carried out; rainwater resources should be effectively used; crop planting structures are adjusted as a result of improving agriculture and so on. In the industry, water-saving technology and water-saving equipment should be actively promoted; leakage of water supply pipe network production is supposed to reduce water consumption; wastewater treatment rate and reuse rate of water should be improved as a result of improving the efficiency of industrial production water.

Conclusions
With the deepening of China's social and economic development and urbanization, the competition of water consumption for the different sectors became more evident. Especially in arid regions where water supply is limited, water resource allocation conflicts have hindered the sustainable development of urban water resources. The question of how to alleviate the conflict of water resource allocation in cities by optimizing water resource allocation is a problem that must be paid attention to. Since urban water resource allocation is a multi-subject and multi-objective decision-making problem, it involves the water demand of the urban life, ecology and production sectors and the benefits of the urban economy, society and ecology. In this paper, the city's maximum benefits of economic, social, ecological and others are the targets, and the local hydrological conditions and the water demand of various sectors are used as constraints, and the urban water resources optimal allocation model is constructed. The PSO algorithm has no need to adjust parameters in multi-objective nonlinear programming and it has features of fast convergence and simple operation, so the PSO algorithm is adopted to solve urban water optimization allocation model. Finally, the model was applied to the optimal allocation of water resources in Kunming, a typical area of drought. In partially dry years (inflow guarantee rate p = 0.825) and extraordinarily dry years (Inflow guarantee rate p = 0.885) of Year 2020 and 2030 are studied. The detailed scheme of water resources allocation in the life, production and ecological sectors can provide decision-making basis for Kunming's specific water resources planning work in the future.
Since urban water supply prioritizes the need for life and ecological water use, the water shortage in Kunming's water resources allocation plan is only reflected in production water. The results showed that, in the years of 2020 and 2030, the water production rate of the water distribution plan is controlled at 25% both in the partially dry year (inflow guarantee rate p = 0.825) and the extraordinarily dry year (inflow guarantee rate p = 0.885). These plans can not only ensure the demand for production water, but also play a certain role in the regulation of production water. Under the same inflow guarantee rate, the water shortage rate of the water distribution plan in 2030 is about 20.5%. Compared with the water resources allocation plan in 2020, the water shortage rate has decreased by about 0.9%. It indicates that the water resources allocation plans can alleviate the future water shortage in Kunming. In addition to designing scientific water resources allocation plans, Kunming should actively build water source projects, encourage the city to save water and improve the efficiency of industrial and agricultural production.