Optimal design of decentralized energy conversion systems for smart microgrids using decomposition methods

The design of decentralized energy conversion systems in smart residential microgrids is a challenging optimization problem due to the variety of available generation and storage devices. Common measures to reduce the problem's size and complexity are to reduce modeling accuracy, aggregate multiple loads or change the temporal resolution. However, since these attempts alter the optimization problem and consequently lead to different solutions as intended, this paper presents and analyses a decomposition method for solving the original problem iteratively. The decomposed method is verified by comparison with the original compact model formulation, proving that both models deviate by less than 1.8%. Both approaches furthermore lead to similar energy systems that are operated similarly, as well. The findings also show that the compact model formulation is only applicable to smalland medium-scale microgrids due to current limitations of computing resources and optimization algorithms, whereas the distributed approach is suitable for even large-scale microgrids. We apply the decomposed method to a large-scale microgrid in order to evaluate economic and ecological benefits of interconnected buildings inside the grid. The results show that with local electricity exchange, costs can be reduced by 4.0% and emissions by even 23.7% for the investigated scenario. © 2018 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).


Introduction
The transition towards a more energy efficient and environmentally friendly economy is a recognized objective of the European Union [1]. In Germany, this concept is known as "Energiewende" and aims at reducing greenhouse gas emissions, increasing electricity generation from Renewable Energy Sources (RES) and achieving higher energy efficiency in general [2]. In the context of buildings, which account for approx. 40% of total energy consumption in the European Union [1], emission reductions and energy savings can for example be achieved by installing more efficient heating devices and by improving their control strategy.
In recent years, many different heat and electricity generation as well as storage technologies evolved for application in buildings. Small-scale Combined Heat and Power (CHP) units offer a highly efficient method for generating heat and electricity simultaneously from fossil fuels. Potential benefits can further be leveraged by introduction of Thermal Energy Storage (TES) devices. In addition, Heat Pump (HP) systems present a technology to efficiently use electricity for heating purposes. RES, especially solar systems, can also be used on building level, for example Solar Thermal Collectors (STCs) or Photovoltaic (PV) modules. Storage devices such as TES units and batteries (BATs) can further enhance the integration of fluctuating solar generators.
When considering neighborhoods instead of individual buildings, economic and ecologic benefits can be obtained [3], for example through better integration of efficient, small-scale technologies within local microgrids [4]. According to Marnay et al. [4], microgrids are electricity distribution systems that comprise generation and storage units as well as loads. Additionally, microgrids have to be controllable and can be operated either with connection to a main power network or in an islanded mode. The following section provides a literature review on the design of microgrids and the arising problems.

