Water-energy-food nexus in urban sustainable development: an agent-based model

Guijun Li (School of Management Science and Engineering, Central University of Finance and Economics, Beijing, China)
YongSheng Wang (School of Management Science and Engineering, Central University of Finance and Economics, Beijing, China)
Daohan Huang (School of Management Science and Engineering, Central University of Finance and Economics, Beijing, China)
Hongtao Yang (School of Business, East China University of Science and Technology, Shanghai, China)

International Journal of Crowd Science

ISSN: 2398-7294

Article publication date: 12 June 2017




The purpose of this paper is to study how to effectively allocate water, energy and food (WEF) resources in urban development.


An agent-based model combined with NetLogo simulation model has been used in this paper.


This paper proposes a framework for agent analysis in urban WEF consumption.

Research limitations/implications

Further discussions using empirical data are of great importance.

Practical implications

Apply to form the development model of the city in the future.


A new method of WEF management has been used at the city level.



Li, G., Wang, Y., Huang, D. and Yang, H. (2017), "Water-energy-food nexus in urban sustainable development: an agent-based model", International Journal of Crowd Science, Vol. 1 No. 2, pp. 121-132. https://doi.org/10.1108/IJCS-08-2017-0014



Emerald Publishing Limited

Copyright © 2017, Guijun Li, YongSheng Wang, Daohan Huang and Hongtao Yang


Published in the International Journal of Crowd Science. Published by Emerald Publishing Limited. This article is published under the Creative Commons Attribution (CC BY 4.0) licence. Anyone may reproduce, distribute, translate and create derivative works of this article (for both commercial and non-commercial purposes), subject to full attribution to the original publication and authors. The full terms of this licence may be seen at http://creativecommons.org/licences/by/4.0/legalcode

1. Introduction

The rapid development of urbanization in China characterized by large-scale population transfer has put great pressure on the resources and environment in the city. To overcome the constraints and meet the challenges of urban development in the future, international organizations attach greater importance to water-energy-food nexus (WEF nexus) (Hoff, 2011). As the fundamental elements for urban development, the WEF systems are highly interconnected: food production requires both water and energy; using and transporting water requires energy; and energy production requires water (Daher and Mohtar, 2015). These three resources are in a complex non-linear relationship, whether in the process of production, consumption or management, which means that any strategy that only take into account a single resource will bring about unexpected consequences (Muller, 2015).

The agent-based model (ABM), which integrates complex adaptive system theory, artificial life and distributed artificial intelligence, serves as an important tool for simulating and analyzing complicated systems (Ling and Yang, 2003; Courdier et al., 2002). Its principle is to divide the complex system into corresponding agents (each agent has its own data, knowledge, model, interface, etc.) by simulating the real world and to adopt a bottom-up approach to study individual’s behavior at the micro level, from which the researcher draw an conclusion about the system behavior at the macro level (Minsky, 1986; Luo et al., 2003). Urban space can be regarded as an intricate environmental system in which WEF production and consumption activities keep going and different types of agents independently make behavior decisions by receiving and screening the information from external resources and in turn generate demand for WEF at different levels. Additionally, there will be interactions between various agents and environmental systems from which they can accumulate learning experience and change their structures and behaviors for survival and development (Xuan and Gao, 2002).

The previous studies concerning the relationship between different agents in the city mainly concentrated on the migration of population and households, the transformation of land utilization patterns and the changes and adjustments to space like ecological protection zones; few touches upon the flow of resources that do not have significant spatial distribution characteristics, which is also of great importance to achieve urban sustainable development. In the long run, the sustainability of WEF is a prerequisite for the sustainable development of the city. All the agents within the city not only should coordinate with each other in terms of land space but also need to make joint decisions to effectively allocate and dispose the limited fundamental resources.

2. Agents and its framework

The urban sustainable development model constructed in this paper mainly takes into account three agents and their decision-making behaviors, namely, household agent, firm agent and government agent, which constitute an environmental system. In the n × n-dimensional network, agents are connected by the relation between WEF production and consumption. Government decision-making, which comprises public’s participation and enterprises’ behavior, reflects the impact and contributions of different parties to the sustainable development of the city and is conducive to alleviating the conflicts between the increasing consumption of resources and to promoting of low-carbon society.

