A Graph Theory-Based Method for Regional Integrated Energy Network Planning: A Case Study of a China–U.S. Low-Carbon Demonstration City

With the significant attention on global climate change, regional integrated energy systems (RIES) in low-carbon city planning has become one of the most important ways for global cities to achieve the goal of energy conservation and emission reduction. However, the planning strategy used in the primary stage of RIES establishment will greatly affect the system economy and environment. In view of the lack of planning guidance mechanisms for the large-scale RIES in China, a method for RIES preliminary overall planning, focused on energy types and use, is proposed in this paper. A graph theory-based mathematical optimal model was established with the lifetime costs of the whole system as the economic goal, and an improved Prim algorithm was put forward to solve the costs of the transmission and distribution network with the dynamic weight set of pipeline flow. The model was solved by an algorithm based on the idea of a dynamic minimum spanning tree and optimal path planning. The model and method were applied in a China–U.S. low-carbon demonstration city to verify feasibility and validity. The results could help us to comprehensively integrate regional energy and accurately plan future cities.


Background of Environment and National Policy
Global climate change has become one of the most serious and complex issues worldwide. With the development of human society and city construction all over the world, energy consumption creates large quantities of human-produced greenhouse gas, contributing to global warming. Global primary energy consumption, especially natural gas and renewable energies, has increased rapidly in recent years. Meanwhile, the growth rate of carbon emissions has peaked in the last seven years [1]. The average temperature of the global land and ocean surface in 2018 was the fourth warmest since global records began in the mid-to-late 1800s [2]. Cities are estimated to contribute 76% to energy-related carbon emissions by 2030 according to the international energy agency (IEA) [3]. British Petroleum (BP) estimates that China accounts for 23.6% of global energy consumption and remains the world's largest energy consumer [1]. Two general characteristics of China's energy consumption have been summarized; the first is that it is densely packed with cities. China's city energy consumption accounts for 85% of the total, 18 percentage points higher than the world average; the other is the high level of spatial agglomeration, as city energy consumption is concentrated in the developed eastern areas and several regional central cities [4]. Cities have their center vital point positions in the field of

Regional Integrated Energy System in City Planning
City planning is the science of the rational organization and equitable allocation of city resources, combined with analysis and design [11]. Since the theories of neo-urbanism and smart growth were developed, cities have tended to be compact and intensive, with a high density of population and construction. Traditional energy use in buildings has the character of equipment decentralization and multipoint emissions. In this way, no energy is integrated, and it is difficult to realize centralization of management. Regional renewable energies have the characteristics of low energy density and discontinuity of capacity. A regional integrated energy system (RIES) has been suggested to comprehensively plan every kind of available energy in the design area [12,13]. A joint energy station is established to supply demand users with cold and heat through a transmission and distribution network. A RIES mainly consists of energy stations, transmission and distribution networks, and users. Unlike traditional distributed energy systems, a RIES distributes cold and heat mainly by using a flowing medium through a closed and insulated network [14], making better use of regional energies and resulting in less consumption.
RIES have become one of the important ways for global low-carbon eco-cities to achieve the goal of energy conservation and emission reduction. RIES include regional heating [14,15], regional cooling [16], regional cooling and heating [17,18], regional combined heat and power, regional combined cooling heating and power [19][20][21], and so on. At present, the research on the technology of RIES has been considerable. Most of these studies concentrate on specific technologies like the optimization of multi-energy storage [12,18], heat pumps with a solar assisted ground source [19,22,23], low temperature district heating networks [24,25], integration of renewable energy [26], and so on. The global spread of this kind of energy use is also considerable. RIES has developed rapidly in China in the past 60 years. China has a long history of heating. Heating in China's northern part began in the 1950s [27], and regional heating accounted for about 2/3 of the heating area in the north in 2015 [28]. The total building area covered by heating pipeline networks in 2017 was estimated to be more than twice the area in 2009 [29]. Although regional cooling is far less common than heating in China, it is constructed widely in south China, such as Guangzhou, Shanghai, Chongqing, and so on. The regional cooling system in Guangzhou, with the service area of 6 million m 2 , has become one of the world's largest systems [30]. The current situation of China's rapid urbanization and the requirements of low-carbon cities planning are bound to increase the demand for RIES.