Literature review
Due to the vast amount of possible energy supply options for individual buildings and within microgrids, optimization techniques have become an indispensable tool for the design, sizing and operation of such energy systems [5]. However, when considering local neighborhoods instead of individual buildings, the resulting optimization problem tremendously gains in complexity [6e8]. In the work of Harb et al. [6], for example, the optimization of single buildings required less than 4 min. If 6 of these buildings are interconnected and local energy exchange is considered, the computing time increases to approx. 5.5 h. Mehleri et al. [7], describe that for 10 buildings, the computing time increases from 2 to 101 s when considering interconnections between these buildings. Similarly, Schiefelbein et al. [8], illustrate that extending the number of connected buildings also drastically increases computing times. In their work, the optimization of 5 buildings required 0.5 h of run time, whereas 7 buildings led to 30 h and 9 buildings even to 73 h of computing time.
Different approaches have been applied to allow a better scalability of optimization models for the design, sizing and operation of microgrids. These approaches mainly include model simplifications, coarsening the time resolution, solution space reductions and mathematical reformulations as well as combinations of these four methods.
Model simplifications can be used to reduce the computational effort. For instance, different models for part load operation exist that present tradeoffs between computing times and accuracy. Lozano et al. [23], assume that energy conversion systems are either shut-off or run at nominal power. In contrast, other works assume that these devices can operate flexibly between being shutoff and nominal power output [7,20,22]. Furthermore, some studies require a minimum activation threshold [9,21], whereas even more accurate models interpolate within device characteristics to estimate operation condition for every time step [24e26]. Furthermore, the time discretization can be coarsened. For example, Harb et al. [6], model full year load profiles with 12 representative typical demand days with hourly time resolution. In contrast, other studies use 3 typical demand days with hourly resolution [7,27,28], whereas other works use longer time step lengths of 2 h [5] or even 4 h [10,20].
Additionally, the solution space can be reduced. Yang et al. [5] aggregate the loads of multiple consumers into a single, larger consumer. Similarly, Weber and Shah [10] and Schiefelbein et al. [8] use pre-processing heuristics to allow and forbid certain district heating connections.
Other studies apply mathematical methods like decomposition to reduce the computational effort while maintaining a high level of modeling accuracy. On building level, Wakui and Yokoyama [11], proposed a decomposition algorithm that implements an exhaustive search over all available boilers (BOIs), CHPs, and HPs. Each optimization forces a specific heat generator, additionally a constraint is added ensuring that the current optimization has to improve upon the previously best optimization run. This approach offers advantages for individual buildings; however, due to the vast amount of available combinations, this approach is inefficient when applied to neighborhoods and city districts.
Yokoyama et al. [12], introduce a decomposition approach for the structural design of single energy supply systems. This approach splits the original, compact model formulation into a single master problem and multiple subproblems. These subproblems each describe the decision if a certain device is purchased and how it is operated. The master problem combines the subproblems' solutions to generate a feasible solution for the original problem. This approach has been demonstrated for an individual energy supply system but it has not been used for optimizing the structure, sizing and operation of multiple systems within a distributed energy system.
Sokoler et al. [29] and Harb et al. [13], implement a similar decomposition methodology based on Dantzig-Wolfe decomposition [14] for the optimal control of distributed energy systems. While Sokoler et al. [29] use a linear optimization approach, Harb et al. [13] use a mixed-integer linear model. Since Dantzig-Wolfe decomposition is initially designed for linear programs, Harb et al. [13] implement a solution algorithm that has been proposed by Belov and Scheithauer [30] to efficiently deal with integer variables. The results of both studies indicate that Dantzig-Wolfe reformulation significantly reduces computing times compared with the original, compact model formulation [13,29]. In contrast to other studies though, these works only consider the operation of already installed energy conversion systems and do not treat the design and sizing of energy systems.

Contribution
The aforementioned studies have required significant simplifications when applying optimization methods to local neighborhoods and city districts. Therefore, this work presents a decomposition approach for the optimal design, sizing and operation of distributed energy systems. The developed approach allows for using the same model accuracy as for individual energy systems. Additionally, this approach drastically improves the scalability of the optimization model, significantly increasing the amount of simultaneously considered energy systems. This approach is based on Dantzig-Wolfe reformulation [14] and the solution algorithm proposed by Belov and Scheithauer [30]. A similar approach has previously been applied to the operation of existing distributed energy systems [13]. This paper now extends previous works by also considering the structural design and sizing of multiple distributed energy systems.
In this paper, we describe the compact optimization model formulation without decomposition as well as the distributed formulation based on Dantzig-Wolfe decomposition, comprising the master problem, subproblems, and the iterative column generation algorithm used for solving this optimization problem. Afterwards, verification calculations are presented illustrating that the original, compact formulation as well as the developed, distributed approach lead to comparable results. However, the novel, distributed approach requires significantly less computing time for problems containing a reasonable number of energy systems. Finally, the scalability of the distributed approach is demonstrated by optimizing the energy supply systems of a large residential neighborhood in order to assess potential benefits regarding costs and CO 2 emissions of the microgrid approach in comparison with individual buildings.

