Development of an Agent-based Model and Its Application to the Estimation of Global Carbon Emissions

With the purpose of studying the influence of population dynamics and economic growth on energy consumption and carbon emissions, an endogenous economic growth model is proposed incorporating physical and human capital and using an Agent-Based Model. The model can test different development strategies by identifying the key factors existing at the agent level that may speed up or slow down a given path, and therefore it is an interesting tool to develop and to test mitigation and/or adaptation measures. Favorable scenarios may be possible in societies that encourage investment in human capital through education and technological development, provided that this is accompanied by a reduction in consumption rates and the creation of physical capital by the population. Moreover, this model shows that human capital resulting from education not only raises productivity, but also plays a key role in the development and adoption of new technologies that drive long-term growth.


Introduction
The rise of the atmospheric carbon dioxide concentration due to anthropogenic emissions generated by energy consumption of fossil fuels is increasing the additional greenhouse effect.Currently, the analysis of the influen ce of demographic variables on these emissions has become a relevant subject in the debate on climate change, since their impact on economic growth has a direct effect on the consumption of goods, primary energy, and therefore on carbon emissions, modifying the accumulation of greenhouse gases in the atmosphere.
Population growth rates have declined over the last fifty years in almost every country in the world, showing a reduction in fertility rates and an increase in life expectancy at birth [1].The significant social and health care improvement of the last century has decreased infant mortality and increased longevity, producing a demographic transition which has changed the population structure.In developed countries, a reduction of the youngest age groups is already noticeable, however smoothed by immigration from less developed countries.Global popu-lation ageing may impact on economic growth through variations in consumptions preferences.
Theories of economic growth have led to the development of many studies since the beginning of the systematization of this science.Among such theories, we can mention Adam Smith, who proposed the division of labor as a source of growth.Thomas Malthus stated that if income exceeds a certain threshold, mortality rates should decay and birth rates should rise, balancing economic growth.However, data of the past 150 years show that while mortality rates declined due to improved living conditions and investment in health, birth rates also decreased in most countries.Neoclassical economists have suggested that the causes of economic growth are related to increased investment in physical capital through an exogenous technical progress, ignoring its relationship with population dynamics [2,3].But increased investment does not adequately explain the decline in growth rates or the difference in growth between developed and least developed countries.
Endogenous growth models determine long-term growth rates using internal feedback variables.They predict GDP growth as a result of investments in research and development (R&D), which generate growth for themselves [4,5].Another key element in these models is the creation of technology and innovation to maintain sustained growth [6,7].In this respect, population growth causes an increase in the number of consumers and in the number of workers dedicated to productive activities and research, leading to an increase in the scale of the economy.Education, knowledge and skills are central to technological development and have a positive influence on growth.Human capital is related to the degree of training and productivity of individuals involved in production.
As societies have expanded human capital (more education, better skills and knowledge, higher investment in science), a decline in fertility rates has been observed.This fact is related to female labor force participation, fertility choice, and time spent on individual training [8], [9].By contrast, societies with less human capital have higher fertility rates but lower per capita income, which could explain development disparities among countries [10,11].Jones [12] argues that the level of investment in R&D has a positive impact on the economy by improving the level of per capita income, although it does not affect the growth rate of GDP/capita in the long term, as this is proportional to the rate of population growth.This concept introduced the idea that long-term sustained economic growth cannot be maintained at low population rates or with stagnant population.However, as the working-age population is declining with respect to the elderly population, it is also becoming smarter and more productive, which increases labor supply.In fact, the same factor that has contributed to the decline in fertility has raised the educational level of young individuals and will sustain rapid productivity growth and income [13,14].This research simulates the evolution of population and economic growth, its energy consumption and carbon emissions through an endogenous growth approach, using physical and human capital as feedback variables under an Agent-Based Model (ABM) simulation paradigm.In the ABM, a system is modeled as a set of autonomous entities, called agents, with the ability to act and make decisions based on a set of pre-defined rules.Agents can evolve and adapt, and are able to perform several actions independently, at the same time interacting with other agents and their environment [15,16].Agents' ability to evolve and adapt often results in the manifestation of an ensemble of emerging patterns as a result of the interaction of individual components [17], [18].Consistently with Kelley and Evans [19], our agentbased approach has the advantage of generating scenarios that are influenced by heterogeneous behavior preferences.The concept of emergence along with the easy and straightforward inclusion of the concept of heterogene-ous choice and decision making of agents are the main features of the ABM and the main reasons for proposing this simulation paradigm in the present study.
The ABM is beginning to be used in diverse areas such as ecology [20], ecological economics [19,21], economic growth based on the production of ideas [22], and climate change [23,24].Janssen and De Vries [25] presented a very interesting work on climate change that includes the concept of agents' choice.The ABM is also very suitable for social systems simulations which would otherwise result in a high computational cost.These examples show the use of the ABM as a trend for a new kind of simulation approach [26,27].