Graph Theory Application to Regional Energy Systems
Graph theory focuses on a graph composed of a number of given vertexes and the edges connecting two vertexes as a research object, where vertexes represent certain things and edges represent the specific relationship between these corresponding things. The application of graph theory to RIES has increased in recent years, especially for the number of energy stations and site selection, and the transmission and distribution network optimized layout. The transmission and distribution network system is an important part of RIES. Its initial costs and operation costs account for a large proportion of the total, consuming a lot of electricity every year [31]. Therefore, whether the transmission and distribution network layout is reasonable or not will greatly affect the initial investment and annual operating costs of RIES. There is a lot of research on RIES network layout. In China, the concept of the "Energy Internet" was earliest put forward by Liang H. et al. in the national HVAC academic conference in 2010, and the graph analysis method was put forward to solve the RIES energy station site selection and network layout problems, wherein the mixed integer linear programming optimization model was set up with the optimization target of lowest energy consumption, costs, and carbon emissions [32]. Chen J. et al. put forward the concept of energy distance and established a P-median model of 'stations-pipelines' layout, with the minimum energy distance as the economic goal [33]. Yi W.F. et al. also established a P-median based model for energy station location and the transmission and distribution network, and it was solved by an algorithm based on the enumeration method [34]. Wang Z.Q. proposed a network location algorithm based on the idea of the minimum spanning tree. The optimal solution was obtained on the basis of all feasible solutions in the ergodic solution set space [35].
The solution when addressing the network layout is to achieve the optimal goal for the energy station number and location, and the path of the energy transmission system. This problem is a P-median problem. The purpose of the P-median problem of the energy system is to find the optimal P stations from the set of alternative energy stations, making the sum product of the distances and the loads. The solutions mainly include the enumeration method, greedy algorithm, mathematical programming method, and so forth [36]. However, most of these algorithms rarely consider the optimal layout of the transmission and distribution network. Therefore, most studies have adopted the shortest path and minimum spanning tree theory to solve the optimization problem [33].
In general, applying RIES to low-carbon cities has become a recognized choice, and there are many large-scale systems in China. However, the planning guidance mechanism of RIES in China is always lacking and few literatures have proposed overall planning ideas for the large-scale RIES. In addition, an effective, economic, and reasonable planning is of great significance to establish RIES. The difference in economy and efficiency between different design planning can vary greatly. Moreover, there are very few algorithms that really fit the design idea of HVAC pipelines, and the study on complex network layout problems is less involved.
The aim of this paper is to provide a theoretical method for the primary stage of a RIES planning. First, the regional resource situation analysis and the forecast of cooling and heating load on the demand side provided date and background support to establish the structural model of RIES. Second, the mature graph theory was applied to the structural model of RIES. Because most of the algorithms used rarely accorded with the design idea of the transmission and distribution network layout, the improved Prim algorithm with the dynamic weight set of pipeline flow was put forward to solve the costs of the transmission and distribution network. Third, the mathematical optimal model of RIES was established, with the lifetime costs of the whole system as the economic goal. The model was solved by the idea of the dynamic minimum spanning tree and optimal path planning. Fourth, the theoretical method for the primary stage of a RIES planning was applied in a China-U.S. low-carbon demonstration city, and the mathematical optimal model and the improved Prim algorithm were verified to provide effective support for primary planning of RIES and to comprehensively integrate regional energy and accurately plan cities.

