Agent-Based Modeling of a Thermal Energy Transition in the Built Environment

: To reduce greenhouse gas emissions to 80% below 1990 levels by 2050, an energy transition is taking place in the European Union. Achieving these targets requires changes in the heating and cooling sector (H&C). Designing and implementing this energy transition is not trivial, as technology, actors, and institutions interact in complex ways. We provide an illustrative example of the development and use of an agent-based model (ABM) for thermal energy transitions in the built environment, from the perspective of sociotechnical systems (STS) and complex adaptive systems (CAS). In our illustrative example, we studied the transition of a simpliﬁed residential neighborhood to heating without natural gas. We used the ABM to explore socioeconomic conditions that could support the neighborhoods’ transition over 20 years while meeting the neighborhoods’ heat demand. Our illustrative example showed that through the use of STS, CAS, and an ABM, we can account for technology, actors, institutions, and their interactions while designing for thermal energy transitions in the built environment.


Introduction
An energy transition is ongoing in the European Union (EU) [1]. Since 2011, the EU has aimed at reducing greenhouse gas emissions to 80% below 1990 levels by 2050, including to 60% by 2040 and to 40% by 2030. One way to achieve these goals is to increase the share of renewable energy resources (RES) in the energy system. However, this change would not be trivial. Due to the intermittent nature of many RES, the energy system would have to be able to ensure stability and security of supply under variable generation [2]. Energy systems that are able to meet this and other challenges are conceptualized as "smart energy systems" [3,4].
Accounting for the heating and cooling sector (H&C) is key to the design and implementation of smart energy systems [5]. This sector, which provides energy to warm and cool the built environment, is the largest single energy consumer of the EU. In 2016, it accounted for 50% of the EU's annual energy consumption, 13% of oil, 59% of gas, and 68% of gas imports [1]. As is the case in other sectors and infrastructures, designing and implementing changes in the H&C sector is challenging. The involvement of multiple individuals and organizations in decisions regarding technological changes is required [6], and institutions and technology need to be harmonized [3]. Therefore, designing for an energy transition in the H&C sector requires an approach that accounts for technology, individuals and organizations, and rules and regulations.
In this paper, we provide an illustrative example of the development and use of agent-based model (ABMs) of thermal energy transitions in the built environment from the perspective of sociotechnical

Materials and Methods
In Sections 4 and 5, we present an illustrative example of the development of an ABM of a thermal energy transition in the built environment. Our example addresses the transition to heating systems without natural gas in residential neighborhoods.
Two main reasons substantiate our choice of illustrative example. First, reducing fossil fuel consumption is a current societal challenge, as explained in Section 1. In the Netherlands, reducing natural gas consumption is part of this challenge, as explained in Section 4. Second, agent-based modeling is a suitable method to study this problem. In [25], the authors reviewed 23 agent-based modeling studies that addressed the adoption of energy efficient technologies by households. First, they provided an overview of barriers to and policies for the adoption of those technologies, as well as an overview of Energies 2019, 12, 856 4 of 25 energy efficiency model types. Then, they identified the technologies, policies, and decision-making theories used in the reviewed agent-based modeling studies, as well as the use of empirical data in those studies. They concluded that opportunities remain for other AB studies to address different residential technologies, barriers to, and policies for their adoption.
Our illustrative example is our first step towards our application of STS and CAS in the development and use of an ABM in the context of a case study. Therefore, the problem that we present in Section 4 is intentionally simplified. The model that we conceptualized, developed, and used is an illustrative model. This model, which can be modified and extended, is a sketch that will guide the development of forthcoming case studies. The model contains both assumptions regarding input data and simplifications regarding technology, agents, and institutions.
In the following subsections, we explain the main methods used in the illustrative example. In Section 3.1, we elaborate on model development and reporting. In Section 3.2, we explain how we used the model for computational simulations. In Section 3.3, we present our approach to analyzing simulation results.

Model Development
We developed an ABM based on the approach proposed by the authors of [24]. This approach proposes 10 steps to guide the development of ABMs of sociotechnical systems. The steps are (1) problem formulation and actor identification, (2) system identification and decomposition, (3) concept formalization, (4) model formalization, (5) software implementation, (6) model verification, (7) experimentation, (8) data analysis, (9) model validation, and (10) model use. We followed steps 1 to 8. Steps 9 and 10 will be addressed in forthcoming case studies.
In Section 4, the description of our ABM is based on the overview, design concepts, and details (ODD) protocol by the authors of [33]. We based our description on the ODD protocol for two of its known advantages: It can be used for a wide range of ABM applications in different fields, and it clarifies the features that were and were not included in the model, which can serve as input for further discussions and research [33].

Computational Simulations
After building and verifying the model, we used it for experimentation. Our experiments simulated changes that could occur in a neighborhood as a result of the behavior of agents, the environment, and their interactions. To simulate these changes, we changed the model's input parameters and observed changes over a fixed simulation time. Each unique set of input parameters of the model is an experimental scenario. In a simulation run, an experimental scenario is used to start up the model, and changes occur through a series of time steps based on the model code.
We simulated each experimental scenario once, as our model was deterministic. Simulation runs of experimental scenarios were conducted through the Behavior Space of NetLogo [34], a built-in simulation tool. Experiments took less than one minute to complete in a processor Intel(R) Core(TM) i7-6600U with 8GB RAM.

Analysis of Results
In order to analyze results, we collected data from each time step of each simulation run. These data were exported by NetLogo [34] in a CSV file. To visualize and analyze results, we used the statistical computing software R project (version 3.5.1, R Core Team, R Foundation for Statistical Computing, Vienna, Austria) [37] and R studio (version 1.1.463, RStudio Team, RStudio, Inc., Boston, MA, USA) [38], with the packages dplyr (version 0.7.8) [39], sqldf (version 0.4-11) [40], ggplot2  [41], and car (version 3.0-2) [42]. We relied on a nonparametric statistical test and visual inspection of plots and tables to describe and analyze results. When a model has undergone validation, further statistical analyses of its results can be conducted.