2.1 Household agent

As a key terminal for WEF consumption, household agent refers to the individuals who can think and act independently in pursuit of a better life. The differences within households account for their differentiated consumption patterns. On the one hand, objective factors such as income, size and living space of the household determine how much resources the family needs to obtain from outside. On the other hand, their behaviors and attitudes in utilizing resources are influenced by subjective factors such as consumption habits, the awareness of saving and the inclination to follow their neighbors’ suits (Li et al., 2016). In terms of the factors that influence household consumption, household agents can be classified into four subtypes (Li and Liu, 2008), as shown in the Figure 1: ① represents the household agent that has a large size, population and living space. Although they need more resources for survival and development, their family members have awareness of saving and keep a low-carbon energy-saving consumption habit, thereby increasing the utilization efficiency of the resources. Likewise, the cases of ②, ③, ④ can be inferred in a similar way.

These four types of family consumption patterns are not immutable. Rather, they can be converted from and to each other. Assuming that the objective factors that affect the family consumption of WEF is fixed, the only way to maintain the sustainability of household consumption is from ① to ②, and from ③ to ④, that is, arousing energy-saving awareness and promoting low-carbon behavior in all households. The reality is that the income of residents in the long term has an upward trend: the increase in income will lead to the expansion of living area, which in turn increases the demand for resources consumption. Therefore, sustainable development requires that residents form a good consumption habits.

2.2 Firm agent

Firms shoulder multiple functions: They are responsible for the production and supply of WEF, whereas at the same time, they consume part of WEF. Firm agent can be further categorized into the agent accountable for the production of WEF and the one that consumes WEF. With regard to the former, the supply of WEF depends on the demand of individuals, the cost of WEF production and market prices. For the latter, the amount of consuming resources not only is related to the price of products but also has close connections to the city’s industrial structure and resource utilization efficiency. Moreover, the firm agent also needs to recycle the remaining waste produced in the consumption process, including waste water, waste gas, solid waste, etc. (Figure 2).

2.3 Government agent

Government agent is special because it does not have evident spatial attributes and cannot live without a certain amount of WEF. The function of government agent is to coordinate the allocation and mobilization of WEF in the entire urban system by formulating economic policies and take administrative intervention. For example, it curbs residents’ excessive consumption by increasing the price of WEF and arouses their environmental protection awareness by raising the garbage recycling prices. At the same time, residents and other consumers give feedback about the consumption information to governments, such as exorbitant water and electricity prices that may affect their quality of life.

To achieve the goal of sustainable development, various agents that have the ability to act independently in the urban environment must coordinate the limited supply of resources and rationally allocate the resources like WEF to avoid conflicts and vicious competition. An agent may achieve optimum by adjusting the consumption of resources in accordance to the WEF price set by the government. It may also interact with other agents to adjust its own consumption behavior.

3. Water, energy and food consumption rules

The following part mainly discusses the WEF consumption rules of different agents and the allocation and mobility of WEF in the entire urban space.

3.1 Households’ water, energy and food consumption

W: According to the function and quality of domestic water, households’ WEF consumption can be divided into three layers: water consumption for outdoor activities as the first layer, domestic water as the second layer and drinking water as the third layer. To improve water utilization efficiency, you can take water-saving measures such as putting a brick in the toilet tank to reduce the flush volume or promote the multiple use of water like watering the flowers with recycled water.

E: The major types of energy that urban residents consume are electricity, gas, liquefied petroleum gas and natural gas. The consumption terminal can be divided into outdoor and indoor parts: the former mainly refers to the energy consumed in transportation, whereas the latter includes the energy utilized in lighting, heating, cooking and household appliances. To improve the efficiency of energy utilization, we can encourage the development of energy-saving technology and the exploration to new energy and give subsidies to low-emission cars.

