Increased water charges improve efficiency and equity in an irrigation system

Conventional wisdom in many agricultural systems across the world is that farmers cannot, will not, or should not pay the full costs associated with surface water delivery. Across Organisation for Economic Co-operation and Development (OECD) countries, only a handful can claim complete recovery of operation, maintenance, and capital costs; across Central and South Asia, fees are lower still, with farmers in Nepal, India, and Kazakhstan paying fractions of a U.S. penny for a cubic meter of water. In Pakistan, fees amount to roughly USD 1-2 per acre per season. However, farmers in Pakistan spend orders of magnitude more for diesel fuel to pump groundwater each season, suggesting a latent willingness to spend for water that, under the right conditions, could potentially be directed toward water-use fees for surface water supply. Although overall performance could be expected to improve with greater cost recovery, asymmetric access to water in canal irrigation systems leaves the question open as to whether those benefits would be equitably shared among all farmers in the system. We develop an agent-based model (ABM) of a small irrigation command to examine efficiency and equity outcomes across a range of different cost structures for the maintenance of the system, levels of market development, and assessed water charges. We find that, robust to a range of different cost and structural conditions, increased water charges lead to gains in both efficiency and concomitant improvements in equity as investments in canal infrastructure and system maintenance improve the conveyance of water resources further down watercourses. This suggests that, under conditions in which (1) farmers are currently spending money to pump groundwater to compensate for a failing surface water system, and (2) there is the possibility that through initial investment to provide perceptibly better water supply, genuine win-win solutions can be attained through higher water-use fees to beneficiary farmers.

exchange that is nonmarket or inequitable.We examined efficiency and equity outcomes across a range of different possible cost structures for the maintenance of the system (distinguishing both local watercourse and global system costs), levels of market development, asymmetric access to water, and assessed water charges.We drew on our empirical findings from previous work (Bell et al. 2014)  We found that, robust to a range of different hypothetical (although realistic) conditions, increased water charges lead to gains in both efficiency and concomitant improvements in equity as investments in canal infrastructure and system maintenance improve the conveyance of water resources further downstream.These findings suggest that, under conditions in which (1) farmers are currently spending money to pump groundwater to compensate for a failing surface water system and (2) there is possibility through initial investment to provide perceptibly better or more reliable water supply, genuine win-win solutions can be attained through assessing and collecting higher water-use fees from beneficiary farmers.