Illustrative Example: from Natural Gas-Based to Natural Gas-Free Heating in Residential Neighborhoods
In the Netherlands, a large share of the built environment relies on natural gas for heating [43], but in the future, this is likely to change. In March 2018, the national government announced its decision to end natural gas extraction from the Groningen field by 2030 [44]. The Groningen field is the largest in Europe and is located in the North of the Netherlands [45]. Moreover, since July 2018, new buildings that are small consumers, such as houses and small commercial buildings, have had to be built without a connection to the gas grid [46]. As a result of these changes, the built environment in the Netherlands has the challenging task to organize heat supply that is naturally gas-free. At the local level, municipalities are responsible for taking control of the thermal energy transition [47].
We focused our illustrative example on the transition of the Dutch built environment to heating systems that do not use natural gas. For the purpose of simplicity, we only considered residential buildings. Our research question was: Which socioeconomic conditions support Dutch neighborhoods' transition to natural gas-free heat supply until 2040 while meeting the neighborhoods' heat demand?
While there can be multiple and complex objectives of thermal energy transitions (e.g., maintaining user comfort, public participation, acceptability of projects), this work focused on two key performance indicators (KPIs) related to reduced fossil fuel use: The neighborhood's annual natural gas consumption (MWh) and the cumulative costs of the transition (thousands of Euros), including investments, maintenance, and energy costs.
The remaining parts of this section are structured as follows. In Section 4.1, we describe the thermal energy transition through the lenses of STS and CAS. In Section 4.2, we define the modeling questions and present the model overview, based on the ODD protocol. In Section 4.3, we describe the experimental design for the computational simulation. Results are presented and discussed in Section 5.

The Thermal Energy Transition through the Lenses of STS and CAS
The transition towards natural gas-free heating in residential neighborhoods is complex. While local governments in the Netherlands are in charge of taking control of the thermal energy transition, the transition cannot be achieved only through top-down technological decisions. From the perspectives of STS and CAS, neighborhoods can be seen as networks of individual actors who own technology, interact with each other, and are able to make their own decisions.
Our simple conceptualization of the neighborhood considers each household to be an actor. Each household is assumed to live in a single dwelling, and the dwelling's insulation and heating system are considered to be the technologies of interest to the model. For the sake of simplicity, we assumed that all households can make capital investment decisions for their dwelling. Each household was assumed to initially own a natural gas boiler and to be able to decide to keep their boiler or replace it with an alternative. The heating systems that were assumed to be available were micro-CHPs (micro combined heat and power), electric radiators, aerial heat pumps, and geothermal heat pumps. While micro-CHPs consume gas, we assumed that they are available for agents to purchase. The household can also decide to keep their dwelling's current insulation level unchanged or to improve it. A higher insulation level results in lower heat demand. Some households are influenced by the decisions of other households after observing how many households in the neighborhood have improved their insulation or replaced their heating system. Since each household is able to make its own decisions and these decisions can vary from one household to the next one, the neighborhood's transition depends on households' individual decisions. This is the CAS notion of system outcomes being the result of individual decisions rather than of centralized control. Households can make decisions in different ways. Some take action to reduce natural gas consumption and prioritize natural gas reduction over costs minimization, while other do not. Some households are influenced by observations regarding the number and type of heating systems and the dwelling insulation levels in their neighborhood, while others are not. Some households have better information regarding costs of technology options than others. All households have budget constraints that affect their investment decisions.
Following the review in [25], we integrated notions from structural, economic, behavioral, and social-behavioral barriers to explore the adoption of residential heating systems. We assumed that households do not have knowledge of future retail energy prices, do not always have sufficient capital to make an investment, have to pay upfront capital costs, are bounded by their own desired payback period and by their ability to compare combinations of heating systems and insulation, and can be influenced by other households' inactivity or investment decisions.
While natural gas reduction in the neighborhood depends on individual decisions by households, the cost of the transition is also influenced by external factors that cannot be controlled by households. These include the investment cost of insulation measures, investment and maintenance costs of heating systems, and electricity and natural gas prices, which influence the operation costs of heating systems. While households have access to present market costs, future costs are uncertain, and households have no access to data of past prices. Therefore, while households can estimate the financial performance of their preferred insulation and heating system options, their actual financial performance is uncertain until after the fact.
Institutions also play a role in the transition to natural gas-free residential heating. Our conceptualization includes changes in energy prices, the sunsetting of natural gas boilers, and the effect of better information in the investment decisions that households make. We assumed that the electricity price changes annually and at a constant rate, and that the natural gas price also changes annually and at its own constant rate. Furthermore, we assumed that it is no longer possible for households to purchase new natural gas boilers. Finally, we assumed that an information campaign that informs households about cost-effective investments in technology is sometimes in place.

Model Overview
We based our ABM on the simple conceptualization from Section 4.1. The model represents a neighborhood in which households use their heating systems to meet their heat demand and can choose to invest in replacing their heating system or improving their dwelling's insulation level. We used the model to simulate experimental scenarios that represent variations between households' decision rules and external factors. The purpose was to identify the conditions under which the transition was achieved and gain insights on the costs of such a transition and on the changes in household technologies that took place. We operationalized this objective, based on the research question, into the following modeling questions:

1.
Under which socioeconomic conditions did the neighborhood transition fully to natural gas-free heating? 2.
What were the costs of the transition? 3.
Which changes in household insulation and heating systems took place during these transitions?