Modeling
This chapter describes the original, compact model formulation as well as the developed, distributed model and its solution algorithm. This description is limited to the aspects related to the decomposition. The equations of the compact model and its decomposition into the developed distributed model are given in Appendix A.
For both models, optimal energy systems are determined by minimizing total annualized costs based on the German engineering guideline VDI 2067 [32] taking into account investment costs, operation and maintenance, demand related costs as well as revenues from subsidies and electricity feed-in. Both models freely compose energy systems for each individual building that are based on the components and energy flows illustrated in Fig. 1. Heat can be generated through STC, EH, HP, BOI or CHP and is used to charge a TES unit, which satisfies the building's thermal demand accounting for space heating and domestic hot water. Each building's electricity balance considers plug loads for appliances and lighting ðP dem h;d;t Þ, HP, EH, BAT, CHP, PV as well as interaction with the grid ðP imp h;d;t À P exp h;d;t Þ. The implemented models cluster full year input time series into a set of representative typical demand days, which is a common measure in design optimizations to reduce computing times [5e13,19e28]. Related works dealing with the simultaneous sizing and operation of multiple distributed energy systems often use 3 typical demand days with hourly resolution [7,27,28] or even longer time step lengths of 2 h [5] or 4 h [10,20]. In contrast, the developed decomposition approach allows for using more accurate time modeling. In this work, 12 typical demand days with hourly time resolution are used. Each house h fulfills the electricity balance shown in Equation (1) The remaining equations for the optimization of individual building energy systems, including thermal balances, technical equations for devices' sizing and operation as well as economical equations, are given in Appendix A. The outcome for each building is the installed energy system, which combines binary decision variables for the technology selection as well as continuous variables for the sizing. Furthermore, binary and continuous variables are used to model the activation of each selected component and its energy inputs as well as outputs at each considered time step. Based on the technology selection, sizing and operation, corresponding costs are derived for investments, operation and maintenance, fuel and electricity demand, metering equipment as well as revenues from feed-in and governmental subsidies.
For the optimization of microgrids, the structure shown in Fig. 2 is used. We assume that electricity can be transferred without losses between all buildings participating in the microgrid, since geographical distances between the buildings are small. Electrical line limitations are also neglected. Furthermore, we only account for an electricity exchange and do not consider district heating.
The following sections describe the core aspects related to the developed decomposition of the compact and distributed formulations for the simultaneous optimization of multiple energy systems within a microgrid.

Compact formulation
The compact model formulation describes an optimization program that simultaneously optimizes the structure, dimensioning and operation of all building energy systems inside the microgrid. The objective is minimizing total annualized costs, based on the German guideline VDI 2067 [32]: In this equation, c describes costs and r revenues. We account for investments (inv), operation and maintenance (om), gas and metering (met) costs as well as subsidies (sub). Furthermore, costs for electricity imports from the macrogrid (grid,imp) and revenues from exports (grid, exp) are considered.
The electricity balance inside the microgrid is written as follows, Consequently, costs and revenues for grid interaction are computed as shown in Equation (4). Hereby, Dt is the length of each time step, which is set to 1 h in this work. Additionally, w d is the weighting factor for typical demand day d. This weighting factor describes how many days of the original full year time series are represented by this typical demand day d. Furthermore, b el $CRF models inflation effects for electricity.

Distributed model
The distributed model is a reformulation of the compact model based on Dantzig-Wolfe decomposition [14] and it is solved using the iterative column generation algorithm implemented in Ref. [30].

Dantzig-Wolfe reformulation
Dantzig-Wolfe reformulation is a method designed to efficiently solve large optimization problems with block-angular structure as shown in Equations (5) and (6). Hereby, the first set of constraints are "coupling constraints", whereas the remainder of the main diagonal consists of independent blocks that are called "independent constraints".

Coupling constraints Independent constraints ð1Þ
Independent constraints ð2Þ « Independent constraints ðHÞ In the case of the presented application, the coupling constraints are the electricity balances shown in Equation (3) that are formulated for each day and each time step. The independent constraints describe the device selection and operation for each building. Without the local electricity exchange within the microgrid (the coupling constraints of Equation (6)), the compact model could easily be solved by optimizing each building individually.
However, due to the coupling of individual constraints, more elaborate decomposition methods are required. In this work, we use Dantzig-Wolfe reformulation that is designed for solving such optimization problems with block-diagonal structure. With this reformulation, the problem is split into one master problem dealing with the electricity balances and multiple subproblems optimizing the energy system of each building. Both, master problem and subproblems are significantly smaller than the original, compact model formulation and are therefore easier to solve than the compact model. However, the distributed model requires an iterative solution algorithm that repeatedly solves the master problem as well as the subproblems. The implemented optimization algorithm is explained in more detail in Subsection 2.2.4.
The following two subsections describe the core aspects of the master problem as well as the subproblems. The complete sets of equations are given in Appendix A.

