Local environmental quality and heterogeneity in an OLG agent-based model with spatial externalities

Most of the theoretical contributions on the relationship between economy and environment assume the environment as a good distributed homogeneously among agents. The aim of this work is to relax this hypothesis and to consider that the environment can have a local character even if conditioned through externalities by the choices made at the global level. In this article, we adapt the classical framework introduced in John and Pecchenino (Econ J 104(427):1393–1410, 1994) to analyze the dynamic relationship between environment and economic process, and we propose an OLG agent-based model where each agent perceives her own level of environmental quality determined by her own decisions, and by the decisions of those living around her. Despite the attention devoted to local environmental aspects, network externalities (determined through the scheme of Moore neighborhoods) play a fundamental role in defining environmental dynamics and they may induce the emergence of cyclical dynamics. The occurrence of oscillations in the local environmental quality is partially mitigated by the presence of heterogeneity in individuals’ preferences. Finally, when a centralized planner is introduced, the dynamics converge to stationary values regardless of the assumption on heterogeneity of agents.


Introduction
In recent years, environmental issues have assumed an increasing relevance both in economic research and in political agendas. From a theoretical point of view, modeling approaches to environmental issues are characterized by crucial differences. The literature that explored this topic in a dynamic setting offers a traditional view of the environmental problem solved by an infinitely lived benevolent social planner. Leaving aside the specific differences within these works, this approach is mainly characterized by a social planner with perfect knowledge about environmental dynamics aiming to optimally allocate resources between economic activity and environmental protection (see Van Der Ploeg and Withagen 1991). The result typically obtained in this strand of literature is the existence of a path on which the economy monotonically grows toward the long-term equilibrium and environmental quality increases accordingly or, alternatively, it exhibits an U-shaped evolution. However, even in the second case, after an initial phase of degrowth, the prediction of such models is the monotonic evolution of the environmental quality toward its stationary level or growth rate. 1 Alongside this approach, another strand of research has focused on the study of the characteristics of economic systems when environmental issues are solved by a social planner, with a finite decision-making horizon. In this regard, some examples are represented by the articles of John and Pecchenino (1994), John et al. (1995) and Fodha and Seegmuller (2014). Though from a theoretical point of view there are important differences (the non-Pareto optimality of the trajectories), from a dynamic point of view, results are similar to those described so far. Indeed, in several works (such as John et al. 1995), the authors focus on identifying the stationary states of the system and analyzing how the levels of these equilibria are affected by the main parameters of the model. In other words, although models are dynamic, since the growth process leads the system closer and closer to stationary states, the analysis is restricted to these. Results dramatically change when a decentralized solution to environmental issues is considered. As shown in several works by Antoci and coauthors (see Antoci et al. 2007Antoci et al. , 2019, the introduction of a representative agent, which unlike the social planner does not internalize the environmental problem, may produce dynamics that do not converge to any long-term equilibrium. In this case, economic variables oscillate forever even if no exogenous shock is introduced. The main message of these articles is that, due to the distortions they create in the allocation process, environmental goods are triggers for the emergence of cyclical evolutions in both the level of environmental quality and the economic variables. Because economic agents consider the evolution of the environment as given, they do not make any investment in environmental maintenance. Instead, they make self-protective choices through private consumption that can exacerbate environmental problems causing, in turn, feedbacks prone to the emergence of cyclical dynamics. 2 This article aims at investigating whether environmental assets can be a cause of cyclical dynamics even in a fully decentralized setting where instead of considering the representative agent hypothesis, in which the environmental evolution is assumed as given (Antoci et al. 2007), there are interacting agents that can exhibit pro-environmental behaviors. In doing so, we extend the OLG model developed by John and Pecchenino (1994). In the original framework, the allocative problem is solved by short lived representative agents who act as social planners. The agents live two periods and choose whether saving their labor income to consume a private good when they are old or spending it for the environment. Unlike John and Pecchenino (1994), we consider that decisions are taken in a decentralized form by a population of agents each of which lives, without the possibility of migration, on a cell of a two-dimensional grid and makes decisions based on the level of environmental quality that is experienced on that cell. Consumption choices and expenditures to improve the environment in their own cells affect the environmental quality of nearby cells through externalities that cross the boundaries of the cell (a concept similar to the transboundary externalities among regions introduced in La Torre et al. (2021), but in our framework expressed as externalities among individuals). In the absence of interactions (no externalities among cells), the model collapses into a model formally similar to Zhang (1999). In this case, closed-form results concerning the existence and stability of stationary states can be obtained. As we mentioned above, even if cycles are proved to exist, when imposing values from the econometric literature to economic parameters, regardless of environmental parameters, the model exhibits dynamics that lead each cell to its long-term level or cycles with small periods (2-cycles or 4-cycles). Therefore, we investigate how the interaction between agents modifies the evolution of the system. This analysis connects our work also to the literature on the provision of public goods on networks. A large literature has studied in both static (see Bramoullé and Kranton 2007;Elliott and Golub 2019) and dynamic (Allouch 2015) contexts how the network structure and the links between agents may affect the characteristics of the Nash equilibrium related to the local public good game. Regarding the static context, starting from the pioneering work of Bergstrom et al. (1986), Bramoullé and Kranton (2007) develop a network model related to the provision of a public good which is non-excludable for agents connected in the same network. In terms of environmental contribution (and consequently of the levels of environmental good provided), they notice that as the size of the social network in which an individual is included increases, the probability of exerting a low effort for the environment increases. Thus, in the presence of very large networks, a high number of free riders are observed. Although we consider a network with a homogeneous structure, a similar phenomenon may be also observed in our model. In fact, (i) due to the presence of externalities caused by the choices of nearby agents and (ii) the overlapping generations structure of the model, the standard free riding problem arises both in intragenerational and intertemporal terms. Concerning the dynamic strand, Allouch (2015) analyzes the existence and stability of the Nash equilibrium in a network in which agents interact with respect to the consumption of a public good. The author shows that the higher the marginal propensities to consume the public good, the less consumers substitute and adjust to their neighbors' provisions and then the Nash equilibrium is stable. In line with this result, in our work the presence of an overlapping generations structure (where agents optimize in a finite horizon setting while the environment evolves in infinite time) and interaction between agents induces a similar phenomenon. Considering the preference toward the local environment as the propensity to consume the public good, we notice that for high levels of preference the environmental dynamics will (statistically) tend to converge to Nash equilibrium. Further, the likelihood of converging to the stationary point increases in the case of heterogeneous agents. Our result is also in line with Corazzini and Gianazza (2008), who study a model where agents are distributed over a circle and contiguous agents interact locally, showing how high levels of preference for the environmental good are a vehicle for a stable Nash equilibrium. Considering the provision of public goods in a context of positive spillovers between jurisdictions, Bloch and Zenginobuz (2007) study a non-cooperative game between jurisdictions in which levels and asymmetries among spillovers play a key role in determining the value of the Nash equilibrium. With respect to this work, our model (i) allows us to observe that the equilibrium not only changes as the spillovers between interacting cells in the neighborhood vary, but for sufficiently high values of these spillovers the equilibrium loses stability; (ii) reinforces, in a dynamic context, the complexity result found by the authors regarding equilibrium levels for the provision of public goods when n jurisdictions (with n > 2) are assumed. Indeed, the interaction among several agents (homogeneous or heterogeneous) in contiguous positions may give rise to continuous changes in allocative decisions. In terms of general results, the main findings of this article are that (i) the local dimension of the environmental good can justify the plausibility of agents participating in its maintenance; (ii) externalities between cells are the engine for the emergence of oscillatory dynamics. Indeed, comparison with Zhang (1999) shows that interactions between different generations cannot alone lead to nonlinear trends in environmental and economic variables if realistic parameter sets are considered; (iii) heterogeneity plays a stabilizing role in the dynamics because differentiated behavior among agents creates a more balanced grid in terms of environmental quality and economic outcomes, reducing feedback reactions by agents. However, this dampening effect is only partial; (iv) when externalities among cells exist, the environment's inability to regenerate at high rates and the extent of the negative impact of consumption on the environment play a destabilizing role in the dynamics, while the effectiveness of environmental spending and a strong generalized interest or disinterest in the environment are elements that favor the stabilization of the dynamics. The remainder of the paper is organized as follows: Sect. 2 describes the structure of the OLG agent-based model; Sect. 3 provides an analysis of the properties of the model when local interactions are not allowed; Sect. 4 discusses the results of simulations performed when local interactions exist. Finally, Sect. 5 concludes.

The model
We consider an overlapping generations economy where two generations, the young and the old, coexist at every discrete time period t = 1, . . . , +∞. 3 The number of economic agents belonging to each generation is assumed to be constant and each agent lives, without the possibility of movement 4 , in a specific cell v of a lattice L with dimension N × N . Therefore, there exists a one-to-one correspondence between the N 2 agents and the cells and we indicate the agent living in the cell v as the agent v. To avoid problems in defining neighborhoods at grid boundaries, we assume that L is wrapped to create a torus structure. By following John and Pecchenino (1994) and Naimzada and Sodini (2010), every agent v born at time t has preferences toward the consumption in the old age, c v t+1 , and a positive index of the local environmental quality in the old age, E v t+1 . 5 Specifically, we assume the following logarithmic utility function (1) where ω v ∈ (0, 1) and (1−ω v ) represent the weights that individuals give, respectively, to consumption and environmental quality in their preferences. In what follows, to simplify the analysis, we introduce the elasticity parameter η v = 1−ω v ω v . During her youth, each agent v supplies inelastically her time endowment (which is normalized to 1) to the productive sector receiving a wage w v t that she will divide between saving, s t , for consumption when old, and investment in environmental maintenance, m t , for improving the environmental quality of the cell v at t + 1.
The consumption good is produced by Z perfectly competitive firms. Then, the output Y is produced according to the Cobb-Douglas technology where K t is the physical capital, A is a positive parameter representing the technological progress, and α ∈ (0, 1) represents the elasticity of capital. By introducing the capital per worker k t = K t N 2 , the production function reads as where y t = Ak α t . Concerning the local environmental quality perceived by each agent, we assume that it depends not only on the decisions made by the agents of the various generations in that cell, but it is also affected by the actions of her contemporaries positioned on her immediate neighborhood. Specifically, we use a Moore neighborhoods scheme (see Shiflet and Shiflet 2014), in which any neighborhood is composed by nine cells: the central one indexed with v and the set of eight cells which surround it denoted with I v (see Fig. 1).
Adapting the specification employed in John and Pecchenino (1994) and Zhang (1999), we assume that the index of local environmental quality in the cell v evolves Fig. 1 A sketch of the Moore neighborhood scheme. (i) The black cell in the grid represents the agent v, in the position (i, j) of L, with i = 1, .., N and j = 1, .., N ; (ii) the dark gray cells describe the neighborhood, that is agents positioned at (n, p) with n = i − 1, . . . , i + 1 and p = j − 1, . . . , j + 1 and (n, p) = (i, j); (iii) the white cells define agents that do not belong in the immediate neighborhood of the agent in the black one according to The parameter E v > 0 represents the value toward the index tends when consumption and environmental expenditures are null, b ∈ (0, 1) measures the speed of reversion of the environmental quality to E v and E v t > 0 is the current level of the index in the cell v. The terms enclosed in the square brackets concern the impact of agents decisions on the future level of environmental quality experienced in the cell v: (i) in the first brackets, γ v m v t and l∈ I v γ l o m l t measure environmental improvement on the cell v induced by environmental expenditure of the young agent v and by the positive externalities produced by agents living in her neighborhood, respectively; (ii) in the second brackets, β v c v t and l∈ I v β l o c l t l∈ I v measure the environmental damage caused on the cell v by the consumption choices of the agent v and her neighbors, respectively. 6 Assuming that the choices made by agents v on the cell v generate higher impacts than those generated, on the cell v, by the choices made by the agents in I v , we have γ v > γ l o ≥ 0 and β v > β l o ≥ 0 for every v and l ∈ I v . In addition, we impose β v , γ v ≤ 1. This assumption, as shown by Zhang (1999), allows analyzing the dynamics of the model without loss of generality.
Agents supply their saving s v t inelastically to firms and earn the gross return (1 + r t+1 − δ) where r t+1 is the real interest rate and δ is the depreciation rate of capital. Then, each individual v faces the following life-cycle budget constraints: Individual v maximizes the objective function under constraints (5)-(6)- (7), with respect to the choice variables , taking w t , r t+1 as given. Assuming that the rule in (4) is known to the agents, the expected future environmental quality at t + 1 for the agent v is given by The term l∈ I v γ l o m e,l t refers to the aggregate environmental improvement triggered by the expectations of the agent v on the defensive expenditures of her neighbors. In particular, we assume that every agent expects her neighbors to continue behaving as in the previous period (naive expectations), that is m e,l t = m l t−1 for every l ∈ I v and for every t ≥ 1. 7 The last block in brackets collects consumption of the old agents in v and in I v . 8 As suggested by the condition in (7), we allow for the possibility that each agent v decides not to be involved in environmental maintenance (m v t = 0). The interior solution of the problem, when it exists, is instead characterized by the first order condition From (7) and (10), we get the following individual optimal choices (s v The goods market clearing condition reads as At each period t, firms maximize their profit, and then the following equilibrium equations for wage and interest rate are obtained: From the solutions of the maximization problem for the agent v in (11)-(12), the equilibrium expressions for wage and real interest rate in (14)- (15) and equations (4)-(13), then the equilibrium dynamics for every v are defined by the following system of first order difference equations: J :

Bounds to E v dynamics
We notice that if agents do not contribute to the environmental defense, the evolution of state variables in the generic cell v is described by the following equations: The dynamics of k autonomously evolve and converge to the stationary equilibrium Because the expression k t+1 = w t − m t ≤ w t holds, k * max also defines the highest value that k may assume given an initial condition k 0 < k * max , for any initial value E v 0 and any sequence of decisions made by agents. Thus, in the generic cell v, E v dynamics satisfy the following inequality which represents the lowest value that E v may exhibit. In what follows, we assume that the initial condition E v 0 is not too far from E v , that is we assume that at the beginning of the anthropic activity the environment is close to its stationary value. To avoid cases in which the index E v takes negative values, that would not be consistent with the definition of the utility function, we consider the expression in (20) and we assume that Let us now consider the case when agents decide to devote their entire wage to the environmental defense. The evolution of state variable E v in the generic cell v becomes and the following inequality holds: In this case, a higher private wealth allows agents to invest a higher amount of resources in the environmental maintenance. From the equation of capital accumulation and (23), it follows that The level (E v max ) * defined in (24) will be used in the simulation analyses performed in the following sections to define a normalized index of environmental quality E v t ∈ (0, 1) with In this regard, we notice that the agent's allocative choices are unaffected if we consider the following expression of the utility function The usefulness of using this normalized index lies in the fact that the range over which E v t varies is strongly conditioned by the model parameters especially by b, making it difficult to compare dynamics generated by different parameter values. 10

The model without local interactions
If we assume no local interactions among individuals (that is, β l o = γ l o = 0 for every l ∈ I v ), the dynamic system in a generic cell v reads as M : where M describes the dynamics on every generic cell v of the lattice L, independently by the allocative choices made in its Moore neighborhood. Moreover, we can notice that, with this assumption, in every cell of L the expected and realized future environmental levels are equal (E e t+1 = E t+1 ). It means that, when an interior solution exists, capital and environmental dynamics are proportional at each time period following the equation in (11). Then, the analysis of the map M collapses in studying the unidimensional map For the study of the map (28), it is convenient to start from the case E = 0. With this assumption, the map H may be rewritten as . By considering the map (29), we get the following results: which exists if and only if a 1 1−a 0 > 0. Being immediate to verify that a 0 < 1 in the whole parameter space, the result is obtained by the condition which guarantees that a 1 > 0.
Proposition 2 Let f be the function defined in (29). If γ > βα 1−α , then f is strictly concave and admits the fixed point E * 2 .
Proof By computing the second derivative we find that f (E t ) < 0 if and only if a 1 > 0. Then, the result follows.
Concerning the stability of the fixed points E * 1 and E * 2 , the following results are stated: Proposition 3 Let f be the function defined in (29).

Proof
The results follow by evaluating the first derivative at the stationary states. Being α ∈ (0, 1), it is straightforward that lim The result in (ii) follows by solving the inequality If we assume E > 0, and γ > αβ 1−α , the map in (28) preserves the concavity property described in Proposition 2. Then, we obtain the following result: Proposition 4 Let assume γ > αβ 1−α and E > 0. The map H admits a unique fixed point E * .

Proof
We can notice that f (0) = bE > 0. This implies that the graph of the map H crosses the 45-degree line at least once. Due to the concavity of H ensured by the condition γ > αβ 1−α , the intersection point is unique.
Although the expression of the fixed point for H cannot be found analytically, the following Proposition classifies its stability: Proposition 5 Let assume γ > αβ 1−α and H be the map defined in (28). (a) If , then E * is unstable for every E > 0.
Proof It is straightforward to prove that, under the assumption γ > αβ 1−α , there is a positive monotonic relationship between E and E * and, as E tends to +∞, E * tends to +∞. Considering the first derivative f (E * ) = a 0 +a 1 α (E * ) α−1 , we notice that f is monotonically decreasing. (a) For the assumption on η, we get f (E * )| E=0 ∈ (−1, 1) and lim E→ +∞ f (E * ) = a 0 < −1. This implies that there exists a threshold value E th such that f (E * ) = −1. Hence, the result follows. (b) In this case, for E = 0, f (E * ) < −1 and due to the monotonic behavior of f (E * ), the result trivially follows.
Concerning the role of the value E th , the following Corollary holds: Corollary 6 At the value E = E th , the map undergoes a Flip bifurcation.
The stability properties stated in the previous Proposition can be highlighted by the following numerical exercise. Specifically, Fig. 2 shows that, considering the parametric set α = 0.1, γ = 0.11, δ = 0.016, η = 0.8, A = 5, b = 0.22, β = 0.3, the map H admits a single positive fixed point. Drawing the first 100 iterations of the map (depicted in red), Panel (a) shows that, for E = 0.5, the fixed point becomes stable, while Panel (b) displays that the fixed point is unstable, for a sufficiently high value of E ( 1.5). If the concavity property of f fails, the following result trivially holds: Proposition 7 If γ < αβ 1−α , then the function f is always decreasing and the fixed point E * is always stable or the dynamics are captured by a 2-cycle for a sufficietly high value of E.
We notice that, regardless of other parameters, E has a destabilizing role in the dynamics. This is due to the fact that a high level of E induces agents not to invest in the environment. However, because of the non-coordination across generations in the same cell, this can create such a low level of environmental quality for subsequent generations that this new level induces them to make a strong change in decisions on wage allocation. This situation is prone to create oscillatory dynamics. Nevertheless, we anticipate (see the following Section) that for realistic values of the economic parameters the dynamics tend to converge to stationary equilibrium or a cycle of period 2. In the following section, we explore the properties of the model when the hypothesis of no externalities among cells is removed.

The model with local interactions
In this section, we investigate the dynamics of the model when interactions among cells are considered. To reduce the complexity of the model analysis due to the presence of many parameters, we set the parameters related to the production sector and capital accumulation to values in line with those estimated in the econometric literature (that is, A = 9000, α = 0.33 and δ = 0.7870898627 11 ) and focus on the analysis of the role of environmental parameters in defining the evolution of the model. In any case, varying the parameter A in a range that gives rise to capital accumulation levels typical of advanced countries 12 , and/or varying the annual rate of technological obsolescence in a range between 0.05 and 0.08 (see Escribá-Pérez et al. 2018), and/or considering productivity in the range (0.25, 0.35) the results remain very close to those illustrated below. Moreover, considering that agents in every cell have access to the same production technology and the same consumption good, it is natural to assume that also the environmental damage parameter β v and the defensive expenditure efficiency parameter γ v remain constant in all the cells of the lattice (β v = β, γ v = γ ), as well as the externalities they generate on neighboring cells (β l o = β o ,γ l o = γ o ). Finally, we assume that the environmental quality has the same characteristics over the whole grid. Then, we impose that E v assumes the same value in all the cells (that is, E v = E). As illustrated in Sect. 3, a lower bound for E has to be imposed in order to obtain well-defined dynamics. In particular, we set  (20). By applying this condition on E, the index of environmental quality steadily decreases to 0 if agents do not invest in environmental expenditures and use all the wage for consumption. In order to have an index that lies in the range (0, 1) for all the parameter setting, in what follows, we will refer to E v t , defined in (25). 13 Clearly, by imposing this scalarization, two different economies converging to the same value may be associated with two very far environmental results. Differences in E v t may be due, at least in part, to exogenous factors randomly determined: the ability of nature to regenerate, b, and to the extent of the impacts of the agents' allocations on the environment (i.e., the parameters β, β o , γ , γ o ). In other words, environmental parameters define alternative and randomly selected states of the world in which agents make their decisions. Contrasting environmental dynamics associated with different states of the world can be really misleading. Instead, by considering the variable E v t , trajectories of E v t close to 0 clearly describe a case of agents devoting few resources to the environment. Dynamics of E v t close to 1 identify cases where agents have invested greatly in the environment, regardless of the specific state of the world.
The Table 1 summarizes the assumptions on the parameters. Analytical classification of the dynamics generated by map J appears rather complicated. Therefore, to identify the dynamical properties of the model we will base our analysis on numerical simulations. Specifically, we will address the analysis of the model through Monte Carlo simulations with a sufficiently large number of iterations (2000). 14 For each replication, by randomly drawing a set of parameters within the ranges described in Table 1, we let the dynamic run for 300 periods, starting from an initial condition E 0 close to the E value (i.e., the long-run value of E without anthropogenic activity) and for an initial capital level positive but lower than k max (k 0 = 0.0001 in all the simulations). 15 In what follows, we analyze the presence of convergent dynamics or of long-term cyclical dynamics, that is, dynamics producing oscillations after a transient of 100 periods. In addition, to characterize the type of oscillations that are produced in the various Monte Carlo runs, we consider the distribution of the variable E v = max E v r − min E v s with r , s > 100 that is the range over which the variable E v t varies after the transient, regardless of the value around which this variation is generated (high values or low values of E v ). Moreover, since the oscillatory dynamics are persistent, both max E v r and min E v s , or values close to them tend to repeat more and more times. So, a higher value of the variable E v can be interpreted as associated to a heavier oscillatory phenomenon. Alternative measures for the variability have been considered (as the coefficient of variation) obtaining results in line with those outlined in the remainder of the article. 16 The role of grid size varies depending on the assumptions we are going to explore. In particular, N is irrelevant if agents are homogeneous. Each agent is surrounded by agents that replicate her choices for each value of N . In the case where agents are heterogeneous, a specific analysis on the role of N will be carried out (see Sect. 4.3).

Local interactions make the difference
We begin our analysis by investigating the role of local interaction among individuals in the case of homogeneous agents. In Sect. 3, we highlighted that even in the case without interactions, oscillatory dynamics are possible. However, these results are possible only in the presence of parametric sets with values of economic parameters far from those estimated in the economic literature. As shown in Table 2, in 2000 replications of the model with N = 10, without interactions among cells, 17 only in 1% of cases there are oscillations. The result dramatically changes with positive values of β o and γ o . In this last case, the oscillations occur in 78% of cases and, as shown in the histogram in Fig. 3, in about 48% of cases the oscillations of the (normalized) environmental quality index have an amplitude greater than 0.1. The economic interpretation of this result lies in the fact that even if we consider a local environmental variable and each agent is interested only in what happens in her cell, externalities create bridges between cells and the non-coordination between agents produces non-optimal allocations. Therefore, agents of subsequent generations may be pushed to change their allocative choices. If, for example, agent v finds a high environmental quality, she will tend to invest little in environmental expenditure at her cell. The worsening of the environment is, however, greater than expected, because the neighbors will also replicate her behavior. At that point, the new young agent in cell v This phenomenon is prone to create cyclical dynamics. The result is exacerbated by the fact that all agents are homogenous and live in cells characterized by the same level of environmental quality, and therefore, their allocations move in the same direction. In order to exemplify what described, Fig. 4 shows in the Panels (a) and (b) four simulations without and with interaction, respectively, for the same parametric set.
While Panel (a) shows that the dynamics of E v without interaction converge to values dependent on the level of ω (the possibility of cycles is very rare), Panel (b) shows the onset of dynamics largely cyclical caused by the interactions among agents.

Sensitivity analysis on environmental parameters
In this subsection, we study the role of environmental parameters in defining the dynamics of the model, to understand which parameters favor convergent dynamics and which favor oscillatory ones. Specifically, for every environmental parameter (that is, ω, β, γ, β o , γ o , b) we will perform a sensitivity analysis exercise. In particular, we will consider 9 increasing values of the parameter under analysis, from its lowest to its highest value as specified in Table 1 and for each of these values, we will perform a Monte Carlo analysis with the characteristics specified at the beginning of the section. Regarding the parameter ω, for very low values of the parameter, the environmental dynamics, as well as capital accumulation, tend to converge to a long-run value. As the value of the parameter increases, the variability of the simulations increases, making it possible to observe a large number of oscillatory dynamics, and then, as the value further increases, the variability of the dynamics decreases, until a return to convergent dynamics is observed for very high values of the parameter (see Fig. 5). The reason for this result lies in the fact that ω describes the agents' interest in the environment. If the level of ω is very high or very low, the externalities caused by the behaviors of neighboring agents are somewhat irrelevant. To understand this point, we can refer to the boundary cases ω = 0 and ω = 1: in the first case, regardless of the behavior of neighbors, agents are not interested in consumption and invest all resources in the environment. Then, E v tends to (E v max ) * and k tends to 0. Instead, in the second case, the environmental quality is not evaluated by the agents at all and they will invest all their income in consumption. E v tends to 0 and k tends to k * max . Therefore, for values of ω close to 0 and 1 the dynamics of E v will stabilize. The evolutions of agents' decisions become more complex in the case of intermediate values of ω, where the behavior of neighbors can cause overall results that subsequent generations want to modify (an example of the dynamics observed as ω increases is shown in Fig. 6). The sensitivity analysis on the environmental parameters of the model also allows us to outline the opposite role that the two technological parameters β and γ have on the dynamics. In fact, as we show in the histograms in Fig. 7 and time series depicted in Fig. 8, if for increasing values of β the variability in the simulations tends to increase, the reverse happens when the parameter γ varies. These results robustly confirm what has been described in Zhang (1999). If consumption activity produces a strong environmental impact, subsequent generations will change their wage allocation decisions, investing more in environmental quality. This triggers a reduction in the savings rate and thus a reduction in economic resources for agents. This sequence of feedbacks is prone to generate oscillatory dynamics. Conversely, a high value of γ generates a self-reinforcing system, which favors the stabilization of dynamics. The reason is that in this case, economic growth is positively and strongly correlated with environmental quality and the growth process does not generate a negative feedback.
Concerning the parameters of indirect impact on the local environment, i.e., β o and γ o , we instead notice a univocal effect on the simulations. In fact, as both β o and γ o increase, the variability of the dynamics of E v (and of the dynamics of k associated with it) increases (see Fig. 9). An increase in β o or γ o implies an increase in externalities, and thus in strategic interactions between agents of the same generation. This phenomenon is profoundly different with respect to the one related to an increase of β or γ . In fact, we recall that for the OLG structure, the decisions of the young are made when the decisions of the elderly have already been made. Therefore, a real strategic interaction between generations does not exist (an example of the dynamics generated as β o or γ o increases is given in Fig. 10).
Finally, a further factor that destabilizes the environmental dynamics is the speed of natural decay of the environment, b (see Fig. 11). An increase in b causes an effect in some way comparable to an increase in β. In fact, this increase implies that nature is less able to regenerate itself, and therefore, the negative externalities between generations generated by consumption are more important. This triggers a series of feedbacks already described in relation to β.

Heterogeneous preferences
The aim of this subsection is to explore how the phenomena discussed so far change, when the homogeneity in the preferences of agents is removed. In order to do this, we study the simplest possible case, in which a neighborhood coincides with the entire grid. Therefore, for this numerical exercise, we assume N = 3. In this case, we test the impact of heterogeneity by perturbing the preferences of only one of the cells. Starting from the situation of homogeneous agents and by increasing or decreasing the value of ω of a unique agent, said agent p, Monte Carlo simulations show that the variability of environmental dynamics is reduced (see Table 3). To understand this phenomenon, we must recall what explained for the homogeneous case. In that case, all agents take the same decision, causing a snowball effect, favorable to generate oscillatory dynamics. In this case instead, thanks to the interactions that agent p has with her neighbors, the presence of even only one agent who takes decisions structurally different (ω p different from other ω), reduces this phenomenon.
As N increases, the phenomenon of stabilization tends to increase (see Table 4). To understand this result, we must consider that the agent p, or better, the generations of agents p, tend to stabilize the behaviors of the neighbors. The latter, in turn, become themselves different agents (for the allocative decisions they take), compared to their neighbors who do not have direct contact with p. This diffusion effect generated by agent p, tends to stabilize the dynamics on the entire grid.
To test the consistency of both (i) the stabilization phenomenon caused by the presence of heterogeneous preferences and (ii) the increase in the diffusion effect as N increases, we extend the analysis to the case where all the agents are heterogeneous. In particular, in the following simulations, we consider values of ω v on the grid extracted each time from a Beta-distribution, with probability density function d(ω v ; ρ, σ ) and where ρ, σ > 0 are the shape parameters of the distribution. 18 At each simulation,  Each ω v is sampled from Beta-distribution 838 50% both the shape parameters determining the Beta-distribution (from which each ω v is extracted) are sampled from a homogeneous distribution. Assuming a grid of dimension N = 3, we notice that heterogeneous preferences on the whole grid induce a lower variability of the dynamics with respect to the case in which all agents have identical preferences. Indeed, Table 5 shows that in the case of heterogeneous ω v extracted from d(ω v ; ρ, σ ), the number of simulations whose variability E v is close to zero increases.
This finding confirms what has already been shown above with a single perturbed cell. More specifically, the interaction among agents who have heterogeneous preferences favors a mitigation effect in the decisions of all agents in the long run. This in turn induces a partial reduction of oscillatory phenomena in the dynamics of the local environment on the grid, compared to what is observed when perfectly identical agents interact. This result shows a significant contrast to some results in the economic dynamics literature (e.g., Onozaki et al. 2003) in which heterogeneity is perceived as a vehicle for destabilizing the economic system.
Finally, we repeat the Monte Carlo simulations to test the role played by N , in this heterogeneous context. Starting from the grid size N = 3, we notice that by increasing the grid size the number of convergent dynamics increases as well (see the left part of Fig. 12). This phenomenon can be interpreted as follows: considering those cases in which for low N a certain distribution of ω v on the grid did not allow a stabilization of the dynamics, we find that as the grid size increases, the same distribution of ω v produces the stabilization of the dynamics of E v on L, due to the diffusion effect described before. The extent of the diffusion phenomenon tends to stabilize for sufficiently large N (see the right part of Fig. 12).

The centralized case
Differently from what shown in the previous paragraphs (where a decentralized solution of the local environment problem is considered), in this paragraph we describe the result of assuming the existence of a short-lived social planner (see Pecchenino 1995) that maximizes the utility of the single cohort. Therefore, taking into account the network externalities created among the cells, the maximization problem is defined and follows: If the social planner internalizes the environmental problem, we notice that centralized decisions allow the achievement, on average, of higher environmental quality levels within L, compared with the levels obtained in the case of decentralized ones. Concerning the dynamics of the system, considering the values of parameters in Table 1, in the presence of centralized choices they converge all (100% of simulations performed)

Conclusions
In this article, by adapting the modeling framework introduced by John and Pecchenino (1994) to analyze the dynamic relationship between the environment and economic activity, we have focused on the analysis of the dynamics when a local dimension of the environment is considered. To this end, we have proposed an OLG agent-based model in which decisions are made in a decentralized form by a population of agents each of whom lives, with no possibility of migration, on a cell of a two-dimensional lattice. Agents make decisions according to the environmental level that is experienced in that cell, and consumption choices and expenditures to improve the environmental quality of their cells affect the environmental quality of neighboring cells through externalities that cross cell boundaries (local interactions). By analyzing the dynamics of the model, the main finding is that externalities among cells trigger strongly oscillatory dynamics, both in the case of homogeneous agents and in the presence of heterogeneous agents. The occurrence of cyclical dynamics in the local environmental quality is only partially mitigated by the presence of heterogeneity in individuals' preferences. This means that differentiated behaviors among agents reduce the possibility of agents generating an ex-post situation on the network prone to induce strong feedbacks in agents' future decisions. By studying the role of model parameters through sensitivity analysis, we have highlighted that the variables playing a destabilizing role in the dynamics are the level of the negative impact of consumption on the environment and the inability of the environment to regenerate at high rates, while the effectiveness of environmental spending and a strong general interest or disinterest in the environment are elements that favor the stabilization of the dynamics. Finally, when a centralized planner is introduced, the dynamics converge to stationary values regardless of the assumption on the heterogeneity of agents.
The model can be extended in several manners: first of all, it is possible to compare our model with the extensive literature focused on the definition of stable international environmental agreements (IEAs, hereafter). Recently, in this strand of the literature, Günther and Hellmann (2017) studied the conditions for the emergence and stability of environmental agreements and noticed that (i) the existence of stable agreements depends on the balance of network spillovers and that (ii) excessive asymmetries may lead to the instability of such agreements in the long run. These outcomes provide an interesting comparison to an extension of our model in which (contemporary) agents may create coalitions (IEAs). Indeed, an insight would be to observe how an overlapping generations model may react to coordination opportunities and consequently to study whether coalitions persist across generations (stable IEAs) or are subject to continuous (on/off) switches. Second, the modeling approach introduced in this article may be employed to study the decentralized decisions of agents on health in a context of deadly epidemic dynamics (e.g., SARS-CoV-2) affected by externalities arising from the behavior of agents and their neighbors (see Fernández et al. 2021).
Acknowledgements The authors gratefully acknowledge the participants of the conferences NED 2021 held at Catholic University of Milano (Italy), the participants of the conference AMASES 2021 (online conference), two anonymous reviewers and the Associate Editor for their valuable comments on an earlier draft, allowing a substantial improvement in the quality of the article. Mauro Sodini acknowledges the support by VSB-TUO project SP2021/15 and the Science without borders 2.0 project, CZ.02.2.69/0.0/0.0/18_ 053/0016985 within the Operational Programme Research, Development and Education. Finally, the authors also acknowledge Angelo Antoci, Marco Catola, Luca Gori and Silvia Leoni for thei comments and suggestions.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Appendix 1
When the interior solution of the optimization problem applies in every cell v, we notice that the map describing the dynamics of the system, considering equations (12)-(13)-(14)-(15) introduced in the body text, can be written as a system of second order difference equations in the variables E e,v , with v belonging to L. Then, the system reads as This system can be written also as the following N 2 + 2 dimensions dynamic system in the variables E e t , k t and p t (where p t = k t−1 ) F : We notice that in F the N 2 variables E e,v t+1 , with v belonging to L, appear on both the sides of the expression. Given the linearity and the assumptions on the parameters, it is possible to write the dynamic system in an explicit form, and therefore, we have F : where E e t is the vector collecting the values of E e t on all the cells of L. Assuming that E = 0, we can derive the stationary state of the system in closed form This stationary state exists when the expression βδ−8(1−δ)β o −bηγ −β−γ −8γ o ((β+8β o +γ +8γ o )α−γ −8γ o )A exists and it is positive. Under the hypothesis of identical initial condition for (E, k, p), the dynamics of E in the system evolve on the subset E e,i t = E e, j t with i, j = 1 . . . N 2 . In this case, the dynamics of every cell can be described by the two-dimensional map F : Considering the expressions in the mapĤ , the Jacobian matrix evaluated at the stationary state ((E e ) * , p * ) reads as The local stability of ((E e ) * , p * ) is described by the so-called Jury conditions: where T r(W * ) = W * 11 and Det(W * ) = −W * 12 . Since it is possible to violate, with an appropriate parametric configuration, both the second and third Jury conditions, we can notice that when the steady state is locally stable, it can lose its stability either through a Flip bifurcation (when 1 + T r(W * ) + Det(W * ) = 0) or a Neimark-Sacker bifurcation (when Det(W * ) = 1).