Model Entities, State Variables, and Scale
Entities in our model are either agents or objects who exist in the environment with a temporal scale. Agents represent households, are able to make decisions, and are described by state variables. Objects represent heating systems, are described by properties (such as capital costs and thermal efficiency), and are simply used by agents. The environment represents information that is external to agents and objects. Below, we elaborate on agents, their state variables, the environment, and the temporal scale. Objects' properties are specified in Appendix A. Each agent has nine state variables that describe the agent at any point in time: Insulation level, heating system, annual natural gas consumption, cumulative costs, time horizon (HRZ), investment (INV), value orientation (ORI), social threshold (THR), and ability to compare combined investments (ACCI). Insulation level and heating system describe the technology that an agent owns. Cumulative costs and annual natural gas consumption are outputs from the use of heating systems by agents, from their investment decisions, and from external factors. HRZ, INV, ORI, THR, and ACCI are inputs for agents' investment decisions. Agents' states are listed in Table 1 and explained further in the following paragraphs. Agents have an insulation level and own a heating system. Three insulation levels are possible, with the lowest level representing poorly insulated dwellings, and the highest, quasi-passive dwellings. Five heating systems are possible, two of which consume electricity, i.e., electric radiator, aerial heat pump, and geothermal heat pump. When an agent invests in a new technology, one or both of these state variables are updated.
Cumulative costs are the thousands of Euros that an agent has spent over a simulation run. When agents invest in technology, the capital costs of that technology increase the agent's cumulative costs. Similarly, maintenance and use of heating systems also increase the agent's cumulative costs. Thermal efficiency and capital and maintenance costs vary between heating systems, and capital costs vary between insulation levels, as specified in Appendix A. In addition, cumulative costs are influenced by energy prices. While agents cannot control the costs of technology, the thermal efficiency of heating systems, or the energy prices, agents can influence their own cumulative costs through their investment decisions in technology.
Annual natural gas consumption results from the use of a heating system by an agent. It is influenced by the type of heating system that the agent owns and the agent's insulation level. Each heating system uses either natural gas or electricity and has its own thermal efficiency, and each insulation level results in a different heat demand. While agents cannot control whether a type of heating system uses natural gas or electricity, or the heat demand that results from each insulation level, agents can influence their own annual natural gas consumption from the following year through their investment decisions in technology in the present year.
Each agent's time horizon (HRZ) is the payback period that an agent considers when assessing whether an investment would be cost-effective. For example, when an agent's HRZ = 5, they estimate the cumulative natural gas consumption and the cumulative costs of each investment option over a 5-year period, including investment, maintenance, and energy costs (Equations (1) to (5), below). Then, the agent selects the cheapest option that they believe minimizes cumulative natural gas consumption or the option that they believe minimizes cumulative costs, depending on the agent's ORI. After making an investment, an agent will only consider new investments after HRZ has passed, this is, when the state variable investment (INV) is equal to or lower than zero.
Cumulative natural gas consumption = Cumulative heat demand/Thermal efficiency (1) Energy costs = (Cumulative heat demand/Thermal efficiency) * Retail energy price (4) Maintenance costs = Annual maintenance costs * HRZ (5) • Equation (1) applies to technologies that consume natural gas and not electricity.

•
In Equation (2), information regarding maintenance costs and investment costs is part of the environment and is available to agents. • In Equation (3), annual demand is retrieved from the environment. See Appendix A, Table A3.

•
In Equation (4), retail electricity or natural gas price of the present year are used, depending on the technology. • In Equation (5), annual operation costs are retrieved from the environment. See Appendix A, Table A2.
The value orientation (ORI) of the agent is set to either "environmental", "financial", or "social". Environmental agents aim to minimize their natural gas consumption. When faced with multiple alternatives that would reduce natural gas consumption to zero, environmental agents select the alternative that would minimize their cumulative costs. Financial agents focus exclusively on minimizing cumulative costs. Social agents also aim at minimizing cumulative costs, but they are only willing to replace their heating system or improve their insulation after a given fraction of all households owns either a heating system or insulation level different than their own. This fraction is specified by the social threshold (THR) state of the agent. If the fraction of total agents with either a different heating system or insulation level than their own is not higher than a social agent's THR, the social agent would not invest in new technology. When social agents observe agents in the neighborhood, they observe their states from the end of the previous year.
The agent's ability to compare combined investments (ACCI) is a proxy for the impact of an information campaign about cost-effective investments in heating systems and insulation measures. We assumed that, after being reached by an information campaign, agents can compare all possible combinations of insulation levels and heating systems when making an investment decision. ACCI is represented as a binary variable that indicates whether the agent has been reached by the information campaign (ACCI = 1) or not (ACCI = 0). For example, when an agent with a natural gas boiler and low insulation has an ACCI = 0, they only consider investment options 1 to 7 from the list below. If the same agent has an ACCI = 1, they also consider options 8 to 15. We assumed that agents never choose an insulation level lower than their existing one.

1.
Business as usual (natural gas boiler and low insulation) 2.
Micro-CHP and low insulation 3.
Electric radiator and low insulation 4.
Aerial heat pump and low insulation 5.
Geothermal heat pump and low insulation 6.
Natural gas boiler and medium insulation 7.
Natural gas boiler and high insulation 8.
Micro-CHP and medium insulation 9.
Micro-CHP and high insulation 10. Electric radiator and medium insulation 11. Electric radiator and high insulation 12. Aerial heat pump and medium insulation 13. Aerial heat pump and high insulation 14. Geothermal heat pump and medium insulation

Geothermal heat pump and high insulation
In the model, agent rationality is bounded. First, individual agents' estimates are constrained by their HRZ and ACCI. Agents with longer HRZ are willing to choose technologies with higher investment costs and lower maintenance and energy costs, while agents with shorter HRZ prefer options with lower investment costs. Therefore, it is possible for choices of agents with longer HRZ to result in lower annualized costs. Similarly, when agents have an ACCI = 0, they are not able to compare all investment options that are available to them, as described above. Second, agents have imperfect information regarding their environment. While they have perfect knowledge of investment and annual maintenance costs of each heating system, agents assume that electricity and natural gas prices do not change. Agent estimates are thus only correct in scenarios where prices remain constant. As a result, an agent can have lower or higher heating costs than expected. Finally, agents are subject to path dependency: Their present decisions condition their future options. When the cumulative costs of an investment decision differ from their estimated costs, agents may not have the capital to change their technology according to the new natural gas and electricity prices, as reflected by the variable INV. In the current version of the model, HRZ, ORI, THR, and ACCI do not change during a simulation.
The environment consists of external factors and information about the state of the neighborhood. First, external factors are prices of electricity and natural gas and the prices and technical specifications of available technologies. We assumed that prices of electricity and natural gas can change every year, that installed technology does not age, and that, with one exception, prices and technical specifications of technology remain constant. This means that the efficiency of installed technology remains constant, as well as the specifications of technologies available in the market. An exception is made for micro-CHPs. While we assumed that installed micro-CHPs do not age, we simulated a decrease on their market price based on [48] in [49]. Second, information about the state of the neighborhood consists of the neighborhood's annual natural gas consumption and cumulative costs, the number of each type of heating systems installed, and the number of dwellings with each insulation level in the neighborhood. While agents cannot influence external factors, agent decisions influence the state of the neighborhood: The neighborhood's natural gas consumption is the sum of the natural gas consumption of all households, and the neighborhood's cumulative costs is the sum of cumulative costs of all households.
In the model, the time scale is defined as one year per time step, and no spatial scale is defined. Agents are assumed to live in the same neighborhood. At all times during a simulation run, each agent knows the number of agents that, by the end of the previous year, had each type of heating system and had each level of insulation.