Model Description
We describe an endogenous system through the behavior of individuals1 from 1950 to 2100 using an agent based model (ABM) paradigm.The proposed model is based on individual agents belonging to different families, in which although individuals have finite lives, we consider extended families (dynasties) with infinite life horizon.Individuals of each dynasty are linked through a network of intergenerational transfers of capital, and were not considered marriages or links between dynasties.Agents are differentiated in four groups according to their chronological ages: Children (0 to 14 years), Young adults (15 to 49 years), Adults (50 to 69 years) and Senior adults ( 70).Each individual agent is created with a set of initial values, which are updated with each time step (t = 1 year) through a series of instructions.
All individuals are economically active and independent, having their own physical and human capital, and their own consumer trends and investment rates in both types of capital.Agents have the ability to choose their own reproductive, economic and energy development, according to the family traditions or their personal choice.As a consequence of their growth and development, agents consume energy and generate emissions.The sum of the individual choices are combined (as a society) in a total energy consumption and CO 2 emission to the atmosphere.

Economic Growth
To design the economic module of the model shown, it was considered a closed economy based on one sector, in which households are their only representative agents and all the capital stock is owned by their residents.In such an economy the output may be used for consumption or investment by the representative agents.Taking the term capital in a broad sense, the output of each agent (x) equals the quantities they devote to consumption (cons) and investment, both in physical capital (i k ) and human capital (i h ) [28]: The value of age max depends in part on the nature of the variable represented by the mapping curve f(t), and also on the agent's choices and behaviors, which are described in the Table 1 of the Section 2.3.
Assuming that physical capital (k) and human capital (h) are depreciated at the same rate level (), their values for time (t + 1) are defined by the values in t, plus the investment in physical capital or the investment in human capital, respectively, minus the depreciation of capital: Once all individuals get their levels of consumption and investment in human capital, they calculate a tentative value for their investment in physical capital, also from an inverted bell-shaped curve.This value is tentative because the intended investment is subject to the availability of resources of their family or dynasty.This restriction corresponds to households' budget constraint, which states that their total income is the sum of the wage income of the whole family (W), and the asset income2 (r).Whereas households use the income that was not used for consumption to accumulate more assets (A), the budget constraint of each family or household is given by: The time evolution of consumption levels and rates of investment depend on each individual, his customs and choices, his type of development and his age [13,29].To represent the evolution of the levels of consumption (cons) and investment rates in human capital (i h ) of an individual throughout his life, we propose an inverted bell-shaped mapping curve f(t) (Gaussian type).This function grows up to a maximum from which it begins to decrease.The ABM uses discrete-time functions, therefore the age of each agent is chosen as the independent discrete variable increasing linearly with each time step t.If we use age max to represent the age at which the individual achieves the maximum value of certain variable, and (b) to represent the parameter governing the width of the mapping curve f(t), its rate of change is expressed as: Being (C) the sum of current consumption level of all individuals of that family.Since we are in a closed economy, family assets (A) are equivalent to the total capital of the family, given by the sum of physical and human capital of all the individuals belonging to that family (K + H).Thus, an increase in an individual investment is possible only if the family budget can afford this growth.
If the physical capital calculated from the tentative investment exceeds that permitted by the resource constraint, all individuals of that family must reduce gradu-In discrete form, the curve f(t) may be written as: ally its investment in physical capital through regulation of the parameter (b) of Equation ( 5).
If the level of household consumption exceeds the family budget constraint, even after reducing the investment in physical capital; all individuals of this family must reduce their consumption levels.This is achieved (iteratively) by regulating the corresponding mapping curve f(t), until a family capital is reached that meets the restriction of Equation (6).
Once the value of the consumption and investment at each (t) is determined, every agent gets a production level (x) from Equation (1).The sum of production levels of all agents represents the gross domestic product (GDP); the average production of all agents is the GDP/ capita.
Each individual in its childhood devotes most of his wealth to invest in human capital (education and training).As the agent gets older, it increases the consumption level and the investment in both types of capital.In its youth (from age 15 to 49) the agent reaches the maximum level of investment in human capital.From this time on, the investment in human capital will decline, increasing the values of consumption and investment in physical capital.At some point in adulthood (50 to 69 years), the agent will reach the highest level of consumption and investment in physical capital, decreasing any investment thereafter.As the agent reaches the older age (> 70 years), although the levels of consumption and investment in physical capital are high, his consumption and investment in capital decreases.

