Joint optimization of water allocation and water quality based on multi-objective control in Nanning, China


 Studying the change mechanism of water quantity and quality is the basis for joint optimization of water resources system, which is a significant means for modern regional water resources management. A water quantity and quality joint optimization model is built based on multiple control objectives, which includes water demand, observed flow rate, and observed pollutant concentration. Coupled water quantity and water quality model was developed for Nanning, China. The natural water cycle and social water cycle in Nanning City and the associated pollutant transport transformation process are simulated. The results indicate that simulation error of water resources allocation is below 5%, the Nash-Sutcliffe efficiency coefficients of the three hydrological stations are 0.85, 0.88, and 0.85 respectively, and the relative errors of the simulated results of three water quality monitoring stations are all within 1.83%, all of which indicates that the model performs well and the simulation results can reproduce the water use process and pollutant transport transformation process of Nanning in time and space. This study can provide effective support for water resources management in Nanning City.


INTRODUCTION
Water is the foundation that supports the entire life on earth (Zhang et al. 2018). However, there are many areas in the world where water resources are becoming increasingly scarce (Esmaeili & Shahsavari 2015). There are two main reasons for the shortage of water resources. One is the increase in water consumption with the development of social economy (Bao & Fang 2012;Wang & Li 2019), the other is that the deterioration of water quality reduces the available water resources (Wang et al. 2016;Hu et al. 2018). Water shortage have severely restricted the further development of social economy, and integrated water resources management is an effective means to deal with this problem (Li et al. 2017a(Li et al. , 2017b. Desalination is also used to address the water shortages, but it is costly (Panagopoulos et al. 2019;Panagopoulos & Haralambous 2020;Panagopoulos 2021). Optimal allocation of water resources is the basis of regional water resources management, and the use of it to alleviate water shortages has attracted widespread attention (Yan et al. 2018;He et al. 2019). Since the optimal allocation of water resources needs to consider both water quantity and quality, it is necessary to understand the processes of water cycle and associated pollutant transport transformation before implementation (Ling et al. 2013).
Many researchers around the world have conducted researches on the optimal allocation of water resources. At first, more attention was paid to water volume and water quantity. Lizhen Wang et al. proposed an optimal allocation model of water resources in combination with water rights trading and other policies to study the rational allocation of water resources in water-deficient areas . Liang Yuan et al. established a new water resource model based on game theory and applied it to the dry season water allocation problem among countries in the Mekong River basin (Yuan et al. 2019). Jing Tian et al. proposed a fair water allocation method to resolve conflicts between different goals and regions (Tian et al. 2019). Over the years, water quality issues have been one of the major challenges that humanity is facing, and the joint optimization of water quality and quantity is becoming a research focus. Wanshun Zhang et al. proposed a water quantity and water quality coupling model, and simulated the hydrodynamics and water quality process of the river (Zhang et al. 2010). Javier Paredes-Arquiola et al. applied a water quantity and water quality coupling model at the basin scale, and analyzed the water quantity and quality of the basin water resources system (Paredes-Arquiola et al. 2010). Dedi Liu et al. proposed an optimal allocation model of water resources in the estuary area and an optimal allocation model of water volume and pollution load (Liu et al. 2010(Liu et al. , 2014. Mohammad Reza Nikoo et al. proposed a new optimization model in view of the uncertainties in the inflow, discharge and water demand of the reservoir (Nikoo et al. 2014). Ali Tavakoli et al. proposed a new method to optimize the distribution of river water resources and wastewater load under uncertain conditions (Tavakoli et al. 2015). Chong Meng et al. established a two-stage stochastic programming model to study the allocation of water resources and total pollutant discharge control among various water-using departments (Meng et al. 2018).
Although researchers around the world have carried out a lot of research work on water quantity and quality, most of them consider the distribution of pollution load discharge based on the allocation of water quantity, and analyze the impact on the ecological environment through the reduction of pollution discharge. There are few studies on joint optimization of water quantity and water quality on time and space scales. This paper establishes a multi-objective water resources optimal allocation model to simulate the change process of water quantity and water quality to realize the space-time joint regulation of regional water quantity and quality. The natural water cycle and social water cycle processes are simulated in this study, and a joint optimization model is established with water quantity and quality control as control objectives. This paper constructs a comprehensive water resource allocation model for Nanning, China, and simulates the process of water volumes allocation, pollutant discharge, river flow and water quality from 1980 to 2017. The model performs well, and the simulation results can reproduce the water use process and pollutant transport transformation process of Nanning temporally and spatially.

STUDY AREA
Nanning, located in southwest China, is the capital of the Guangxi Zhuang Autonomous Region (Figure 1). Nanning is rich in water resources, but it is still facing a huge challenge from future social and economic development. On the one hand, the two main rivers in Nanning, Yujiang and Hongshui River, are both input rivers, which leads to a greater dependence on the border water resources. On the other hand, with the development of social economy, urban sewage will affect the water ecological environment. Therefore, it is necessary to carry out a joint Water Supply Vol 00 No 0, 2 simulation of water quantity and water quality for the water resources system of Nanning, so as to lay the foundation for the joint regulation and control of water quantity and water quality of the regional water resources system in the future.
Nanning City governs 7 urban areas, Xingning, Jiangnan, Qingxiu, Xixiangtang, Yongning, Liangqing, and Wuming, and 5 counties, Hengxian, Binyang, Shanglin, Mashan, and Long'an. In 2017, the city's permanent population was 4.33 million, and the urbanization rate was 77.47%, the regional GDP reached 341.07 billion yuan and the per capita GDP was 79,292 yuan (Xi 2018). The Yujiang River is the largest river in Nanning, traversing Nanning from west to east. Its main tributaries include Youjiang, Zuojiang, Wuming River, Liangfeng River, and Bachi River. The main tributary of the Hongshui River is the Qingshui River. The annual average rainfall in Nanning is 1,390 mm, and the average annual water resources quantity is 14 billion m 3 . In 2017, the per capita water resource was 3,230 m 3 .

METHODS AND DATA
Mathematical models were used to simulate the processes of runoff, social water cycle, and pollutant migration and transformation in the study area. For model purpose, the study area may be partitioned into a number of computing units. In this study, the determination of the calculation unit is based on the river basin boundary, ensuring that each calculation unit has a unique outlet.

Conceptual model
As shown in Figure 2, the calculation unit is composed of a river and several water storage projects. For water storage projects whose rainwater collection area is completely contained in a certain calculation unit, all water storage projects will be regarded as a comprehensive water storage project. The storage capacity of this comprehensive water storage project is the sum of the storage capacity of all water storage projects, and the rain collection area is the sum of the rain collection area of all water storage projects. If there is a cascade water storage project in the calculation unit, due to the overlap of the rain collection area, the rain collection area of the comprehensive water storage project is equal to the rain collection area of the last level water storage project.
For water storage projects with rain collection areas across different calculation units (Figure 2(a)), such water storage projects are calculated separately. If it is a cascade water storage project with a rain collection area across different calculation units (Figure 2(b)), the cascade water storage project is generalized into a comprehensive water storage project, and its rain collection area is the rain collection of the last water storage project (Storage Project 2), its profitable storage capacity is the sum of the profitable storage capacity of cascade storage projects.

Water balance model
The water cycle process of the calculation unit includes the processes of incoming water, water supply, water use, water consumption, and water drainage. Incoming water consists of internal source water and external source water. External source water includes the backwater of the upstream computing unit, the water supplied by other computing units to this unit, and the water supplied by the regional water transfer project. The internal source water is the self-produced water of the computing unit. Water consumption refers to water consumption for life, production, and ecology outside the river. Water balance process of the calculation unit is shown in Figure 3.
For a single calculation unit, the water balance equation can be described as: where, W ex and W en are external source water and internal source water respectively (10 4 m 3 ), W loss is the water loss in the calculation unit (10 4 m 3 ), DW is the change in water storage per unit time in the calculation unit (10 4 m 3 ), W uout is the water returned from the upstream calculation unit (10 4 m 3 ), W ou is the water supply of current unit from other units (10 4 m 3 ), W t is the water supplied to this unit by the water transfer project outside the area (10 4 m 3 ), E is the water evaporation in the calculation unit (10 4 m 3 ), W con is the water consumption (10 4 m 3 ), it represents the amount of water consumed by production, living and ecology, which is equal to the amount of water supplied minus the amount returned without consumption, W su is the amount of water supply in the calculation unit (10 4 m 3 ), W re is the return water (10 4 m 3 ), W en is calculated and output by the hydrological model.

Hydrological model
Hydrological model is an effective tool for simulating the process of runoff generation and hydrological cycle. There are generally four types of hydrological models: stochastic models, lumped models, distributed models, and semi-distributed models (Todini 1988). For example, SWAT, Topmodel, BTopMc, SHE, and SCS are all widely used hydrological models. In this study, the Xinanjiang three-source model is used to calculate the internal source water (Xu et al. 2009). The inflow of the calculation unit includes the external water and the local water calculated by the Xinanjiang model. Uncorrected Proof

Water quality model
In this study, one-dimensional water quality model was used to simulate the migration and transformation process of pollutants. As mentioned above, there is only one river in each calculation unit. This study assumes that the pollutant concentration in the river water body within the same calculation unit at any time is consistent, that is, it is considered that the pollutant diffuses rapidly after entering the water body, and the concentration of pollutants only changes over time.
The one-dimensional water quality model can be described as follows: where, C x is the concentration of pollutants in the downstream of the river (mg/L), C 0 is the concentration of pollutants upstream of the river (mg/L), K is the comprehensive attenuation coefficient of pollutants (s À1 ), x is the longitudinal distance between the upstream and downstream sections of the river (m), u is the average flow velocity of the river (m/s).
where, t is the flow time of the water flow in the calculation unit (s).
In this study, assuming that the pollutant concentration in the river within the calculation unit remains constant at any time, and the pollutants in the calculation unit are discharged evenly along the river, the formula for the pollutant concentration in the calculation unit at the end of a certain period is as follows: where, C t is the concentration of pollutants at a certain moment (mg/L), m is the rate of pollutants entering the river (g/s), Q is the average flow of the river (m 3 /s).

Water allocation and regulation model
The allocation and regulation of water resources includes the calculation of water availability, the calculation of water supply allocation, and the calculation of the water storage project operation. The formula for calculating the available water supply is as follows: where, W i av is the available water supply of the water storage project in the i-th period (10 4 m 3 ), W i in is the water inflow of the water storage project in the i-th period (10 4 m 3 ), W iÀ1 st is the storage capacity of the water storage project in the i-1 period (10 4 m 3 ), W d is the dead storage of the water storage project, W i rl is the water loss of the reservoir in the i-th period (10 4 m 3 ), W i eco is the ecological water demand in the i-th period of the river (10 4 m 3 ).
The calculation formula of the actual water supply is as follows: where, W i psu is the actual water supply in the i-th period (10 4 m 3 ), W i nd is the user's water demand in the i-th period (10 4 m 3 ).
The calculation formula of the water storage project operation is as follows: where, Q i and q i are the inflow and outflow of the water storage project in the i-th period (m 3 /s), W iÀ1 st and W i st are storage capacity of the water storage project at the beginning and end of the period respectively (10 4 m 3 ), Q eco is the ecological base flow of the downstream channel (m 3 /s), W xl is the utilizable storage (10 4 m 3 ), DT is the length of the calculation period (s).

Data
The data required for this study includes: the parameters of the water storage project in the calculation unit, the direction of water flow between the calculation units, the spatial locations of hydrological monitoring stations, rainfall stations, and water quality monitoring stations, and monitoring data of hydrological stations, rainfall stations, water quality stations, and water demand data.
The daily flow data of five hydrological stations, Xiayan, Fusui, Nanning, Zouwei, andGuigang (1980-2017), among which Nanning, Guigang, and Zouwei stations were used for the calibration of the Xinanjiang model. Daily precipitation data at the Nanning rainfall station from 1980 to 2017, which were used to calculate the internal runoff of each unit through the Xinanjiang model. Monthly measured water quality data of five water quality stations: Leigancun, Zhixin, Jinling, Lingli, andPingfukou (2015-2017). Among them, Jinling, Lingli, and Pingfukou are used for the calibration of one-dimensional water quality models. The target pollutants for simulation are COD and ammonia nitrogen. Daily water demand data from 1980 to 2017. The water storage project parameters and water supply capacity data in the study area.
In this study, water use mainly include domestic water, industrial water, and agricultural water. The water consumption rates are 40, 30, and 45% respectively, and the sewage inflow rate is 80, 80, and 60%, respectively. The attenuation coefficient values of COD and ammonia nitrogen pollutants are 0.19 d À1 and 0.12 d À1 , respectively.

Determination of the calculation units
The determination of the calculation unit takes into account the boundaries of the administrative region and the river basin to ensure that each calculation unit has a unique outlet. As shown in Figure 1, the water resources system of Nanning is divided into 10 calculation units, and the information of each calculation unit is shown in Table 1.

Simulation of water allocation
In this study, the water allocation of each calculation unit is represented by the water shortage rate. The water shortage rate of each calculation unit from 1980 to 2017 is shown in Figure 4. The error (water shortage rate) is within 5%, and the simulation results are basically in line with the actual situation. UNIT001, UNIT002, UNIT004, UNIT007 have external water inflow, even in years with less rainfall (1983,1988,1991,1996,2000,2005,2009), there will be no water shortage. However, UNIT003, UNIT005, UNIT006, UNIT009, and UNIT010, which have no inflow of external water, have water shortage in dry years.

Simulation of flow rate
Figures 5-7 shows the simulation results of the basin outlet flow of the calculation units UNIT002, UNIT004, and UNIT010. The Nash-Sutcliffe efficiency coefficients are 0.85, 0.88, and 0.85, respectively. The external source water and internal source water of the calculation units are operated by the water storage project, and the water demand of the social economy and ecological environment is considered. The simulation results fit the unit outlet flow process well. It can be seen that the model successfully simulates the coupling process of the natural water cycle and the social water cycle.

Simulation of water quality
In this study, the pollutant entering the river, the pollutant concentration and the water quality change process of the basin outlet of each calculation unit in the study area were calculated. The simulation results of UNIT001,   Uncorrected Proof UNIT002, and UNIT004 are selected for display. The measured data is the monthly monitoring data from 2015 to 2017, and the calculation unit UNIT001 only has 2017 data. Figures 8-10 show the COD and ammonia nitrogen simulation results of UNIT001, UNIT002, and UNIT004, respectively. The relative errors of COD simulation are 1.83%, 0.50%, 0.07%, and the simulation errors of ammonia nitrogen are 1.80%, 0.24%, 1.56%, respectively. It can be seen that the simulation accuracy is high.

Uncorrected Proof
The average concentrations of COD and ammonia nitrogen at the outlets of each calculation unit from 2015 to 2017 are shown in Table 2. It can be seen that the maximum concentration of COD is 263.2 mg/L in UNIT003, UNIT005, UNIT008 and UNIT010, and the minimum is 188.4 mg/L in UNIT004 and UNIT006. The maximum concentration of ammonia nitrogen is 12.1 mg/L in UNIT002 and the minimum is 4.6 mg/L in UNIT004 and UNIT006.
Through a long series of simulations on the water resources system of Nanning City, it is possible to accurately simulate the temporal and spatial changes in the demand for water resources for social and economic   Uncorrected Proof development and the temporal and spatial changes in the water volume and quality of the river. The simulation results can be used to analyze the evolutionary relationship between social economic development and water resources, which can provide support for water resources management decisions in the economic and social development of Nanning.

CONCLUSIONS AND DISCUSSION
With the development of social economy, water resources management has gradually developed from the allocation of water quantity to the joint allocation of water quality and quality. In this study, a water quantity and quality joint model based on multiple control objectives was constructed. The objectives include water demand, basin outlet flow, and pollutant concentration. The joint model includes water balance model, hydrological model, water quality model, and water resource allocation model. The model simulates the water balance in the study area and the associated pollutant migration and transformation process, and the regional natural water cycle process and the social water cycle process. Taking Nanning City as an application example, the study area is divided into 10 calculation units, and the natural water cycle and social water cycle of the water resources system in Nanning City from 1980 to 2017 are simulated. The simulation results show that simulation error of water resources allocation is below 5%, the Nash-Sutcliffe efficiency coefficients of the three hydrological stations are all above 0.8, and the relative errors of the simulated results of three water quality monitoring stations are all within 2%, all of which indicates that the model performs well.The results can reproduce the water use process in Nanning City and the regional water quantity and quality status. The simulation results can more accurately reflect the water supply process, river water volume change process, and pollutant change process of the counties in Nanning from 1980 to 2017. It can not only reflect the time change process of various water resources elements, but also reflect the spatial change process, as well as the relationship between social and economic development and water resources. It can provide effective technical support for water resources management in Nanning. Up to now, domestic and foreign researchers have done less research on joint regulation of water quantity and water quality on time and space scales. This study makes up for the shortcomings in this area.

DATA AVAILABILITY STATEMENT
All relevant data are available from an online repository or repositories.