BACKGROUND AND HYPOTHESES
The IBIS is a large, publicly maintained system of canals feeding branch canals, branch canals feeding distributaries and minors, and these, in turn, feeding lower-level watercourses.Irrigators along the lowest-level watercourse in the IBIS receive water according to a fixed-turn system (known as warabandi) in which one farmer appropriates all water entering the watercourse for some fixed interval before yielding flow to the next farmer, with a typical cycle taking about 10 days (Bandaragoda 1998).Farmer choices for water appropriation (e.g., opening and closing of gates, committing labor to maintain watercourse) shape a local commons dilemma of the kind well studied elsewhere in smallscale irrigated systems in which the variability in water receipt is largely a function of local actions (e.g., Janssen et al. 2011, D'Exelle et al. 2012).Large-scale public irrigation schemes such as Pakistan's differ from such systems in that water receipt to terminal watercourses is shaped by investment and appropriation decisions at higher scales (Bell et al. 2015a), to which farmers' major connection is the water-use fee that is paid.With some variation across the country, generally some component of this fee is retained locally, for local maintenance, whereas the remainder is collected centrally and applied (somehow) toward the maintenance of the larger IBIS system.The focus of our study is on these latter processes, linking broader investments in system maintenance to the performance of local watercourses, rather than on the local watercourse commons themselves.However, we are mindful in our design and discussion to consider the possible implications of the local dilemma on our broader findings.
If we consider some part of the water-use fee to contribute to shaping the inlet conditions (i.e., water receipt reliability) to a local watercourse of irrigators paying the fees, then farm-level improvements in productivity with improved water infrastructure seem reasonable and intuitive.If cost recovery is higher, and these revenues are spent on maintenance and appropriate capital investments, at a minimum some farms should experience improved water supply.Water volumes reaching these farm outlets would be higher and more predictable, permitting farmers to better match cropping patterns to available water and to possibly select for more water-intensive, higher-valued crops.Although crop choice is ultimately mediated by a myriad of factors, evidence suggests that water reliability is one of them: our previous work across multiple sites in the region found significant cropping of water-intensive rice and sugarcane only at sites where reliable supply was available via low-salinity groundwater (Bell et al. 2014).Despite this possible mechanism for improved efficiency, it remains an open question whether actual increases in water-use fees measurably lead to improved efficiency across the system.Thus, the first test to which we apply our modeling framework is whether our field observations, i.e., a steady increase in willingness to pay water-use fees with improved reliability, translate meaningfully into potential efficiency improvements, measured as production across the system, via the following hypothesis (in null form): • H1 0 : Irrigation system efficiency is not improved under increased water fees A second open question, given the unequal access to water that canal irrigation systems provide, is whether the benefits of any improvement would be equitably shared among all farmers in the system.Improved infrastructure and reduced leakage likely mean that at least some farmers will receive more water, but it is not at all obvious how far down the system of canals, of distributaries within canals, of minors within distributaries and so on, that benefits from a given investment would be perceived.To the extent that improved water supply reaches a greater number of farmers, equity might be improved.However, if the benefits are not equitably distributed, then it is possible that those farmers with the least access to canal irrigation (e.g., those toward the tail end of a canal or distributary) might actually be made worse off, paying higher water-use fees yet not reaping any of the benefits of the improved infrastructure, which are instead captured by those farmers closer to the head.Perhaps more likely, given our previous empirical work, they would simply not pay at all, remaining entirely unaffected, and no more engaged in the shared system.It is not obvious a priori whether system equity might be improved, worsened, or left unchanged under a given change to cost recovery, and thus, whether system investments might yield equity-efficiency trade-offs.Our second and third hypotheses thus examine the system outcome of equity (measured by distribution of accumulated wealth) in response to increased water fees, and its relationship with the outcome of efficiency: • H2 0 : Irrigation system equity is not worsened under increased water fees • H3 0 : Improvements to irrigation system efficiency do not come at the expense of irrigation system equity Several factors complicate this analysis for Pakistan.One is that many systems are conjunctive use, relying on both surface and groundwater (and, to a lesser degree, rainfall), where both groundwater quality and pumping costs can be highly heterogeneous (Mahmood et al. 2001, Qureshi et al. 2010).A second factor is that (as introduced above in the context of local commons dilemmas) actual water allocations in practice often depart from official allocations, sometimes through voluntary trades but also in some cases motivated by more influential individuals, or otherwise enabled by unequal access to water http://www.ecologyandsociety.org/vol21/iss3/art23/resources, leading to less equitable divisions (Bandaragoda 1998).A third is that the cost structure of maintaining and developing irrigation infrastructure is not well reported; rather, the literature reports only charges assessed and recovered, and expenditures, which are known to not cover true operation and maintenance costs (e.g., Wolf 1986, Habib 2002).In all of these cases, we lack empirical data on the profile of groundwater salinity and pumping cost, on the degree to which water allocations are stolen or coerced, or on the true costs of maintaining irrigation infrastructure in the region, to describe them meaningfully within the model context.
However, we note that a good system model is not necessarily the one that incorporates all possible variables and factors, but rather, the simplified model whose findings would remain robust to inclusion of such additional factors.We present a simple modeling framework, making use of sensitivity analyses where possible to identify effects that are robust to unknown inputs such as true maintenance costs, and discussing how these effects would persist under processes we don't incorporate, such as groundwater supply or other modes of water exchange among users.Our framework employs an agent-based model (ABM) approach, which treats decision-making agents (such as farmers, drivers, deliberative bodies, governments, etc.) as the basic unit of analysis and allows system-level outcomes (such as land cover, traffic, or in our case, irrigation performance) to emerge out of the interactions agents have with each other and their environments, and the decisions they make (Matthews et al. 2007, Bruch andAtwell 2015).There is a wealth of literature applying ABM to study agricultural decision making (e.g., Deadman et al. 2004, Robinson and Brown 2009, Bell 2011, Bell et al. 2016) and several models built to consider irrigators specifically, including labor allocation across farming and fishing in an Asian irrigation context (Schlüter et al. 2009), or rules for collective use in a West African irrigation context (Barreteau et al. 2004).The great strength of ABMs in analyzing resource use is the ability to represent highly contextspecific decision processes.The trade-off, however, is that such models are often difficult to share or apply to new contexts, and new lines of inquiry often require new models (as does ours).

METHODS
We developed an ABM of a small irrigation command consisting of 24 farm agents, i.e., farmers.The complete model description adhering to the Overview, Design concepts, and Details (ODD) protocol for ABMs (Grimm et al. 2006(Grimm et al. , 2010) ) is included in Appendix 1.In this section, we summarize the model structure, parameters, and key assumptions.The complete model is published via OpenABM.org(Bell 2015).Additionally, to make some of the toolkits developed for this model more available (Bell et al. 2015b), individual submodels for (1) the irrigation channel model, (2) the genetic algorithm for land-use decision making, and (3) the water market model can be downloaded directly from the model's OpenABM page (https://www.openabm.org/model/4727/version/1/view).

Physical time scale and processes
We model the irrigation command area as a node-and-channel model with an exogenous upstream water source (Fig. 1).In each water time step, water entering the system at the upstream inlet propagates through the entire system, with seepage losses along each channel segment according to the level of maintenance and potential withdrawal (in the absence of market transactions) at each node according to the allocation of farms located at the nodes.Any water not withdrawn drains from the final node in each channel.The modeled time scale is thus equivalent to a complete irrigation turn cycle (typically 10 days in Punjab), without the need for explicitly modeling the flow rate of water along the channels or the active opening and closing of irrigation gates at the farm nodes.Without adequate investments in maintenance and upkeep, infrastructure of both the commandarea channels and the upstream inlet degrade during each water time step, leading to higher seepage losses in the former, and a more irregular inlet flow in the latter.

Decision time scale and processes
We approximate a year as 36 time steps or roughly 360 days (hereafter the decision time step).In each decision time step, farmers choose the optimal land-use portfolio for their farm (consisting of a subdivision of land into plots, each with its own water allocation and crop rotation), the level of the assessed wateruse fee they are willing to pay, and whether to trade (purchase or sell) water allocations with other farmers in their immediate watercourse.Additionally, within each decision time step, revenues collected though water-use fees are applied to maintain both upstream inlet and local channel infrastructure.

Genetic algorithm for crop decisions
Farmers' decisions on crops are based on expected water receipt given their memories of historical water receipts and universally (in the model) known functions for crop yields on water, based on the Jensen crop water production function (Kipkorir and Raes 2002).
Farmers decide on the best land-use portfolio for their farm (see Table 1, for an example), maximizing expected utility on net income using a genetic algorithm.The genetic algorithm employed in this model treats the land-use portfolio as a gene, and individual rotations (together with their area and fractional water allocation) as traits.The algorithm follows the same design http://www.ecologyandsociety.org/vol21/iss3/art23/used by Manson (2005) and Manson and Evans (2007), with reproduction by elite tournament selection, via (1) crossover between two parents, (2) mutation of a single parent, or (3) direct reproduction without change.Crossover is performed as a simple shuffling of crop rotations, i.e., the set of all crop rotations belonging to the two parent portfolios is pooled, and then each rotation is randomly allocated to one of the two child portfolios.Mutation is allowed to occur in any part of the portfolio: (1) area mutation, (2) water mutation, or (3) crop mutation.For the current study, we were able to obtain reliable estimates of costs, water requirements (at different points throughout the crop growth cycle), and yields for eight of the most important, in terms of area, crops in our region of interest (Pakistan Punjab): plain rice, basmati rice, wheat, sugarcane, cotton, potato, maize, and onion.All crop data and sources are included as Appendix 2.
Crop data can potentially include not just yields, prices, and variable input costs, such as labor, fertilizer, etc., but also fixed costs, such as machines or crop-specific land prep, that can be shared across multiple crops to capture the imperfect and lumpy ability of farmers to switch between different cropping systems (for the current study, we do not include any fixed costs in our data).

Decision model for water-use fee payment
Farms choose to pay water-use fees in this model according to the following schedule: - where the value 23,000 corresponds to the maximum cumulative willingness to pay of approximately PKR 23,000 per hectare for a reliable water supply estimated by Bell et al. (2014).This model structure reflects our maintained assumption that farmers would be willing to pay up to PKR 23,000 per hectare for an assured water supply, but would be equally happy to pay less if the assessed fee is such.
Fees received are allocated to separate channel accounts, with farms contributing only to channels through which they receive water, and with a proportional allocation of the fees across the inlet and other channels fixed by the irrigation system parameters described in Table 2.

Market model for water allocation
A rural water market can be difficult to resolve because farms have simultaneous potential to be buyers or sellers of their water allocation.For instance, a farm with more than enough water to grow wheat but not enough water to grow sugarcane might have a low marginal value for a small additional amount of water (as they could not use it to their advantage) but a high marginal value for a larger amount of water, if it enables them to transition from wheat to sugarcane.At the same time, they may be quite interested in selling water.
The water market submodel acts as a clearinghouse, receiving a list of all bids that farms in a market are willing to make on increments of δ through nδ of water allocation and a separate list of prices at which the same farms would be willing to sell increments of δ through nδ of water allocation.These bid and ask prices are evaluated on a farmer-by-farmer basis by estimating the expected change in utility to the farmer arising from an additional allocation (and actual receipt) of δ through nδ (to calculate the bids for purchasing) or from a reduction in allocation by δ through nδ (to calculate the ask prices for selling).Note that a change in water allocation of δ is not the same as a change in water receipt of δ; the submodel looks at the actual water receipt histories of neighboring farms to determine what change in actual water receipt would be expected to occur with a change in allocation of δ.
The list of all bids across all farms in the market is ordered from greatest to least, and a standard "knapsack" combinatorial optimization problem (e.g., Strandmark 2009) is solved for each one in turn, until there are no more possible transactions.A transaction is possible if there is a set of increments for sale such that the total price for the increments offered is below the willingness to pay for the total set of increments, e.g., a bid of 18 for 4δ could be met by 3δ offered for 12 and δ from another farm offered for 5. Once a farm has participated in a transaction, either as a buyer or a seller, it leaves the market for this time step and does not participate in further transactions until the next decision time step at the earliest.

Numerical experiment design
We ran a full factorial experimental design over the costs of maintaining upstream inlet reliability (3 levels), the costs of local channel maintenance (3 levels), the degree of permissible market participation of farmers (i.e., the limit on allocation increments that farmers could buy or sell in the market; 3 levels), the structure of the canal command (i.e., the number of branches across which the 24 farms were evenly distributed; 3 levels), and the level of water-use fee assessed (4 levels).We repeated this sweep of conditions with 3 random seeds, for a total of 972 modeling runs.
At initialization in each simulation run, farms have no previous memory of water receipt or candidate land-use portfolios for consideration.At Δt w = 0 (i.e., the water time step is 0), the random seed for the simulation is set, the landscape is initialized, and the simulation is run for a spin-up period of 10 full decision time steps (in our simulations, 360 Δt w ) without the farms taking any action, to accumulate a memory of water receipt.The first decision time step Δt D thus occurs at Δt w = 361.actual maintenance and repair needs (Malik et al. 2014); in our experiments we choose local and global irrigation maintenance costs to cover a range of conditions from insignificant to limiting cost levels.Assessed water-use fee levels in these experiments are chosen to span a range of conditions, but notably this range begins at a level above current water-use fee assessments for Pakistan, as a representative of large-scale public irrigation in Asia, and stops well below farmers' measured willingness to pay for reliable canal water (Bell et al. 2014).

RESULTS
Our principal interest is in examining outcomes of economic efficiency, measured as value of production (VOP), and equity, measured by the wealth GINI coefficient across a simulation, as water-use fees are increased, over a range of different cost and market access conditions.Here, farm wealth includes both agricultural income and income from the sale of water allocation.A complete set of experimental outcomes is included in Appendix 3; in the current section we draw a subset of these to illustrate the overall narrative that the full experiment conveys.
Looking across all farms in all simulation runs (Fig. 2), we observed clear patterns in crop choice and efficiency as a function of the reliability of surface water (measured as the fraction of allocated water received over the duration of the simulation).Farms with low surface water reliability (the peak at the left in Fig. 2A) appear to grow more lower-value, hearty crops, such as maize or wheat; with increasing surface water reliability, there is a gradual transition toward more high-value but water-sensitive crops, which, in our dataset, includes moving toward cultivating onions and sugarcane.This is consistent with trends observed in our previous field study in Punjab (Bell et al. 2014).
Efficiency improves with increasing water-use fees across a broad range of structural conditions in the irrigation system (Fig. 3).We consider both a system in which there is high potential for increased water fees to have an impact on system performance, hereafter a "high potential" system (Fig. 3A), as well as a "low potential" system (Fig. 3B).In terms of our experimental variables, high potential is captured by (1) relatively low maintenance costs, meaning even a modest increase in use fees leads to rapid infrastructural improvement, and (2) high asymmetry, with farmers all arranged along a single watercourse.In contrast, the low-potential system has relatively high maintenance costs and a lesser problem of asymmetric access because farmers split evenly across three watercourses accessing the inlet directly.We note that this increase in efficiency is robust to changes in market development; that is, the increasing extent to which farms can sell portions of their allocation in each decision time step does not disrupt the gains in efficiency that higher water-use fees bring.Similarly, we observe an apparent, though slight, reduction in wealth inequality measured across farms with increasing wateruse fees (Fig. 4A, B).This decrease appears robust to irrigation structural conditions as well as the development of markets.However, a visualization alone does not demonstrate effect, nudging us toward formal tests of relationships between our experimental sweep variables and the outcomes of interest.
Treating each of the 972 simulation runs as an independent data point, the effects of our sweep variables emerge clearly from simple ordinary least squares (OLS) regressions of the main effects and 1st-order interactions (Table 3).System-level efficiency (VOP) increases with water-use fees (evidence to reject H1 0 ), with the development of markets for water allocation having a negative effect that could offset some of these efficiency gains.This is to say, as farms sell off their allocations, some fraction of land in the watercourse would go to lower-valued crops or fall out of use altogether (we note that our model does not explicitly model any alternative incomes) so that wealth creation across the command could decrease even as some farms produce higher-value crops Fig. 3. Per-hectare value of production (VOP) as a function of per-hectare water-use fees and market development, for conditions of (A) "high potential," low maintenance costs of PKR 200,000 per 1% improvement in local channel maintenance per unit length; low maintenance costs of PKR 200,000 per 1% improvement in upstream inlet reliability; high system asymmetry, with all 24 farms lined along a single watercourse, and (B) "low potential," high maintenance costs of PKR 1,000,000 per 1% improvement in local channel maintenance per unit length; high maintenance costs of PKR 1,000,000 per 1% improvement in upstream inlet reliability; low system asymmetry, with 24 farms broken into 3 watercourses of only 8 farms each.Color of surface indicates relative value of dependent variable (on a scale from blue through red).
and others make rational choices to sell off their allocation.Both local and inlet costs have intuitive impacts of decreasing VOP; as the system becomes more expensive to maintain, overall maintenance levels are lower, and production is lower.Breaking farmers up across multiple channels with symmetric access to the resource improves production in the system.Key interactions for VOP include that (1) the effect of local costs on VOP is higher when abiana levels are high; (2) the effect of having more channels is more important when local costs for maintenance are high; and (3) higher abiana levels and a greater number of channels have offsetting, positive effects on VOP.
Equity (wealth GINI) is also improved with increasing water-use fees (recall that a lower GINI indicates more equal distribution of wealth), though we note the overall low level of explained variance in this regression.Including 1st-order interaction terms in the regression model for wealth, GINI leads these significant effects to disappear, likely by collinearity and variance inflation.Taken together, these results suggest that if present, any effect of  increasing water fees on equity is small but positive (i.e., reduces the GINI); we find no support to reject H2 0 , with no evidence to suggest that equity is worsened under increased water fees.Further, our outcomes of GINI and production are negatively correlated (a Pearson coefficient of -0.2375, significant at 0.1%, indicating a positive relationship between efficiency and equity), and thus find no support for H3 0 , that improvements in efficiency come at the expense of equity.
Overall, explanatory variables in the regression models reflecting the structure of the irrigation system (costs, number of channels) exhibit the effects on outcomes posited by our high-potential and low-potential categorization: higher maintenance costs tend to reduce farms' ability to produce, whereas a higher number of channels (and thus more symmetric access to water) tends to improve both equity and efficiency.Interestingly, we observe no significant interaction effects of market development (numDeltas) with other variables in our sweep.

DISCUSSION
We present a simple results narrative, fleshed out in further detail with detailed experimental sweep results in Appendix 3. In general, our results suggest that increasing water-use fees not only increases agricultural efficiency, but does so without compromising equity in the command area.Efficiency gains emerge as farmers are better able to choose and grow watersensitive, higher-value crops.This result is robust to a range of operation and management cost structures and symmetry in water access, capturing the variation that could be expected across small to large irrigation command areas.Additionally, this result is mostly robust to variation in the extent to which farms are able to trade their water allocations among themselves.
The underlying mechanism is that, if farms are willing to pay more for reliable water supplies (e.g., Bell et al. 2014), and if water fees collected are invested in system maintenance and improvement, then higher water-use fees can stimulate a selfreinforcing system of improved cost recovery and downstream user empowerment.Improved performance leads recipients to pay some greater overall fraction of the assessed fees, further improving performance and leading potentially to greater cost recovery.As system improvements allow allocations to be met further downstream, downstream users in turn receive more reliable supplies, are able to undertake more profitable cultivation http://www.ecologyandsociety.org/vol21/iss3/art23/ on their land either by increased productivity or by moving to higher value production, and are, as well, willing to pay more into the system.We must highlight, however, that this paragraph began with several "ifs."In particular, this mechanism depends upon appropriate institutions in place to translate collected water fees into system improvements; our goal, in the current study, is not to discuss these in detail, but rather to demonstrate their importance, by illustrating how Pakistan's irrigation landscape could be transformed were they properly in place.
This mechanism also presents something of a chicken-and-egg problem: this self-reinforcing mechanism of cost-recovery and system maintenance depends crucially on the investment of funds into providing a perceptible improvement in water reliability.Such an initial investment might come from farmers themselves, under the premise that their increased contributions should lead to improved performance, but for farms not currently receiving reliable water this might be a big ask.Indeed, the results in Bell et al. (2014) suggest that one of the major factors underlying farmers' willingness to pay higher water-use fees is their perception of the reliability of their existing surface water supply.Certainly, if their contributions did not lead quickly to improved delivery, such contributions would not likely be sustained, as more broadly observed under the process of irrigation management transfer (IMT) in Pakistan: initial changes to local management led to short-term improvements in water-use fee collection that declined quickly in subsequent seasons when benefits were not readily apparent to farmers (e.g., Asrar-Ulhaq 2010, Ghumman et al. 2011).Rather, a program kick-start might need to come via external investment, with a clear commitment to invest in infrastructural repair and maintenance.This would be a departure from much of the broader history of development project investments, in which new infrastructure brings greater political capital and thus a cycle of build-neglect-rebuild (Khan 2009).
We argue, however, that the return for sustained investments in infrastructural repair and maintenance is a robust mechanism for efficient, equitable improvements in irrigation water supplies.We excluded additional sources of water from our model for simplicity, but we would expect this effect to hold under the conjunctive use systems common in Pakistan.Diesel fuel, for groundwater pumping, is a major cost for irrigators (Bell et al. 2014), such that access to groundwater is somewhat more the privilege of the wealthy.To the extent that providing surface water would be more cost-effective or otherwise preferred over pumping groundwater (because most usable groundwater in Pakistan is leakage from surface-water systems anyway, and will contain contaminating salts and minerals that the surface water does not; WSTF 2012), investments in infrastructure and repairs to improve surface water delivery should lead even wealthier farmers away from groundwater, toward greater payment of water-use fees, and the net empowerment of less advantaged farmers observed in our model.
We also excluded any treatment of exchange in water allocations other than the market submodel, which incorporated no measure of relative bargaining power.Even where deviations from design allocation exist purely because of coercion or theft, our mechanism will hold provided that there is at least some fraction of the command area that would benefit from having more reliable water enter the system (i.e., those who do not or cannot meet their needs through theft or coercion alone).As those contributors lead to improved performance, the net empowerment of tail-enders may also serve to mitigate the potential for theft or coercion in the future.

CONCLUSIONS
We applied an agent-based model of farms making decisions on what to plant based on expected water receipt and paying wateruse fees based on the reliability of water that they had received.
We found that increased water-use fees raised overall agricultural production in the system, as well as improved the distribution of wealth among farms in the system; a result that is robust to a range of irrigation structural characteristics, i.e., costs of local vs.global maintenance, and asymmetry of access.Our previous work in the region (Bell et al. 2014) challenged the wisdom that farmers were unwilling to pay greater amounts for water; and our current study demonstrates the system level benefits that could accrue, to a range of different forms of irrigation system, if greater wateruse fees were levied.
The major challenge to kick-start such performance in an actual irrigation system is the initial provision of a perceptible improvement in irrigation performance.New command areas may be able to levy high fees from the start, but more generally it may be important to channel project funding or public expenditures into the operations and maintenance of existing irrigation infrastructure, rather than into new projects.Activating the mechanism for self-reinforcing cost recovery could make such investments highly valuable.
Responses to this article can be read online at: http://www.ecologyandsociety.org/issues/responses.php/8642 Farms have a unique ID and location in the 2-D space, and are described by the state variables: • Size • Wealth • Water allocation (m 3 /day) • Current water receipt (m 3 ) • Relative risk aversion coefficient • Discount rate • Memory of water receipt • Land use portfolio (crop rotations allocated some fraction of overall farm water and farm land) Irrigation channel segments have a unique ID and location in the 2-D space, and are described by: • Design flow (m 3 /day) • Maintenance level • Depreciation rate • Irrigation level (canal, distributary, watercourse, etc.) Irrigation nodes have a unique ID and location in the 2-D space, and are described by: • Inlet link IDs • Outlet link IDs

• Withdrawing farm IDs
The physical environment is described only by inlet water to the system, where the inlet represents any upstream portion of the broader irrigation system.Remaining variables in the modeled environment include the set of crops available to the farmers, the market prices (fixed and exogenous) that each crop earns, as well as the size of the water allocation increment (δ) and the number of increments δ that can be traded in a given decision time step.
Farms are organized in separate markets, with a market consisting of all farms along a nonbranching series of channel segments.Farms located at branching nodes participate in the market upstream of them.Farmers within the same market can trade portions of their overall water allocation (up to a fixed number of increments δ) with each other.
Spatial scale in this model is arbitrary.There are two time scales of interest -i) the water turn time scale and ii) the farm decision time scale.The water turn time scale is the time required for one full set of 'irrigation turns'; that is, the time across which each farmer can be expected to receive water, irrespective of the local rules for sequential access.Water distribution is determined simply by propagating water through the channel network and meeting farm water allocations until water is consumed, such that any actions to withdraw water (opening and closing gates) or timing of water consumption within the water turn time step is implicit in the farms' water allocation and receipt.In our simulations the water turn time step is taken as 10 days.Depreciation of canal infrastructure also is updated at the water turn time scale.
The farm decision time scale represents the interval at which farmers revisit their plans for their land use, are assessed and pay water use fees (which are used at the same interval to maintain irrigation infrastructure), and have the opportunity to trade portions of their water allocation among other farms in the same market.In these simulations the farmer decision time step is taken as a crude one-year period -36 water turn time steps, or 360 days.As a note, each of these separate decision processes (land use, water fees, and markets) could occur with different frequency, but in our simulations all occur with the same frequency.