Regional Energies Situation Analysis
The research on RIES has been focused on its energy types and use. Before designing a RIES, it is necessary to analyze and evaluate the existing energies. This determines the form of energy available to the system and the equipment selection, as well as the efficiency and energy saving potential of the whole system. However, different energy types and utilization forms have advantages and disadvantages. This relates to national energy policy, regional resource conditions, economic type, urban design characteristics, building formats, and energy system management modes. Yan J.L.; et al. evaluated RIES from three aspects: energy consumption, environmental influence, and economy, and determined the weight of the indexes at different levels [37]. And the evaluation indexes are shown in Figure 1. A city is generally equipped with basic energy facilities and natural renewable energies. Facilities include the city heat supply, electric power resources, and natural gas pipeline network, and renewable energies include solar power, renewable water resources, shallow geothermal energy, and so on. Combined heat and power are energy uses encouraged by national policy, which is more energy-saving and environmentally friendly than boiler heating. Natural gas is a clean energy and one of the key energy forms in the construction of low-carbon cities with significant emission reductions. It can realize energy cascade utilization and reasonable distribution of energy according to the different energy grades and energy demands. Unless the technology and economy are unreasonable, the application of cogeneration heating and natural gas cascade utilization should be considered as far as possible, with related national policies. Public subsidies should be added to the life cycle costs of the energy system. The hourly distribution of the heating and cooling load means a shortage of electricity during peak hours. However, energy-storage air conditioning can realize peak load shaving for power demand, which reflects the concept of power demand side management. Therefore, it is necessary to consider ice storage and other energy storage applications. Renewable water sources and shallow geothermal energy are excellent energies due to their stability. All these energy types and their forms of utilization, recommended for RIES, can be roughly divided into four levels according to the above evaluation indexes. As shown in the table below (Table 1), a higher level means a lower recommendation. Forecasting and analysis of cooling and heating load on the demand side provides an important design basis for the selection of cooling and heating primary equipment capacity in energy stations. There exists the unit area index method, software simulation prediction method, and data statistical analysis method for load forecasting [38]. The algorithm used by the unit area index method to calculate the total load of regional buildings simply accumulates the loads of individual buildings in the region, which does not reflect the time variation characteristics of the load. The software simulation prediction method's workload is exponentially increased compared with the unit area index method. The data statistical analysis method is based on a large number of historical data, to judge the regional building load trend by using mathematical statistics or other methods. Therefore, combining the unit area index method with the software simulation prediction method to calculate the regional building load based on the heat transfer coefficient method is preferred.
The hourly load of the block on the energy demand side of the region is: ; q x denotes the design of daily cooling or heating load indexes of specific types of building (kW/m 2 ) from the simulation software; and x denotes the building type, with x = 1 for residential building, x = 2 for department store, x = 3 for office building, x = 4 for hotel building, and x = 5 for school building. The design load of the block is: Q D j denotes the maximum of the hourly load (kW); and f denotes the coincidence factor, in consideration of different simultaneous uses in different building.
The total capacity of the energy station is: Z jk is a 0-1 variable, denoting the distribution relationship of blocks and stations; Z jk = 1 for station k provides the energy for block j, or Z jk = 0.

Graph Theory-Based Structural Model
The regional integrated energy network could be described as an undirected graph with weight, G = (V, E, Q, D), with vertex set V, edge set E, vertex weight set Q, and edge weight set D. The diagrammatic structure graph of RIES is shown in Figure 2a.
. . , V 0 denotes the energy sources set, represented by triangles in the graph, such as water resources, ground sources, and where the energy station absorbs energy. The position of the energy source has a great influence on the selection of energy stations. They would be closer with better energy efficiency and economy. V 1 = v 1 k k = 1, 2, . . . , V 1 denotes the set of energy stations, represented by small squares in the graph. V 2 = v 2 n n = 1, 2, . . . , V 2 denotes traffic intersection sets, represented by small dots on every intersection of two lines. V 3 = v 3 j j = 1, 2, . . . , V 3 denotes blocks to be served in the design region set, represented by big dots. E = e(v, v ) v, v ∈ V denotes city road sets, along which the pipeline should lay according to specification. e is a 0-1 variable, reflecting the adjacency relationship between two vertexes. Q = q(v) v ∈ V 3 denotes the load set of vertexes V 3 . D = c(e) e ∈ E denotes the weight set of edges, representing the costs of the pipeline.
Spanning tree, which is characterized by no-loop and ergodicity, is a very important concept in graph theory. The pipeline networks of the system can be described as the spanning tree T = (X, L, W), T ⊂ G, T ∅. The diagrammatic structure graph of the tree-shaped pipeline network is shown in Figure 2b. Tree T is the nonvoid proper subset of graph G, X = X V a a = 0, 1, 2, 3 , X ⊂ V, X V a = X ∩ V a , denotes the vertex set of the tree, the constraint condition is X V 1 = 1 , tree T contains only one energy station v 1 k . L = {l i |i = 1, 2, . . . , |L|} denotes the pipeline set. In this model, water supply and return pipes are simplified to a single line l. W = w(l), l ∈ L denotes the weight set of edges. w(l) = l ×Q l 0.5 denotes loads along the pipes, Q l i = i i=1 Q f i is the accumulated load of all downstream points to be served. W changes with the connected relationship of the pipeline network layout, so it is the dynamic weight set of the edges of the tree.