Master problem
The master problem's objective is formulated as: In this equation, c h;p describes the costs associated with the optimal, local solution for house h obtained in iteration p. These costs are determined by the subproblems in every iteration of the column generation algorithm. More details on these costs are given in Section 2.2.3. Furthermore, l h;p stands for a weighting variable of this proposal.
Costs and revenues from interaction with the macrogrid are determined like in the compact model as stated in Equation (4). Electricity imported from and exported to the macrogrid are determined with: Equation (8) represents the original coupling constraint and is often also called "resource constraint" in literature on decomposition methods. Here, P h;d;t;p denotes the power interaction with the local microgrid of house h at day d and time t in iteration p. A negative value stands for electricity supply while a positive value indicates electricity demand.
The weighting variables are defined for each proposal of each house. They describe the selected share of each proposal in the optimal solution. A weighting variable that equals 0 indicates that the corresponding proposal is not part of the optimal solution of the master problem. In contrast, if a weighting variable is equal to 1, the corresponding proposal describes the optimal energy system configuration and operation for the associated house in this iteration of the column generation algorithm. The weighting variables are constrained as shown in Equations (9) and (10). Equation (9) is commonly referred to as the convexity constraint of the master problem.
Next to the optimal values for P grid;imp d;t , P grid;exp d;t and l h;p , the master problem also determines the shadow prices p d;t and s h . The shadow price of the resource constraint describes the marginal utility gained by relaxing this constraint by 1 unit, i.e. the objective value increases by the amount of the shadow price, if the righthand side of the corresponding resource constraint is increased by 1 unit. In this application, the shadow price can be interpreted as a local clearing price inside the microgrid.
The shadow prices of the convexity constraints stated in Equation (9) are denoted with s h and indicate whether the subsequent proposals can improve the master problem's objective value. Both vectors of shadow prices are sent to the subproblems.

Subproblems
Similar to the optimization of single building energy systems, the objective of subproblem h is formulated for each proposal as shown in Equation (11). For a better readability, the proposal index p is omitted for all variables except variables that are sent to the master problem ðP h;d;t;p and c h;p Þ.
The costs for electricity import from and revenues for export to the macrogrid are calculated with During each iteration, the subproblems determine the optimal structure, sizing and operation for their corresponding building. Each iteration generates one proposal that is sent back to the master problem, containing the resulting costs c h;p as well as the interaction with the microgrid P h;d;t;p . This interaction states the power consumed from or provided to the local microgrid at each time step: Since the subproblems cannot anticipate how their provided electricity proposal P h;d;t;p will be used within the master problem, e.g. whether or not requested electricity is purchased from the macrogrid or provided by a building that generates surplus at this time step, c h;p only contains the first five terms of Equation (11). The final electricity costs and revenues from feed-in can only be determined within the master problem as described in Subsection 2.2.2.