Process overview and scheduling
The model solution scheme is as follows: Each of depreciateCanalInfrastructure, updateLandUse, solveInletWater, collectAbiana, up-dateFarmerMemory, maintainCanalInfrastructure, and tradeWaterAllocation are described below in Submodels.

Design concepts
Basic principles.The structure of this model is derived loosely from the functioning of large public irrigation systems in South Asia (e.g., Barker & Molle, 2004) with systems of water fees assessed for the maintenance of the system (e.g., Bell, Shah, & Ward, 2014) and some assignment of water allocation from which it is known there is deviation (trading, overage, theft, etc.) (Bandaragoda, 1998).It captures an irrigation context where the availability of water is a limiting factor in cropping decision-making, and where water availability shapes willingness to pay assessed fees, such as Pakistan (Bell et al., 2014).Farmers' use of their knowledge about water to make decisions is boundedly rational (Kahneman, 2003), captured through the use of a genetic algorithm (e.g., Manson & Evans, 2007;Manson, 2005) with a land-use portfolio acting as a gene (described in Submodels -updateLandUse), and a fitness function based on the farmers' expected utility (Feder, Just, & Zilberman, 1985) from marketing the crops grown under each portfolio. Emergence.
The key system-level outcomes of efficiency (yield, value, and diversity of crops produced) and equity (distribution of generated wealth across farms) emerge from farm decisions on how to use their land and whether to participate in the trading of water allocations.
Adaptation.Farms adapt their land use in successive decision time steps via the genetic algorithm described in updateLandUse, which searches for a land use portfolio with the highest expected utility, given current land use and the current memory of water receipt.Additionally, farms estimate their expected utility under different conditions of water allocation, and use this information to generate bid and offer prices of water allocation increments δ for participation in a water market; the market mechanism allows farms to adapt by moving toward water allocations that might benefit them further.
Objectives.Farm choice of land use, as well as participation in water allocation markets, is governed by the objective of maximizing expected utility (Feder et al., 1985).
Learning.Farms update their pool of candidate land-use portfolios in each successive iteration of the genetic algorithm.
Prediction.Farms predict expected utility for a given land-use portfolio by estimating future water receipt (based on a stored memory of previous water receipt) and from this, estimating yields using the FAO crop yield response to water model (Steduto, Hsiao, Fereres, & Raes, 2012), transformed into Jensen's sensitivity index (Kipkorir & Raes, 2002).This simple model (which breaks a crop's growth into phases with different sensitivities to water stress) is used as a representative understanding held by all farms (it is not learned, but rather is known) of how different crops will perform to a given water scenario.
Sensing.Farms observe and remember water reaching their farm.While they do not explicitly store memory for water receipt above or below them in the irrigation system, the routine for evaluating potential water receipt under a change in water allocation of nδ searches the water memories of upstream and downstream farms in order to estimate actual water receipt under the change, so that some knowledge of neighboring farms' water receipt is implicit.Crop responses to water stress and crop prices are known and fixed.During the clearing of possible markets for water allocation, markets are solved using a knapsack algorithm (Strandmark, 2009) in which the ability for the sellers with the highest offer price to access the buyer with the highest bid is implicit.
Interaction.Farms interact directly only through participation in the trading of water allocation, in tradeWaterAllocation. Farms interact indirectly with all farms downstream of them through any trade in water allocation, by changing the potential amount of water that will reach downstream farms.
Stochasticity.Stochasticity is introduced across many parts of the model.Specifically, it appears: • In model setup, to draw farm-level parameters for size, risk coefficient, discount rate, and the number of years used in estimating expected utility • In model setup, to randomly select the fidelity with which a farm uses their memory in decision making (i.e., remembering the past year as 36 distinct water turns, 4 distinct seasons, 1 average year, etc.) • In the main algorithm, to randomize the order of agents in each new decision time step • In the main algorithm, to estimate inlet water in each water turn time step • In maintainCanalInfrastructure, to randomize the order through which channel links are maintained, if this option is selected (alternative is to order from worst to best condition) • In the genetic algorithm within updateLandUse, to generate new candidate land use portfolios, select points for crossover and mutation, and as part of the selection procedure (whether probabilistic or tournament) for inclusion in the next generation • In the evaluation of expected utility, in the selection of past cycles of water memory to be used in estimating future water receipt Collectives.Farms interact via markets, with a market composed of all farms connected to nodes along a non-branched segment of irrigation channel, inclusive of farms connected to the downstream node at which branching occurs.Farms in the same market are able to trade portions of their water allocations with each other in each decision time step.
Observation.In our experiments, outcomes of i) the average value-of-production (VOP, averaged over the duration of a simulation and across the landscape), ii) crop income diversity (measured via the Shannon index of crop revenues over the simulation, across the landscape), iii) farm wealth distribution (measured via a Gini coefficient), and iv) farm water allocation distribution (measured via a Gini coefficient) are used as key outcomes.All farm-level attributes as well as farm-level crop incomes are returned from the simulation.