Process Overview and Scheduling
In each year of the model, external factors change; agents' variable INV is updated to reflect the passage of time since their last investment; all agents give maintenance to their heating systems and use them to produce heat; and agents who are able to invest make investment decisions. Maintaining and operating their heating systems generates costs for agents and may require natural gas. These costs and natural gas consumption, when applicable, are added to agents' cumulative costs and natural gas consumption, respectively. Every agent who is able to invest selects their preferred insulation level and heating system, based on their individual decision rules. An investment generates costs for the agent, which are added to their cumulative costs. The neighborhood's cumulative expenses and annual natural gas consumption are calculated.

Experimental Design
We used the model to represent a neighborhood in which, initially, all households had natural gas boilers and low insulation levels. We initialized the model with 24 agents that were not able to invest during the first 5 years. The number of agents and years before their first opportunity to invest were chosen arbitrarily and aimed at maintaining the simplicity of our illustrative example. The inability of agents to invest at the beginning of the simulation was designed to represent past investments and the potential need of agents to save before their next investment. We used the model to simulate experimental scenarios over 20 years. The number of simulated years was chosen to be consistent with EU targets to reduce greenhouse gas emissions over the next few decades and the decision of the Netherlands to end natural gas extraction in Groningen in 2030. Additional details regarding initialization and input data for heating systems, insulation levels, and market prices are available in Appendix A.
Experimental scenarios represented variations in the environment and between agents. An experimental scenario consisted of five experimental variables, described in Table 2. The first two variables defined the environment: The annual percentage change in retail natural gas price (dgp) and the annual percentage change in the retail electricity price (dep). For example, in an experimental scenario with constant dgp (dgp = 0) and a dep of +4% (dep = 0.04), natural gas price remained constant, and electricity price increased by 4% every year. These variables can be considered to be proxies for both relevant market forces and policies, such as taxes or subsidies. The last three variables of an experimental scenario defined a population of agents: The fraction of agents in the model with an ACCI = 1 (popACCI), the HRZ shared by all agents (popHRZ), and the proportion of agents with each value orientation (popORI). PopORI consists of three fractions: First, the fraction of agents who are environmentally oriented; second, the fraction of agents who are socially oriented; third, the fraction of agents who are financially oriented. For example, in a population with popACCI = 1.00, popHRZ = 5, and popORI = [0.50, 0.25, 0.25], all households were able to compare combined investments, all households had a time horizon of 5 years, 50% of households were environmentally oriented, 25% were socially oriented, and 25% were financially oriented. We used the model to simulate 756 experimental scenarios, which is the count of all possible combinations of variables in Table 3. Simplifications were made in the choice of variable values in order to maintain the simplicity of the illustrative example. In all experimental scenarios, all agents had the same HRZ, so that popHRZ = HRZ for all agents. Similarly, all agents had ACCI = 0 or ACCI = 1, so that popACCI = ACCI for all agents. Furthermore, a limited number of values for popORI, popACCI, popHRZ, dgp, and dep were tested. In the future, when using this model for a case study, the choice of values for experimental variables in scenarios should be modified based on the type of problem and modeling questions.
Results from experimental scenarios are available as supplementary material: "DataSet S1: Behavior space results (NetLogo 6.0.4)".

Results and Discussion from the Illustrative Example
To analyze simulation results and answer the research question and modeling questions, we analyzed the KPIs resulting from our 756 simulation runs: The annual natural gas consumption at the last time step of a simulation run and the cumulative costs of the neighborhood in the model. Figure 1 is a scatterplot of these KPIs. In Figure 1, we observed that both annual natural gas consumption and cumulative costs varied between experimental scenarios. The transition to a natural gas-free neighborhood was considered to be fully achieved when none of the agents consumed natural gas by year 20. In our simulation runs, this transition was achieved with different cumulative costs, as indicated in Figure 1 by multiple dots over the vertical axis where annual natural gas consumption equals zero. Because of our simple experimental design and deterministic nature of our model, multiple experimental scenarios led to the same annual natural gas consumption and cumulative expenses. As a result, a single dot in Figure 1 and in the following plots could represent multiple overlapping dots. Results from experimental scenarios are available as supplementary material: "DataSet S1: Behavior space results (NetLogo 6.0.4)".

Results and Discussion from the Illustrative Example
To analyze simulation results and answer the research question and modeling questions, we analyzed the KPIs resulting from our 756 simulation runs: The annual natural gas consumption at the last time step of a simulation run and the cumulative costs of the neighborhood in the model. Figure 1 is a scatterplot of these KPIs. In Figure 1, we observed that both annual natural gas consumption and cumulative costs varied between experimental scenarios. The transition to a natural gas-free neighborhood was considered to be fully achieved when none of the agents consumed natural gas by year 20. In our simulation runs, this transition was achieved with different cumulative costs, as indicated in Figure 1 by multiple dots over the vertical axis where annual natural gas consumption equals zero. Because of our simple experimental design and deterministic nature of our model, multiple experimental scenarios led to the same annual natural gas consumption and cumulative expenses. As a result, a single dot in Figure 1 and in the following plots could represent multiple overlapping dots. We divided the set of results from all simulation runs in two subsets: "gas-free-subset" and "gasdependent-subset". The gas-free-subset consisted of results from experimental scenarios where the transition was fully achieved. The gas-dependent-subset consisted of results from all other simulation runs. We named the complete set of results "all-simulations-runs".
A different approach would have been to study all experimental scenarios in which a given fraction of agents still consumed natural gas by the end of the simulation run. This would have allowed the analysis of conditions that led to a partial transition. This approach would be sensible We divided the set of results from all simulation runs in two subsets: "gas-free-subset" and "gas-dependent-subset". The gas-free-subset consisted of results from experimental scenarios where the transition was fully achieved. The gas-dependent-subset consisted of results from all other simulation runs. We named the complete set of results "all-simulations-runs".
A different approach would have been to study all experimental scenarios in which a given fraction of agents still consumed natural gas by the end of the simulation run. This would have allowed the analysis of conditions that led to a partial transition. This approach would be sensible when the model has stochasticity. Another approach would have been to study the entire data set. Because of the deterministic nature of our model, limited number of agents, and simple experimental design, we chose to study only experimental scenarios in which the transition was fully achieved.
As seen in Table 4, a complete transition occurred in only 128 (gas-free-subset) out of 756 simulation runs (all-simulation-runs), which accounts for less than 17.0% of all-simulation-runs. In the following subsections, we refer back to the subsets from Table 4 while answering the modeling questions. Table 4. Definition of dataset and subsets of results from simulations.

