Allocation of Distributed Energy Systems at District-Scale over Wide Areas for Sustainable Urban Planning with a MILP Model

An optimal allocation of centralized district-scale distributed energy resource (DER) systems with district heating and cooling network (DHCN) is studied. A generic mixed integer linear programming (MILP) model is constructed to increase the system efficiency and decrease costs by reducing energy distribution losses and transportation costs in energy distribution network. Initial investment costs based on size and type (co/trigeneration) of the facility and demand-weighted transportation costs are minimized by the capacitated fixed charge facility location (FCFL)model. However, unlike the standard FCFLmodel, by adding the maximum coverage distance in the set covering problem, a new method has been proposed. Thus, its aim is to avoid assigning a demand point to a candidate facility from a point farther than the predetermined distance. That means that the weakness of disregarding the distance between supply and demand points in the FCFL problem is eliminated. Additionally, this model, in which the annual inputs are used, has a generic framework suitable to form infrastructure needs in consideration of distributed energy systems in the general planning level for sustainable urban planning. For this purpose, the applications of the model, both case study and tests, have been made over wide areas, with annual demand and capacity values. Consequently, a case study with different coverage distances has been conducted to see the effect of coverage distance on the model, and also test problems with different sizes have been carried out to demonstrate the capability of the proposed model.