Initialization
At initialization, farms have no previous memory of water receipt, or candidate land use portfolios for consideration.At Δt w = 0 (i.e., the water time step is 0), the random seed for the simulation is set, the landscape is initialized, and the simulation is run for a period of 10 full decision time steps (in our simulations, 360 Δt w ) without the farms taking any action, in order 6 to accumulate a memory of water receipt (i.e., a spin-up period).The first decision timestep Δt D thus occurs at Δt w = 361.
Table 1 summarizes model parameterization for our chosen set of experiments.Genetic algorithm parameterization is based on that of Manson (2005).True costs for maintenance of irrigation systems in South Asia are not well known, because at best revenues and spending are recorded, rather than indication of true maintenance and repair needs (Malik, Prathapar, & Marwah, 2014); in our experiments we choose local and global irrigation maintenance costs to cover a range of conditions (from insignificant to limiting cost levels).Abiana levels in these experiments are chosen as well to span a range of conditions, but notably this range begins at a level above current water use fee assessment for Pakistan (as a representative of large-scale public irrigation in Asia) and stops well below farmers' measured willingness to pay for reliable canal water (Bell et al., 2014).

Input data
The model draws external data on crop yields, costs, and prices.Specifically, for any crop (or particular sequence of crops) to be considered within the genetic algorithm, data must be provided for each water turn time step for i) crop phase, ii) the crop coefficient K c and iii) the 8 yield response factor K y (Steduto et al., 2012).Additionally, overall cost data must be provided for this duration, broken apart into i) startup fixed costs (i.e., any costs associated with growing this crop or sequence for the first time), ii) per-season fixed costs (i.e., any fixed costs associated with each new application of the crop or crop sequence), and iii) per-area variable costs (i.e., any variable costs associated with applying this crop or crop sequence to a unit area).Finally, the nominal expected yield (without any water stress) should be provided, as well as a per-unit price.Sample crop data sheets, in the correct format to be read by the model, are included with this protocol.