Column generation algorithm
An iterative column generation algorithm implemented in Refs. [13,30] is used to solve the distributed model. A flow chart of this approach is shown in Fig. 3.
The algorithm starts by initializing the master problem with empty proposals. Afterwards, the resulting shadow prices are sent to the subproblems that consecutively optimize their subsystem and return their proposals to the master problem. Subsequently, the master problem is solved again, considering the newly created proposals. Until a termination criterion has been reached, the updated shadow prices are sent to the subproblems again. In this work, we use a fixed iteration limit of 10 iterations. Sokoler et al. [29] have shown in their study on the model predictive control of distributed energy systems that the number of required iterations hardly depends on the problem's size and that 5 to 9 iterations are already sufficient to reach accurate solutions.
If the termination criterion is met, the master problem is solved again using Equation (15) instead of Equation (10). This set of constraints ensures that only one proposal is fully chosen instead of choosing fractions of multiple proposals. In this way, integer feasible solutions are generated, since integrality constraints are always respected within the subproblems and combining them discretely instead of fractionally conserves the integer feasibility. 1 l h;p 2f0; 1g (15) This algorithm can be interpreted as a Price-and-Branch heuristic, which typically leads to high quality solutions in practical applications [13,15]. However, Jans [31] argues that such a simplified procedure does not guarantee global optimal solutions if the subproblems contain binary as well as continuous variables and the master problem's resource constraints only contain continuous variables. Therefore, the next chapter describes a verification of this heuristic, proving its suitability for optimizing energy systems' structure, dimensioning and operation.

Verification
In order to verify the presented methodology, we compare the results of the original, compact formulation with the developed, distributed model. Since the compact formulation requires long computing times with growing number of participating buildings, this verification is limited to small-scale and medium-scale microgrid setups.

Input data
All calculations described in this paper are based on buildings located in Bottrop, Germany. The buildings comprise single-family and multi-family houses as well as apartment buildings. Electricity load profiles have been calculated with the model described in Ref. [16] for each apartment individually and accumulated for multi-family and apartment buildings. Domestic hot water demands have been computed based on the occupancy profiles obtained according to [16] and the tap water profiles of [17]. Buildings' design heat loads are computed according to EN 12831 and hourly space heating loads are calculated with a simplified building model based on two thermal capacitances and multiple resistances [18]. The nominal powers, investment costs, and efficiencies of all building energy components that are available during the optimization as well as the economic boundary conditions used in this study are explained in more detail in Ref. [9] and are listed in Appendix A.5. In order to reduce computing times, we reduce full year inputs to 12 typical demand days with hourly resolution by means of a k-medoids clustering approach [19].

Small-scale microgrids
We analyze two small-scale microgrids each consisting of 3 Fig. 3. Iterative column generation algorithm. 1 When using continuous weights, the weighting variables usually take fractional values. This implies that fractions of integer feasible subproblem proposals would be combined, which in turn implies that fractions of energy system components would be purchased, which is not feasible. Due to this final step with binary weighting variables, integer feasible subproblems are combined discretely, which means that energy system components are either purchased completely or not at all. Furthermore, all devices that are purchased are also operated according to their specific characteristics.
buildings. The first scenario deals with 3 small single-family buildings that have design heat loads of 5 kW each with 8 residents in total. The design heat loads in the second scenario with large buildings range from 36 to 42 kW. These 3 larger apartment buildings consist of 14 apartments with 49 residents.
The main results for both scenarios with both model formulations are summarized in Table 1. The objective values of distributed and compact model deviate by 0.4% for small buildings. As shown in Table 1, the device selection is very similar in both cases, too. For small buildings, boilers are installed as primary heat generation units that are supported by 2e4 m 2 of STC. In addition, 116e118 m 2 of PV are used. Since both models lead to similar amounts of PV that is primarily used inside the generating building, only providing excess electricity to the grid, both have similar total electricity imports and exports. The calculation times are 2879 s for the distributed optimization and 260 s for the compact model.
For 3 large buildings, the difference in the objective value is 1.8%. Both models again lead to similar devices' capacities, installing approx. 45 kW boilers, 33 kW CHP units, 30 kW electrical resistance heaters as well as 10 kW heat pumps. Neither batteries, nor solar thermal collectors are used; instead both install 120 m 2 of PV modules and a total thermal energy storage volume of 6.0 m 3 . The power balance shows that the distributed model requires more electricity imports but simultaneously leads to increased electricity exports. This finding suggests that the compact model is able to slightly better coordinate generation and demand, since higher self-consumption more profitable than increased electricity imports and exports. Both models converge within 2178 and 1340 s. Fig. 4 displays the heat coverage ratios for both models and both simulations. With 3 small buildings, approx. 95% of the heat demand is generated through boilers in the distributed model and 91% in the compact model. The remaining heat is provided by STC. In the microgrid with large buildings, STC is not used, instead heat is generated by boilers, heat pumps and CHP units. CHP units provide 64% of total heat in both simulations. Heat pumps account for 22% of the total heat generation in the distributed optimization and 20% in the compact formulation, the remaining 14% resp. 16% are generated with boilers. Fig. 5 shows the microgrid's operation for the distributed (d) and compact (c) model formulation with 3 large buildings. The operation is displayed for one day during spring. In the top plot, red lines display electricity demands as the sum of all buildings', heat pumps' and electrical heaters' consumption. Blue curves stand for the grid's balance, which is computed by subtracting local generation through PV and CHP units from the total demands. Therefore, positive values indicate electricity imports and negative values exports. The bottom part of this plot shows PV (red) and CHP (blue) electricity generation as well as electricity consumption of heat pumps (black). This figure demonstrates that both models lead to coordinated operation schedules. In both results, CHP units are largely shut down during noon, when PV is able to cover local demands and they are operated during evening, since PV is not available and household appliances are activated. Furthermore, controllable loads, such as heat pumps are activated either simultaneously with CHP units to benefit from their electricity generation or run during periods with high PV generation. As shown in the top plot, the centralized model leads to a slightly better integration of local electricity generation, since less electricity is imported and less electricity is exported. We omit a similar illustration for the microgrid with small buildings since there is no significant electricity exchange between buildings, as there are no controllable devices available such as heat pumps and CHP units.

