Framework for optimization of long-term, multi-period investment planning of integrated urban energy systems

This paper proposes an optimization framework for long-term, multi-period investment planning of urban energy systems in an integrated manner. We formulate it as a mixed-integer linear program, combining a capacitated facility location with a multi-dimensional, capacitated network design problem. It includes generation and network expansion planning as well as interconnections between networks and storage infrastructure for each energy system. It can incorporate pathway effects like techno-economic developments, policy measures, and weather variations. The intended use is to support urban decision makers with long-term investment planning, though it can be tailored to fit other geographical or temporal scales. We demonstrate the model using two cases based on an average city in The Netherlands, which wants to reduce its CO 2 -emissions with 95% by 2050. In the first case, we include explicit carbon-emission constraints to study the effects of the carrier mismatch. In the second case, we implement interannual weather variations to analyze the temporal mismatch. The results give valuable insights into the energy transition design strategy for urban decision makers. They also show the future potential, as well as the computational challenges of the optimization framework.


Keywords:
Mixed-integer linear optimization Investment planning Integrated energy systems Climate policy Facility location network design A B S T R A C T In order to achieve stringent greenhouse gas emission reductions, a transition of our entire energy system from fossil to renewable resources needs to be designed. Such an energy transition brings two main challenges: most renewables generate variable electric energy, yet most demand is currently not electric (carrier mismatch) and does not always manifest at the same time as supply (temporal mismatch). Integrating multiple energy infrastructures can address both challenges by using the synergy between different energy carriers; building on existing infrastructure, while allowing a robust and flexible integration of the new. This paper proposes an optimization framework for long-term, multi-period investment planning of urban energy systems in an integrated manner. We formulate it as a mixed-integer linear program, combining a capacitated facility location with a multi-dimensional, capacitated network design problem. It includes generation and network expansion planning as well as interconnections between networks and storage infrastructure for each energy system. It can incorporate pathway effects like techno-economic developments, policy measures, and weather variations. The intended use is to support urban decision makers with long-term investment planning, though it can be tailored to fit other geographical or temporal scales. We demonstrate the model using two cases based on an average city in The Netherlands, which wants to reduce its CO 2 -emissions with 95% by 2050. In the first case, we include explicit carbon-emission constraints