depreciateCanalInfrastructure
In this submodel, the maintenance levels m i for all irrigation channel segments i, as well as the maintenance level for the inlet (which represents all irrigation infrastructure upstream of the modeled system, are depreciated by , where d i is the appropriate depreciation rate (either for channel segments or for the inlet).

updateLandUse
This submodel integrates several different routines to capture the actions in the farm decision time step.An overview of the submodel (in pseudocode) is as follows: For each farm (in random order) • Calculate yields for any crops harvested over the previous decision time step • Estimate best new land-use portfolio using genetic algorithm • Decide whether to switch to best new portfolio or stick with current portfolio • Incur any costs from upcoming decision time step • Estimate WTP and WTA for participation in water allocation market in this time step using genetic algorithm End

Yield calculation
The same routine is used both for calculating yields over the previous period as well as for estimating possible yields within the genetic algorithm, and employs the Jensen crop water production function (Kipkorir & Raes, 2002): where Y a is the actual yield, Y m is the maximum yield with no water stress, ET a is the actual evapotranspiration, and ET c,i is the evapotranspirative demand in phase i (over n total phases).The evapotranspirative demand for a phase is estimated as ET 0 *K c,i , where ET 0 is the standard reference evapotranspiration of 5mm/day (FAO, 1998) and K c,i is the crop coefficient for phase i.The exponent λ i is converted from the yield response factor K y by the polynomial method outlined in Kipkorir and Raes (2002): 9

Estimating best land-use via genetic algorithm
Farmer land use is described by a portfolio of crop rotations, each allocated a fraction of the farm land and a fraction of the overall water allocation ( The genetic algorithm employed in this model uses the portfolio as a gene, and individual rotations (together with their area and fractional water allocation) as the trait.The algorithm follows the same design used by Manson (2005) and Manson & Evans (2007), in which member genes are selected to reproduce either by i) probabilistic, ii) tournament, or iii) elite tournament selection; and in which reproduction follows either i) crossover between two parents, ii) mutation of a single parent, or iii) direct reproduction without change.What makes any genetic algorithm unique is the interpretation of crossover, mutation, and the appropriate fitness function, which we describe next.
Crossover is performed as a simple shuffling of crop rotations -the set of all crop rotations belonging to the two parent portfolios is pooled, and then each rotation is randomly allocated to one of the two child portfolios.Areas for each rotation are re-scaled to sum up to the total actual farm size, and water allocations are rescaled to sum to 1.
Mutation is allowed to occur in any part of the portfolio.Specifically, one rotation is selected randomly, and within this rotation a single point mutation type is drawn randomly (with equal probability for each): i) area mutation, ii) water mutation, or iii) crop mutation.In the case of an area mutation, the fraction of the farm's land allocated to that rotation is randomly mutated, and all land areas are then rescaled to sum up to the size of the farm.The minimum fraction of a farm that a rotation can occupy is constrained, so that in some cases this rescaling process must be iterative, setting areas that are too small to the minimum size and rescaling.In the case of water fraction, mutation proceeds in a similar manner -randomly mutating the fraction of water allocation to the current rotation, then rescaling all other fractions to sum to 1.In this case, there is no minimum water fraction to allocate to a rotation, so that this is never an iterative process.Finally, the case of mutating the crop rotation is a step-wise set of decisions.First, one crop-fallow pair in the rotation is selected randomly.Next, it is selected whether to delete this crop-fallow pair, or to add an additional crop-fallow pair, with equal probability.
In the case of adding a crop-fallow pair, it is selected whether to add the pair before or after the currently selected pair, and then the actual crop and fallow period are drawn randomly.
The fitness function for the genetic algorithm is expected utility for the portfolio, given known water history, calculated as: where P i is the price for crop i, Y i is the yield of crop i, d is the discount rate, t h is the time of harvest, C i,j is the cost of type j (fixed or variable cost) incurred at time t j , r is the risk coefficient, and n is the number of different, equally likely water histories. 10 The idea of 'equally likely water histories' is perhaps easiest explained by example.Consider a portfolio in which the longest rotation is 4 decision time steps (we write 'season' for simplicity) in length, while the second rotation is 3 seasons and the last is 1 season.If we have 5 seasons of data, then there are 2 unique histories to evaluate the 4-season rotation (starting in season 1 and starting in season 2), 3 unique histories to evaluate the 3-season rotation, and 5 unique histories to evaluate the 1-season rotation.However, if we restrict ourselves to water patterns that have some overlap (i.e., there is no overlap between the 3-season history that starts in season 1 and the 1-season histories that start in seasons 4 or 5), then we have a slightly reduced set of possibilities to consider.We are interested in the 3 different ways the 1-season rotation could occur within the 3-season rotation.In turn, the 3-season rotation can occur in 2 different ways within each of the 4-season rotation, which in turn can occur 2 different ways within the 5 years of data.Our number of unique histories is thus n = 3x2x2 (as opposed to n = 5x3x2).In the event that the longest rotation in a portfolio is longer than the available data, existing cycles are repeated randomly until the memory data is as long as the longest rotation.
The same method is used to evaluate utility remaining the currently active portfolio by evaluating only crop plantings and harvests that have yet to occur.