F: Households’ food consumption is composed of indoor food consumption and outdoor food consumption. The expansion of urban area and traffic congestion contribute to the trend that more and more people tend to eat in the restaurants, considering the fact the distance between workplace and home is long and the trip is time-consuming. Although it can on the one hand reduce household consumption of food and the production of kitchen waste, it will on the other hand increase the demand for consumption in catering industries such as the restaurants, canteens and other places: the city’s total amount of consumption and emissions do not change.

There is certain correlation between household agent and WEF. For example, cooking in the kitchen needs food (as raw materials), water and energy. Arranging the meals based on family members’ actual needs can avoid unnecessary food waste and save water and electricity.

The expression of households’ WEF consumption:

(1) HiWEF=αW+βE+γF+εi
(α, β, γ are preferences and weight and α + β + γ = 1 is a random perturbation variable).

Different households have different preference for WEF, and they will choose their own consumption patterns according to subjective and objective conditions. The probability that each consumption pattern is selected is:

(2) P(x|i)=exp(WEFx,i)xexp(WEFx,i)

The searching rules for household consumption patterns are presented as follows:

  • So long as the conditions of the family permit, we randomly seek practical consumption patterns until we arrive at the limits of constraint conditions.

  • Select the alternative that is better than the family’s current consumption model. If there is no proper alternative, we will stop the effort.

  • Calculate the total utility of these alternatives.

  • Figure out the conditional probability of the consumption pattern in the formula, use Monte Carlo simulation to produce the optimal consumption choice and finally adopt it.

  • Update relevant data in both old and new consumption patterns.

3.2 Firms’ water, energy and food consumption

First of all, set a total amount for the firms’ WEF supply TWEF and analyze their needs for WEF. Firms not only supply water but also have a demand for it. The water consumption by firms can be divided into the water used for production and processing and that used for service industry. All firms need to consume certain amount of energy to carry out its production and business activities. As for food consumption, we assume that employees either consume food in the households or in catering service industry in the cities.

The firm’s resources consumption in the model constitutes at least three parts: WEF production, waste disposal and the provision of necessities and services for society. The first two parts aim to maintain the WEF cycle, whereas the last one is not only the basis for economic and social operation of the whole city but also the source of family income for residents.

The expression of firms’ WEF consumption:

(3) EWEF=CProducitonWEF+Cwastedisposal+Cprovidinggoodsandservices

This is the sum of WEF consumption by all the enterprises in the city, and a single firm’s resource consumption is only a part of it. Water plants, power stations and garbage disposal plants are responsible for water supply, power generation and waste disposal, respectively. Other production and processing enterprises, commercial corporations and service firms take on the responsibilities to provide a wide range of products and services:

(TWEF is relatively fixed)

Because the total supply of WEF is fixed, the WEF consumption of firms and households are in a competitive relationship, that is, an increase in household consumption will cause a decrease in that of firms. Therefore, the household agent and the firm agent should interact with each other before they make behavioral decisions.

To figure out the optimal WEF consumption of firms, it is necessary for them to set certain environmental parameters that inuenced by the government policies and constrained by their industrial structure and available capital (Liu and Silva, 2013). The government’s investment in the development of energy-saving and new energy technologies and price setting in WEF and its waste will influence the WEF consumption of firms. Besides, the upgrading from secondary industry to the third industry means that the firms gradually get rid of the production mode marked by high energy consumption and pollution and that the resource consumption of unit output will decline. Firm agents can feel the changes, adapt their own behaviors to the environment and even predict the future.

3.3 Governments’ water, energy and food consumption

The water consumption of governments is part of the water consumption of public services, and the energy they consume is provided by energy production enterprises. We assume that civil servants rely on families to consume food as the employees in the companies do.

The government agent in the model should behave in consistent with other agents. If the government changes the system environment by implementing a subsidy policy for low-emission or new energy vehicles, then the household agent’s purchasing behavior will be influenced by the policy. Meanwhile, government’s procurement behavior should take into account current environmental conditions.

4. Model design and prediction