Medium-scale microgrids
The medium-scale microgrids comprise 10 buildings each. We chose 10 buildings since the compact model exceeded our computing resources of 32 GB RAM and 6 threads, when using 11 or more buildings. The microgrid with small buildings is designed for 25 residents, the design heat loads of the buildings vary between 11 and 15 kW. The other setup with large buildings consists of 56 apartments with 161 occupants in total. Table 2 presents the main results of both setups. With small buildings, the objective functions deviate by 0.6%. Both models lead to very similar results, installing BOIs, backup EHs as well as large areas of PV and only few STCs. Due to the increased usage of PV in the distributed model, less electricity has to be imported; however, larger exports are generated. The calculation times are 9396 s with the distributed model and 25,846 s with the compact formulation.
With 10 large buildings, the objective functions differ by 0.8%. The device selection of both models marginally differs, since the compact model leads to more installed capacity of boilers and heat pumps instead of CHP units. Consequently, more electricity has to be imported and less can be exported in the compact model's result than in the energy system resulting from the distributed formulation. This is due to higher electricity demands in the compact model that can be explained with the increased heat pump usage and lower electricity generation, since less CHP units are purchased.
The heat coverage ratios in medium-scale microgrids are shown in Fig. 6. In the microgrid with small buildings, approx. 96% of the heat demand is generated with boilers and the remaining 4% through solar thermal collectors. In the microgrid with 10 large buildings, the distributed formulation leads to heat coverage ratios of 14% for boilers, 62% for CHP units, and 24% for heat pumps. The optimal energy system for the compact model requires higher boiler and heat pump capacities and lower CHP capacity. Therefore, more heat is generated by boilers (18%) and heat pumps (29%), whereas heat generation from CHP is reduced (52%). Fig. 7 shows the operation of the medium-scale microgrids with 10 large buildings. Similar to the case with 3 large buildings, CHP  units, HPs, and PV are operated in a coordinated manner. During early morning hours, CHP units and HPs run simultaneously in order to generate the required electricity. During noon, generation from CHP units is reduced, since PV is available, leading to small electricity purchase. When PV is no longer available, generation from CHP is increased again, in order to balance the electricity demand of domestic appliances and lighting.

Summary
This verification consists of four cases describing neighborhoods of 3 and 10 buildings with either large or small buildings. These verifications have shown that the compact model formulation and the developed, distributed approach lead to comparable optimal energy systems that are both operated in a coordinated manner.
Since the calculating times of the compact model increased by a factor of 70.2 on average, when considering 10 instead of 3 buildings, this approach is currently only limited to small and medium sized microgrids. In contrast, the computing times of the distributed approach increased by a factor of 3.5, implying a linear gain with increasing buildings, making it suitable for large microgrids.