Subset Number of Scenarios Definition
All-simulation-runs 756 Results from all simulation runs.

Gas-dependent-subset 628
Subset of all-simulation-runs in which the neighborhood consumed natural gas in year 20, and thus did not achieve the transition to a gas-free neighborhood.
Gas-free-subset 128 Subset of all-simulation-runs in which did not consume natural gas in year 20, and thus fully achieved the thermal energy transition to a gas-free neighborhood. Figure 2 shows the neighborhood's annual natural gas consumption by year 20 for all-simulation-runs. The boxplots from popORI = 1, 2, 3, 4, and 7 (see Table 3) show outliers with high ending natural gas consumption. These points belong to simulation runs from two types of experimental scenarios: First, those where popHRZ = 1, and second, those where popHRZ = 5 and natural gas price decreased. The horizontal line in popORI = 5 indicates that natural gas consumption in year 20 was always zero for simulation runs in this group, and therefore always in the gas-free-subset. Similarly, for popORI = 6, natural gas consumption was the same in every simulation run, and always in the gas-dependent-subset. In the remaining groups (popORI = 1, 2, 3, 4, and 7), the transition was fully achieved only when the popHRZ was 5 or 10 years, natural gas prices increased, and electricity price decreased. These findings are summarized in Table 5, where we present two sets of sufficient scenario conditions for simulation runs to be in the gas-free-subset.

Modeling Question 1: Socioeconomic Conditions
Energies 2019, 12 12 when the model has stochasticity. Another approach would have been to study the entire data set. Because of the deterministic nature of our model, limited number of agents, and simple experimental design, we chose to study only experimental scenarios in which the transition was fully achieved. As seen in Table 4, a complete transition occurred in only 128 (gas-free-subset) out of 756 simulation runs (all-simulation-runs), which accounts for less than 17.0% of all-simulation-runs. In the following subsections, we refer back to the subsets from Table 4 while answering the modeling questions. Table 4. Definition of dataset and subsets of results from simulations.

Number of Scenarios Definition
All-simulation-runs 756 Results from all simulation runs.

Gas-dependent-subset 628
Subset of all-simulation-runs in which the neighborhood consumed natural gas in year 20, and thus did not achieve the transition to a gas-free neighborhood.

Gas-free-subset 128
Subset of all-simulation-runs in which did not consume natural gas in year 20, and thus fully achieved the thermal energy transition to a gas-free neighborhood. Figure 2 shows the neighborhood's annual natural gas consumption by year 20 for allsimulation-runs. The boxplots from popORI = 1, 2, 3, 4, and 7 (see Table 3) show outliers with high ending natural gas consumption. These points belong to simulation runs from two types of experimental scenarios: First, those where popHRZ = 1, and second, those where popHRZ = 5 and natural gas price decreased. The horizontal line in popORI = 5 indicates that natural gas consumption in year 20 was always zero for simulation runs in this group, and therefore always in the gas-freesubset. Similarly, for popORI = 6, natural gas consumption was the same in every simulation run, and always in the gas-dependent-subset. In the remaining groups (popORI = 1, 2, 3, 4, and 7), the transition was fully achieved only when the popHRZ was 5 or 10 years, natural gas prices increased, and electricity price decreased. These findings are summarized in Table 5, where we present two sets of sufficient scenario conditions for simulation runs to be in the gas-free-subset.   In set 1, the transition was always achieved because all agents decided to replace their boilers for gas-free alternatives, as they were programmed to be environmentally oriented. In all scenarios in set 2, some agents aimed to minimize their costs rather than their natural gas consumption, as they were financially oriented. In these simulation runs, by the time that agents chose natural gas-free technologies, natural gas price had increased, and electricity price had decreased. As a result, agents estimated that an option involving a natural gas-free technology would be cheaper. However, simulation runs that also had popHRZ > 10 were not part of the gas-free-subset, even when there were increasing natural gas prices and decreasing electricity prices. In those cases, agents were not able to make a second investment before the end of the simulation run: After making an investment, agents waited for a period equal to their HRZ before considering a new investment.

Modeling Question 2: Cost of the Transition
To determine how the transition would affect the costs of heating in the neighborhood, we calculated the neighborhood's cumulative costs of the gas-dependent-subset and gas-free-subset. Table 6 shows higher average and median cumulative costs for the gas-free-subset than for the gas-dependent-subset, and Figure 3, a wide range of values within the gas-free-subset. A Wilcoxon rank sum test showed that the median of the cumulative costs of the gas-free subset was significantly higher than the median of the cumulative costs of the gas-dependent subset. We selected the Wilcoxon rank sum, a nonparametric test, because the assumption of normality, needed for a student-T test, was not met. Results from the Wilcoxon rank sum test and Shapiro-Wilk normality test are provided in Table 7. In set 1, the transition was always achieved because all agents decided to replace their boilers for gas-free alternatives, as they were programmed to be environmentally oriented. In all scenarios in set 2, some agents aimed to minimize their costs rather than their natural gas consumption, as they were financially oriented. In these simulation runs, by the time that agents chose natural gas-free technologies, natural gas price had increased, and electricity price had decreased. As a result, agents estimated that an option involving a natural gas-free technology would be cheaper. However, simulation runs that also had popHRZ > 10 were not part of the gas-free-subset, even when there were increasing natural gas prices and decreasing electricity prices. In those cases, agents were not able to make a second investment before the end of the simulation run: After making an investment, agents waited for a period equal to their HRZ before considering a new investment.