solveInletWater
This submodel estimates incoming water for the current water turn time step and calculates its propagation and withdrawal through the system.
First, incoming water is estimated by: where M is the level of maintenance of the inlet.In this way, a perfectly maintained inlet will provide water at the design flow rate, while a poorly maintained inlet will have a very random stream.Alternatively, a schedule of water data (such as might be available from an irrigation department) could be used, in order to capture events like planned shutdowns, etc., though this is not currently undertaken with this model.This submodel operates by propagating available water through the irrigation channel segments to nodes.The fraction of water lost by each channel segment i is equal to (1 -M i ), where M i is the maintenance level for that channel segment.Water reaching a node is given first to any farms connected to that node, up to their water allocation or the amount of water remaining in the channel.If there is water remaining at a node after giving to farms, it is allocated proportionally among any outlet links from that node, based on the cumulative water demand of each outlet link (the sum of all water allocations of farms downstream along that outlet channel segment, not considering leakage through low maintenance).This process repeats along each channel segment and node until terminal nodes are reached.
Water remaining at terminal nodes is considered drainage and is set to 0.

collectAbiana
Farms choose to pay water use fees (abiana, in the case of Pakistan) in this model according to the following schedule: where the value 23000 represents the cumulative willingness to pay of approximately 23000 Pakistan Rupees per hectare for a reliable water supply measured by Bell et al. (2014).This simple model scales water payments from 0 (when no water is received) up to a maximum of 23000 Rs or the assessed water use fee per hectare (when all water allocated is received).