Introduction
In 2015 at the United Nations climate change conference in Paris, COP15, the governments of 195 countries agreed that stronger and more ambitious climate action was urgently required [1]. Greenhouse gas (GHG) emission reductions need to be accelerated such that global temperature rise remains well below 2 degrees Celsius above preindustrial levels. The majority of anthropogenic GHG emissions originate in the energy system [2,3], hence decarbonizing them is very important and requires large-scale implementation of renewable energy sources (RES).
Yet such an energy transition from a mostly fossil to a mostly renewable energy system is also incredibly challenging (see Fig. 1).
The current system is based on a myriad of existing infrastructure centrally designed for a relatively predictable energy demand. This needs to move towards a far more complex, uncertain, and variable future, containing multiple, shifting energy carriers, while influenced by techno-economic developments, climate policy, and weather variations; all of which have impacts on different spatio-temporal levels.
Spatially, most research on climate action focuses on either a large scale, e.g. national level [4], or a small scale, e.g. building level [5]. Yet at the urban scale, cities play a large role in the implementation of strong climate actions given their increasing population density and resource intensity [6]. Furthermore, many cities are already dealing with the effects of climate change, and over 90% are at risk of flooding from rising sea levels and powerful storms [7]. This leads to a strong motivation to act; often ahead of national policies [8]. However, this scale of energy systems is surprisingly understudied in the literature and thus ripe for developing actionable policies that can have a clear impact.
Temporally, most literature either looks at either long-term future scenarios or at short-term operational challenges. The former creating the 'dot on the horizon' that needs to be reached by a certain year in order to curb climate change, e.g. discussing which energy mixes are required (% renewables) [9], how demand can be electrified [10], or the future role of nuclear [11]. The latter includes creating new operational tools or techniques to deal with potential effects of large-scale RES implementation and demand electrification, e.g. grid ancillary services [12], demand side management [13], or virtual power plants [14]. Yet there is a research gap on how to design the pathway from today towards these future scenarios. A multi-period setup allows the explicit inclusion of pathway effects, like techno-economic developments, policy options, and weather variations.
Finally, most literature focuses on a single energy sector, which is often the power sector as most RES directly supply electricity; e.g. researching smart grids. Yet less than 25% of the world's final energy demand is currently electric [15] and most demand scenarios project this to remain at 50% or below in the 2050 time-frame [16,17]. It is therefore imperative to look at solutions regarding the entire energy system in order to reach the climate goals of 80%-100% CO 2 reduction by 2050 [18]. Recently, a few papers do consider the integration of different energy systems, which offers better perspectives for achieving a sustainable energy supply and supporting the energy transition than traditional mono-energy system approaches [19]. Such multienergy systems (MES) consider all relevant energy carriers (e.g. electricity, heat, fuels) to create increased degrees of freedom [20] and the strengths and weaknesses of each carrier can be activated or compensated. For example, electricity is quite flexible in its end-use applications and easily produced sustainably, but it is difficult to store in the long-term. Heat is more easily stored long-term, especially seasonally, but can only be used for 'low-grade' energy applications [21]. Fuels are easiest to store, especially long-term [22], but as of yet difficult to produce renewably and economically in large quantities [23]. However, most MES research applies ex ante simplification, either by analyzing or optimizing the systems separately and connecting them iteratively at one or a handful of physical [24] or virtual [25] locations, by considering only one additional energy carrier, often gas [26,27], or by focusing only on operational challenges [28,29].
To effectively address the challenges of the energy transition, we simultaneously consider a multi-energy perspective to optimally combine the strengths of each energy carrier and reach stringent climate goals; a long-term, multi-period perspective to effectively help decision makers design their energy transition pathway; and an urban perspective to create actionable policies with a clear impact. Hence, we propose a novel optimization framework for long-term, multi-period investment planning of integrated urban energy systems. The aim of the optimization framework is to help urban decision makers, e.g. municipalities and distribution system operators (DSOs), design a pathway for their energy transition such that climate goals are reached, largescale implementation of RES is achieved in the most cost-efficient manner, and a safe and reliable energy system is assured along the way. The framework includes investment decisions on energy distribution networks, energy conversion, energy supply, and energy storage assets, and it can incorporate existing assets (i.e. a brownfield situation). Moreover, it allows for incorporating pathway effects like techno-economic development factors, climate policies, as well as weather variations. In mathematical terms, we have formulated the resulting optimization problem as a multi-period, mixed-integer linear program (MILP), combining a capacitated facility location problem with a multi-dimensional, capacitated network design problem.
We demonstrate the optimization framework with two cases: one to show how a city can handle long-term planning under a carrier mismatch and the other one for a temporal mismatch. A carrier mismatch occurs when an energy carrier is still in demand like gaseous fuels, yet supply solutions are no longer possible. In the first case this is demonstrated with increasingly ambitious climate goals limiting a gaseous fossil supply. A temporal mismatch occurs when energy demand and supply do not match in time; more common in a progressively variable, supply-driven energy system. The second case delves into inter-annual weather variations specifically, which are generally underestimated in long-term planning cases [30]. Both cases are based on an average city in the Netherlands, modeled using 21 nodes, with a planning horizon from 2018-2050, and three modeled energy carriers: electricity, gas, and heat. These are the main energy networks used in an urban energy setting. The city is modeled to have ambitious climate goals in line with those of the EU: to reduce their CO 2 emissions by 95% in 2050 using large-scale implementation of RES and energy efficiency measures. The latter is relevant as it affects the overall demand in 2050.
Our work makes three primary contributions to the existing literature. First, we propose a long-term, multi-period investment optimization framework specifically for integrated urban energy systems. It allows urban decision makers to design their energy transition pathway in a cost-efficient manner, ensuring alignment with their forecasted scenarios, existing assets, and climate goals. Second, we defined this optimization framework as a novel application of the facility location network design problem. Third, through both case studies we show the impacts of both climate policy and interannual weather effects on the transition of urban energy systems. Specifically, we demonstrate how the framework can help an urban decision maker plan for the challenges of an increasingly renewable energy supply, with a transitioning energy demand.

Mathematical modeling framework
Our framework builds upon energy hub-theory [31,32] and expands the approach as described in our previous research [33], which was tailored specifically to a district with limited time periods and did not include pathway effects.
We develop a mixed-integer linear optimization model which determines when and where which investments are required. In this section, we first provide the model notation, followed by a detailed model formulation. This includes a description of the technical and economic features, as well as on how (climate) policy can be incorporated into the model. Finally, we briefly highlight the model complexity.