Modeling Question 2: Cost of the Transition
To determine how the transition would affect the costs of heating in the neighborhood, we calculated the neighborhood's cumulative costs of the gas-dependent-subset and gas-free-subset. Table 6 shows higher average and median cumulative costs for the gas-free-subset than for the gasdependent-subset, and Figure 3, a wide range of values within the gas-free-subset. A Wilcoxon rank sum test showed that the median of the cumulative costs of the gas-free subset was significantly higher than the median of the cumulative costs of the gas-dependent subset. We selected the Wilcoxon rank sum, a nonparametric test, because the assumption of normality, needed for a student-T test, was not met. Results from the Wilcoxon rank sum test and Shapiro-Wilk normality test are provided in Table 7.    Because of the limited number of agents, our simple experimental design and the deterministic nature of the model, we limited further analyses to visual inspection of the plots. Figure 4 shows cumulative costs of the gas-free-subset, grouped by (a) popORI, (b) popACCI, and (c) popHRZ. Figure 4b,c shows the outliers. In Figure 4b, outliers belong to simulation runs where popORI = 5 and popHRZ = 1. The three groups of outliers were produced by the three variations in the change of electricity price (increasing, constant, or decreasing). In Figure 4c, outliers belong to simulation runs where popORI = 5 and popACCI = 0.00. Because of the limited number of agents, our simple experimental design and the deterministic nature of the model, we limited further analyses to visual inspection of the plots. Figure 4 shows cumulative costs of the gas-free-subset, grouped by (a) popORI, (b) popACCI, and (c) popHRZ. Figure 4b,c shows the outliers. In Figure 4b, outliers belong to simulation runs where popORI = 5 and popHRZ = 1. The three groups of outliers were produced by the three variations in the change of electricity price (increasing, constant, or decreasing). In Figure 4c, outliers belong to simulation runs where popORI = 5 and popACCI = 0.00. In Figure 4a, the boxplot for popORI = 5 shows a wider range of values than all other groups of popORI. A similar pattern can be observed in Figure 4c, where groups with popHRZ = 10, 15, 20, and 30 have a wider range of values. A possible and partial explanation for this wider range for simulation runs where popORI = 5 is that all simulation runs in this group are part of the gas-free subset (108 simulation runs), as opposed to four simulation runs with each of the other groups with different popORI (popORI = 1, 2, 3, 4, and 7). Finally, external factors may have also contributed to these differences, as in all simulation runs in the gas-free-subset where popORI ≠ 5 had increasing natural gas prices (positive dgp) and decreasing electricity prices (negative dep). Boxplots of the gas-freesubset grouped by these experimental variables are presented in Figure 5.
Interaction effects between experimental variables could have resulted in different ranges of values between groups. Figure 6 is a grid of plots in which simulation runs from the gas-free-subset are classified according to popACCI, popORI, and popHRZ. Each plot in the grid displays cumulative costs for scenarios with a unique combination of popACCI and popORI. Within the same plot, simulation runs are grouped by popHRZ with a boxplot for each popHRZ. Plots for popORI ≠ 5 show points only for popHRZ = 5 and 10, as only simulation runs from these scenarios were part of the gasfree-subset, as summarized in Table 5. In Figure 4a, the boxplot for popORI = 5 shows a wider range of values than all other groups of popORI. A similar pattern can be observed in Figure 4c, where groups with popHRZ = 10, 15, 20, and 30 have a wider range of values. A possible and partial explanation for this wider range for simulation runs where popORI = 5 is that all simulation runs in this group are part of the gas-free subset (108 simulation runs), as opposed to four simulation runs with each of the other groups with different popORI (popORI = 1, 2, 3, 4, and 7). Finally, external factors may have also contributed to these differences, as in all simulation runs in the gas-free-subset where popORI = 5 had increasing natural gas prices (positive dgp) and decreasing electricity prices (negative dep). Boxplots of the gas-free-subset grouped by these experimental variables are presented in Figure 5.
Interaction effects between experimental variables could have resulted in different ranges of values between groups. Figure 6 is a grid of plots in which simulation runs from the gas-free-subset are classified according to popACCI, popORI, and popHRZ. Each plot in the grid displays cumulative costs for scenarios with a unique combination of popACCI and popORI. Within the same plot, simulation runs are grouped by popHRZ with a boxplot for each popHRZ. Plots for popORI = 5 show points only for popHRZ = 5 and 10, as only simulation runs from these scenarios were part of the gas-free-subset, as summarized in Table 5.
Visual inspection of Figure 6 suggested that when popACCI = 0.00, a longer popHRZ resulted in higher cumulative costs. By contrast, when popACCI = 1.00, a longer popHRZ resulted in lower cumulative costs. These trends can be observed more clearly in the plots for popORI = 5 (fifth row from top to bottom). In Figure 4, the boxplot for popORI = 5 displays a wide range of values without revealing interaction effects of popHRZ and popACCI. By contrast, visual inspection of Figure 6 suggested that the interaction between popHRZ and popACCI influenced cumulative costs.  . Cumulative costs of the transition (gas-free-subset). Each plot displays results from simulation runs with a unique combination of popACCI (grey labels on top of each column) and popORI (grey labels to the right of each row). In each plot, a boxplot is displayed for simulation runs with the same popHRZ, e.g., the plot in the top right corner displays simulation runs in which popACCI = 1.00 and popORI = 1, the first boxplot corresponds to popHRZ = 5, and the second one, to popHRZ = 10.
Visual inspection of Figure 6 suggested that when popACCI = 0.00, a longer popHRZ resulted in higher cumulative costs. By contrast, when popACCI = 1.00, a longer popHRZ resulted in lower cumulative costs. These trends can be observed more clearly in the plots for popORI = 5 (fifth row from top to bottom). In Figure 4, the boxplot for popORI = 5 displays a wide range of values without revealing interaction effects of popHRZ and popACCI. By contrast, visual inspection of Figure 6 suggested that the interaction between popHRZ and popACCI influenced cumulative costs.
The combined effects of popACCI and popHRZ resulted from the modeling choices. When all agents were able to compare costs of combined investment options, agent's decisions may have more cost-effective results than when popACCI = 0.00. When popACCI = 1.00, agents could replace both  . Cumulative costs of the transition (gas-free-subset). Each plot displays results from simulation runs with a unique combination of popACCI (grey labels on top of each column) and popORI (grey labels to the right of each row). In each plot, a boxplot is displayed for simulation runs with the same popHRZ, e.g., the plot in the top right corner displays simulation runs in which popACCI = 1.00 and popORI = 1, the first boxplot corresponds to popHRZ = 5, and the second one, to popHRZ = 10.
Visual inspection of Figure 6 suggested that when popACCI = 0.00, a longer popHRZ resulted in higher cumulative costs. By contrast, when popACCI = 1.00, a longer popHRZ resulted in lower cumulative costs. These trends can be observed more clearly in the plots for popORI = 5 (fifth row from top to bottom). In Figure 4, the boxplot for popORI = 5 displays a wide range of values without revealing interaction effects of popHRZ and popACCI. By contrast, visual inspection of Figure 6 suggested that the interaction between popHRZ and popACCI influenced cumulative costs.
The combined effects of popACCI and popHRZ resulted from the modeling choices. When all agents were able to compare costs of combined investment options, agent's decisions may have more Figure 6. Cumulative costs of the transition (gas-free-subset). Each plot displays results from simulation runs with a unique combination of popACCI (grey labels on top of each column) and popORI (grey labels to the right of each row). In each plot, a boxplot is displayed for simulation runs with the same popHRZ, e.g., the plot in the top right corner displays simulation runs in which popACCI = 1.00 and popORI = 1, the first boxplot corresponds to popHRZ = 5, and the second one, to popHRZ = 10.
The combined effects of popACCI and popHRZ resulted from the modeling choices. When all agents were able to compare costs of combined investment options, agent's decisions may have more cost-effective results than when popACCI = 0.00. When popACCI = 1.00, agents could replace both their heating system and improve their insulation level at the same time. As a result, during the course of a simulation run, the combination of insulation and heating system that they chose could potentially keep the agents' costs lower than when agents were only able to choose either a change in insulation or a change in heating system. Since agents were not able to make a new investment before their HRZ elapsed, agents unable to make combined investment decisions would have no choice but to use a heating system and keep an insulation level that could result in higher costs.