11
Fees received are allocated to separate channel accounts, with farms contributing to channels through which they receive water only, and with proportional allocation of the fees across the inlet and other channels fixed by the irrigation system parameters described in Table 1.

updateFarmerMemory
In this submodel, the array of water memory held by the farm is updated to integrate the previous water turn timestep.

maintainCanalInfrastructure
This submodel applies collected water use fees to the maintenance of modeled irrigation channel infrastructure, as well as to the inlet water (which represents all irrigation infrastructure upstream of the modeled section, exogenous to the current model).
Available funds are allocated to separate accounts for each channel during the water use fee collection (Submodel 7.4 -collectAbiana).For each of these channels, funds are applied to maintain the irrigation channel segments, either 1) in random order, or 2) in order from lowest maintenance level to highest, depending on parameter settings.In a given segment, the maintenance level is increased only by the increment specified in the irrigation parameter settings before moving on to another segment.
If there are funds remaining once all segments in the channel that require maintenance have been raised by this increment, this process is repeated until all funds for this channel have been used or all segments are fully maintained.
After completing maintenance on the modeled irrigation channels, all unused funds are added to the account for maintaining the inlet water.The total funds available are then applied, as necessary, to raising the maintenance level of the inlet water -which in practice would include the maintenance, repair or even new development of irrigation channels, barrages, dams, pumps, etc.