Having establishing the consumption rules of different agents within the urban area, we need to explore how these agents carry out consumption activities within the supply constraints of WEF and how does their interaction cause the dynamic change to WEF consumption pattern in whole city. To simulate the complex agent system, we can simulate WEF consumption in NetLogo’s programmable modeling environment, in which NetLogo modelers can issue commands to hundreds of independent agents, making it possible to explore the relationship between individual behavior at the micro level and the macro model derived from the interaction between individuals (Tisue and Wilensky, 2004; Zong, 2011).

4.1 The introduction of NetLogo

NetLogo simulation model is built on the basis of WEF nexus with different agents in the urban space. The model shown in Figure 3 consists of three parts: social environment, multi-intelligent system, simulation of WEF consumption distribution. The first two parts have been elaborated in the previous section: the social environment constitutes factors such as policy objectives, market mechanisms and consumption concept; multi-intelligent system reflects the relationship between different agents, with each agent array storing attributes like its consumption behavior and background. The distribution model of WEF consumption mainly includes urban electronic map, residential area, industrial area, the distribution of government agencies and their consumption density. The consumption model is determined by the current situation of various agents in the city and affected by and reacted to social environment.

As for the dynamic simulation of WEF consumption model, there is a large number of movable agents like households, firms and governments, etc. in a two-dimensional virtual world, who can take the initiative to follow directions and participate in activities. They interact with each other and change the characteristics of the urban consumption system at macro level. The NetLogo simulation model contains three categories: turtles, patches and observers (Wilensky, 1999). Small turtles in this model refer to the agents such as household, firm and government, who move in the two-dimensional world and consume WEF. The patch is the networks in the two-dimensional world, with each one occupying small rectangular pieces. The patch in this model is marked in light green, and the darker the color, the greater is the amount of WEF stock there. We assume that WEF can flow rapidly within the urban area and that the distribution density in each part is even, so the color of WEF in each patch is the same. If the government set the energy-saving emission reduction targets, it means that the resources in each patch will decrease, and their color will correspondently become lighter. The observer represents the one who is observing the world and who is capable of executing instructions, acquiring information about all or part of the world’s states or controlling the world. The observer in this model can be understood as the government because governments not only play a vital role in formulating the long-term development plan for the city and helping it maintain sustainable development but also are the main force to regulate and guide consumer behaviors.

4.2 Model construction under government regulation

The NetLogo simulation model contains three types of entities with different action rules. On the one hand, they are free to move in the urban space to get the WEF for survival. On the other hand, they connect with each other through WEF and gradually form an intertwined consumption pattern. In this paper, this complex relationship has two manifestations: one is the competition between household and the firm, the other is the coordination between government, firms and family. The former reflects the driven force for the evolution of the simulation system, whereas the latter reflects the external forces that keep the system stable, both of which belong to the WEF supply and demand model within the urban space defined by the researcher.

Assuming that y is the sum of the WEF distributed on all patches in the simulated environment, it consists of three parts: input from the outside(x), output from the city itself (z) and output to the outside (m).