Modeling Question 3: Changes in Technology and Insulation
By the end of each simulation run, agents in all experimental scenarios of the gas-free-subset had either aerial heat pumps or radiators. Geothermal heat pumps were never chosen because they were perceived by agents as less cost-effective. Simulations where agents had either boilers or micro-CHPs in year 20 were always excluded from the gas-free-subset, as both heating systems used natural gas.
While all agents in all simulation runs in the gas-free subset had natural gas-free heating systems in the last time step, agents may have made multiple investment decisions before investing in the aerial heat pump or radiator that they had by year 20. Therefore, we considered the "pathways" of technological changes that occurred in the transition of each simulation run in the gas-free-subset. The "heating systems' pathway" recorded the series of all changes in the number of heating systems of each type that took place in the neighborhood over time in a simulation run. Similarly, the "insulation pathway" recorded the series of all changes in the number of dwellings with each insulation level that took place in the neighborhood during the simulation. Figures 7 and 8 are grids of line plots of heating system and insulation pathways, respectively, of the gas-free-subset. In each grid, scenarios in the gas-free-subset are classified according to popHRZ and a combination of dgp, popACCI, and dep. The graph on the top right corner of Figure 7, for instance, shows the number of dwellings with each heating system over time in simulation runs where popHRZ = 30, dgp = −0.04, popACCI = 0.00, and dep = −0.04. In Figure 7, plots with a black frame indicate simulation runs where agents replaced their heating system more than once. In all but four line plots in each figure, the plots display results from only one simulation run, where popORI = 5. The four line plots with a blue frame each contain results from six simulation runs with the same dep, dpg, popHRZ, and popACCI but different popORI. Results in these plots correspond to simulation runs that met set 2 of sufficient scenario conditions from Table 5. Because each of these line plots displays results for more than one simulation run, their lines overlap or cross. Therefore, Figure 9 provides a zoom-in on these plots from both Figures 7 and 8.
Visual inspection of Figures 7 and 8 led to conclusions regarding choices in technology. Figure 7 suggests that under longer popHRZ, agents preferred aerial heat pumps, while in shorter ones, they preferred radiators. When popHRZ < 20, after an initial investment in year 5, agents were able to invest again before the end of the simulation run. In exceptional cases, agents chose to invest again in a heating system before the end of the simulation run. When agents considered an investment, they had no knowledge of future energy prices. As a result, their estimated costs were incorrect in simulation runs where energy prices changed. Agents could then decide to replace their technology for one that was more financially attractive after energy prices had changed. In turn, Figure 8 suggests that agents with ACCI = 1 tended to improve their insulation from low to high level early in the simulation run and that medium insulation was chosen in some cases by agents with shorter HRZ.
Simulation runs in which not all agents had the same popORI led to more complicated results than simulation runs where agents had the same popORI. Figure 9 shows heating system and insulation pathways for experimental scenarios with popORI = 1, 2, 3, 4, 5, and 7. Line plots for popORI = 1, 2, 3, and 4 display more changes in technology and insulation than line plots for popORI = 5. Agents with different popORI made different decisions.

Integration and Discussion
As an illustrative example of the development and use of ABMs of thermal energy transitions in the built environment, we studied a residential neighborhood's transition to natural gas-free heating from the perspectives of STS and CAS. The research question was: Which socioeconomic conditions support Dutch neighborhoods' transition to natural gas-free heat supply until 2040 while meeting the neighborhoods' heat demand? We operationalized this research question into the following three modeling questions.
First, in which scenarios did the neighborhood transition fully to natural gas-free heating? In Subsection 5.1, we identified the simulation runs in which the neighborhood transitioned fully to natural gasfree heating. This transition occurred in simulation runs where all agents were environmentally oriented, and in simulation runs where four conditions were met: At least 25% of the agents were financially oriented, their time horizon was equal to 5 or 10 years, the natural gas price increased, and the electricity price decreased over time.
Second, what is the cost of the transition in these scenarios? In Subsection 5.2, we found that the median of the cumulative costs of the transition was higher than the median of the cumulative costs in simulation runs where the neighborhood continued to use natural gas. We found indication of the costs of the transition being higher when agents were environmentally oriented. However, we also found indication of a wider range of values in the group of simulation runs of the gas-free-subset where all agents were environmentally oriented. A possible explanation of these differences is that in most experimental scenarios of the gas-free-subset, all agents were environmentally oriented, which meant that simulation runs where some agents were socially or financially oriented were underrepresented. A complementary explanation is the combined effect of agent ability to compare combined investments and their time horizon. When they were able to select more cost-effective alternatives, they enjoyed their benefits throughout the simulation run. When agents could only make less cost-effective choices, they were financially burdened.

