Water Resources Allocation Based on Complex Adaptive System Theory in the Inland River Irrigation District

: Water resources are the key factors affecting the sustainable development of inland river irrigation districts. The establishment of a water resources management model is helpful to realize the coordinated development of water, society, and ecology. Aiming at the contradiction of water use and ecological vulnerability, this study was based on the method of complex adaptive system (CAS) theory, and an agent-based modeling (ABM) method was adopted. Taking Huaitoutala irrigation district as the research object, a water resource management model considering ecological balance was established, with the water resources potentially tapping in the source area as an effective constraint. This study took 2016 as the datum year; the water consumption and comprehensive beneﬁts of four water-saving irrigation scenarios in different characteristic years were simulated and optimized under the conditions of the current water supply and 10% and 15% potential water resources tapping. The results showed that the model considering the behavior and adaptability of the agent can well optimize and simulate the water use in the irrigation district. Under the application of water resources potential tapping and high-efﬁciency water-saving technology; the water utilization efﬁciency (WUE) of the irrigation area has been signiﬁcantly improved. The comprehensive beneﬁts of the irrigation district increased the proportion of ecological water, which was conducive to the sustainable development of the irrigation district and the ecological protection of inland rivers.


Introduction
In recent years, with the increase in economic development and population, the contradiction between the supply and demand of water resources in inland river source irrigation districts has become increasingly prominent [1], and the sustainable development of regional agricultural production and economic society has been seriously impeded [2]. Water resources management is the main instrument to improve water use efficiency and alleviate the pressure on water resources [3]. Because of the complexity and uncertainty of watershed systems, effective sustainable water resources management often needs to be based on adaptive management [4]. Adaptability refers to the ability of the agent to adapt to the environment. The concept of adaptive management was originally used in ecosystem theory and practice to address uncertainties in natural resources under dynamic conditions [5]. Adaptive water resource management considers the complexities and uncertainties of the water resource system and continuously optimizes its management objectives through the dynamic learning feedback process of each agent within the system [6,7]. Complex adaptive systems (CAS) theory combines macro-level systems and micro-level agents to describe the adaptability of the complex system. It describes the interaction between agents and the interaction between agents and the environment, making the whole system in the process of continuous evolution [5]. CAS emphasizes the adaptability and co-evolution of agents within the system, provides a theoretical basis for the adaptive theory of environ-mental resource allocation and management, and gradually applies the management of natural resources, especially the adaptive management of water resources [8].
Paying attention to the research on water resource allocation from the angle of complexity science, it is necessary to combine CAS theory with the basic characteristics of water resource systems [9]. Zhao et al. applied CAS theory to build a new water resources allocation system analysis model, and the dynamic connection of all agents in the system was established, which integrated hydrological simulation with economic optimization and was applied in water resource allocation of the Yellow River Basin in China. The study preliminarily proved the applicability of the model in the water resource allocation of river basins [10]. The theory is based on self-organization theory and synergetics, and it divides the system into individual adaptive agents. The agents have learning ability and adaptability and can continuously learn to accumulate experience and improve themselves according to the influence of the external environment [11]. This long-term dynamic evolution mechanism forms the evolution and adaptability of the system. The cooperation between agents enhances the stability of the water resource system and the adaptability of the agent accelerates the evolution of the system [11,12]. Vervoort et al. used adaptive action to provide decision-makers with food security decisions in response to different climate conditions [13], providing a new approach for the adaptive management of water resources. Meek and Marshall defined the elasticity range of water resources management in Southern California from the theory of CAS, proving the importance of stakeholders' participation and action in the water governance system for elasticity recovery [9]. CAS theory can be used not only to evaluate water policies and design water management strategies but also to simulate the competitive process of water resources [14,15]. Liu et al. proposed a general framework for the analysis of agent water conservation behavior response model under external stimulation. The study took Beijing as an example to construct water conservation regulation scenarios and corresponding agent water conservation behavior rules, systematically simulated the process of individual water use change from the aspects of water price setting, water information, and water-saving education [16]. Such studies typically simulate the behavior of different water users/stakeholders and their responses to different management scenarios. The cooperation between the agents is realized by providing incentives, penalties, and new laws, which can provide a reference for regional sustainable water resources management strategy. The water resources system is a complex adaptive system, and it is also a coupling human and natural systems [17]. Utilizing water rights trading, raising water-saving awareness, and water-saving reconstruction engineering, human beings improve their water use efficiency while pursuing the maximum benefits. These behaviors change the natural changes of river runoff and the groundwater level so that human beings affect the water resource system as an internal factor [18,19]. The agent-based model (ABM) is widely considered as an important tool to study the human-nature coupling system, which can be used to model the complex adaptive system [20]. The agent-based water resources management model fully considers the heterogeneity of the internal composition of the water resources system and is widely used in the optimal allocation of water resources in the basin, the management of urban residents' water use, and the water resources management in the irrigation district [11,14,17,[21][22][23][24]. The operational mechanism of the ABM includes the agent-level distributed decision-making process and the coordination mechanism of the system-level organizational decision-making process [11]. ABM technology provides a clear concept and regulations for the construction of distributed systems to support stakeholder-driven, bottom-up management [24]. Yang et al. described the agent-level distributed decision-making process and the coordination mechanism of the system-level organization decision-making process and also proposed a multi-agent-based distributed optimization algorithm for watershed management. The local interest factor was used to measure the importance of the agent goals compared with the constraints [25]. Zhao et al. proposed a decentralized algorithm of water resources system based on ABM, studied the allocation of water resources through indicators under the market system such as economic benefits, water rights, and water prices, found the optimal water rights allocation scheme for the water market through reasonable initial water rights, and revealed the overall water consumption and trading behavior of water users in the basin under the condition of water trading [10].
After the large scale complex problem is decomposed into several relatively simple local objective problems by using the distributed control theory and distributed to several agents in the network, the ABM should also be combined with the continuous watershed simulation model, to dynamically consider the effects of the actions taken by the agents on the quality and quantity of water resources and water demand, and establish rules that correspond to changing water demand and environmental issues [24,26,27]. Akhbari et al. studied to encourage cooperation by providing incentives, penalties, and new regulations, dynamically considered the impact of actions taken by the agent on water quality, quantity, and water demand, and established the framework of water resource conflict management model based on the ABM [11]. In irrigation districts, the research applies the ABM to simulate and analyze the grain yield, crop planting pattern, and water quality and to optimize water demand and restore underground aquifers. Nouri et al. established a crop model and a water management policy evaluation model based on the agent to restore the aquifer and simulated the behavior of agricultural agents through fuzzy inference system (FIS) [28]. Ghazali et al. proposed a hybrid framework based on TOPSIS-agent, which considered the influence of neighbors, training, punishment, incentives, and other factors; used TOPSIS to determine the dynamic balance coefficient; and proposed the best crop model for different regions under different climatic conditions [29]. Ng et al. established the ABM coupling model of water resources allocation and hydrological cycle to simulate and analyze the grain yield and water quality in the irrigation district [24].
In the irrigation district, previous studies about water resources management mainly focus on the economic benefits and groundwater problems, and less on the ecological relationship between the irrigation district and the surrounding environment [4,30,31]. Moreover, the traditional water resources allocation does not describe the dynamic changes of the water resources system enough and ignores the heterogeneity of irrigation water users and the water competition among them [32]. Such simulation results usually do not conform to the actual water use situation of irrigation districts [28]. According to the characteristics of water resources system in the irrigation district, based on the complex adaptive system, this study constructed the dynamic management model of water resources in irrigation district based on agent and applied it to Huaitoutala's irrigation, which provided the basis for the decision making of water resources management in the sustainable development of inland river irrigation district.
The paper is divided into five sections. Section 2 introduces the structure of the CAS of water resources in the irrigation district, describes the agent behavior, and forms the dynamic communication mechanism of water resources allocation by establishing the interaction mechanism between the agents. Section 3 introduces the nested genetic algorithm to solve the model. Section 4 carries out a case study on a typical inland river irrigation district in China and analyzes the agent water use behavior under different scenarios. Section 5 summarizes conclusions of the study.

CAS of Water Resources in Irrigation District
There are diverse agents in the system. The agent at the bottom level has formed a department-level agent through aggregation [5,12]. The agent with the same or similar behavior has formed a high-level agent through complementary advantages and resource sharing [18]. The new agent has stronger adaptability so that the original agent can enhance its ability to adapt to the changes of the external environment [22]. Secondly, because the agent has adaptive and learning mechanisms, there are many non-linear correlations within the system. For example, under the influence of different water use structures and modes, the relationship between the total amount of water resources and the total output is nonlinear [33]. The connection of nonlinear relations is based on flow. Flow is the link of the system, which mainly refers to substances, funds, and information exchange between the agents or an exchange of substances between the agents and the external environment [21]. Substances flow refers to the distribution and transportation of water quantity. Fund flow refers to the investment in agricultural water-saving transformation and water conservancy engineering projects. Information flow refers to the water supply and demand information of different agents [10].
The characteristics of CAS indicate that the system has dynamic conditions for continuous learning, and the mechanisms are the basis for continuous evolution [8]. The internal models are formed by the interaction of the internal mechanisms of the agents and mechanisms of different levels [11]. For example, according to the feedback of water supply and demand information and substances flow, the agricultural production agent should change the irrigation methods to improve the water utilization efficiency and optimize their own planting structure. Building blocks affect the complexity of the system [5,10]. For example, the resource allocation ratio between ecological agents and agricultural production agents affects whether the irrigation district is biased toward economic benefit or ecological benefit. Tagging is the basis for agents to identify water and land resources information [4]. By identifying the information and processing the internal model, the agents interact with simple building blocks in various ways and combinations and, finally, forms the co-evolution of CAS in the irrigation district.
The water resources system of the irrigation district can be divided into three levels. The top management agent is responsible for the overall coordination of the whole irrigation district to achieve sustainable development [34]. The management agent forms the initial water resources allocation scheme according to the social and economic development goals and ecological planning development goals [22]. The lower level of agricultural production departments, ecological departments, and water supply departments, to maximize their profits, reallocate resources within the departments under the policies and programs formulated by the management agent [12,22,35]. The bottom users are the basis of the whole irrigation district's water resources system. According to the experience of continuous learning and accumulation, they use the allocated resources for production and evaluate benefits after production, and the evaluation results are fed back to the department agents. The department agents adjust the water use behavior through behavior decision making, and the user agents execute a new round of production. Finally, the department agents feed the water use information back to the management agent, and the management agent generates a new water resources allocation scheme [24,28,29]. Therefore, different levels of water resource systems in the irrigation district cooperate to maximize the benefits of the irrigation district. The mutual feedback mechanism of CAS in the irrigation district is shown in Figure 1.

Agent Classification and Model Framework
In traditional water resources management, multi-stage stochastic programming, uncertain programming, and interval programming models are used to solve the impact of climate change on water resource management, irrigation water resource management, and other important issues in future water resource management research [31,36]. These traditional centralized models cannot be used to solve the optimization problem of multiagent systems. Firstly, this is because of the disaster dimension. Secondly, when all subsystems are running at the same time, it is difficult to obtain the optimal solution from the perspective of central control [7,26,30]. ABM can decompose a large-scale complex problem into several relatively simple local objective problems and assign them to multiple agents in the network. Each agent processes the local objective problem and interacts with its neighbor agents to find the global optimal solution [25].

Agent Classification and Model Framework
In traditional water resources management, multi-stage stochastic programming, uncertain programming, and interval programming models are used to solve the impact of climate change on water resource management, irrigation water resource management, and other important issues in future water resource management research [31,36]. These traditional centralized models cannot be used to solve the optimization problem of multiagent systems. Firstly, this is because of the disaster dimension. Secondly, when all subsystems are running at the same time, it is difficult to obtain the optimal solution from the perspective of central control [7,26,30]. ABM can decompose a large-scale complex problem into several relatively simple local objective problems and assign them to multiple agents in the network. Each agent processes the local objective problem and interacts with its neighbor agents to find the global optimal solution [25].
The adaptive agents are selected based on the comprehensive analysis of the hydrologic, economic, and ecological conditions in the irrigation district [11]. According to the hierarchical structure of the water resources system, the agent of water resources management is generalized into the management agent at the system level, the agricultural production agent, and the ecology agent at the department level. There are often lower-level user agents whose internal models are described by a fixed empirical formula or who are mathematical in practical application [10].
Through the analysis of the behavior goals of the selected adaptive agents, the functions of the agents are obtained, and the interaction mechanism between the agents is established. The dynamic feedback mechanism of the irrigation district water resources management model is established through the interaction between the agents [21]. The internal elements of the model include input data and output data, and the input data includes the parameter data which describe the characteristics of the agent and the variable data which are connected by the feedback relationship of other agents. The output data of the model is the performance of the adaptability of the agent [10,13]. As the input  The adaptive agents are selected based on the comprehensive analysis of the hydrologic, economic, and ecological conditions in the irrigation district [11]. According to the hierarchical structure of the water resources system, the agent of water resources management is generalized into the management agent at the system level, the agricultural production agent, and the ecology agent at the department level. There are often lowerlevel user agents whose internal models are described by a fixed empirical formula or who are mathematical in practical application [10].
Through the analysis of the behavior goals of the selected adaptive agents, the functions of the agents are obtained, and the interaction mechanism between the agents is established. The dynamic feedback mechanism of the irrigation district water resources management model is established through the interaction between the agents [21]. The internal elements of the model include input data and output data, and the input data includes the parameter data which describe the characteristics of the agent and the variable data which are connected by the feedback relationship of other agents. The output data of the model is the performance of the adaptability of the agent [10,13]. As the input of other agents, the dynamic communication mechanism of the whole irrigation district is established to ensure the adaptive learning process of each level of the agent. The model block diagram is shown in Figure 2. of other agents, the dynamic communication mechanism of the whole irrigation district is established to ensure the adaptive learning process of each level of the agent. The model block diagram is shown in Figure 2.

Water Resource Allocation System
The water resource allocation of the management agent is based on the water balance of the irrigation district [37]. Under the boundary conditions of water resources constraints, the water resource allocation mechanism of the management agent simulates the water resources circulation and allocation and realizes the allocation and scheduling of water resources in various departments [21], according to the following equation: where is the water quantity available in the irrigation district (m 3 ), is the surface water quantity (m 3 ), is the available groundwater resources quantity (m 3 ), , is water consumption of agricultural production agent and ecology agent (m 3 ).

Land Management
The irrigation management department needs to determine the annual crop planting area and allocate the ecological area according to the ecological planning objective. This constraint can be expressed as: where ( , ) is the area of the ecological user agent in the year (hm 2 ); ( , ) is the planting area of the agricultural user agent in the year (hm 2 ); is the total area of available land in the irrigation district (hm 2 ).

Management Agent Model 2.3.1. Water Resource Allocation System
The water resource allocation of the management agent is based on the water balance of the irrigation district [37]. Under the boundary conditions of water resources constraints, the water resource allocation mechanism of the management agent simulates the water resources circulation and allocation and realizes the allocation and scheduling of water resources in various departments [21], according to the following equation: where Q is the water quantity available in the irrigation district (m 3 ), Q s is the surface water quantity (m 3 ), Q G is the available groundwater resources quantity (m 3 ), W A , W E is water consumption of agricultural production agent and ecology agent (m 3 ).

Land Management
The irrigation management department needs to determine the annual crop planting area and allocate the ecological area according to the ecological planning objective. This constraint can be expressed as: where a (i, Y) is the area of the ecological user agent i in the Y year (hm 2 ); a(j, Y) is the planting area of the agricultural user agent j in the Y year (hm 2 ); S is the total area of available land in the irrigation district (hm 2 ).

Ecological Management
The ecological management behavior calculates the ecological water demand satisfaction, which is calculated as: where EWDSD is the satisfaction degree of ecological water demand; EW is the total ecological water resource allocated to the irrigation district (m 3 ); EWDU and EWDL are the upper and lower limit of ecological water demand, respectively (m 3 ); d refers to the satisfaction degree when ecological water is at the lower limit of ecological water demand (the value of d is 0.5 in this study). Ecological water consumption includes natural ecosystem water consumption and artificial ecosystem water consumption.

Social Statistics
The state information of the irrigation district management department needs to be obtained through social statistical behavior. Social statistical behavior collects crop yield, crop annual value, ecological water shortage, and other information to serve the government's optimal decision-making [38].

Adaptability Description
In this model, the adaptability of the government is shown as the largest comprehensive benefit including agricultural benefit and ecological benefit [33]. The agricultural benefit is the result of the balance between crop yield and annual value, and the ecological benefit is the satisfaction degree of ecological water demand [39]. The functions of the benefits are as follows: and where YS is the standard value of agricultural yield; MS is the standard value of agricultural annual value; AWEL stands for agricultural benefits; ECOB stands for ecological benefits; SWEL is the comprehensive benefit; and f is the utility function.

Ecological Agent Model
The main constraints of the irrigation district include water constraints and land constraints. The constraint is expressed as: where a(i, Y) is the area of the ecological agent i in the Y year (hm 2 ); Accounting of ecological water shortage is performed according to the following equation: where DE is the regional ecological water demand (m 3 ), and WE i is the amount of water allocated to each ecology agent (m 3 ). The comprehensive index of ecological evaluation is added to describe the adaptability of the ecology agent. Model comprehensively considers the ecological factors include climate quality indicators, vegetation quality indicators, and hydrological quality indicators closely related to water resources management and land utilization [40]. Five indicators closely related to water resource utilization were selected, including precipitation in the climate index, woodland coverage and grassland area ratio of vegetation factors, water area, and the runoff of hydrological factors [2,41,42]. The weight values of each index are shown in Table 1. The obtained data are standardized to avoid the influence of different dimensions or properties of data indicators on the accuracy of the results. The formula for standardization is as follows: where X max , X min represent the maximum value and minimum value in the data; respectively, and X i is the raw data. The formula of the comprehensive index of ecological evaluation is as follows: where P is the comprehensive index of ecological evaluation, w i is the weight of the ith factor, whose value is between (0, 1). the Activity-Based Classification is used to determine the weight value of each ecological indicator. All the factors in the index system were classified and queued according to their importance, and then different weights were given to various factors. x i is the dimensionless value of the ith factor.

Agricultural Production Model Agent
The main behavior of the agricultural production agent includes redistribution of water and land allocated by irrigation management agent, forming a water supply strategy for the user-level agent, and making statistics on the actual amount of resource benefits of the user-level agent. The adaptability of the agent is the biggest agricultural benefit [14,21,29].
The model optimizes the planting area of all kinds of users according to the optimization objectives of department-level agents. The main constraints are as follows: where a(j, Y) is the planting area of the agricultural user agent j in the Y year; TA(j, Y) is the maximum allowable planting area of j in the Y year; CI A(j, Y) is the irrigation area of j in the Y year; I A(j, Y) is the effective irrigation area in Y year; W A (j, Y) is the agricultural water consumption in the Y year; W A (Y) is the maximum allowable water consumption for agricultural production in Y year. The benefit statistic is the statistics of crop yield and annual value. The crop production function can be expressed as [43]: Sustainability 2021, 13, 8437 where Y j is the yield of each crop; W I is the irrigation water quantity; PA is the effective precipitation; a, b, and c are coefficients, which are determined by the research data of the irrigation district [1,44].
where P is the precipitation in the crop growth period; ET is the evaporative capacity of the irrigation district. K c is the crop water consumption coefficient; ET 0 is calculated by FAO Penman-Monteith equation. The calculation formula is as follows: where ET 0 is the reference crop evapotranspiration (mm day −1 ); T is the average temperature ( • C) at the height of 2 m; u 2 is the wind speed at a height of 2 m (m s −1 ); ∆ is the slope of the vapor pressure curve (kPA • C −1 ); R n is the net radiation at the crop surface (MJ m −2 day −1 ); G is the soil heat-flux density (MJ m −2 day −1 ); e s is the saturation vapor pressure (kPA). e a is the actual vapor pressure (kPA); γ is the psychrometric constant (kPA • C −1 ). The total crop yield can be calculated as follows: where Y is the total crop yield (kg); y j is the yield per unit area of the jth crop (kg hm −2 ); s j is the planting area of the jth crop (hm 2 ).
X A (Y) is the agricultural income in Y year (yuan); Y A (Y) is the agricultural annual value in Y year (yuan); P A is the price of irrigation water; W I (Y) is the water consumption in Y year (yuan).

Model Algorithm
Aiming at the ABM of water resources management in the irrigation district, the improved evolutionary theory based on non-dominated sorting genetic algorithm II is used to establish the learning model of the agent. The genetic algorithm, which has self-organizing and self-adaptive characteristics, can be used to simulate and solve the intelligence of agents, the intelligence including self-organizing, self-adapting, and selflearning [28].
Because the model is based on the framework of agent and hierarchy, different levels of the model can be combined with the corresponding genetic algorithm to form a nested solution to the whole model. An independent genetic algorithm is used to solve the problem of the department-level agent, and the optimization results are used as the input of the genetic algorithm of the management agent, which provides support for the individual fitness evaluation of the genetic algorithm at the highest level of the model [10].

Model Operation Rules
Through sorting and inputting the basic data, the management agent allocates the initial water quantity and area to the agricultural production agent and the ecology agent. The department-level agent redistributes resources within the department. After the bottom user-level agents produce according to their behavior, they feed the results back to the department-level agent. The department-level agent makes statistics of the feedback information and forms a new water supply strategy and land allocation schemes according to the department's internal goals. The user-level agents carry out a new round of production, The production results are fed back to the department-level agent again until the maximum benefit is achieved within the department. The agent of each department feeds back the optimal results to the management agent. The management agent makes statistics of the feedback information and redistributes the resources of each department according to the maximization of the comprehensive benefits of the irrigation district. In this bottom-up dynamic feedback, the comprehensive benefits of the irrigation district are maximized. The learning and adaptation processes of agents are simulated by genetic algorithm.

General Situation of Irrigation District
The Huaitoutala irrigation district is located in the southwest of Delingha City, Haixi Prefecture, Qinghai Province ( Figure 3). Huaitoutala is a typical inland river irrigation district with little rain and large evaporation. The annual average precipitation (1956-2016) is 176.54 mm, and the proportion of precipitation in the four seasons is 18.97%, 61.5%, 14.78%, and 4.75% of the annual value, respectively. The distribution of precipitation is uneven throughout the year, mainly in spring and summer, and the evaporation is large in the irrigation district. The average annual evaporation is 2071 mm. The structure of water supply and use in the irrigation district is singular. Agriculture is the main water user in this area, and the water mainly comes from the Huaitoutala reservoir in the north of the irrigation district. The average annual water resource is 24.386 million m 3 and the total annual water supply is 14.485 million m 3 . Wheat and rape are the main crops in the irrigation district. In recent years, the Huaitoutala irrigation district began to adjust the planting structure under the guidance of the government, planting characteristic economic crop wolfberry in the irrigation district, increasing the proportion of wolfberry planting, and exploiting groundwater for irrigation. Woodland and grassland are distributed around the irrigation district as ecological barriers. Therefore, the ecology agent of the irrigation district is generalized into the woodland agent and grassland agent; the agent of agricultural production can be generalized into wolfberry, wheat, and rape.

Boundary Condition Calibration
In this study, 25%, 50%, and 75% rainfall frequency were selected as wet year, normal year, and dry year, and the corresponding precipitation was 211.9 mm, 166.5 mm, and 129.8 mm, respectively. The data series of the Huaitoutala reservoir is short. Only data from 2009 to 2016 are available. The wet, normal, and dry years of the reservoir inflow were determined by determining the wet, normal, and dry years of precipitation. The

Boundary Condition Calibration
In this study, 25%, 50%, and 75% rainfall frequency were selected as wet year, normal year, and dry year, and the corresponding precipitation was 211.9 mm, 166.5 mm, and 129.8 mm, respectively. The data series of the Huaitoutala reservoir is short. Only data from 2009 to 2016 are available. The wet, normal, and dry years of the reservoir inflow were determined by determining the wet, normal, and dry years of precipitation. The available amount of surface water resources is the sum of the available water supply of the reservoir, and the water resources potential tapping. Furthermore, 85% of reservoir inflow was taken as irrigation water supply. The water resources increased by tapping the potential of precipitation is 10% and 15% of the average total amount of surface water resources available for many years. Combined with the construction of pumping wells in the irrigation district, the exploitable amount of groundwater is between 1 million m 3 and 1.2 million m 3 .
According to the natural conditions, topographical conditions, and current planting structure of the irrigation district, the threshold of crop sown area was set as 50~150% of the actual area, and the threshold of ecological land occupation area was set as 100~600% of the actual area. In this study, the irrigation district should not only meet the water demand of the artificial ecosystem, but also supply water resources to the natural ecosystem. Therefore, the upper limit of ecological water demand was set as 50% of the total water diversion, and the lower limit was the water consumption of woodland and grassland irrigation. According to the Qinghai provincial local standard DB63/T 1429-2015, the quota index of agricultural and forestry water is used as the basis of water resources management. The meteorological data and precipitation data are from Delingha weather station, and the daily data time series is from 1956 to 2016. This study took the statistical data of the Huaitoutala irrigation district in 2016 as the initial data, and the initial area and water consumption of each agent are shown in Table 2. Four different water-saving scenarios (Table 3) were set up to apply the improved irrigation technology and agronomic technology from the field scale to the irrigation district scale to form the optimal management scheme of water resources. The model solving process is shown in Figure 4. A traditional flat no-mulching (FN) planting pattern is adopted in the irrigation district, and the present situation of irrigation is mainly flood irrigation (FI). The agronomic technologies to be popularized in the irrigation district include ridge-furrow mulching (RM) and the technology of soil magnistorge compatibilization (MC). The irrigation technologies include drip irrigation (DI) and subsurface irrigation with microporous ceramic (CI), which will also be applied to the irrigation district's agriculture [1]. Ridge-furrow mulching can effectively reduce soil evaporation and improve soil water storage, which can provide a better hydrothermal environment for crops than flat no-mulching [1,45,46]. The technology of soil magnistorge compatibilization refers to enlarging the capacity of the soil reservoir, increasing the infiltration capacity of soil, and improving the utilization rate of rainfall through protective tillage, water and soil conservation engineering measures, and soil improvers [47]. Subsurface irrigation with microporous ceramic uses a microcellular ceramic emitter to transport irrigation water to crop root zone soil at a certain depth underground; it can reduce soil evaporation and effectively improve irrigation water use efficiency [48,49]. the soil reservoir, increasing the infiltration capacity of soil, and improving the utilization rate of rainfall through protective tillage, water and soil conservation engineering measures, and soil improvers [47]. Subsurface irrigation with microporous ceramic uses a microcellular ceramic emitter to transport irrigation water to crop root zone soil at a certain depth underground; it can reduce soil evaporation and effectively improve irrigation water use efficiency [48,49].

Water Utilization Behavior of Agents
The construction of the model takes the agent as the basic unit, while the users in the system have different ways of utilizing resources. The interaction between these ways

Water Utilization Behavior of Agents
The construction of the model takes the agent as the basic unit, while the users in the system have different ways of utilizing resources. The interaction between these ways emerges as the behavioral characteristics of higher-level sectoral water-land resources utilization. For example, the agricultural production agent seeks the maximum comprehensive benefit of agriculture, i.e., the maximum yield and output value. The interaction between resource behaviors at the departmental level emerges as the behavioral characteristics of higher-level management departments. The management agent seeks the maximum benefits, which include both the maximum of agricultural comprehensive benefits and the maximum of ecological benefits.
The self-organizing process of agent requires different water users to select appropriate water consumption and cooperate with other agents to seek the maximum benefit under the restriction of system setting rules. In this study, the agricultural production agent and the ecological agent firstly allocated resources between the departments and then fed the water use information and benefit value back to the management agent. The management agent balanced the benefits of agricultural and ecological departments to redistribute water resources. Different departments also worked together to increase or decrease water consumption to achieve the optimal target.
Taking scenario 4 in wet year (10% potential tapping) as an example, as shown in Figure 5, the adaptation process of the agent can be divided into three stages: the trial period in prophase, the adaptation stage in metaphase, and the stability stage in anaphase. In prophase, each department agent seeks the optimal value of the target according to the initial water allocation, modifies the behavior rules, and recognizes the external environment. The water consumption is relatively stable in prophase, and the water consumption of the agricultural production agent is much greater than that of the ecology agent. This is because when the competition between agents is not considered, the benefit value of agricultural water use is more significant than that of ecological water use, and the agricultural production agent will be given priority in the water supply. In metaphase, the interaction between the agents is deepening, and the mutual transformation of water resources is frequent. The agents constantly change their water consumption to adapt to the environment through cooperation and competition. With the development of the model evolution process, the interaction between the adaptive agents tends to be stable, and water resources allocation also enters the late stage of stable development. Driven by the comprehensive benefits of the irrigation district, the ecological water consumption increases, and the agricultural production water consumption reduces. Three stages are consistent with the agent adaptive evolution characteristics, which proves the applicability of the CAS theory in the allocation of water resources in irrigation districts. agent and the ecological agent firstly allocated resources between the departments and then fed the water use information and benefit value back to the management agent. The management agent balanced the benefits of agricultural and ecological departments to redistribute water resources. Different departments also worked together to increase or decrease water consumption to achieve the optimal target.
Taking scenario 4 in wet year (10% potential tapping) as an example, as shown in Figure 5, the adaptation process of the agent can be divided into three stages: the trial period in prophase, the adaptation stage in metaphase, and the stability stage in anaphase. In prophase, each department agent seeks the optimal value of the target according to the initial water allocation, modifies the behavior rules, and recognizes the external environment. The water consumption is relatively stable in prophase, and the water consumption of the agricultural production agent is much greater than that of the ecology agent. This is because when the competition between agents is not considered, the benefit value of agricultural water use is more significant than that of ecological water use, and the agricultural production agent will be given priority in the water supply. In metaphase, the interaction between the agents is deepening, and the mutual transformation of water resources is frequent. The agents constantly change their water consumption to adapt to the environment through cooperation and competition. With the development of the model evolution process, the interaction between the adaptive agents tends to be stable, and water resources allocation also enters the late stage of stable development. Driven by the comprehensive benefits of the irrigation district, the ecological water consumption increases, and the agricultural production water consumption reduces. Three stages are consistent with the agent adaptive evolution characteristics, which proves the applicability of the CAS theory in the allocation of water resources in irrigation districts. Figure 5. The evolutionary path of agent water utilization behavior in scenario IV (wet year with 10% potential tapping). Figure 5. The evolutionary path of agent water utilization behavior in scenario IV (wet year with 10% potential tapping).

Analysis of Water Resources Allocation Results
The irrigation district is planning to tap the potential of water resources to increase the available amount of water resources. The water consumption and comprehensive benefits of four water-saving irrigation scenarios in different characteristic years were simulated and optimized under the condition of the current water supply and 10% and 15% tapping of the potential water resources.
For the agricultural production agent, because of its high economic benefits, wolfberry occupies a large proportion of water consumption. As can be seen from Table 4, compared with scenario 1, without water resources potential tapping, the water consumption of wolfberry decreased by 12.8%, 11.2%, and 10.8% in wet, normal and dry years, respectively; when 10% of the water resources are tapped, the water consumption of wolfberry decreased by 1%, 11.5%, and 10.0% in the wet, normal, and dry years, respectively; when 15% of water resources are tapped, the water consumption of wolfberry decreased by 17.6%, 15.0% and 12.8% in the wet, normal, and dry years, respectively. Compared with scenario 1, the yield, annual value, and water use efficiency of wolfberry increased by 63.3%, 85.3%, and 108.4%, respectively.
Under the collaborative application of high-efficiency water-saving irrigation and agronomic technology, the water use efficiency of the irrigation district was significantly improved, and crop yield was significantly increased. According to Table 5, the water use efficiency of wolfberry in scenario 2 increased by 62.6% compared with that in scenario 1 when the water resources potential tapping was 10%; Scenario 3 increased by 18.9% compared with scenario 2; Scenario 4 increased by 10.7% compared with scenario 3. According to the analysis in Table 6, with the improvement of agronomic technology and the change of irrigation methods, the water consumption of the agricultural production agent gradually decreased, the total agricultural annual value steadily increased, the water allocated to the ecology agent continuously increased, and the ecological water demand satisfaction increased by 22.5% from scenario 1 to scenario 4. At the same time, it is more conducive to the sustainable development of the inland river irrigation district and the stability of the inland river and lake ecosystem.  It can be seen from Figure 6 that under the four scenarios of dry year, the yield and annual value of wolfberry steadily increased and gradually stabilized, and the water consumption of wolfberry decreased significantly. Without water resources potential tapping, compared with flood irrigation and flat no-mulching, the total agricultural annual value increased by 78.6% in scenario 4 ( Figure 6c). When water resources are increased by 15%, the total annual value will increase by 80.5% in scenario 4 ( Figure 6d). In dry year, through the application of subsurface irrigation with microporous ceramic and technology of soil magnistorge compatibilization, the irrigation district can still maintain stability and achieve higher economic and ecological benefits. When water resources are increased by 15% in the dry year, the ecological water use in the irrigation district is increased from 6% in scenario 1 to 16% in scenario 4 (Figure 7d), which indicates that the water resource potential tapping has a significant role in relieving the pressure of groundwater exploitation and maintaining the sustainable development of the irrigation district. Figure 7 shows the water consumption of each agent under four scenarios. It can be seen that, with the improvement of agronomic technique and irrigation technique, the total annual value has increased significantly and has the trend to be smooth (Figure 8a), while the ecological satisfaction still has a potential for a lasting increase (Figure 8b). It shows that, with the increase of available water resources and the improvement of water resource utilization efficiency, the economic benefits will gradually become stable, and the ecological benefits of the irrigation district will be steadily improved. More water resources can be used in the ecological protection of the source area.
annual value of wolfberry steadily increased and gradually stabilized, and the water consumption of wolfberry decreased significantly. Without water resources potential tapping, compared with flood irrigation and flat no-mulching, the total agricultural annual value increased by 78.6% in scenario 4 (Figure 6c). When water resources are increased by 15%, the total annual value will increase by 80.5% in scenario 4 (Figure 6d). In dry year, through the application of subsurface irrigation with microporous ceramic and technology of soil magnistorge compatibilization, the irrigation district can still maintain stability and achieve higher economic and ecological benefits. When water resources are increased by 15% in the dry year, the ecological water use in the irrigation district is increased from 6% in scenario 1 to 16% in scenario 4 (Figure 7d), which indicates that the water resource potential tapping has a significant role in relieving the pressure of groundwater exploitation and maintaining the sustainable development of the irrigation district. Figure 7 shows the water consumption of each agent under four scenarios. It can be seen that, with the improvement of agronomic technique and irrigation technique, the total annual value has increased significantly and has the trend to be smooth (Figure 8a), while the ecological satisfaction still has a potential for a lasting increase (Figure 8b). It shows that, with the increase of available water resources and the improvement of water resource utilization efficiency, the economic benefits will gradually become stable, and the ecological benefits of the irrigation district will be steadily improved. More water resources can be used in the ecological protection of the source area. (b) (d) Figure 6. Without water resources potential tapping, wolfberry yield and water consumption in dry year (a); 15% water resources potential tapping, wolfberry yield and water consumption in dry year (b); without water resources potential tapping, water consumption of agricultural production agent and total agricultural annual value in dry year (c); 15% water resources potential tapping, water consumption of agricultural production agent and total agricultural annual value in dry year (d).  Figure 6. Without water resources potential tapping, wolfberry yield and water consumption in dry year (a); 15% water resources potential tapping, wolfberry yield and water consumption in dry year (b); without water resources potential tapping, water consumption of agricultural production agent and total agricultural annual value in dry year (c); 15% water resources potential tapping, water consumption of agricultural production agent and total agricultural annual value in dry year (d).
(b) (d) Figure 6. Without water resources potential tapping, wolfberry yield and water consumption in dry year (a); 15% water resources potential tapping, wolfberry yield and water consumption in dry year (b); without water resources potential tapping, water consumption of agricultural production agent and total agricultural annual value in dry year (c); 15% water resources potential tapping, water consumption of agricultural production agent and total agricultural annual value in dry year (d).

Conclusions
Based on the theory of CAS, this paper described the internal model and adaptability of each agent, analyzed the interaction and feedback mechanism between each agent in detail, and used the multi-objective method to evaluate the state of the system. In Huaitoutala irrigation district, runoff flows into the downstream lake through dissipation. The uncontrolled increase of agricultural irrigation water will directly lead to the lake shrinking and drying up. The ecological balance of the irrigation district can be maintained by

Conclusions
Based on the theory of CAS, this paper described the internal model and adaptability of each agent, analyzed the interaction and feedback mechanism between each agent in detail, and used the multi-objective method to evaluate the state of the system. In Huaitoutala irrigation district, runoff flows into the downstream lake through dissipation. The uncontrolled increase of agricultural irrigation water will directly lead to the lake shrinking and drying up. The ecological balance of the irrigation district can be maintained by increasing ecological water demand and increasing water supply to rivers, lakes, and other ecological users. In the study of ecological water demand, without considering the social and economic benefits, the results are usually not accepted by other stakeholders and are difficult to be applied in the actual water resources management. Therefore, comprehensive consideration of agricultural water demand and ecological water demand becomes a reliable way to manage water resources. By coupling water resources potential tapping with irrigation and agronomic techniques, the agent-based irrigation water resources management model was constructed and optimized. In the dry year without water resources potential tapping, the total agricultural annual value increased by 78.6%, and the satisfaction degree of ecological water demand increased by 15.6%. When water resources are increased by 15%, the total annual value can be increased by 80.5%, and the satisfaction degree of ecological water demand can be increased by 17.5%, which is more conducive to the sustainable development of inland river irrigation district and the stability of the upstream and downstream inland river lake ecosystem. The model has been applied to water resources management in irrigation district, and it has good application prospects in the detection of sustainable development.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.