{'fraction_non_alphanumeric': 0.03310496926469898, 'fraction_numerical': 0.011684106799305522, 'mean_word_length': 5.325764321757198, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Spatially-explicit simulation of two-way coupling of complex socio- environmental systems: Socio-hydrological risk and decision making in Mexico City

We present here MEGADAPT (MEGAcity-ADAPTation), a hybrid, dynamic, spatially-explicit, integrated modeling approach to simulate the vulnerability of urban coupled socio-environmental systems – in our case, the vulnerability of Mexico City to socio-hydrological risk. Although vulnerability is widely understood to be influenced by human decision-making, these decisions are rarely captured as endogenous to dynamic vulnerability models. The objective of this paper is to use MEGADAPT to demonstrate a methodological approach that allows vulnerability to be simulated as a reflexive process: the result of the interplay between mental models held by influential actors and the response of the biophysical and social world to the realization of decisions based on these mental models. MEGADAPT represents Mexico City as a self-organizing system. Hence, its computational framework involves the implementation of a suite of system models, geographic information system-multicriteria decision analysis, and geosimulation. A novel contribution of this approach is the use of the Analytic Network Process to synthesize the dynamic feedback between mental models and conditions of geographic automata. In this way, MEGADAPT depicts the shift in the behavior of socio-environmental systems from one-way coupling/single-loop learning to two-way coupling/double-loop learning, with the decision-making process as an endogenous system driver.


Introduction
The simulation and analysis of coupled socio-environmental system (SES) interactions has advanced considerably over the last decades. Nevertheless, approaches to simulation have done a relatively poor job of capturing how so-called soft socio-political infrastructure shapes urban vulnerability (Eakin et al., 2017). Socialpolitical infrastructure captures the notion that social and political norms, values, rules, and relationships undergird and structure decisions that then shape and structure the built environment. Hence, humans act in their environment with specific ideas about causality in their world, and in doing so, modify that world in accordance with those beliefs. As the physical and social world responds to these interventions, decision-makers perceive the social and biophysical changes that result from their interventions, learn and thus may change their ideas about how the world works. This latter form of learning is called double-loop learning because it entails modifying the mental models (i.e., the internal, cognitive representation held by actors of how the world works; Biggs et al., 2011;Jones et al., 2014) that represent how individuals cognitively make sense of their environment. Despite the influence of particular mental models over SES dynamics and thus vulnerability, and, conversely, the influence of SES dynamics on mental models, simulation and analysis has fallen short in portraying dynamic double-coupled relationships between human cognition and the state of the SES.
Vulnerability is an undesired outcome of the complex dynamic interactions of coupled SES; it is the failure in maintaining the capacity to respond effectively to change (Eakin and Luers, 2006). On the one hand, these interactions involve endogenous and exogenous perturbations, and on the other hand, they involve the responses of social agents to changing risks. In other words, social agents adapt in idiosyncratic ways. In doing so, they shape the biophysical environment in which they operate. This means that mental models employed by actors in SES themselves are in non-stationary equilibria. Learning thus becomes a central component of adaptive capacity (Nelson et al., 2007): agents have the capacity not only to reflect on and improve the outcomes of their decisions (single-loop learning), but also to modify the values and priorities in their mental models (double-loop learning) that determine what decisions they take and why.
The role of mental models in SES dynamics has been of particular interest in climate adaptation science, risk management and vulnerability assessment (Morgan et al., 2002). Vulnerability and adaptability to climate change have been studied from the perspective of coupled SES (Le et al., 2010;Pickett et al., 2005;Young et al., 2006). Nevertheless, there has been less emphasis on how actors learn in the process of adaptation, and on the effect of mental models held by some influential agents (for example, government authorities) on patterns of vulnerability in a landscape. As yet, this form of two-way coupling (Eakin et al., 2017) and double-loop learning (Argyris, 1976;Tschakert and Dietrich, 2010) is poorly reflected in environmental modeling and participatory science. Achieving a better understanding of vulnerability and adaptation challenges hinges nonetheless on making the feedbacks between the cognitive, social and the biophysical-infrastructure determinants of risk transparent, spatially-explicit, and thus useful for planning and policy making (Eakin et al., 2017;Hull et al., 2015). Therefore, there is a need for approaches capable of dynamically updating mental models with information about the changing SES in which the decisions are made (Beckage et al., 2018;Eakin et al., 2017;Eriksen et al., 2015;Füssel and Klein, 2007).
Our objective in this paper is to present such an approach, using MEGADAPT (MEGAcity-ADAPTation), a dynamic, spatially-explicit and integrated model to simulate vulnerability to socio-hydrological risk in Mexico City. MEGADAPT corresponds with what Sivalapan et al. (2012) refer to as process socio-hydrology research; that is, the analysis of the co-evolution and feedbacks between multi-scalar hydrological and sociological processes, including learning. Accordingly, our goal is to demonstrate the use of MEGADAPT as a tool for improving understanding of present human-water systemic functions and anticipating possible trajectories of sociohydrological risk into the future.
Although still a work in progress, MEGADAPT enables carrying out computational experiments to depict how the decision making of water authorities shapes vulnerability to socio-hydrological risks in Mexico City. MEGADAPT specifically confronts the challenge of addressing the often poor representation of decision making and decision makers as endogenous drivers of vulnerability patterns, processes, and outcomes. In this regard, it simulates vulnerability as a process of dynamic reflexivity involving mental models and SES in non-stationary equilibria.
Our approach advances methodology within the purview of both sustainability and geographic information science (GIScience). MEGADAPT takes the perspective that the megacity can be represented as a self-organized, dynamic system involving complex interactions between decision making and the biophysical and social environment. MEGADAPT is a modeling framework that combines three GIScience frameworks -spatiallyexplicit system dynamics modeling, geographic information system-multicriteria decision analysis (GIS-MCDA) and geosimulation -to portray and explain the evolution of vulnerability and adaptation patterns in the context of coupled SES (Jankowski, et al., 2014;Ligmann-Zielinska et al., 2005;Malczewski and Rinner, 2015;Torrens and Benenson, 2005).
In what follows, we first describe the modeling framework and then present the results of our test simulation. In the last section, we discuss how MEGADAPT depicts the behavior of the SES as an outcome of decision making as an endogenous driver, iteratively coupled with the response of the biophysical and social system. We interpret the simulation output according to the theoretical concepts of SES coupling (Manuel-Navarrete, 2015) and double-loop learning (Argyris, 1976;Tschakert and Dietrich, 2010). We illustrate how, as the states of the biophysical variables surpass critical thresholds, the relative importance of elements in the respective mental models change, completing a two-way coupling of the SES. We conclude with a discussion of the applicability of the computational framework to a broader category of problems involving the tasks of design (searching for decision options) and choice (evaluation of decision options) in the context of coupled SES.

Modelling framework
We describe in this section the implementation of MEGADAPT and illustrate how it can unveil the complex interplay between the decision makers´ cognition and the real-world social-ecological dynamics that together shape urban vulnerability. We focus on SACMEX (Sistema de Aguas de la Ciudad de México), Mexico City´s water management agency, as the primary actor in the SES. In our example, SACMEX's goal is to allocate scarce resources to reduce flooding and ponding, two important socio-hydrological risks in Mexico City. The spatial and temporal incidences of those two risks are expected to increase with continued urbanization and climate change. In the context of our model, SACMEX can undertake two actions at the local level, building new or maintaining the sewage infrastructure.

Mental models
Mental models manifest themselves as narratives describing perceived relationships (often associated with causality or influence) among the elements that are perceived as critical in explaining some aspect of the system dynamics. These elements may be tangible (e.g., elements such as rainfall in mm or runoff in m 3 /s) or intangible or subjective (e.g., heavy rain or slight flood). The narratives associated with mental models reveal how agents discern causal relationships, ascertain and weigh facts, and appraise outcomes associated with these elements. Mental models thus mold what agents perceive and expect as the primary drivers of risk and outcomes of their interventions (Morgan et al., 2002).
A mental model extends the perspective of describing geographic space through components that belong to either the real or the projected world (Howarth and Couclelis, 2005;Manuel-Navarrete, 2015). Under this view, mental models comprise judgments concerning what actions to perform for reducing vulnerability at concrete geographic entities, given a set of empirical and subjective vulnerability indicators. Because of the agents´ reflexive response to risk, this also implies that such judgments must be constantly revised and adapted to match the conditions of SES in non-stationary equilibrium. Hence, dynamic simulations of SES coupling need to include computational agents with the capacity for awareness of past mistakes, so that they can learn and improve their subjective understanding of the tangible causes of risk.
The concepts of single and double-loop learning in organizations (Argyris, 1976;Tschakert and Dietrich, 2010) are pertinent for describing the behavior of agents in response to perceived changes in both tangible and subjective indicators. In single-loop learning, changes in the material condition of specific vulnerability indicators do not trigger changes in mental models (e.g., how the actor cognitively understands the dynamics of the system), whereas in double-loop learning, they do. Thus, one-way coupling (i.e., mental model  SES  same mental model), single-loop learning describes situations in which material changes in the manifestation of sociohydrological risk reinforce the agents´ mental models, whereas two-way coupling (i.e., mental model  SES  new mental model), double-loop learning describes situations in which such changes bring about changes in their mental models, with consequent implications for their decision-making preferences.

Figure 1: Computational framework of MEGADAPT.
Stage 1: System models For MEGADAPT, system models were used to simulate the dynamic change of the determinants of sociohydrological risk associated with the biophysical and the built environments. The impact of urban growth on watershed runoff was simulated by loosely linking SLEUTH, a cellular automata urban sprawl model (Clarke et al., 1997), with SWAT-SCS-CN, a water balance model that relates runoff to land cover type, soil condition, daily precipitation, and evapotranspiration inputs (SCS, 1972). Climate change effects on precipitation and evapotranspiration were modeled using the delta change method, which transformed available historical observations into future projections (Dahm, 2016).
Sewerage capacity was modeled through an aggregated multicriteria index that included as indicators the topology of the sewerage network, infrastructure age, minor system characteristics (inlets, pipes and other conduits, open channels, pumps), and total flow (summation of discharge for all pipe segments in a census block, as computed by Manning's equation).
Statistical techniques were used to estimate the probability of flooding and ponding at each spatial decision alternative (i.e., census block) as a function of runoff and precipitation patterns.

Stage 2: Multicriteria evaluation
One key step in the spatial simulation of the dynamics of coupled SES is establishing the behavioral rules of the interacting entities or agents. This task has been typically achieved in Agent-Based Modeling through multicriteria evaluation (e.g., Manson, 2005). However, one limitation of this approach has been the implicit assumption that the agents´ preferences or priorities are static.
In contrast, the Analytical Network Process (ANP) is a multicriteria evaluation technique with unique capacities for the development of dynamic and adaptive decision-making models (Saaty, 2001;Saaty, 2016). The ANP can explicitly incorporate how biophysical changes in real-world geographic entities activate adjustments in the agents´ mental models, and how such adjustments generate decisions that, over time, shape the biophysical dimensions of a system.
Operationally, the ANP entails organizing the decision elements of a mental model into a network of interactions, dependencies, and feedbacks amongst tangible (e.g., runoff, water scarcity) and intangible or subjective (e.g., influence of citizen complaints on decision making) decision elements (Bojórquez-Tapia et al., 2011). This network encompasses not only all direct and indirect relationships of dependency and feedback between all the decision elements, but also incorporates subjective information (such as judgments), and the empirical knowledge (such as statistical data) about those relationships. The output of the ANP is the priority weights of the decision elements of a mental model.
Structuring an ANP model entails three steps: decomposition, comparative judgment, and synthesis (see Supplementary Material). Decomposition involves structuring a network of clusters and associated elements. Comparative judgment entails organizing each of the cluster´s elements in the respective pairwise comparison matrices; these comparisons denote the relative preference or differential degree of importance of one element in relation to another. Synthesis entails mathematically solving a supermatrix (an approach parallel to a Markovian chain process) to obtain the elements´ global weights indicating the relative influence of each element on every other one (Saaty and Vargas, 1998;Saaty, 2016).
In MEGADAPT, the ANP was implemented in an expert consultation workshop held in October 2015, to which a group of experts and water managers from SACMEX participated. All the experts were professionally involved in managing the city´s water and sewage systems. The freeware Super Decisions v.1.6.0 (downloadable from http://www.superdecisions.com/) was used to facilitate the decomposition, comparative judgment, and synthesis of the ANP model for socio-hydrological risks in Mexico City.
Accordingly, the experts first defined the overall decision-making goal as it related to social-hydrological risk: to allocate the most appropriate management actions concerning the sewerage system to reduce Mexico City´s vulnerability to ponding and flooding. Next, they arranged the tangible and intangible decision-making components concerning the sewerage system as a network of five clusters ( Figure 2). Cluster Environment included elements that described the external conditions related to the functioning of city sewerage: garbage (t), rainfall (mm), runoff (m 3 /s), and subsidence (mm). Through outer dependencies, experts linked these elements to those of the cluster Socio-hydrological risks, and elements garbage and subsidence to elements capacity and failure of cluster Infrastructure. Cluster Infrastructure included elements that described the state of city sewerage: capacity (discharge volume, m 3 ), deficiency (lack of infrastructure), and failure (frequency of breakdowns), and oldness (infrastructure´s age). An inner dependence linked the elements capacity and failure to element oldness. Except for oldness, outer dependencies linked the elements of cluster Infrastructure to the elements of cluster Socio-hydrological risk.
Cluster Socio-hydrological risks included elements that described the exposure of the city residents to risks: flooding (frequency) and ponding (frequency). These were linked to elements of cluster Socio-institutional by outer dependencies.
Cluster Socio-institutional included elements that described the manifestation of the perceived risk by different urban agents: citizen complaint (frequency), media reporting (frequency), and municipal petitions (frequency). The experts connected these elements to the elements of the cluster Actions.
Cluster Actions included elements that described the set of decisions available to the water authority regarding the city sewerage: building new and maintaining existing infrastructure. These elements were linked to those of cluster Infrastructure: element building new infrastructure was linked to elements capacity and deficiency, and element maintaining existing infrastructure was linked to elements failure and oldness of the cluster Environment.
The resulting supermatrix, , comprised 25 block matrices (Table 1) and its solution (see Supplementary Material) produced the global priority weights of the decision elements in SACMEX´s mental model. Table 1: Unweighted super-matrix of the sewerage subsystem as represented in the ANP structure in Figure 1; a) at the initiation of the one-way coupling (single loop learning); block matrix is shaded in grey.
Maintaining ( Stage 3: GIS-MCDA GIS-MCDA has proved to be effective for depicting the spatial complexity of SES in manageable terms (Bojórquez-Tapia et al., 2011). It is a procedure to transform and combine geographic data (input maps) and decision makers' (expert or agent) preferences into a spatial representation of decision outcomes (output map). It has been widely used for solving spatial decision problems that involve participatory decision making, conflicting goals, and incommensurate evaluation criteria, as well as for integrating suites of land-change models that focus on distinct environmental issues and dealing with uncertain information at regional scales (Malczewski and Rinner, 2015).
In general, GIS-MCDA involves a set of geographically defined alternatives (e.g., Mexico City´s census blocks), a set of criteria on which the alternatives are evaluated and a group of agents. The key point in GIS-MCDA is the aggregation procedure used to synthesize the agents´ preferences. This procedure establishes the logical and observable linkages among (1) the decision-maker volition, (2) the drivers and processes of change, and (3) the specific spatial features of the alternatives. Thus, GIS-MCDA is particularly useful for concretizing the multidimensional meanings of coupled SES, articulated in mental models, into spatial representations.
In MEGADAPT, GIS-MCDA was used to identify the decision space or subset of geographic alternatives (census blocks, hereafter) to be used in Stage 4. It entailed two steps: site selection and site search.
Step 1. Site selection The computational problem in site selection was to rank the census blocks according to their suitability for the two actions concerning Mexico City´s sewerage system (i.e., building new and maintaining existing infrastructure). The aggregation procedure synthesized the (1) agent´s volition, (2) drivers and processes of change, and (3) specific spatial features of the census blocks.
Site selection was implemented by means of compromise programming (CP), an approach based upon the notion of the ideal or utopian point in a multidimensional mathematical space (Zeleny, 1974). In our case, the utopian point was an abstract census block possessing the most desirable values for this decision process, implying the lowest possible vulnerability. Hence, the departure from the ideal point constituted a vulnerability index for a census block; formally (Szidarovzky et al., 1986): where is the vulnerability score for an action in terms of the distance to the ideal point; is the weight of actions; is the weight of elements; is the standardized score of elements; , , and are indices for census blocks, elements, actions, and time; and is the compensation parameter that defines the kind of metric measuring the deviations from the ideal point.
The standardized scores, , represented judgments about the vulnerability of the census blocks by observable values of the biophysical and institutional decision elements (Bojórquez-Tapia et al., 2011;Pereira and Duckstein 1993). For interval-and ratio-scaled continuous decision elements, the numerical values of the judgments were obtained by means of value functions (Beinat, 1997). For nominal-and ordinal-scaled decision elements, the numerical values of the judgments were obtained by means of the Analytic Hierarchy Process under the socalled ideal mode (Saaty, 2001). The value functions transformed the real-world denotation of the state of an element, measured in their natural scale, into its projected-world connotation, measured in a [0, 1] scale, in which 0 represented the most undesirable state and 1 the most desirable state. They portrayed any linear, nonlinear, monotonic, and non-monotonic relationship between the elements´ states and their meaning in terms of relative vulnerability.
In general, the compensation parameter, , defines the kind of distance metric measuring deviations from the ideal point (Tecle et al., 1998). In MEGADAPT, we set = 1 to use the Manhattan distance metric, also called compensatory mode, meaning that a reduction in the distance to the ideal point in one element, , could be compensated by an equivalent increase in another element.
The vulnerability index subsumed the suitability of the census blocks for the two actions in accordance with SACMEX´s preferences captured in Stage 2. The higher the vulnerability, the larger the distance to the ideal point, , and therefore the higher suitability for the two actions. Boolean constraints on the decision map were set in place with the assumption that there was a threshold of vulnerability values that would make either action unfeasible. This separated the set census blocks in which any of the two actions was feasible from the set in which they were unfeasible; the former constituted decision space to be used in further analyses.
Step 2. Site search The computational problem of site search was to optimally allocate actions (i.e., building new or maintaining existing infrastructure) in the decision space, subject to budgetary constraints. Hence, the goal was to identify the proper action for each non-dominated census block, in accordance with Pareto optimality (that is, if census block A was at least as suitable as census block B on one action, and more suitable on the other one, then B was dominated by A).
Site search involved the implementation of integer 0-1 programming (Cova and Church 2000;Malczewski et al. 1997); the objective function maximized the sum of vulnerability index scores, , and allocated actions in a way that covered the largest possible number of census blocks; formally: where is the budget restriction or a maximum number of census blocks where actions can take place, is the 0-1 decision variable (1 if -th census block is selected for the -th action, 0 otherwise), and is the cost of the -th action.

Stage 4: Geosimulation
Geosimulation is concerned with automata-based modeling of discrete and dynamic spatial systems that fulfill certain purposes. Its aim is to describe and explain spatial patterns as self-organized systems. In general, it combines dynamic aspects of spatial structures so that small-scale or regional pattern (e.g., Mexico City) can emerge as an outcome of large-scale or local (e.g., census block) decision-making processes. One approach is based in the concept of geographic automata, a kind of geospatial agent whose rules of behavior are determined either by its state and the state of its neighborhood, a property of cellular automata, or by local transition rules, a property of MAS. Geographic automata may be composed of regular or irregular tessellation spaces (Malczewski and Rinner, 2015;Torrens and Benenson, 2005).
In MEGADAPT, geosimulation included both inanimate and animate geographic automata. The city´s census blocks (n = 2 428) constituted an irregular tessellation of inanimate geographic automata of an irregular tessellation of geospatial decision entities in the two-dimensional urban space. Changes in their condition or situation were caused by either events (i.e., flooding and ponding, as well as precipitation and runoff), or SACMEX´s actions (i.e., building new and maintaining existing infrastructure).
SACMEX was the only animate geographic automaton or geospatial conscious agent in the simulation. It tracked the allocation of actions and the occurrence of events related to socio-hydrological risk and possessed the following properties: (1) rationality, by acting consistently with the preferences established by the respective mental model; (2) autonomy, or capacity for taking independent action at each census block; and (3) reactivity, or capacity for sensing and reacting to the current situation of inanimate geographic automata (census blocks).
The state of each geographic automaton at a given time was defined as a function of the state of the census block and the state of neighboring ones at the previous time; formally: where is the state of a census block, is the state of neighboring census blocks, the set of transition rules, and and indices for census blocks and time, respectively.
Set included the following global transition rules that are applied locally: (1) If action maintaining existing infrastructure is allocated to census block , then rehabilitate the sewerage system, which implies changing the state of element oldness +1 . (2) If action building new infrastructure is selected for a census block, then create new connections to the city sewerage system, which implies changing the state of element capacity, +1 .
SACMEX´s actions implied an improvement of the state of elements oldness and capacity, and was modeled as proportional increments of their values in the respective input map layer of Stage 1: where is the normalized score for elements oldness or capacity; , , and are indices for census blocks, elements and actions; and is a proportionality factor.

Stage 5: Feedback
The feedback loop of the computational framework was closed by a synchronous and parallel updating of the geographic automata. The output of Stage 4 was organized into (1) the element outcome space that corresponded to the elements´ standardized score values, , at each census block, and (2) the decision outcome space that corresponded to the geographic representation of the consequences of each action.
The element outcome space returned as input map layers for Stage 1 (system modeling), whereas the decision outcome space return as statistical data for Stage 2, in the proper block matrices of the unweighted supermatrix. The standardized scores of elements, , describing biophysical and institutional factors were obtained by normalizing the corresponding values generated in Stage 1 (system modeling), while the value of the weights of elements, , and actions, , resulted from Stage 2 (supermatrix synthesis). In this way, the values of , , and were updated at each iteration of the simulation.

Results
We tested MEGADAPT functioning for a simulation time of 40 years. The SACMEX´s mental model was initialized assuming that runoff gave rise to 75% of the cases of ponding and 25% of the cases of flooding, whereas rainfall gave rise to 17% of the cases of ponding and 83% of the cases of flooding. It should be emphasized that these proportions were included in block matrix as follows (Table 1) In Stage 1, models SLEUTH and SWAT and the statistical analyses generated the input map layers of runoff and precipitation, the two main biophysical drivers of flooding and ponding, for each time step of the simulation. In Stage 2, the initial limit supermatrix (Table 2) yielded higher importance weights for elements flooding of cluster Socio-hydrological risk; media reporting and citizen complaint of cluster Socio-institutional; rainfall and runoff in cluster Environment, and deficiency, failure and oldness of cluster Infrastructure. As an outcome, the weights of elements in cluster Actions showed that the preference for building new infrastructure was marginally higher than that for maintaining existing infrastructure. The output of MEGADAPT displayed two distinct phases of the behavior of the coupled SES (Figures 3 and 4). Phase 1 (0 < < 20) portrayed the outcome of a higher preference by SACMEX for building new infrastructure than that for maintaining existing infrastructure (Table 2). These actions resulted in a period (1 ≤ ≤ 6) of decreasing frequencies of ponding and flooding that reduced the vulnerability of exposure to socio-hydrological risks (frequency of flooding and ponding events), followed by a period (6< < 20) with an opposing trend. This behavior was interpreted as an instance of one-way coupling, because it manifested changes in the denotation of the elements´ states, without altering their connotation for decision making. Thus, SACMEX´s preferences remained unchanged. Figure 3: Diagrammatic representation of the MAGADAPT simulation process. Top, phase 1 (0 < t ≤ 20): the behavior of the socio-ecological system corresponds to one-way coupling/single-loop learning because data of the situation of geographic automata, feedbacked into block matrix , does not change the priority weights of actions (i.e., building new over maintaining existing infrastructure) when the limit supermatrix is solved. Middle: the critical threshold (red arrow; t ≤ 20) is reached when the data feedbacked into block matrix produces a reversal in the actions´ priority weights when the limit supermatrix is solved (i.e., maintaining existing over building new infrastructure), thus triggering a two-way coupling/doubleloop learning behavior of the socio-ecological system. Bottom, phase 2 (20 < t ≤ 40): the socio-ecological system returns to one-coupling/single-loop learning behavior under the new priorities. At one point in the simulation time ( = 20), the states of flooding and ponding in relation to runoff and precipitation crossed a critical threshold: runoff gave rise to 10% of the cases of ponding and 90% of the cases of flooding, whereas rainfall gave rise to 50% of the cases of both ponding and flooding. These data were incorporated into a block matrix as follows: = | 0.00 0.10 0.90 0.50 0.00 0.90 0.10 0.50 | Given these new conditions, results of the limit supermatrix (Table 2) showed that the weights for elements flooding, media reporting, municipal petitions, oldness, failure, and runoff increased, whereas the weights for elements ponding, citizen complaint, deficiency, and rainfall decreased. As an outcome, the weight for maintaining existing infrastructure became slightly higher than that for building new infrastructure. This behavior was an instance of two-way coupling and double-loop learning because the elements connotation was altered for decision making, thus triggering changes in SACMEX´s preferences.
Phase 2 (20 < ≤ 40) emerged immediately after the change in SACMEX´s preferences and continued to the end of the simulation time. This behavior was interpreted as a return to one-way coupling/single-loop learning in which SACMEX´s preferences remained unchanged again.
We tested the sensitivity of the SES to the timing of a shift in SACMEX´s preferences. This entailed running four scenarios and examining the resulting net vulnerability to socio-hydrological risk over the simulation ( Figure 5). Scenario 1 simulated the case in which SACMEX´s preferences remain unchanged (by precluding the two-way coupling/double-loop learning in the simulation); it resulted in a two-fold increase in net vulnerability by the end of the simulation time. Scenarios 2 to 4 simulated cases in which two-way coupling/double-loop learning occurred at 10, 20 or 30 yr, respectively. In general, these scenarios showed that minimum net vulnerability was reached within 10 yr after the shift in SACMEX´s preferences. Nonetheless, the moment when the behavioral shift took place was consequential: Scenarios 2 and 3 showed a decrease in the net vulnerability of about 40%, whereas scenario 4 showed a gain in the net vulnerability of about 5%. This suggests that there is a window for opportune learning by SACMEX (not earlier than 10 yr and not later than 20 yr), so that a shift of its preferences can result in a reduction of the average net vulnerability to socio-hydrological risk in Mexico City. Yet, the highest vulnerability score at the end of the simulation corresponded to scenario 2, followed by scenarios 3 and 4 with similar scores. MEGADAPT´s overall accuracy in portraying vulnerability patterns across Mexico City was evaluated by comparing the output of scenario 1 with SACMEX´s records of ponding and flooding for 2007-2014. Accordingly, we transformed SACMEX´s database into frequencies of ponding and flooding by census block. We established two general classes for the comparison: (1) lower vulnerability (LV), grouping census blocks with minimal flooding and ponding, and (2) higher vulnerability (HV), grouping census blocks where socio-hydrological risks would result in citizen complaints, media reporting, or municipal petitions (the elements of the socioinstitutional cluster). After normalizing the data in [0, 1] scale (1 equivalent to the maximum frequency), we plotted the cumulative distribution function to find the point of the beginning of asymptotic tendency; this point was used as the cut value for the two classes and corresponded to a normalized vulnerability score of 0.125. Next, data were arranged in a 2 × 2 confusion matrix to calculate the accuracy and the kappa coefficient of agreement (; Trodd 1995) of the simulation (see Supplementary Material). Results show that the overall accuracy of the classification was high (76%), but its level of agreement was low (̂= 15%). This result was nevertheless expected because the majority (90%) of census blocks fell in class LV in the actual data. In the simulation, less than a quarter of the census blocks fell in class HV; the size of simulated class HV (n = 562) practically doubled that of the actual data (n = 253). Errors of commission were low for LV (8%) and high for HV (80%); errors of omission were low for LV (21%) and moderate for HV (56%). Level of agreement was 2.5 times higher for the simulated HV (̂ = 27%) than that for the actual HV (̂ = 11%).

Discussion and conclusions
Notable amongst the methodological challenges of the simulation of urban vulnerability is depicting how the soft socio-political infrastructure shapes socio-hydrological risk (Eakin et al., 2017). MEGADAPT addresses this challenge by simulating vulnerability as a function of the feedbacks between endogenous (i.e., decision-maker preferences and mental models) and exogenous (i.e., rainfall) determinants of risk. It is based on a hybrid modeling framework that combines system models, GIS-MCDA and geosimulation to portray the complex and dynamic linkages between mental models, decision making and the biophysical and infrastructural drivers of urban vulnerability. Results show how decision making affects critical social-ecological interactions and regulate vulnerability patterns, and how particularly influential decision makers can have an outsized influence on the trajectory of vulnerability. MEGADAPT thus enables a better understanding of how the soft socio-political infrastructure shapes urban vulnerability and adaptation.
According to Filatova et al. (2013), progress in agent-based modeling of coupled SES requires improvements in the integration of socio-demographic, ecological, and biophysical models. Furthermore, Parker et al. (2003) point out that such progress also depends on the capacity of the models to represent the complex interactions between heterogenous actors and institutions, and among actors, institutions and their environment, without assuming equilibrium conditions. In this respect, MEGADAPT represents an advancement over previous methodological work on dynamic spatial simulation of human-environmental interactions (e.g., Brown et al., 2005;Gilruth et al., 1995;Jian and Gimblett, 2002;Manson, 2005;Manson and Evans, 2007) as well as on knowledge-based spatial modeling of megacities in the context of self-organized systems (e.g., Arsanjani, 2011).
MEGADAPT not only simulates the complex interactions among agents, and between agents and their environment, but also the regional vulnerability patterns that emerge as an outcome of learning.
The computational framework of MEGADAPT provides a means for not only explicitly incorporating both the symbolic and material components of coupled SES proposed by Manuel-Navarrete (2015), but also for generating meaningful representations of what Howarth and Couclelis (2005) called a purposive change in reference to goal-directed transformations of space. While the use of GIS-MCDA allows for the depiction of both the denotation and connotation of geospatial alternatives (Bojórquez-Tapia et al., 2011) such as the census blocks, geosimulation incorporates self-awareness and reflexive agency into the simulation. The ANP, and the supermatrix approach in particular, provides a means for simulating the actions of an agent (such as SACMEX) as a dynamic process in which decisions are constantly revised and adapted to suit changing conditions of sociohydrological risks. The supermatrix provides a unique way of integrating statistical and geospatial data with the subjective knowledge captured by the weights generated in the process of pairwise comparisons.
MEGADAPT simulates conditions in which a SES shifts from one-way coupling to two-way coupling and a mental model shifts from single-loop learning to double-loop learning. During phase 1 of the simulation, the cognitive predisposition of SACMEX to single-loop learning was reinforced by the corresponding decline in sociohydrological risk. This generated a path dependency that manifested itself as one-way coupling of the material dimension, without changes in SACMEX´s preferences. But when the conditions at the regional scale, captured in block matrix , crossed the critical threshold, two-way coupling, double-loop learning behavior was activated, which in turn changed the priority of SACMEX´s actions. After this tipping point, a new cycle of oneway coupling/single-loop learning started according to the new priorities. Results thus showed not only how decision making implemented at the local scale gives rise to vulnerability patterns at the regional scale, but also the relationship between such spatio-temporal patterns and the subjective intentions of SACMEX. In addition, the results showed that net vulnerability to socio-hydrological risk was sensitive to when the two-way coupling/double-loop learning, that set off the behavioral shift of the SES, occurred over the simulation; the shift in priorities, moreover, led to rapid updates of infrastructure, which then age over time with unchanging priorities ( Figure 5). This suggests a need for mechanisms that can feedback pertinent information to decision makers and thus enable opportune learning on how to reduce net vulnerability in the city over time.
MEGADAPT performed reasonably well in depicting the general spatiotemporal patterns of vulnerability to socio-hydrological risks across the city, despite high errors of commission and omission, and poor agreement in the classifications. These results indicate that MEGADAPT tends to overestimate class HV. However, a quick and dirty inspection of the SACMEX´s database reveals that numerous cases of ponding and flooding are missing. While we acknowledge that enhancements in the simulation of socio-hydrological risk are in order, we argue that the uncertainty concerning socio-hydrological risk in Mexico City may be irreducible. Consequently, we contend that the simulation presented here illustrates how MEGADAPT could be used to carry out computational experiments (sensu Bankes, 1993;Bankes et al., 2002) aimed to achieve a better understanding of socio-hydrological risks in Mexico City.
We conclude that modeling approaches such as MEGADAPT play an important role in sustainability science. The computational framework is applicable to a broad category of problems involving reflection and deliberation on how decision-making shapes vulnerability and adaptation patterns and processes. As pointed out by Eakin et al. (2017), we thus generalize that modeling approaches such as MEGADAPT play an important role in sustainability science by providing a space for reflection and deliberation on how decision making shapes some critical issues undergirding vulnerability patterns and processes. We thus concur with Munda (2006) that the key issue for fulfilling such a role concerns procedural rationality, a term coined by Simon (1976) that stems from psychology to underscore the role of reflection and deliberation in shaping, justifying or transforming decision making involving ill-structured problems. From the point of view of spatial decision support systems (Jankowski et al., 2014), moreover, the computational framework of MEGADAPT is applicable to a broader category of problems involving the tasks of design (searching for decision options) and choice (evaluation of decision options) in the context of coupled SES.