Integration and Discussion
As an illustrative example of the development and use of ABMs of thermal energy transitions in the built environment, we studied a residential neighborhood's transition to natural gas-free heating from the perspectives of STS and CAS. The research question was: Which socioeconomic conditions support Dutch neighborhoods' transition to natural gas-free heat supply until 2040 while meeting the neighborhoods' heat demand? We operationalized this research question into the following three modeling questions.
First, in which scenarios did the neighborhood transition fully to natural gas-free heating? In Section 5.1, we identified the simulation runs in which the neighborhood transitioned fully to natural gas-free heating. This transition occurred in simulation runs where all agents were environmentally oriented, and in simulation runs where four conditions were met: At least 25% of the agents were financially oriented, their time horizon was equal to 5 or 10 years, the natural gas price increased, and the electricity price decreased over time.
Second, what is the cost of the transition in these scenarios? In Section 5.2, we found that the median of the cumulative costs of the transition was higher than the median of the cumulative costs in simulation runs where the neighborhood continued to use natural gas. We found indication of the costs of the transition being higher when agents were environmentally oriented. However, we also found indication of a wider range of values in the group of simulation runs of the gas-free-subset where all agents were environmentally oriented. A possible explanation of these differences is that in most experimental scenarios of the gas-free-subset, all agents were environmentally oriented, which meant that simulation runs where some agents were socially or financially oriented were underrepresented. A complementary explanation is the combined effect of agent ability to compare combined investments and their time horizon. When they were able to select more cost-effective alternatives, they enjoyed their benefits throughout the simulation run. When agents could only make less cost-effective choices, they were financially burdened.
Third, which changes in insulation and heating systems took place during these transitions? In Section 5.3, we found indication that agents with longer time horizons preferred heat pumps, while those with shorter time horizons preferred radiators. Agents with ACCI = 1 tended to change their insulation level from low to high early in the simulation run. Experimental scenarios in which not all agents had the same popORI led to more complicated results at the level of the neighborhood, as agents made different decisions regarding heating systems and insulation.
We limited our analysis to simulation runs where no natural gas was consumed in the neighborhood by year 20. This choice excluded experimental scenarios where, potentially, the majority of agents were using natural gas-free technologies. Alternative approaches would have been to select a threshold for natural gas consumption and study simulation runs below this threshold, or to study all results. In a future case study, this choice could be based on the research question and subquestions. Furthermore, our results included multiple ties. When using a model with agent heterogeneity and stochasticity, we would expect fewer ties in the results and more continuous distributions of results. Further statistical analysis would then be relevant while analyzing results.
Choices regarding the experimental design also influenced the conclusions that could be drawn from the study. First, to simplify our example, we explored limited and discrete variations of each experimental variable. Instead, continuous variations could reveal thresholds on which the behavior of the model would change. Second, the experimental variables remained constant over each simulation run. This implied that agents did not learn from their decisions, from other agents, or from the environment. If time horizon, value orientation, or ability to compare combined investments changed over a simulation run, different behavior could be observed. Similarly, different changes in electricity and natural gas prices every year would reflect the uncertain nature of these factors. Third, agents in the same experimental scenario were rather homogeneous. Their only difference, in some scenarios, was their value orientation. Agents also had the same heating system and insulation level at the beginning of all simulation runs. Instead, the model could be used to simulate heterogeneity between and within simulation runs. The simulation time also affected the results. Agents with time horizons longer than 15 years were not able to invest more than one time. A longer simulation time could lead to a larger gas-free-subset.
Additional assumptions and simplifications concerned agents and technology. Agents were not able to forecast market prices: They compared their investment options using prices from the present year. Ability to make forecasts about market prices could be included. After an investment, agents did not invest during a period equal to their time horizon. This means that agents in the model could go as long as 20 years without an investment. This could be modified to allow agents to invest after shorter periods. Social agents were influenced by other households through a basic representation of a social effect. Instead, a network structure and decision-making theories could be integrated in the model, and special scales could be explicitly defined. This would allow the spatial location of agents to play a role in the information that the agent is able to access. At any time during a simulation run, agents had knowledge regarding technologies and insulation levels in the neighborhood from the end of the previous year. Incomplete information about the neighborhood could be included. Technologies did not age and agents had no incentive to replace an old heating system for a new heating system of the same type. Including a decrease on the performance of heating systems would be a way of representing an incentive for such a change. Similarly, only four types of technologies were available to agents, and any type of technology could be used in any dwelling. Additional constraints could be added to represent conditions such as heat pumps requiring higher insulation levels. Moreover, the only technology with a changing price in the model was micro-CHPs. However, different prices could be accounted for. Demand in the model was constant and not influenced by consumer behavior. The effect of household behavior on heat demand could be represented. Lastly, the model was deterministic. Stochastic elements could be included to represent uncertainty. In a case study, these assumptions and simplifications could be explored further, and sensitivity analyses could be conducted.
Finally, the main question of this case study was: Which socioeconomic conditions support the Dutch neighborhoods' transition from natural gas-based to natural gas-free heat supply until 2040 while meeting the neighborhoods' heat demand? Natural gas-free heating was achieved when replacing natural gas technologies was the first priority and when the time horizon was 5 or 10 and electricity price decreased, and natural gas decreased. The ability to compare combinations of insulation and heating systems made room for more cost-effective decisions. When households had this ability, longer time horizons resulted in lower costs, and when agents did not have this ability, longer time horizons resulted in higher costs. These results could serve as input for the design of a case study.

Conclusions
We presented an illustrative example of agent-based modeling of thermal energy transitions in the built environment. We developed and used this model from the perspective of STS and CAS. In the illustrative example, we observed natural gas consumption and cumulative costs in a residential neighborhood. The neighborhood's natural gas consumption and cumulative costs changed as a function of individual decisions of households. Households could improve their dwellings' insulation or replace their heating system. Actors were households, technology consisted of dwellings' insulation level and heating systems, and institutions were implicit in changes in energy prices, the sunsetting of natural gas boilers, and households' ability to compare combinations of heating systems and insulation levels.
While the illustrative example and its model were intentionally simple and its results were straightforward, they contained key elements of agent-based modeling. First, agents had bounded rationality: They were not always able to select cost-effective alternatives and they did not have knowledge of future energy price or technology prices. Second, a social network effect was incorporated in a simple way: Social agents reacted after observing their neighbors' actions when some conditions were met. Third, the system had no central control: Transition at the level of the neighborhood depended on individual choices of households. Finally, agents reacted to their environment and influenced it: Changes in prices influenced agent decisions and, in turn, their decisions influenced the neighborhood's transition.
By developing and using ABMs from the perspective of STS and CAS, we can gain insights regarding the interactions between actors, institutions, and technology. Forthcoming work will address case studies of thermal energy transitions in the built environment. Our illustrative model can be used as a starting point to collaborate with stakeholders and modify simplifications, assumptions, experimental design, and analysis of results.