tradeWaterAllocation
This submodel solves a market for the 'lumpy' commodity that water is in the current context.In agricultural systems, the marginal value of additional water supply may vary unevenly.For instance, a farm with more than enough water to grow wheat but not enough water to grow sugarcane might have a low marginal value for a small additional amount of water (since they can not use it to their advantage) but a high marginal value for a larger amount of water (if it enables them to transition to sugarcane).At the same time, they may be quite interested in selling water.This can be a difficult market problem to resolve, as agents have the potential to participate in the market in very different ways, depending on what other offers are available.
If the willingness of each farmer to participate in a market can be evaluated at several different points, then the overall market can be solved using solvers for the 'knapsack problem' (Strandmark, 2009), which find the most valued set of elements that add to a given weight constraint.
Specifically, this submodel receives a list of all bids that farms in a market are willing to make on increments of δ through nδ of water allocation, and a separate list of prices at which the same farms would be willing to sell increments of δ through nδ of water allocation.These bids and prices are evaluated by estimating the expected utility of the farmers' current allocations (and actual receipt) modified by adding δ through nδ (to calculate the bids for purchasing) and by subtracting δ through nδ (to calculate the prices for selling).Note that a change in water allocation of δ is not the same as a change in water receipt of δ -the submodel looks at the actual water receipt histories of neighboring farms to determine what change in receipt would actually have occurred from a change in allocation of δ.By estimating the change in expected utility under a change in allocation of δ, the willingness to pay (or willingness to accept, in the case of a sale) for that change δ can be estimated as: 12 In a simulation where the number of allowed increments is n, each farm will have WTP and WTA estimates for 1 through n increments δ (with implied marginal WTP and WTA values MWTP = WTP/n).The list of all bids across all farms in the market is ordered from greatest to least, and the knapsack problem is solved for each one in turn, until there are no more possible transactions.A transaction is possible if there is a set of increments for sale such that the total price for the increments offered is below the willingness to pay for the total set of increments (e.g., a bid of 18 for 4δ could be met by 3δ offered for 12 and δ from another farm offered for 5) -this is the solution to the knapsack problem.The final price paid is calculated separately for each selling farm as the mean of the WTP of the buyer and the WTA of the seller.Once a farm has participated in a transaction, either as a buyer or a seller, they leave the market (for this timestep) and do not participate in further transactions until the next decision timestep. .
for a simple characterization of what farmers will pay, based on what they are charged and what they are receiving.

Fig. 2 .
Fig. 2. Summary of modeled farm outcomes by water reliability: (A) frequency of occurrence (farms) in dataset; (B) average value of production per area; (C) fraction of farm income from specific crops.

Table 1 .
Example of land-use portfolio for a 2.2 ha farm

Table 3 .
Standardized ordinary least squares (OLS) regressions on key outcomes

Table 2 -Example Land-use portfolio for a 2.2 ha farm
Table 2, for an example).