The Improved Prim Algorithm
The Prim algorithm is one of the most common greedy algorithms for a weighted undirected graph to find its minimum spanning tree, including every vertex in it, where the total weight of the edges in the tree is minimized. The basic idea of this algorithm is that it operates from an arbitrary starting vertex, one vertex at a time, and at each step it adds the cheapest possible connection, until vertexes are added to the spanning tree. The transmission and distribution network is characterized by the network topology, and the best layout can be calculated [32][33][34][35]39,40]. However, the calculations of most of the studies directly use the Prim or Kruskal algorithms with a distance weight set, and not enough details. This paper puts forward an improved Prim algorithm in accordance with the design idea of cold and heat pipelines of HVAC. It operates from the vertex representing the energy station. The weight set represents the costs of the edges, and the weight of every added edge is updated at every step. For example, the small blockage denotes an energy station for hot water supply, and the dots denote several load points. The best pipeline network layout is calculated by using the Prim and improved Prim algorithm, respectively. The calculation result of contrast is shown in Figure 3. The layout (a) of pipelines could be more uniform and stable by using the improved algorithm. The total pipeline length of (b) could be shorter, but the most unfavorable pipe section is much longer than in (a), which means the on-way resistance is obviously and unreasonably large.

Objective Function
On the basis of the graph G of the regional energy system, the set T k , including all lode vertexes of V 3 , is found to minimize the lifetime costs of this energy system in the region. The model is called the best economic model, which can be described to find the set T k = T k i i = 1, 2, . . . , k , making the object function true.
The objective function is a discrete optimal control problem. In this formula, P(T) denotes the collection of all energy pipeline network layout diagrams T; T k denotes the number of its elements is k, for the number of energy stations; and T k i is the ith element of T k . The lifetime costs of this energy system in the region are: C in denotes the initial investment of the system; C op denotes the annual operating costs; i 0 denotes the benchmark discount rate; and m denotes the life cycle.
The initial investment is: The initial investment of the regional energy system mainly contains the costs of the energy station room, equipment unit, and the pipeline network. The civil construction costs of the energy station room are: This paper combines engineering examples, fitting the linear regression equation for load Q ES k and the station room costs C in, f w p f w denotes the unit price of civil construction (RMB/m 2 ). S k denotes the room area of the energy station m (m 2 ); The costs of equipment are: q k,n denotes the nth equipment unit of the kth energy station (RMB/kW); and Q ES k,n denotes the design capacity of the equipment unit (kW).
The costs of the cooling and heating pipeline network are: The annual operating costs of the energy system generally include management costs, energy consumption costs, and operating costs of the transmission and distribution network. The annual management costs are: g denotes the annual management costs index (RMB/kW); the management costs can be estimated by loads. The energy consumption costs are: Q i denotes the usage amount of energy; P i denotes the unit price of ith energy; Z 0−1 is a 0-1 variable, and Z 0−1 = 1 for the energy station uses the energy, or Z 0−1 = 0.
The costs of the transmission and distribution network are: COP ES denotes the performance coefficient of the system; c e denotes electricity price (RMB/kWh); r denotes the loading rate of the pumps; τ r denotes the unit operation time at a certain loading rate.