Indices and other sub/superscripts
Index of energy distribution assets Index of energy carrier types Index of nodes Index of locations Index of energy conversion assets Upper limit Lower limit Index of energy supply assets Standing losses Index of time periods Index of edges Index of energy storage assets The model can distinguish a whole range of energy carriers , which can be transported using corresponding distribution network assets , stored with energy storage assets (well), and supplied by different supply assets . These carriers can also be converted from one to another using conversion assets (mix).

Sets
Set of distribution assets Set of energy carriers Set of investments Set of locations Set of conversion assets Set of supply assets Set of time periods Set of edges Set of nodes Set of storage assets Note that the set of locations is different from the set of nodes. ∈ denotes the set of nodes, and ∈ denotes the set of locations, where | | = | || |. Each location contains a number of nodes equal to the number of energy carriers modeled. , , Demand per energy carrier at location and time period . Social discount rate Capacity of energy distribution asset Capacity of energy conversion asset Capacity of energy supply asset Capacity of energy storage asset Transportation efficiency of energy distribution asset on edge .

Parameters
→ ′ Conversion efficiency of energy conversion asset of one energy carrier to another ′ . , Capacity factor of energy supply asset at time period .
, Average capacity factor of energy supply asset . + Efficiency of charging energy storage asset . − Efficiency of discharging energy storage asset . Variable operational cost of energy storage asset at location in time period . Technological development rate of energy distribution assets . Technological development rate of energy conversion asset . Technological development rate of energy supply asset . Technological development rate of energy storage asset . Policy factor for supply asset at time period . External factor for supply asset at time period .

Decision variables
, Integer variable that represents the number of energy distribution assets invested in (built ) at edge and in time period . Note that in some cases, certain decision variables should be parameterized. For example, if scenarios are simulated where one or more types of energy supply are forced to decrease. Then 1 , , , a variable energy supply, can instead be defined as parameter 1 , , varying per location and time period.
Constraint (2) is the main energy balancing constraint, which ensures that demand of each energy carrier is met at each location and in each time period . Constraint (3) depicts the main flow constraint. For each location , and time period , energy from each energy carrier can flow away on edge , , and it can flow into the location in the reverse direction. In the latter case, energy losses are calculated using a linearized loss factor , . Note that the delta flow variable for the energy balance constraint is calculated for each location to relate to the other balancing variables, while the remaining flow variables relate to the edges, which is where the flow actually occurs.
Eq. (4) is the main conversion constraint, which is depicted here for three energy carriers 1 , 2 , and 3 . Eq. (5) shows the generalized conversion constraint for unlimited energy carriers and conversion assets . For each energy carrier , conversion assets can either use them for conversion (−1) or generate them from conversion with a certain conversion efficiency ′ → , ′ ≠ from any other carrier ′ . Applying this formula to three energy carriers leads to the following conversion (or coupling ) matrix: These matrices can also be generated for each individual carrier, then related to the number of conversion methods. Eq. (6), the main storage constraint, explicitly links time periods. The energy storage level at the start of a time period is based on the storage level at the end of the previous time period, adjusted for standing losses , for each storage type . Eqs. (7) and (8) depict how storage levels can be adjusted within a time period: for each energy carrier , at each location , and each time period , considering storage (charging or injection) and withdrawal (discharging ) losses, + and − respectively. Together these are referred to as round-trip efficiency.
Constraints (9)-(12) contain the techno-economic development of each technology asset considered in the case. Future investments are discounted by the social discount rate , as the design is constructed from the perspective of a (municipal) government, a district system operator or both. Even though we are modeling investment decision making, the goal is not to maximize the return for an investor, but to evaluate the total energy system costs under different (policy-driven) circumstances; which is a social perspective [34]. In addition, as targeted technological development is deemed crucial to accelerate the energy transition [35], technological learning curves are incorporated. A technology development factor is used, differing per asset.
Constraints (13) and (14) pertain to the maximum flow of energy between locations, or on edges. Let be the subset of distribution types of energy type . Then for each energy distribution (or network) asset invested in , , the maximum flow possible , , , for the relating energy carrier increases with . Note that there is no distinction between the construction of an edge in one direction ( ∈ ) or the other ( ∈ ), as energy can flow in both directions. These and the following constraints also link time periods, as all these energy capacities are cumulative. If a certain capacity was already present at a location or on an edge , this is still there in the next time period.
Constraints (15) and (16) define the maximum possible energy that can be converted. Let be the subset of conversion types of energy type . Then for each energy conversion asset invested in , up to and including the current time period , the maximum conversion capacity , , , is increased by . Constraints (17)-(18) together define the maximum possible energy that can be supplied. Let be the subset of supply types of energy type . As before, the maximum supply capacity , , , can be increased by investing in energy supply assets , with capacity . Other than before, the maximum supply capacity is affected by an external factor , which is defined in Constraint (19). This includes both a policy factor and weather variations impacting the capacity factor , of certain supply assets, which are normalized using their average capacity factor , . Eqs. (20)-(24) depict both the minimum and maximum storage level constraints. These apply to both the storage and withdrawal variables, as well as the storage level at the end of a time period; automatically constraining the level at the start of a time period. Let be the subset of storage types of energy type . The minimum and maximum storage levels can be increased by investing in storage assets , with a minimum and a maximum storage capacity , ∕ . Eqs. (25) through (28) define the domain of the investment variables. They are limited by number of investments per time period. Also, the variables are restricted to being integer valued and non-negative.
Lastly, Eqs. (29) and (30) define the domain of the remaining variables; all non-negative, real numbers.