(5) {yw(t)=xw(t)+zw(t)mw(t)yF(t)=xF(t)+zF(t)mF(t)yE(t)=xE(t)+zE(t)mE(t)

In the NetLogo model, y is consumed by all the turtles, namely, household, firm and government. Household and firm compete with each other for WEF consumption, whereas the government, which also consumes WEF, plays the role of resources coordinator at most of the time. In other words, when the competition of WEF reaches certain degree, the government needs to issue instructions to ease the tension, so that the consumption of the three resources can strike a balance and be at an optimal state of supply and demand.

First, we need to take into account the competition between household (h) and firm (f) for WEF consumption to reduce the conflicts between the two. Assuming that there are a large number of firms and households living in a specific region in the city, and following the logistic law, the formula illustrates their relationship in terms of WEF consumption:

(6) {ḟ=λ1f(1fN1)ḣ=λ2h(1hN2)

In the formula, f(t) and h(t) represent the number of firm agents and household agents at the time of t, respectively; λ1, λ2 are their respective natural growth rate; N1, N2 are their maximum capacity in the region.

When the household and the firm are in the same urban space, household consumption of WEF resources will hinder firm consumption, and the hindering effect is:


Similarly, we suppose the hindering effects of firms on households is:


Due to the large number of households and firms, it can be regarded as a continuous differentiable function of time t. The model for the competition between household and firm is:

(7) {ḟ=λ1f(1fN1α1hN2)ḣ=λ2h(1hN2α2yN1)

Second, once the consumption of household and firm exceed the supply of WEF, the system may collapse, and it poses a threat to the sustainable development of the city. To alleviate the resources pressure in the city, the government (g) in the model will play a regulatory role. In the following formula, we take into account the situation where the government regulates and controls the resources.

Assuming that the control and regulation of the government is μ, the model can be modified as follows:

(8) {ḟ=λ1f(1fN1α1hN2)+μḣ=λ2h(1hN2α2yN1)+μ

μ is a new feedback adjustment by which the government controls the consumption of WEF of household and firm. Then, we need to design a feedback controller so that the household and firm can be at an optimal state:


The equation indicates that when the competition between household and firm (including the government) for WEF reach a certain threshold, the intervention of government is required to bring the WEF consumption back to an acceptable and optimal state.

4.3. Dynamic model for agent growth

Having established the interrelationship between different agents on the basis of mathematical equations, the author starts to think about how to make the NetLogo model dynamic, thereby figuring out the feature of the long-term evolution of WEF supply and demand. Because WEF consumption in real life is full of uncertainty, such as changes in residents’ consumption habits, the advancement of resource utilization technology and the use of new energy, it will change the agent’s consumption decision and the supply and demand of WEF. Therefore, WEF supply and demand in the city is actually a fuzzy system, and it is difficult to predict when it will be unstable.

To facilitate calculation and improve the accuracy of the model, this paper uses the gray model to predict the number of households and firms. It is assumed that the other variables are static, and the author only takes into account the increase in the number of agents and the changes of their demand for WEF in the city. In this case, how the government serves as the observer to issue reasonable and effective instructions and to coordinate the fierce competition between various agents in face of limited resources?

Suppose X(0) is the modeling sequence of GM (1, 1):


X(1) is the 1-AGO sequence of X(0):


Suppose Z(1) is the generating sequence of the MEAN of X(1):


The grey differential equation model of GM (1, 1) is:

(9) x(0)(k)+az(1)(k)=b

In the equation, a represents development coefficient, and b is grey actuating quantity. Supposing α̂ is estimated parameter vectors and α̂ = (a,b)T, the minimum squares estimated parameter of grey differential equation (9) is:


In the equation:

(10) B=[z(1)(2)1z(1)(3)1z(1)(n)1],Yn=[x(0)(2)x(0)(3)x(0)(n)]dx(1)dt+ax(1)=b
is the winterization equation or shadow equation of the grey differential equation x(0)(k) + az(1)(k) = b.


  • The solution of the winterization equation dx(1)dt+ax(1)=b (also called “time response sequence”) is:


  • The time sequence response of GM(1,1) grey differential equation x(0)(k) + az(1)(k) = b is:


  • Suppose x(1)(0) = x(0)(1):


  • Reducing value:

    (11) x^(0)(k+1)=x^(1)(k+1)x^(1)(k)

The above equation is the prediction equation.

The prediction model indicates that if the government does not take measures, the demand for WEF in the city will exceed supply at some time in the future, which may result in resources shortage and hinder the sustainable development of the city. Therefore, the government needs to issue instructions in advance or limit the demand of agents to maintain the stable supply and demand of WEF.

5. Discussion

The rapid development of urbanization in China has caused a string of problems such as population congestion, resource shortages and environmental degradation. Therefore, the city needs to seek a sustainable development pattern to save resources for its future development. As the basic elements for human survival and urban development, the supply and consumption of WEF become the top priority, and they also have numerous interconnections in the process of production, consumption and management which could be called WEF nexus (Li et al., 2016).

This paper introduces the ABM, simulates and analyzes the complex systems of WEF’s allocation and flow in the city. By subdividing the urban system into different types of agents, household, firm and government, we discuss the relationship pattern and micro rules of various kinds of agents in WEF production and consumption and then establish the NetLogo simulation model of urban consumption. Based on the interaction between social environment and multi-intelligent system, this model forms the simulation of WEF consumption distribution in the city and simulates the interaction of various agents with the evolution of time, which facilitates research on the relationship between individual behavior at the micro and macro model. However, we have just proposed a framework for agent analysis in urban WEF consumption in this paper, whereas further discussions on this agent model using empirical data are of great importance, especially on supply and demand of WEF in a specific city, the distribution of agents and their resource consumption patterns.


Sub-types of household agents and their conversion mechanism

Figure 1.

Sub-types of household agents and their conversion mechanism

Firm agents’ supply and recycle of WEF

Figure 2.

Firm agents’ supply and recycle of WEF

NetLogo simulation model for urban WEF sustainability

Figure 3.

NetLogo simulation model for urban WEF sustainability


Courdier, R., Guerrin, F., Andriamasinoro, F. and Paillat, J.M. (2002), “Agent-based simulation of complex systems: application to collective management of animal wastes”, Journal of Artificial Societies & Social Simulation, Vol. 5 No. 3, p. 4.

Daher, B.T. and Mohtar, R.H. (2015), “Water–energy–food (WEF) nexus tool 2.0: guiding integrative resource planning and decision-making”, Water International, Vol. 40 Nos 5/6, pp. 748-771.

Hoff, H. (2011), “Understanding the Nexus”, Background Paper for the Bonn 2011 Conference: The Water Energy and Food Security Nexus, Stockholm Environment Institute, Stockholm.

Li, X. and Liu, X. (2008), “Embedding sustainable development strategies in agent-based models for use as a planning tool”, International Journal of Geographical Information Science, Vol. 22 No. 1, pp. 21-45.

Li, G., Huang, D. and Li, Y. (2016), “Water-energy-food nexus (WEF-nexus): new perspective on regional sustainable development”, Journal of Central University of Finance & Economics, Vol. 352 No. 12, pp. 76-90.

Li, G., Li, Y., Jia, X., Du, L. and Huang, D. (2016), “Establishment and simulation study of system dynamic model on sustainable development of water-energy-food nexus in Beijing”, Management Review, Vol. 28 No. 10, pp. 11-26.

Ling, X. and Yang, K. (2003), “Research on urban evolution using agent-based simulation”, System Engineering Theory and Practice, Vol. 23 No. 12, pp. 1-7.

Liu, H. and Silva, E.A. (2013), “Simulating the dynamics between the development of creative industries and urban spatial structure: an agent-based model”, in Geertman, S., Toppen, F. and Stillwell, J. (Eds), Planning Support Systems for Sustainable Urban Development, pp. 51-72.

Luo, P., Si, Y., Hu, X. and Yang, J. (2003), “Review of agent-based modeling and simulation in complex system”, Journal of the Academy of Equipment Command & Technology, Vol. 14, pp. 78-82.

Minsky, M. (1986), The Society of Mind, Simon and Schuster, New York, NY, pp. 371-396.

Muller, M. (2015), “The ‘nexus’ as a step back towards a more coherent water resource management paradigm”, Water Alternatives, Vol. 8 No. 1, pp. 675-694.

Tisue, S. and Wilensky, U. (2004), “NetLogo: a simple environment for modeling complexity”, International Conference on Complex Systems, Vol. 22, pp. 16-21.

Wilensky, U. (1999), “NetLogo”, Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL, available: http://ccl.northwestern.edu/netlogo/

Xuan, H. and Gao, B. (2002), Management and Social Economic System Simulation, Wuhan University Press.

Zong, L. (2011), “Design of behavior management based on multi-agent modeling”, Chinese Journal of Management, Vol. 9, pp. 1318-1324.


This research supported by National Nature Science Foundation of China, project is “Establishing and Application of System Dynamics Model on Water-Energy-Food Nexus in Typical Area in China”, No. 71473285.

Corresponding author

YongSheng Wang can be contacted at: wangysforever@163.com

Related articles