Scenario
This scenario demonstrates the economic and ecologic benefits of interconnected residential buildings. This scenario is not a reallife application of the model, which would need extensive uncertainty analyses; however, this application highlights that the developed decomposition is able to solve large-scale problems, to which the traditional, compact formulation is no longer applicable.
We apply the developed, distributed model to a large-scale neighborhood and compare the results with individual optimizations for each building. This neighborhood comprises 136 buildings with 261 apartments and 749 residents in total. The design heat loads range from 5 kW to 42 kW and are summarized in Appendix A.5.
In order to evaluate ecologic benefits, we compute the annual CO 2 emissions as shown in Equation (16). In this equation, f grid ¼ 0:535kg=kWh stands for the average CO 2 emissions of the German power system, f gas ¼ 0:200kg=kWh describes the CO 2 emissions of gas combustion and _ E dev h;t denotes the gas consumption of device dev in house h at time t.   with connected buildings and 584,947.37 EUR/a without interconnection, which is a cost reduction of 4.0%. Without interconnection, neither heat pumps, nor CHP units are used; instead, boilers and backup electrical resistance heaters are installed. When allowing electricity exchange with connected buildings, approx. 10% of the buildings are equipped with a CHP unit and 10% possess a heat pump. Additionally, larger storage tanks are installed, in order to allow for operating these devices more flexibly. Therefore, the connected setting is able to reduce electricity imports by 35.3% lower exports by 5.2%, due to a coordinated usage of locally generated electricity. As a result, CO 2 emissions are reduced by 23.7% compared to the unconnected optimizations. Fig. 8 shows the heat coverage ratios in both settings. Without interconnection, approx. 95% of the heat demand is provided by boilers and the remaining heat is generated through solar thermal collectors. When allowing for electricity exchange, CHP units and heat pumps are additionally installed. CHP units generate 22% of the microgrids heat demand, heat pumps 11%, boilers 64% and solar thermal collectors 3%. In both settings, backup electrical resistance heaters produce less than 0.5% of the neighborhood's heat demand. Fig. 9 displays the operation in this grid for one exemplary day during spring. The dashed lines represent the operation without microgrid and solid lines stand for the microgrid scenario (suffix MG). Without microgrid, large feed-ins during noon and high imports at evening hours are required. When allowing for electricity exchange between buildings, the exporting peak during noon is slightly reduced by activating heat pumps. Similarly, CHP units are activated during evening in order to reduce the high demands of household appliances and lighting, reducing stress in the distribution grid.

Limitations
This chapter critically explains the limitations of this paper and the limitations of the developed decomposition method for the design, sizing and operation of distributed energy systems.
As briefly discussed in Chapter 2 and explicitly stated in Appendix A, this work uses common approaches for modeling the design and operation of energy components. In particular, we account for an activation threshold that determines the minimal part load. Between this lower threshold and rated power, we assume a constant efficiency as done by related studies [9,21]. Since this work focuses on the development of a distributed optimization model, such established models are reasonable. However, due to the developed distributed structure, approaches that are more elaborate can easily be incorporated within the subproblems in order to improve the accuracy of the total model. Hereby, the decomposed modeling allows for even higher runtime reductions in comparison with a traditional, compact model formulation. More advanced modeling paradigms that could be incorporated within each subproblem for instance consider piecewise linear approximations for modeling part load of each available device [24e26] or accounting for start-up and shut-down effects [35]. Furthermore, local  decisions that affect the heat demand, such as building envelope insulation [36] could also be considered on the level of each subproblem. This work strongly focuses on modeling issues and provides verification results that confirm the applicability of the developed decomposition approach. Furthermore, a large-scale application is presented that proves the suitability to such large districts. This application also illustrates potential economic and ecologic benefits of microgrids in comparison with unconnected buildings. However, since the presented model has only been applied to one exemplary city district, the resulting improvements of 4.0% regarding total costs are not universally transferable or generalizable to other scenarios. In this work, the microgrid presents significant improvement in contrast to an unconnected setting that are mathematically certain, since they are above the used tolerated optimality gap of 1.0%. For real-life applications, these improvements should be verified by conducting sensitivity and uncertainty analyses in order to ensure functionality and efficiency during offdesign conditions. Such extensive analyses are however beyond the scope of this paper. Yet, in contrast to traditional, compact model formulations, the presented decomposition allows for conducting such analyses in a faster way that can be used to extend the scope of such uncertainty evaluations.
The developed decomposition approach presents a Price-and-Branch heuristic, which typically leads to high quality solutions [13,15]. However, Jans [31] describes that such a simplified procedure does not guarantee global optimal solutions. The conducted verification calculations support both arguments. We have shown that global optimality is not guaranteed; however, the results of the decomposition deviate by at most 1.8% from the result of the compact model formulation. Future works could investigate exact Branch-and-Price algorithms that converge to the solution of the compact model. However, Branch-and-Price essentially requires solving the presented master problem and subproblems significantly more often [37], which would lead to correspondingly higher runtimes. With respect to the already good accuracy in comparison with the compact model, this approach does not appear reasonable. Similarly, in recent years, the Alternating Direction Method of Multipliers (ADMM) has gained significant popularity [38]. However, as shown by a related study of Sokoler et al. [29], ADMM has been inferior to Dantzig-Wolfe reformulation in this application.