Model complexity
The proposed framework for multi-energy design investment planning translates to a mixed-integer linear optimization problem (MILP), combining a capacitated facility location problem with a multidimensional, capacitated network design problem. Most of the relevant literature focuses on just one of these problems, or when combined, it is under the assumption that both the facilities and the network connections are uncapacitated. To the best of the authors' knowledge, a few papers consider one of them to be capacitated, but never both [36], and never in a multi-period problem [37]. In short, our combination is a novel one and implies significant, additional mathematical complexity. Generally, off-the-shelf commercial optimization solvers like Gurobi or CPLEX can solve MILPs tractably. However, given the abovementioned and specifically the three-dimensional network character of the problem, even with just two energy carriers and one time period, the optimization is already strongly NP-hard [38]. Hence, the proposed modeling framework is first demonstrated with two long-term, but spatially small-scale cases to showcase all its functionalities without losing tractability. This is described in the next section, as well as the modeling setup to manage computations.

Model demonstration
To demonstrate the investment model, we designed two sets of cases: one to demonstrate the carrier mismatch and another to demonstrate the temporal mismatch. The cases are applied to a 21-node system representing a medium sized city in the Netherlands. First, the background of the energy transition challenges is given, followed by a brief description of the modeled city. Then the setup of both cases are described, each with a total of 8 scenarios. Next, we describe the resulting mathematical setup of the model. Finally, the optimization setup is given, including software and hardware specifications, and optimization criteria.

Demonstration cases
During the energy transition, the energy supply needs to shift from fossil to mainly renewable. That also implies a shift to a mainly electric energy supply. Yet currently only 25% of the world's energy demand is electric and in the Netherlands it is even lower: just 17% in 2018 [39]. As only 2% of infrastructure is renewed annually [40], this demand might not shift as fast as supply, causing a carrier mismatch. The first demonstration case focuses on this challenge.
Moreover, regardless of potential financial drawbacks of an entirely electric energy system, such a dependency on mainly variable and uncertain renewables would be a significant technological challenge. Not only do most RES fluctuate on a daily and a seasonal basis, some even display significant inter-annual fluctuations [41]. In fact, in high wind areas the annual yield can vary up to 30% [42]. In order to ensure adequate supply to cover demand exclusively from fluctuating RES, a large overcapacity would be required, in combination with storage on several time-scales: daily, seasonal and even annual. The latter, especially, is challenging in a purely electric system [43]. This highlights the second challenge of the energy transition: the mismatch of energy demand and supply in time, or the temporal mismatch. Given the long-term planning perspective of the current investment model, the second case will focus on these interannual weather variations.
As different energy carriers have different characteristics and applications, the solution space becomes larger, which increases the chance of finding better solutions. Moreover, the strengths and weaknesses of each carrier can be activated or compensated. For example, electricity is quite flexible in its end-use applications and easily produced sustainably, but it is difficult to store in the long-term. Heat is more easily stored long-term, especially seasonally, but can only be used for 'low-grade' energy applications [21]. Fuels are easiest to store, especially long-term [22], but as of yet difficult to produce renewably and economically in large quantities [23]. In other words, short-term carriers can be converted into long(er) term carriers and carriers can be adjusted based on the required energy service. Especially for a system in transition, planning an urban energy system in an integrated manner can smoothen the path from mostly fossil to mostly renewable.