Constraints
The constraints limit the maximum distance of the transmission and distribution network and the correspondence between the energy stations and the load blocks. All load blocks in set V 3 should be divided into k parts and one energy station serves one part. The network layout T k i denotes a subsystem of the network layout; X i,V 3 denotes the set of all load blocks in T k i . X i,V 1 denotes the energy station in T k i . W DIS denotes the distance set of T k i .
This constraint assures one load block can only map to one energy station and every load block in set V 3 is served. One load block cannot be served by two or more of the energy stations.
This constraint assures that there must be only one energy station in a subsystem of the network layout.
The initial investment and the operating costs of the transmission and distribution network increase with the service range. This constraint assures that the longest distance from an energy station to its load blocks cannot be more than 3.0 km [41].

Algorithm Realization
In the flow chart of the regional energy system's optimum economic distribution algorithm, T K is assumed as the set of dynamic minimum spanning trees, and K is a cyclic variable that represents the number of elements of the tree in the set of T K . P(V 1 , K) is assumed as the set of selected energy stations, N is a cyclic variable that represents the number of elements in the set of P(V 1 , K), and P N (V 1 , K) represents the nth element of the set P(V 1 , K).
The specific process of the algorithm is as follows: Initially, establish the structure graph G = (V, E, Q, D), forecast the load of all points in set V 3 , set all the initial parameters, and let variables K = 1, SSmin = ∞, N = 1, flag = 0.
Step 1: get minimum path matrix Step 2: if K > |V 1 |, go to step 13, otherwise, execute step 3; Step 3: get set P(V 1 , K), the set of all subsets of set V 1 , and the number of elements of every subset is K; Step 4: if N > P(V 1 , K) , go to step 12, otherwise, execute step 5; Step 5: if the path between v i 3 and v j 1 is the shortest compared to v 1 , then distribute v i 3 into X j , until all the elements of set V 3 are distributed, to finally get the set of X K in T K ; Step 6: if the longest distance between every load point and its corresponding energy station is more than 3 km, go to step 7, otherwise, go to step 8; Step 7: flag = 1, go to step 10; Step 8: improve the Prim algorithm, and get the set of dynamic minimum spanning trees by using it; Step 9: calculate objective function LCC, then sum up and get SS; Step 10: if SS is the least in the loop and flag = 0, update SSmin, and save P N (V 1 , K), and T K , otherwise, go to step 11; Step 11: N = N + 1, SS = 0, flag = 0, go to step 4; Step 12: K = K + 1, go to step 2; Step 13: output SSmin, P N (V 1 , K) and T K . At this point, the algorithm ends. And the flow chart is as follows: (Figure 4)

Case Study
This paper analyzes a large-scale RIES of a China-U.S. low-carbon demonstration city. The city is designed to serve about 150,000 local residents. This project adopts integrated energy for the municipal heat source, ice storage, natural gas distributed energy, ground source heat pump, and renewable water source heat pump. This region is equipped with 19 sub-section posts and natural gas pipeline networks, generally uniformly distributed, and there is a renewable water plant by the river, northwest of the region. Its processing capacity is 20,000 tons of water, 12 • C in winter, 25 • C in summer, per day. A large area of green space is planned, which will provide congenital advantages for the use of the soil source heat pump system. There is a local heating power company, whose heat supply network covers this design area. The access point of the municipal heat source network is located at the intersection of two main roads. When any energy station fails, the municipal heat source will be used as a backup heat source to directly heat the buildings in the area. The regional energy distribution map is shown in Figure 5a. The system covers a total planned area of 18.1 million square meters. The construction area for the efficient cooling and heating is planned to be 6 million square meters. The area distribution table of each type of building is shown below ( Table 2). According to the principle of energy station selection, energy stations should be located close to energy sources and the load position, but far from prosperous central parts of the city or areas requiring lower noise. There are eight probationary energy stations, from which 85 blocks should be served, as shown in Figure 5b. The type of block is defined as the type of building of the largest area. This chapter aims to choose the best part of these eight energy stations and to design an optimal pipeline network layout, so that this system can obtain the optimum economy using the mathematical model put forward above. According to the energy type recommended level based on evaluation indexes, these eight energy stations connect properties of recommended energy types and their forms of utilization. The system adopts a multi-source tree-shaped network, and the temperature of the chilled water supply and return water is 4/11 • C in summer, while that of the hot water supply and return water is 55/45 • C in winter.