Conclusions and outlook
In this paper, we have developed a distributed optimization methodology based on decomposition principles and column generation for optimizing building energy systems within local neighborhoods. We have verified our model for two small-scale and two medium-scale microgrids by comparison with a compact model formulation. The verification confirms the applicability of our reformulation since similar energy systems are installed and operated alike. For the small-scale microgrids, the compact formulation requires shorter calculation times, however with increasing number of buildings, the distributed optimization outperforms the compact model's calculation time. With our model formulation and computing hardware, only 11 buildings are manageable with the compact model, whereas the distributed formulation can even be applied to more than 100 buildings.
We applied the distributed algorithm for optimizing a residential neighborhood with 136 buildings in order to evaluate the economic and ecological benefits of local microgrids. The findings conclude that for the investigated scenario, interconnection reduces annual costs by approx. 4.0% and CO 2 emissions by even 23.7% by installing more CHP units and heat pumps and coordinating these devices in order to increase self-consumption and reduce electricity feed-in.
In future works, we will extend our model by including local heating networks. Furthermore, we consider extending the model to also account for non-residential buildings and non-residential areas. Also, in contrast to this paper that primarily deals with the modeling itself, future applications of the developed decomposition approach should investigate the underlying uncertainties associated with the model inputs.

Acknowledgments
This project has received funding from the European Union's Horizon 2020 Framework Programme for Research and Innovation under grant agreement number 731289.  This appendix presents the full set of equations used within the compact model formulation, the master problem and the subproblems. Additional information on the implemented compact model can be found in Ref. [9]. are added that depend on the installed capacity. Hereby, capacity describes the nominal heat output of BOI, CHP, EH and HP, the installed area of PV and STC as well as the water volume of TES and the storage capacity of BAT. These initial investment costs are distributed into an annual payment considering the capital recovery factor (CRF) and the residual value rv dev at the end of the considered observation period of 10 years.
Costs for operation and maintenance are a fraction f om dev of the investment costs, the corresponding values are taken from the German guideline VDI 2067. Furthermore, inflation effects are Costs for gas purchase are computed similarly to electricity costs: For heat generators that couple electrical and thermal subsystems ðdev2fchp; eh; hpgÞ, the following equation links the corresponding heat generation with the electrical power consumption, respectively power generation at each time step. The power consumption of gas boilers, for instance for internal measurements and the boiler's local control unit are neglected, and P boi h;d;t is set to 0.  Similar to the explanations in the main paper, the proposal index is neglected in this summary of the subproblems. However, these subproblems are solved for each house h during each iteration of the column generation algorithm. The remaining equations of the subproblems are exactly taken over from Equations A.4 to A.28.