Population Growth
Individuals created in the model have the ability to produce new individuals in their own family.The model does not differentiate the sex of the agents; therefore all individuals of reproductive age (young group) may choose to reproduce (without mating) according to a value of minimum age of reproduction and the maximum number of children they choose to have.The values for each parameter will depend on the development option chosen by the individual.Individuals who choose to invest much of their time to build human capital will tend to have fewer children, and will reproduce at older ages than other agents.At the same time, since the birth of new individuals introduces new consumers in the family budget, an additional restriction was imposed on the maximum number of reproductions per family at each t, in order to avoid destabilization of the family economy.Thus, if an individual is able to reproduce at a given time t but total births in his family have already reached the maximum allowed, the reproduction will be executed at time t + 1.
When an individual reproduces, he gives half of its physical capital to the new agent, achieving the economic independence of both.Therefore, the newly born individual is considered economically active.Given the "nonrival" characteristic of human capital, the new agent inherits part of the human capital of the parent agent without the latter losing his own.The new individual (at age = 0) also receives a level of initial investment and consumption proportional to the economic level of his family, and therefore the initial decisions of the agent will be influenced by the family background.
The analysis of historical data [1] shows that life expectancy in more developed regions is much greater than in the least developed countries.In addition, global life expectancy has been increasing continuously for the past 50 years, mainly due to improvements in health care, advances in science and medical technologies, and urbanization rates.In this model, life expectancy is set at birth for each agent, adopting a higher or lower value with respect to the global average life expectancy for a given birth year depending on the chosen development option.Once the individual reaches life expectancy age, it dies, leaving as legacy its physical capital, which is divided equally among the remaining (surviving) members of his family.The number of dynasties or cohorts remains constant, while the number of individuals of each dynasty varies according to the number of surviving agents for the period.Thus, the population p is equal to the number of living agents.

Development Options
In order to introduce the concept of agents' choice, taking a similar approach as Janssen and De Vries [25], four development options were created as detailed in Table 1.
To choose the development option, in each t individuals compare their own human capital (at time t) to a reference (average) individual born in 1950 (t = 0, initial condition) with a high level of investment in human capital.In turn, the agents observe the trend in the election of the members of their family, that is, the most often repeated development option among individuals their own family.The higher the human capital of an individual with respect to the reference individual, or the higher the family predisposition to invest in human capital, the greater the possibility of economic development, which is represented by a higher development option number.

Initial Conditions
The initial conditions are assumed to be in a steady state situation, which represents the population distribution in terms of wealth in the initial year (1950).The average per capita GDP data of various countries in 1950 was organized into four groups: 1) Countries with GDP/capita < 1/2 times GDP/capita global average.
The initial number of agents (or initial population) was distributed proportionally according to these four groups in a fixed number of families (dynasties or households).Within each family, a certain number of members are created (children, young adults, adults and senior adults), replicating the distribution of population by age groups and GDP/capita observed globally in 1950.Each family was assigned an initial wealth, according to the observed distribution for that reference year.The initial wealth of each agent was assigned according to their own age and initial household wealth, using the mapping function f(t) in Equation ( 4).The initial values for human capital, physical capital, investment and consumption levels of each agent, were obtained following the existing literature [28].The initial development option of each agent was randomly assigned.To achieve stabilization of the initial conditions, a spin-up time was added at the beginning of each run.

Application Model to Energy Consumption and Carbon Emissions
Worldwide, the primary energy consumption and carbon emissions show a behavior linked to the GDP/capita and population growth, as well as to various technology indicators [30,31].Agents consume energy and generate emissions as a consequence of their growth and development; therefore, at the individual level we assume that the energy consumption of each agent (e) can be expressed as the product of the two following factors: Where (η e ) is an energy intensity factor, i.e., the amount of energy consumed per dollar of generated GDP.In this way, the energy consumption of each agent is determined by the level of its current production (x) and the energy intensity used to generate this production.According to historical data [32,33] and the work presented by Castesana and Puliafito [29], there has been a steady improvement in overall energy intensity, which can be translated into energy savings per unit of production.
In a similar way to what was proposed with life expectancy and fertility, the energy intensity value adopted by the agents will depend on the chosen development option as detailed in Table 2, so that higher levels of human capital investment relate to better energy efficiency.
The carbon emissions (c) produced by each agent from energy consumption can be expressed as follows: Factor (i c ) represents the rate of carbonization, or the amount of carbon dioxide emitted into the atmosphere by each unit of consumed energy.This factor is closely related to the type of available energy sources and its emission factor.Similarly as with the energy intensity factor, the value adopted by each agent for this factor depends primarily on the chosen development option as detailed in Table 2.