Introduction
The prominence of effective energy generation is clearer when the intense environmental pollution created by the conventional energy generation process is taken into account.The meaning of "efficiency" for energy is both to do the same job with less energy and to prevent transmission and distribution losses.
Distributed energy systems generate electricity, even heat and cold energy, at many small-scale local units [1].With an electricity generation unit located at or near end users, it is aimed at reducing transmission losses significantly, and also simultaneous generation systems, cogeneration or trigeneration systems, cause high thermodynamic efficiency and primary energy saving as well as reducing gas emissions because of utilization of exhaust heat.Additionally, these systems offer the opportunity to utilize local renewable energy sources (e.g., solar, wind, and biomass) and add flexibility to the generation system [2].
Although cogeneration is not a new concept, the residential and commercial usage is becoming widespread, nowadays, especially in developed European cities.International Energy Agency has foreseen that the annual distributed electricity generation will increase by 4.2% from 2000 to 2030 and reach 35 GW by 2030 [3].
Systematic analysis and evaluation are essential for optimal design and operation of DERs.In that sense, mathematical programming techniques have been widely used for this purpose.Because of its flexibility and robustness, mixed integer linear programming (MILP) model has been more preferred.Both energetic and environmental advantages can increase if DER system limits are extended from building level to district-scale with distribution networks.
We can divide the optimization models for optimal design and operation of DER systems into two main groups: while the majority of the initial studies ( [2,[4][5][6][7][8][9]) deal with the determination of optimal configuration, in other words, optimal system combination and operational strategies for a single DER system, more recent works ( [10][11][12][13][14][15][16][17][18][19][20][21][22][23][24]) also take into account the pipeline network, in more detail.Nevertheless, there is no doubt that the complexity is further increased when the DER systems are designed for covering the demands of multiple end users at the neighborhood scale, which often involves also the design of a heating pipeline network, concurrently.
Lozano et al. [10] examined the systemic impact of legal restrictions of CCHP systems including thermal storage on a 5000-apartment complex in Spain.Weber and Shah [11] proposed a single-level optimization model called DESDOP (district energy system design and optimization) for an ecological city that is used to determine the optimal technology combination reducing CO2 emissions, considering 5% heat loss.
Ortiga et al. [12] conducted a scenario analysis about system efficiency, investment cost, investment return period, and CO2 emissions of new a polygeneration system including DHCN in Spain for the Polycity project.Mehleri et al. [13] proposed a superstructure MILP model for a DER system design and operation with heating pipeline network at the neighborhood level consisting of 10 to 20 buildings considering sale of excess electricity to the grid as income.Besides determining the optimal combination and allocation of DER technologies and their operation strategies, the economic and environmental impacts are also discussed under different scenarios including thermal storage tanks in their other study [14] at a neighborhood of 5 buildings in Greece.Similarly, a MILP model has been developed by Ameri and Besharati [15] in order to design and operate an optimal CCHP/photovoltaic (PV)/DHC energy system in a residential town in Tehran.Since a much larger area of 50 hectares with 137 buildings was taken into account, 15% thermal loss and 5% cold loss per km for the pipeline have been also included into the model.
Omu et al. [16] introduced a model at the objective of impact assessment of strategic policies about energy systems, to design a centralized district-scale DER system for an area of 300 hectares with six buildings and distribution network, based on local climate data, consumers' energy demands, electricity, gas tariffs, and so on.Bracco et al. [17] proposed a MILP model determining the design and the operation of a CHP distributed generation system in an urban area in order to minimize both annual costs and CO 2 emissions.Later they extended their model to a general mathematical model, to optimally design a distributed energy system composed of different technologies that provide heating, cooling, and electricity to a set of buildings [18].
Yang et al. structured a model determining the optimal sites, types, capacities, numbers for the energy distribution stations, and optimal routes of the energy distribution networks with district-scale [19].A multiobjective optimization model of total cost versus carbon emissions was presented to determine the benefits of decentralized heating networks in the context of DERs where carbon emissions are expressed with a carbon tax by Morvaj et al. [21].
Sameti and Haghighat [22] developed a two-level optimization methodology to help design a trigeneration system for a given district system which satisfies the heating, cooling, and hot water demands and, at the same time, minimizes the annual total costs and CO2 emissions.Marquant et al. [23] proposed a framework to enable large-scale optimization of urban energy systems at neighborhood scale by optimally clustering buildings into small-scale district heating networks and then optimally linking these clusters with further network connections.
Zheng et al. formulated a MINLP model to determine the optimal combination and operational strategies of various technologies to meet the energy requirements under different circumstances.Unlike previous studies, which ignored the real time variations of energy demand, they considered the effect of hourly demand fluctuations [24].
In this study, as a contribution to the current literature, maximum coverage distance of set covering model has been integrated into capacitated fixed charge facility location problem in order not to allow assignment of a demand point to a candidate facility from a point farther than the predetermined distance.By this way, it is aimed at minimizing the energy transmission losses and the transportation costs with eliminating the weakness of disregarding the distance between the customer and the facility in the FCFL problem.Besides, this model, based on annual demand values over wide areas, could be considered as a useful tool for general planning level of spatial urban planning process in which distributed energy systems are involved.
The rest of this paper is organized as follows: Firstly, the problem definition is made in Section 2 and further methodology with the proposed mathematical model is described in Section 3. The case study with different coverage distances is depicted in Section 4, and then the results are presented in Section 5. Additionally, test phase with 100 test problems with different parameter ranges is dealt with in Section 6.Finally, conclusions are drawn in Section 7.

Problem Definition
This facility location and assignment problem for DER systems is based on fixed charge model from median based models.Median based models are better suited to make distribution plans, as transport costs are taken into account when real distances are used, whereas with covering models, a maximum distance exists a priori [25].
Operational optimization models evaluate how to integrate and assign generation technologies at district or building scales.According to classification of optimization models in district energy systems by Sameti and Haghighat [26], our proposed model is included in superstructure models.
District-scale DER system is an energy network system in which energy is produced outside the buildings and distributed to the demand points through energy distribution networks to be consumed.In this study, it is assumed that the DERs are located outside the energy-consuming buildings and that the generated energy is delivered to the demand points via the energy distribution networks.Unlike the previous studies, users' electricity, thermal, and cold energy demands were considered in total annual values.As mentioned before, this is preferred to facilitate the general planning level of spatial urban planning process in which distributed energy systems are involved.
In this proposed model, when the users are assigned to the facilities, the most important issue to be regarded is whether the distance between the facility and the user is exceeding the maximum coverage distance or not.If it exceeds it, the user is assigned to another facility if there is one that is closer.As the installation costs of DHCN constitute almost half of the whole system, the fewer the pipes are, the lower the costs and losses will be.That is why the maximum coverage distance is added to the proposed model.
With this model, while the assignment of district-scale DER systems has been made with the least initial and transportation costs, the facility type (cogeneration/trigeneration), facility size (production capacity), and structure of district heating and cooling network are also decided, simultaneously.
Moreover, both thermal losses and electricity transmission losses are taken into consideration.When these losses are included in the model, they are treated as a percentage increase for each hectometer on demand for the amount of energy involved, not as a percentage decrease in the capacity.
In the energy planning, urban planners emphasize the need for a higher level of integration between both land and energy planning.The consistent land and energy planning approach is one of the basic principles of sustainable urban planning.The spatial planning could be divided into three levels: general planning, special planning, and detailed planning.The main aim of the general planning is to decide the land use and determine the infrastructure needs.Energy planning at this level is preliminary energy infrastructure planning in order to reserve land for the infrastructure needs.The maximum possible energy demands and designing of corresponding energy infrastructure are evaluated so that they could be supplied [27].
Spatial planning is crucial to implement successful district heating and cooling systems because of the need for optimal infrastructure planning.One of the advantages of this model is its capability to be used for general level of spatial urban planning.As distributed generation is spreading, while creating urban plans, the land use and infrastructure requirements for distributed energy systems should be considered at the creation level of urban plans.
This proposed model provides a generic calculating framework for general plans in urban scale planning by using annual demand and capacity values.The use of annual data should not to be seen as simplification; with this approach, it is aimed at establishing the most appropriate infrastructure network for distributed energy systems.Considering the previous studies with seasonal demand changes, it is seen that implementation was made in a narrow area [13,16,20].
However, this study would be appropriate to form a general framework as a view, especially for energy infrastructure, with the inclusion of much wider areas for utilization in spatial urban planning.It can be directly applied to different scale areas in any location with different building types and energy demands for general level of sustainable urban planning.

Mathematical Formulation
In the set covering model developed by Toregas et al. in 1971 [28] where  is the set of demand points and  is the set of candidate facilities, for ∀ ∈  and ∀ ∈ ,   is the distance between  and  points.Dc is the coverage distance while   =  ∈ ,   ≤ Dc;   is the set of all  facilities covering demand point , where   equals 1 if the candidate facility is opened at point  and 0 if not, with 0-1 being binary variables.
The objective of the FCFL model, developed by Balinski in 1965 [29], is to minimize investment and transportation costs while determining the optimal number and location of the facilities to be opened and the assigning of demand points to the opened facilities.The point to be noted here is that, due to the capacity constraint in the fixed charge model, the demand points may not be assigned to the closest one.In order to eliminate the weakness of ignoring the distance between facility and user, maximum coverage distance has been included in the proposed model.This ensures that the distance between the facility and the demand point remaining is within the predetermined limits while the distribution network structure is constructed.

Mathematical Model.
The fixed charge facility location model is an effective tool for analysis of how many distribution centers should be built and where they should be located.We add the maximum coverage distance from the set covering model into our capacitated FCFL model with the assignment restriction.Only one facility is assigned for demand node  that is covered by candidate site  if   ≤ Dc, where Dc is the coverage distance.
The name of the proposed model is maximum coverage distance-added fixed charge facility location (MCD + FCFL) model.

Nomenclature
Indices : Index for demand node ( ∈ ) : Index for candidate facility site ( ∈ ) : Index for energy type ( = electricity, thermal, and cooling) : Index for facility size ( = small, medium, large) : Index for facility type (cogeneration or trigeneration) a facility of type  with size  is opened at candidate facility site ; otherwise, it equals 0;   = 1 if a demand node  is serviced with energy type  from a facility at site ; otherwise, it equals 0.

Objective Function
( The objective of the model is to minimize the annual cost of supplying energy to consumers through the distribution of the energy generated by the DER system.This annual economic cost, given in (2), is the sum of the initial investment cost, electricity transportation cost, and district heating and cooling network cost ( inv ,  elec , and  net , resp.).Another noteworthy point here is that the transportation costs are demand-weighted.

Constraints
Constraint (3) states that only one facility can be opened at one candidate point.
Constraint (4) requires that each demand node can be assigned to only one facility for each product.In addition, with constraint (4), coverage distance (Dc) in set clustering model is incorporated into our FCFL model by the set   , which is the set of all candidate sites that can cover demand node  [  = ( ∈  :   ≤ Dc)].
As you may have noticed, demand is divided into , a big number to avoid the assignment of relevant energy type , when ℎ  = 0.Although the case of no demand for any product is not considered in our case study, because the model we have proposed is generic one, we added  against possible situations.
Constraints ( 5) and ( 6) restrict demand node assignments only to open facilities.There are two separate constraints for similar purpose because we have two different facility types: cogeneration and trigeneration.For the situation index  = 3 (demand energy type is cooling) constraint ( 5) ensured that the relative demand node  assigns a trigeneration facility; otherwise, for  = 1 or 2 the same demand node  can be assigned to either trigeneration or cogeneration facility  with constraint (6).
Constraints ( 7) and ( 8) are capacity constraints.While limiting the demand  for the product  to the product capacity of the facility , transmission losses for both thermal/cold and electricity are treated as two separate constraints.These transmission losses are 3% for thermal and cold energy per hectometer (hm) and 0.5% for electric energy per hm.The calculation is considered by the distance between demand point  and facility point ; also, the loss of the model is taken into account as the increase in demand, not the decrease in capacity.
Constraint ( 9) established the decision variables as binary.

Experimental Case
In order to demonstrate the applicability of the proposed model, a simple case study is dealt with step-by-step.This model, encoded in the GAMS interface, was solved using CPLEX 8.1 solvent.Let us assume 20 demand nodes, for especially residential and commercial use such as hospitals, hotels, shopping centers, schools, university campuses, stadiums, public buildings, and satellite towns and 8 candidate energy generation sources illustrated as in Figure 1.An area of approximately 150 hectares (1,500,000 m 2 ) was regarded for our sample application.

Annual Demand Values of Users (ℎ 𝑖𝑘
). Electricity demand is randomly generated between 5 and 35 million kWh, annually.When calculating a customer's thermal energy demand, a value of 30% to 150% of the predetermined annual electricity demand of the same customer is taken randomly.In a similar way, a random value between 5% and 30% of the predetermined annual electricity demand is taken for cooling energy.As mentioned before the main reason for using annual total demand values without considering seasonal fluctuations is that this proposed model is designed as a generic model that can be used in general level of spatial planning for sustainable city planning.Table 1 gives the annual demand values for each energy type.

Distances between Users and Candidate Facility Points (𝑑 𝑖𝑗
). Euclidean distances were calculated using random coordinates generated at specific intervals for the demand points and the candidate facility points.Table 2 presents the Euclidean distances,   , between demand point  and candidate facility .

Annual Energy Generation Capacities of Candidate
Facilities (  ).Candidate facility points are classified as small, medium, and large considering their production capacities between 1-5 MW, 5-10 MW, and 10-20 MW, respectively.Electric energy production capacities are produced randomly for each size between the limits.Thermal and cold energy capacities are obtained by taking a certain proportion of electricity energy generation capacity as mentioned before.And then, production capacities are converted into annual values with the assumption that the facilities operate 18 hours a day, 365 days a year.Table 3 gives the facility capacities for three different type energy generations.As an assumption it is assumed that the type of equipment to be used in all candidate facilities is the same and that cost variation occurs only according to their sizes.

Initial Investment Costs of Facilities (𝑓 𝑙𝑚 ).
As a result of research for the energy market, the initial investment cost for 1 kW power is predetermined as 500 €.Thus, for cogeneration facilities, the initial investment costs were obtained by multiplying electricity generation capacities with 500.For trigeneration ones, additional costs between € 16,000 and € 450,000 according to capacity size are added for chillers included in the cogeneration system.Table 4 provides the fixed costs of energy generation facilities for our sample application.

Unit Transportation Costs (𝑐 1 and 𝑐 2 ).
Assuming the insulated pipeline is used for the distribution of thermal and cold energy, the unit transportation costs of these two energy types ( 1 ) are evaluated differently from the unit transportation cost of electricity energy ( 2 ).For our sample problem, while  1 is taken as 0.000001 million €,  2 is determined as 0.0006 million € per hm.

Thermal and Electricity
Losses.Thermal and electrical losses occurring in the distribution network in the problem have also been considered as in the literature [14,15].As   seen in the model discussed above, the corresponding losses depending on the distance between  and  are taken as 3% for thermal and cold energy and as 0.5% for electricity energy with the capacity constraints ( 6) and (7).

Results and Discussions
Maximum coverage distance has been tried for different values as 2, 3, 6, 7, 8, 10, and 12 hectometers and the effect has been analyzed by the comparison of the results.

Results Based on Different Coverage Distances.
It is seen from Table 5 that the coverage distance is an important parameter affecting the solution time.As the Dc value decreases, the solution time also decreases; nonetheless, the number of satisfied users also decreases and, thus, unmet demand situation becomes an issue.The Dc value of this problem is taken in the range of 2-12.The iteration counts and node numbers are two of the complexity indicators in the model solution algorithm.They are affected to a certain extent by the increase of the coverage distance as seen from Figure 2.For Dc = 8 hm, these values have peaked and the solution time has reached the upper limit, that is, 7200 seconds.The model met all requests with a deviation of 1.14% from the best possible solution (from the top) at this point.It is also seen that the increase in the coverage distance has directly influenced and increased the solution time of the model.
The results of these two assignments are also shown schematically with the real coordinate values for our case study in Figure 3.
The number of uncovered demand points is noteworthy while coverage distance is less.(15 for Dc = 200 m, 5 for Dc = 300 m).Although the total cost of the system is low, the multiplicity of unmet demands is not a desirable situation.After all the demand points have been evaluated, the effect of coverage distance on the total cost is only reflected with transportation costs.
When we examine the assignment results for 3 and 10 as coverage distances, in Table 5, we see that the same number of facilities (7) is opened in both cases.However, in Table 6, when coverage distance 3 is taken, 5 of the 20 demand points cannot be serviced, and 11 demand points met all energy demands from the same facility.Thus, there are 5 trigeneration and 2 cogeneration facilities with 3 of large, 2 of medium, and 2 of small scale; moreover, the proposed model calculated the total cost including the distribution network as 32.1 million €, optimally.
The following conclusions can be drawn from Table 7: When Dc is received as 10, all of the 20 demand points are serviced, and there are 4 trigeneration and 3 cogeneration facilities with 5 of large and 2 of small scale.In this case, the model calculated a total cost value of 38.81 million € within a time limit of 7200 seconds, where the best possible integer solution is 37.98.The deviation from the best possible solution is found to be 2.2%.Among other solutions in which all demand points are serviced, this is the best result.Candidate facility with number 5 was not opened and 5 of 20 demand points met all three types of energy demands from the same facility.

Test Phase of the Model
6.1.Test Parameters.At this phase of the study, 100 test problems were created at different parameter ranges in order to determine the limits of the mathematical model.10 test problems were solved in 10 different sizes with different parametric structures and 100 results were obtained in total.The parameter ranges shown in Table 8 are used.
As in the case study, possible thermal and electrical losses occurring in the distribution network are assigned as a loss ratio.This loss ratio is 3% for thermal and cold energy and 0.5% for electricity per one hundred meters according to the distance between customer and generation unit.

Test Results
. All runs are limited to 2 hours (2 * 60 * 60 = 7200 seconds).The solution of the model obtained after 7200 seconds of operation is expressed as the lower bound whereas the solver calculates the best integer possible solution for nonoptimal ones defined as the upper bound.Percent deviation is also the percentage of the difference between the lower and upper bound.
From Table 9, it is clear that, as the problem size is increasing, the average solution time is increasing synchronously whereas the number of problems obtaining the optimum solution is decreasing.Another parameter that affects the solution time is the maximum coverage distance added to the model.This value is chosen randomly between 2 and 12.As the Dc value is reduced, the number of customers satisfied is reduced and also the solution time is decreasing.However, decrease in number of satisfied customers is not a desirable situation.It is seen that the difference between the lower and upper bounds and the percentage deviation value increase together with the model size.
When the results of the test problems are evaluated, it is seen that not only the problem dimension but also the coverage distance affects both the solution time and the total costs as in Figure 4.

Conclusions
The authors built a generic MILP model for optimal allocation of centralized district-scale DERs and configuration of   distribution network on the base of annual demand and supply values.In this paper, the design and assignment of local energy generation systems and distribution network were taken as a problem of facility location selection aimed at meeting all three-type energy demands with high efficiency.When energy demands of end users are met, first the distance between the facility and the user is considered and second the model is established on the basis of the allowable userfacility distance (coverage distance).The proposed MILP model allows the optimal layout of the DHCN with regard to the maximum coverage distance.
The most important issue to be regarded is whether the distance between the facility and the user is exceeding the maximum coverage distance or not.If it exceeds it, the user is assigned to another facility on condition that there is one that is closer.As the installation costs of DHCN constitute almost half of the whole system, the fewer the pipes are, the lower the costs and losses will be.That is why the maximum coverage distance is added to the proposed model.
With this model, while the assignment of district-scale DER systems has been made with the least initial and transportation costs, the facility type (cogeneration/trigeneration), facility size (production capacity), and structure of district heating and cooling network are also decided, simultaneously.Moreover, both thermal losses and electricity transmission losses are taken into consideration.
The consistent land and energy planning approach is one of the basic principles of sustainable urban planning.The main aim of the general planning is to decide the land use and determine the infrastructure needs.Spatial planning is crucial to implement successful district heating and cooling systems because of the need for optimal infrastructure planning.As distributed generation is spreading, the land use and infrastructure requirements for distributed energy systems should be considered at the creation level of urban plans.
One of the advantages of this model is its capability to be used for general level of spatial urban planning by using annual values.Unlike the previous studies with seasonal demand changes almost implemented over a narrow area [13,16,20], this study would be appropriate to form a general framework as a view, especially for energy infrastructure planning, with the inclusion of much wider areas.As a realworld community contains hundreds of buildings, this model can be directly applied to different scale areas ranging from 5 to 100 demand points in any location with different types of buildings such as hospitals, hotels, shopping centers, schools, campuses, public buildings, and satellite towns and energy demands for general level of sustainable urban planning.
The numerical application of the model has been made on a sample with 20 demand points and 8 candidate facilities on an area of 150 hectares with different coverage distances.The developed model has given realistic solutions that can be used as a basis for the design of district-scale DER systems.In any case, the MILP model output has contained information to define the optimal design of the co/trigeneration units and distribution network, taking actual boundary conditions into account.
In the light of the examinations made, the installation costs of the district heating cooling networks have been seen to account for almost half of the regional energy system costs.As fewer pipelines are needed, costs and losses are reduced.
To have a projection, actual values of previously assumed fixed parameters could be used during the detailed system design for real-life applications on different scale areas.In addition, for the future works, the suggested MILP model can be integrated with renewable energy generation technologies, for example, photovoltaic, wind, or biomass systems, and the optimization model can be modified to determine how much distance should be set between the installed renewable energy facilities in order to obtain the minimum energy transportation costs.
The development of appropriate heuristic methods for problem dimensions that could not reach the optimal result is also conceived.

Figure 1 :
Figure 1: Illustration of energy generation network for DERs at district-scale.

Figure 2 :
Figure 2: The effect of different coverage distances on model complexity with (a) node number (b) iteration count.

Figure 3 :Figure 4 :
Figure 3: Schematic representation of assignment results for coverage distance of (a) 3 hm and (b) 10 hm.
the set of all candidate sites that can cover demand node .Parameters  : Fixed initial investment cost of locating an  type facility with  size at site  (million €) ℎ  : Demand quantity of energy type  at demand point  (GWh/year)   : Distance between customer  and facility  (hectometers) Dc: Maximum coverage distance (hectometers)   :  production capacity of facility  with size  (GWh/year)  1 : Unit transport cost for electricity (million €/hectometer)  2 : Unit transportation cost for district heating and cooling network (million €/hectometer).

Table 1 :
Annual demand values for 20 energy demand points.

Table 2 :
Euclidean distances between

Table 3 :
Facility capacities according to their sizes (GWh).

Table 5 :
Comparison of results for different coverage distances.

Table 6 :
Assignment results of demand points to energy generation facilities according to requested energy types for Dc = 3 hm (300 m).

Table 9 :
Average solution results obtained by mathematical model for each problem set.