Forecast of the Region Load
The load of different blocks cannot be simply superimposed, considering the asynchronism of energy use and overall energy planning of the region. Software DeST is used to simulate different types of building and to obtain each type's hourly load index. The load index of a residential building is shown in Table 3. Table 3. Hourly cooling load index of a residential building. Finally, the design load of every block and the total load of the region were obtained. The total cooling load is 329.97 MW, and total heat load is 130.88 MW. Part of some blocks' cooling load results are shown in Table 4. The biggest load is at 5 pm, and the department store accounts for the largest portion of the region's total load, as shown in Figure 6.

Model Calculation
The selection of the parameters was as follows: (Table 5) The structure graph of this region is drawn based on graph theory, and its prototype comes from the original city planning diagram. As is shown in Figure 7, the energy resources, like the water resources, the access point of the municipal heat source, and so on, are represented by triangles in the graph. The numbers of the load blocks and city traffic intersections are 85 and 409, respectively. In the simulation by MATLAB R2014a, the eight preliminary energy stations provided 255 options in total, and under the constraint conditions, 87 options were still available. Figure 8 shows that there is a great difference in the costs of different options and network layouts. The maximum of life cycle costs reached 2.45 billion RMB, 9.8% more than the lowest. This result provides us with an optimal choice, represented by bigger dots in Figure 8, with the lowest life cycle costs.

Discussion
This paper discusses the optimal choice further below. The differences in costs between the three lowest-cost options are small, so the bottom three all can be listed into one selection. But from a station management perspective, the selection of four energy stations is more efficient than five stations. Therefore, the optimal network layout result, with the lowest life cycle costs, is shown in Figure 9. Four energy stations, represented with bigger squares, have been selected, and the region energy system has been divided into four subsystems. All load points have found their corresponding station from which they absorb energy. The lowest life cycle costs and the lowest costs for the transmission and distribution network are finally reached. The lowest life cycle costs of this case study are calculated to be 2.233 billion RMB. The layout of the transmission and distribution network has the shortest trunk line with many branches, making it uniform and stable. The result verifies the feasibility and validity of the model and method and helped us to comprehensively integrate regional energy and accurately plan the city.

Conclusions
This paper studied the preliminary planning of RIES. A method of energy system economic planning with graph theory-based model was applied to RIES in a China-U.S. low-carbon demonstration city. The civil construction costs of the energy station room, the equipment costs, management costs, energy consumption costs, and operating costs and initial investment of the pipeline network were considered. The energy types and use are closely related to the system economy. National energy policy affects largely the energy types and utilization forms, and public subsidies should be added to the life cycle costs of the energy system. Specifically, some conclusions were obtained, as follows.
The regional energies situation was analyzed from the aspects of energy consumption, environmental influence, and economy in the primary stage of RIES establishment. The different recommendation rates of different energy types and use are influenced by national energy policy, regional resource conditions, building formats, and so on.
The improved Prim algorithm was proved to be in better accordance with the design idea of the tree-shaped pipeline network. The improved Prim algorithm considered the accumulated load of all downstream points to be served. The calculated results of this algorithm showed the reliability and stability of the pipeline network layout.
The graph theory-based model solved the location problem of energy stations and calculated the optimal number of energy stations to be established. The optimal layout of the pipeline network was then determined. The calculation results of the study case verified the feasibility of the proposed model.