Results
The model results are obtained from the combination of the behavior of all created agents, for three different scenarios: high, medium and low scenarios.In each time step, the agents "choose" their options randomly; therefore, each model run will produce different outputs.That is why the results shown in this section are the average obtained from 40 different runs for each proposed scenario.These results have been normalized to 1950 in order to show only the relative increases observed with respect to that reference year.Aggregate outputs, such as population, GDP, GDP/capita, energy consumption and carbon emissions, were compared to historical values.
Figure 1(a) shows the results obtained from the highscenario for the global population, and the corresponding distribution of age groups, compared with world historical data and projections of the least developed countries,

Carbonization index
High values of carbonization index similar to the one observed in countries using mainly inefficient energy sources, such as coal and biomass.
Mean values for carbonization rates, similar to the global trend.
Low values of carbonization rates, similar to the ones observed in countries using clean energy sources with very low emission rates, such as hydro, nuclear, solar, etc.
Most efficient values of carbonization rates, similar the ones observed in countries using clean energy sources with very low emission rates, such as hydro, nuclear, solar, etc. Figure 2 shows the values obtained from the three proposed scenarios for the GDP/capita, compared with world historical data, and the values for the more developed regions and least developed countries [33].Figures 3(a) and (b) show the estimation of technological development factors such as the energy intensity factor and the rate of carbonization respectively, compared with historical data [32,34,35].It is important to note a steady improvement in this factor, which can translate into energy savings per unit of production 3 .Figures 4(a) and (b) show energy consumption and carbon emissions, respectively, compared to historical data and IPCC SRES Scenarios4 [32,[34][35][36].

Discussions
As shown in Figure 1, the highest global population calculated by the model, is similar to the projections for the least developed countries (as classified by the United Nations), with a significant proportion of youth sectors throughout the analyzed period.Both population and youth rates are higher than the global data average trend.
The mean results show stabilization in population growth beyond 2050, accompanied by a demographic transition reflected in a reduction of the proportion of younger sectors and an increase in the proportion of older sectors.
The lowest results show stagnation in population growth and a more evident population ageing in comparison to the previous case.These results are compared with data and projections for the more developed regions, as classified by the United Nations, which show a much slower than average population growth.It is also observed that increasing number of agents imply a higher level of primary energy consumption and a consequent increase in the level of carbon emissions.However such emissions increases are partially offset by the reduction of technological indicators, which show a generally downward trend in recent years.

Societies with Low Tendency to Investment and Consumption
The analysis of the results of the model shows that the highest values for population growth belong to societies in which a large number of agents choose to develop Option #1: The observed global average economic growth for the same option is lower than expected, reaching the minimum results shown for that variable.Birth rates obtained are higher than the global average, and life expectancy is lower than in a more balanced society.The growth in per capita consumption shows a minimum value with a small positive slope, similar to the result observed for investment in human capital, in a scenario of slow economic growth.
Per capita energy consumption for this society shows stagnation in its growth curves and also in per capita carbon emissions, due to the low level of consumption and economic growth.However, the average values for both variables are higher than those obtained for a balanced society due to the inefficient behavior of technological indicators.Despite a slower growth, this scenario shows a steady population growth associated to slow technological change; it produces high values of energy consumption and values of anthropogenic emissions.

Societies with High Propensity to Investment in Capital
The fact that agents spend their time in education until in their lives strongly affects their fertility choices, resulting in very low birth rates and even lower rates, with a consequent reduction and ageing of the population.Mortality rates show a downward trend related to the high average level of human capital existing in this type of scenario.However, at some point in the model run under these conditions, rates reach a minimum and begin to increase due to population ageing.In a world with an increasing elderly population and a decreasing number of children, the number of deaths per 1000 individuals tends to increase.Population growth in these societies is minimal.
Since in these societies there is a trend to maximum efficiency for technological indicators, the mean values obtained for energy consumption and carbon emissions per individual are lower than those obtained for more balanced societies.These scenarios show high levels of productivity reflected in higher values of GDP/capita compared to the global average trend.However, due to the high efficiency of technological indicators and the low number of inhabitants related to these societies, the values obtained for energy consumption and carbon emissions are minimal.
In this way, the maximum efficiency of technological indicators and the minimum results obtained for birth and death rates for the overall population, and for consumption of energy and carbon emission, refer to societies where the proportion of agents who choose to develop Option #4 is vastly superior to other options.

Societies with High Propensity to Consumption
These are scenarios in which most individuals choose development options with high levels of consumption labeled as Option #3.These societies show the highest economic growth accompanied by highest levels of per capita consumption and steep slopes in growth rates of consumption and investment in physical capital.This affects per capita growth rates of energy consumption and carbon emissions, which show large positive slopes.Although technological indicators are more efficient than the world average, and population growth is lower than the average trend, the high consumption rates related to such societies result in large global levels of energy consumption and carbon emissions.
Thus, the maximum results obtained for GDP/capita, overall energy consumption and carbon emissions correspond to societies in which a large number of agents have chosen to develop Option #3.

Balanced Societies
The results obtained from the medium-scenario correspond to societies in which agents choose their development options heterogeneously.In this work, the agents' choices are based primarily on the comparison of their level of human capital with their environment, which "encourages" the choices for higher level of human capital.This feature generates a growing trend in the choice of development options with major investment in this type of capital.This trend results in a balanced society (even near or beyond 2100) with decreasing birth and mortality rates related to the selected choices of fertility and the improvements in the health system involved in societies with high levels of investment in education and knowledge.The results of such scenarios show population growth with stagnation beyond the middle of the XXI century, and the economic growth, consumption and investment curves show a moderately increasing trend.
Energy consumption levels and rates in these societies show a favorable trend associated to improvements in technological indicators, which results in an average growth of energy consumption and carbon emissions.
Note the importance of heterogeneity in the agents' choice of behavior, since it allows the model to obtain different development scenarios, avoiding the rigidity observed in the results for homogeneous societies.
It is also noteworthy that balanced societies could be masking great inequality, with sectors or regions exhibiting high consumption rates and others that show high levels of poverty.However, the results obtained from balanced societies show that, to a greater or lesser extent, all the development options will continue to exist over time, representing most adequately the world economic and cultural diversity.

Conclusions
The model presented simulates the evolution of population and economic growth through an agent-based approach, using an endogenous growth model with physical and human capital.Such endogenous feature allows all variables of economic and demographic systems to be feed-backed to each other.
The use of the ABM allowed the incorporation of the decision-making concept.This ability of agents to choose their behavior results in a range of possible outcomes.By working with heterogeneous behavior preferences of agents, the model produces stable outcomes bounded within a range of realizable minimum and maximum development scenarios.
We argue that human capital created by education is not only a productive input that directly raises productivity, but also plays a crucial role in the development and adoption of new technologies that drive long-term growth.In addition, the model shows some evidence of the impact of labor force and fertility, suggesting that increasing levels of education play an important role in family planning.Of course there will always be cultural and religious factors and idiosyncratic variations that affect fertility choices; nevertheless, this cultural diversity (expressed in the model as non expected random options) is also an important factor of stabilization for the different scenarios.However, in the context of this work and according to the tested conditions, we conclude that increasing educational levels drive to a fall in fertility and an increase in productivity growth.
From the application of the model to the estimation of the primary energy consumption and carbon emissions, we should highlight the following effects: 1) Societies with low tendency to investment and consumption show high values for global carbon emissions, associated with high rates of population growth and an unfavorable trend in technological efficiency indicators; 2) Societies with positive trend in technological efficiency but high propensity to consumption also lead to scenarios with high energy consumption and carbon emissions.From this, it follows that a possible pathway to achieve favorable scenarios of anthropogenic carbon emissions can be found in societies that encourage investment in human capital through, for example, education and technological development, provided that this be accompanied by a stabilization or reduction of consumption rates and the creation of physical capital by the population.
as classified by the United Nations, Figure1(b)shows the medium-scenario results for the global population, and the corresponding distribution of age groups, compared with world historical data and projections, and Figure1(c) shows the low-scenario results for the global population, and the corresponding distribution of age groups, compared with world historical data and projections of the more developed regions, as classified by the United Nations.

Figure 1 .Figure 2 .Figure 3 .Figure 4 .
Figure 1.Global population: (a) high, (b) medium and (c) low scenarios, and the corresponding distribution of age groups compared with world historical data and projections, and the values corresponding to the more developed regions and least developed countries.

Table 1 . Development options: economic and demographic characteristics.
High; higher than average.Similar to the trend in more developed regions.