Modeled city
The optimization framework is demonstrated on a city represented by 21-nodes containing three energy carriers: electricity, gas, and heat. The timeline considered is from 2018-2050. The topology of the city is depicted in Fig. 2, where the energy systems are projected next to each other. This figure also shows candidate investments within and across the three networks using dotted lines. To aid reader comprehension, we only display all potential network connections in the heat network and each potential asset is depicted only twice. All assets are also displayed with their respective indices. Note that this is merely a static depiction, while the model can invest in assets at each time period. More specifics on the investment possibilities are given in Section 3.2.

Carrier mismatch case
In the modeled city, a climate ambition is projected in line with the stricter EU goal: a 95% reduction of CO 2 emissions by 2050. In the case, this translates to a reduction of fossil gas supply, which is also in line with Dutch ambitions to phase out fossil gas usage [44]. Yet the corresponding forecast for the demand development of this city show significant non-electric demand remaining in 2050; hence a carrier mismatch occurs. In Case 1, the investment model is tested on this 95%-scenario and several scenario variations. First, a businessas-usual (BAU) scenario (#0) is defined where the gas supply, and thus the CO 2 emissions, do not change at all. The reduction is then gradually increased, all the way to the final scenario (#8), where a 100% emission reduction is required by 2030. Fig. 3 shows the different scenarios. Note that Scenario 6 also ends with a 100% reduction, yet the decline is now shaped parabolically instead of linearly as in all the other scenarios. This allows for a slow start to ease the policy's adoption; followed by an acceleration in later years.

Temporal mismatch case
In Case 2, the investment model is tested on 8 different weather scenarios, where all scenarios follow the same 95% reduction of CO 2 emissions. The increased implementation of variable RES causes a more supply-driven system and makes the energy system more sensitive to temporal mismatches. The resulting designs are compared to the base scenario (#0), which displays no variation in weather. The weather scenarios are based on historical weather data from the Netherlands, from 1980-2018, derived from [45,46]. This data shows average capacity factors for photovoltaic (PV) and wind energy, the latter both onand offshore. In Scenarios 1-4, we vary the amplitude of these average capacity factors for both PV and wind. For the variation in wind supply, we take the average capacity factor of on-and offshore. Scenarios 5-8 vary by the absolute capacity factors in different combinations. First, we vary both PV and wind by + and −50%. Then we focus only on wind variations, first looking just at the onshore, and then just at the offshore values. Combined, these scenarios represent weather variation in different areas, from (extremely) cloudy/calm to (extremely) sunny/windy {electricity, gas, and heat storage} areas. Fig. 4 shows the different scenarios via the fluctuating capacity factors for the PV and wind supply.

Mathematical setup
To provide more detail about the demonstration cases, we describe the resulting mathematical setup. First, the sets are defined in Table 1.
The only set that has not yet been defined is , or the set of investments. This is defined as a union of several other sets and elements: In other words, electricity can be supplied by investing in two types of renewable sources: photovoltaics (PV) and wind. Gas can be supplied using existing natural gas sources. No heat supply is present. For each energy carrier modeled, one corresponding type of network (distribution) asset can be invested in. The same is true for energy storage. Finally, three conversion modes are available: combined heat and power assets (CHPs), heat pumps (HPs), and power-to-gas assets (P2Gs).
In this demonstration, a greenfield situation is modeled: except for the node locations and the demand development per carrier, no assets are constructed yet. That means = 0. Furthermore, we assume nearly all assets can be constructed at each location or on each relevant edge. Only gas and wind supply are constrained to nodes 2, 3, 4, and 7. The scenario variations are implemented using the external factor (see Constraints (18)- (19)). For the carrier-mismatch case, the variation is applied via the policy factor . For the temporal-mismatch case, the variation is applied using the average and the varying capacity factors, , and , respectively. Additional details on the demonstrated city case can be found here [47] and provided upon request.

Modeling setup
In each demonstration case scenario, the total number of candidate investments is 1972. Of these, there are 1071 potential network assets  , , 357 potential conversion assets , , 187 potential supply assets , , and 357 potential storage assets , . Each asset is modeled with one capacity to limit computational complexity. Using a step function for , larger assets are constructed. In the case study, = 5, so up I. van Beuzekom et al.    Table 2 shows all totals quantitatively, including the installed capacity and a cost comparison between the BAU scenario and the other scenarios. A clear upward trend is visible: the more strict the required CO 2 reductions, the higher the total investment costs. In the extreme scenario of a 100% reduction in 2030, the costs more than double.

Results per scenario
The results of the BAU scenario equate to the current brownfield energy infrastructure, or whatever investments have been required to manage the energy balance of the modeled city in 2018. The bulk of the investments are in network infrastructure, of which mostly electricity and gas networks and a few heat network connections. Second are the number of conversion units, though in total investment costs these amount to about the same as the networks. In capacity, mostly Combined Heat and Power assets (CHPs) are required (about 5 PJ), followed by a significant number of Heat Pumps (HPs), which in capacity amount to about 1 PJ. Given that this case relies on a majority of gas supply, with a diminishing gas demand and remaining electricity and heat demand over the entire time period, constructing an asset that converts said gas to both electricity and heat is favorable. A few renewable energy supply sources (RES) are built, both photovoltaics (PV) and wind, to satisfy the remaining demand.
The next two scenarios, with 25 and 50% reduction, do not deviate from the BAU results. This can be explained from the demand development in the case study. Due to expected energy efficiency implementations and increased electrification, especially the gas demand decreases over time. That gives room to the maximum gas supply to decrease before additional investments are required. Even a 75% CO 2emissions reduction only requires one additional conversion unit to manage the energy balance in later time periods.
As the carbon limit moves towards stricter values (Scenarios 4-8), the investment mix changes in a number of ways. There is no longer enough gas supply to generate enough heat through CHPs, so it is generated using electricity through HPs instead. In addition, in the final time periods there is still a gas demand, yet no longer sufficient gas supply. This is where the carrier mismatch manifests. To manage the energy balance, investments in additional PV supply combined with Power-to-Gas conversion assets (P2Gs) are made. In addition, longterm gas storage starts to play a role. We show this in more detail in Fig. 6 for Scenario 4, the main scenario for the modeled city where a 95% CO 2 -reduction is required by 2050. To arrive at a 100% linear reduction, a handful of additional conversion units are required and a lot of additional RES supply assets are constructed.   An interesting result to highlight is shown in Scenario 6, or the parabolic pathway to 100% CO 2 -reduction (see Fig. 7). This scenario is cheaper than even the 95% reduction scenario. The ability to postpone certain expensive investments is highly beneficial. This is driven by the techno-economic developments the model accounts for. First of all, future investments are discounted using the social discount factor . Hence, the further into the future, the higher the discounted investment values. This effect is especially beneficial to make relatively expensive technologies more cost-competitive; like long-term gas storage. Second, different assets are assigned different technological development rates ( ), which compounds upon the interest rate. This effect is notably beneficial for P2G conversion investments, as this technology is very expensive initially, yet is expected to make significant development steps. As gas supply decreases, long-term gas storage or the application of P2G conversion are the two ways to meet the remaining gas demand. In the parabolic scenario, the maximum gas supply is at the same level as the 50% reduction scenario in 2040, before dropping to zero in 2050. That means most investments can be concentrated in the last decade, when they are at their lowest cost. Interestingly, this scenario favors gas storage over P2G investments, because there is still enough fossil gas to store and extract to cover the final few time periods. Note that because of this, a 100% reduction of gas supply in 2050 does not equate a 100% reduction of CO 2 emissions. It is simply postponed use of fossil gas. In all the other 100% reduction scenarios using gas storage, the reduction of gas supply does equate to a carbon neutral result. In those, the gas that is stored is actually generated in renewable fashion: via RES supply and P2G conversion.   The final two scenarios 7 and 8 show the consequences of (significant) policy acceleration. The total investment costs increase immensely, as much of the gas demand needs to be met through alternative routes: either via additional gas storage, or by additional RES supply and P2G conversion, or both. All of these assets are still very expensive so early in the planning period. Even in these extreme scenarios, heat storage is never required as there are many cheaper conversion options to generate heat within a time period. Electricity storage is also not considered, as annual standing losses for electricity storage assets are extremely high. This makes it much less cost-efficient to use than other balancing options in this long-term perspective.
Overall, although the BAU scenario is the least costly, it is interesting to note that significant carbon emission reductions can be achieved with little cost increase. A 75% reduction is just 0.2% more expensive. The city's target of 95% CO 2 -emissions reduction induces only 5.7% additional costs. And if the municipality decides to implement a parabolic reduction target, they can achieve a 100% reduction in 2050 for just a 4.0% increase in investments. However, this is not entirely carbon neutral as mentioned before. If they adopt a linear approach to a 100% reduction, it would cost 12.7% extra by 2050, but this would guarantee a carbon neutral solution. And if the climate goals are required to become even more stringent, investment costs increase exponentially: with 38% and even 116.3% if the 100% target needs to be achieved by 2040 or 2030 respectively.
The main question that these results raise is whether these demand projections will actually come to pass. If the demand for gas does not decrease as significantly as it does in these scenarios, the carrier mismatch is even higher and the investment costs are bound to increase. As is evidenced in the final two scenarios and in the significant difference between the parabolic scenario and the linear scenarios. Since demand development is one of the main uncertainties in nearly all energy models, it warrants further analysis. Additionally, the development of both economic and technological characteristics, especially on such a long-term, are also very uncertain. And both can significantly impact the results. If certain technologies develop or are discounted differently, the trade-offs between different investments can shift. Fig. 8 shows difference in the cumulative number of investments and the total investment costs per asset for each temporal mismatch scenario compared to Scenario 0, the base scenario for Case 2. It models a 95% CO 2 -reduction in which the weather does not fluctuate (as Scenario 4 in Case 1). Table 3 shows these results as well, including the total installed capacity as well as the cost compared to the base scenario.

Temporal mismatch
In Scenario 1, historical weather variation is included and this leads to a few more investments, mostly in RES supply. Counter-intuitively, the total investment costs are lowered, as this scenario requires less investments in earlier (more expensive) time periods, and adds all its additional investments in later time periods. It profits greatly from the techno-economic effects and it benefits more from higher electricity supply in good weather years than that it loses in bad weather years.
In Scenarios 2-4, where we vary the amplitude of historical weather variations (Scenario 1), there is a slight upward trend compared to Scenario 0 in the number of investments. Yet only Scenario 4, with I. van Beuzekom et al. an amplitude of three times the historical amplitude, actually shows a higher total investment cost. At this point, even though the output is higher in good years, the lower output in bad years requires more investments to maintain the energy balance. Especially the additional network investments make this scenario more expensive. Even though it also builds many more RES supply assets, those are concentrated in the final time periods and do not incur much additional costs; similar to Scenario 1. Fig. 9 shows specific results for Scenario 4, where the extreme amplitude variation of the PV and wind capacity factors is clearly visible in the variation of the electricity supplied.
In the second set of scenarios (5)(6)(7)(8), the results are more extreme. If the overall output of the RES supply is lower (Scenario 5), the required investments in renewable supply are much higher, and vice versa (Scenarios 6-8). Scenario 5 is almost 50% more expensive than the steady weather Scenario 0. Most additional investments are required in the RES supply, followed by the number of conversion assets, which is unlike the other scenarios. Both the number of CHPs and HPs at the beginning of the planning period are increased, as well as the number of HPs in the second half of the planning period. Simultaneously, the distribution of the conversion units is more uniform across all seven locations. The network investments also change significantly: on the one hand, the number of gas networks built is increased by more than 30% and on the other hand, the heat network is halved. It is more beneficial to transport gas to more nodes, and apply CHP conversion more locally. And in later time periods it is more beneficial convert electricity supply directly to heat, rather than to transport this heat to other nodes. In this scenario, we find that when the local RES supply is lower, a more distributed model with local conversion units is more cost-effective.
The last three scenarios highlight three different results: 1. the consequence of incorporating fluctuating weather 2. the inclusion of more sunny weather 3. the difference between on-and offshore wind patterns First, all three scenarios are significantly cheaper than the steady weather scenario (see both Fig. 8 and Table 3). This feels obvious, as the RES generate more supply. Yet as the supply fluctuates with the weather, that can incur additional costs. We do see that all three scenarios require more network investments to distribute the energy flows when the RES supply is high, yet the decreased number of RES investments weighs heavier on the total costs. In Scenario 6, the capacity factor of both wind and PV supply are increased, whereas the last two scenarios only increase the capacity factor of the wind supply. Since PV supply has no spatial restrictions, it can be supplied more directly where demand arises. Hence, less network assets are required in this scenario. PV also displays less overall variation than wind, reducing the need for storage assets.
Finally, the difference between the last two scenarios is also quite interesting. If the wind supply is strictly offshore, especially in windy conditions (i.e. with an increased capacity factor), the actual supply is much higher, requiring less RES assets than if the wind supply is strictly onshore (see also Fig. 10). Though it should be noted that the current cases do not factor in transportation losses outside the city limits, which would increase with an offshore wind supply. Yet the difference is such that we can confirm the attractiveness of an offshore wind supply in general; as it generally has a much higher capacity factor than onshore wind.

Discussion and conclusions
This paper presents an optimization framework for long-term, multiperiod investment planning of integrated urban energy systems. It aims to help urban decision makers design a pathway for their energy transition such that climate goals are reached, and large-scale implementation of renewable energy sources (RES) is achieved in the most cost-efficient manner, all while assuring a safe and reliable energy system. Our model allows for a fully coupled network planning, including investments in conversion, supply, and storage assets for each energy carrier considered. It incorporates both relevant physical constraints as well as techno-economic developments for each of these assets. Finally, we pay specific attention to the incorporation of other pathway effects, like (time-dependent) climate goals, and interannual weather variations. We demonstrate our model and specifically the carrier-and the temporal mismatch using two case studies based on an average city in the Netherlands.
In the first case, climate goals are incorporated as CO 2 -emission reduction targets, specifically targeting the fossil, natural gas supply. We find that absent any reduction targets, the energy system design remains as it is today, as the 2050 projection shows a reducing overall energy demand mostly due to energy efficiency implementation. From a 75% CO 2 -emissions reduction onward, more investments are required. Here one can clearly see the carrier mismatch being solved: supply is I. van Beuzekom et al. constructed in the form of electricity-producing RES and in order to also meet increasing heat and remaining gas demand, conversion assets are used to convert this electricity to both other energy carriers. As the reduction targets become more stringent, even relatively expensive long-term storage using the gas carrier becomes relevant. Strikingly, the scenario (#6) with a parabolic 100% carbon emission reduction policy by 2050 deviates from this trend. All of its investment results are lower than those of Scenario 5 (100% linear reduction by 2050) and even of Scenario 4 (95% linear reduction). In other words, the city could reach a more stringent climate target more cheaply, if it were to implement its policies more slowly in the first decades and with a stronger acceleration towards 2050. This is an important finding and demonstrates the real-world value for decision makers.
In the second case, interannual weather effects are incorporated using historical data. These influence the capacity factors for PV and wind supply, altering the available RES supply per time period. Especially in the second half of the planning scope, as RES become more prevalent, more temporal mismatches occur during so-called bad weather years. To ensure a continued reliable energy supply, the model invests in long-term storage and conversion assets, as well as more RES supply, which is similar to the first case. Yet differently, it leans more towards PV investments as opposed to investments in wind, as the interannual variation in the latter is much more significant. Despite the fact that the cost per energy unit generated is slightly lower for wind. Again, this is an important finding for decision makers. Also notable is the difference in effects of varying the amplitude and the absolute of the capacity factors. Less steady weather clearly requires more investments, but a much lower, or much higher capacity factor creates more significant effects on the required investments. This shows the potential both of optimal siting of RES projects, as well as of further technological innovations beyond mere cost reductions.
Our analysis focuses on the use of multiple integrated energy systems as a robust and flexible way of managing the challenges of the energy transition, like the carrier mismatch and the temporal mismatch between current and future energy demand and an increasingly renewable energy supply. Potential solutions for both are demonstrated in the cases with different supply variations in a deterministic manner to limit computational complexity. However, the long-term planning of energy systems is characterized by a deep level of uncertainty and (modeling) complexity [48]. Besides weather and policy variations, projections of demand and techno-economic developments vary widely, and all of these can have significant effects on the results [49]. Handling such uncertainty while managing complexity is integral when constructing useful energy system models for decision makers [50]. This is an area the authors are currently researching using a novel exploratory modeling approach [51].
Another interesting future research direction is to incorporate brownfield data. Urban areas generally have an existing energy infrastructure, which has significant impact on cost-effectiveness of certain solution directions. Moreover, incorporating such information as a starting solution to this optimization framework could help reduce the number of potential solutions and thus reduce complexity. However, to fully capture the impact of existing infrastructure, it helps to include asset age and expected lifetimes. Both can be incorporated into the framework by adjusting the investment costs to reflect maintenance and replacement options, to make the modeling more realistic. Yet such an addition adds complexity.
A third research direction is to include the operational challenges of these integrated energy systems in transition. From daily and seasonal weather effects on the supply side, to the use of demand-side flexibility; effects that generally occur at shorter timescales [52]. Given the model complexity, incorporating such operational challenges can be more effective in an iterative manner; similar to how generation expansion planning and dispatch models are coupled in power systems.
Finally, future work also aims to expand towards even larger cases, ultimately aligning with the actual energy assets of a city. In an average city, that could mean anything from zero up to tens of heat stations, hundreds of gas stations, and even three to four times as many electricity stations at MV-equivalent level. As the complexity of the model increases exponentially due to the three-dimensional network aspect, these future studies should also focus on managing the computational and mathematical challenges.