Optimization of Multiobjective Configuration of Multienergy Microgrid Based on HMM and Typical Scenarios: A Case Study of Smart Park

Decentralized regional multienergy system is one of the important development directions of energy and power systems, and researching on the optimization method of multienergy microgrid configuration could provide important support for the investment income guarantee and orderly development of regional multienergy systems. Based on a park-level multienergy microgrid, this paper proposed a multiobjective optimization model for a multienergy microgrid configuration based on the typical scenario set which was constructed by HMM. Besides, based on the actual historical data, the capacity configurationoriented planning model and component configuration-oriented planning model were analysed and compared under different external environments.(e results show that HMM has a good effect on the reduction and extraction of historical scenarios of the system. Compared with the traditional microgrid, the multienergy microgrid has better economic and emission reduction advantages. In addition, the capacity configuration-oriented planning model could reduce the investment cost by up to 62.4% compared with the component configuration-oriented planning model.


Introduction
In recent years, the depletion of traditional energy resources has enabled the development of clean energy such as wind and solar power. Building a multienergy system covering different energy types is an important trend to improve the utilization efficiency of energy terminals and to promote energy revolution [1]. e park-level multienergy microgrid or distributed multienergy system is an important starting point for realizing the interconnection and complementarity of different types of energy systems and meeting different types of energy needs of terminals in the future [2,3]. erefore, formulating multienergy microgrid planning scientifically and rationally is the key to guiding the orderly construction of multienergy microgrid and ensuring the investment economy of multienergy microgrid projects [4].
In the future, operators of multienergy microgrid will face more uncertainties in planning and investment plans. On the one hand, as a comprehensive energy service provider, the operators of multienergy microgrid need to provide users with other types of energy services, such as heating, cooling, and even gas. e uncertainty of different types of energy load must be considered at the planning level, and energy conversion devices and energy storage devices should be properly configured to ensure the reliability of multienergy microgrid system [5]. On the other hand, as an independent market entity, multienergy microgrid operators will face uncertainties in the upstream energy wholesale market and the regional distributed generation output. Operators need to consider the price of upstream electricity and natural gas, the energy purchasing strategy in the wholesale market, and the output of various types of distributed generators in the region to ensure the economy of system investment and operation [6].
At present, some studies have been carried out on multienergy microgrid configuration scheme or planning methods. A collaborative planning method was proposed for a CCHP (combined cooling, heating, and power) system and regional heating network, aiming at the lowest total annual cost. e capacity decision variables of the CCHP system and other thermal/electrical conversion equipment are discrete sets, which represent the selection decision model of the related equipment [7]. In [8], the paper proposed a multienergy microgrid planning and configuration model considering users' thermal/electrical load demand, in which the location and capacity variables of related equipment are continuous decision variables. In [9], the decision variable is the capacity of equipment. A collaborative planning model was established which optimizes the fixed capacity and site selection of new conventional generator sets, transmission lines, gas boilers, and natural gas pipelines to meet the demand of electric and thermal loads, in order to reduce the investment and operation costs of system. In [10], aiming at the problem of capacity selection of isolated microgrid energy storage system, the paper proposed a method of capacity configuration of hybrid energy storage system based on the probability model, which could ensure the flexibility, reliability, and economy of the microgrid system. In [11], a method for determining the configuration capacity of different types of energy storage systems in microgrid is proposed. e optimal system capacity in microgrid group can be calculated by the given maximum allowable continuous off-grid operation time and the expected stable operation time under extreme conditions. e validity and correctness of this method are verified by the design of a demonstration project of microgrid group in Guangxi, China. In [12], a joint optimization model for planning and operation of comprehensive energy system is constructed with the number of equipment as the decision variable. e optimal planning scheme including equipment combination, number of equipment, energy distribution network planning, and operation strategy is solved through mixed integer linear programming. In [13], aiming at the optimization of distributed generation system of cogeneration, a multienergy station interconnection planning method based on 0-1 mixed integer linear programming was proposed.
In summary, there are mainly two different planning ideas in comprehensive energy system planning; the main difference lies in the variable nature of the equipment capacity decision variables, but few literatures consider multienergy planning and a variety of uncertain factors at the same time and put the two planning schemes in the same external environment for quantitative analysis and comparative study.
In view of this, we consider the scale of historical data and uncertainties of distributed renewable power generation, upstream electricity wholesale market prices, user power consumption, and heating, cooling, and other types of energy load. Based on the basic framework of multiobjective optimization, this paper proposed a multienergy microgrid planning and configuration optimization model based on the typical scenario set which was constructed by HMM. By comparing the optimization models of multienergy microgrid under two different planning ideas, the economics, emission reduction, and engineering applicability of the two planning models were analysed, aiming to provide an effective decision-making analysis tool for future multienergy microgrid planning.

Basic Architecture of a Multienergy Microgrid Configuration Optimization Model
A multienergy microgrid configuration optimization model is proposed for smart park with the basic objectives of minimum annual costs of multienergy microgrid (including the equivalent annual value of investment and operation and maintenance costs) and minimum carbon emission intensity. e model mainly considers uncertain factors such as the distributed renewable power generation, upstream electricity wholesale market price, and various types of energy consumption. In this paper, it is assumed that power and heat flow can be exchanged between the nodes in the system, and the cooling demand of the nodes needs to be met by the refrigeration equipment of the nodes. At present, there are two kinds of planning models to plan and configure components in microgrid system: one is to determine the investment decision and capacity of each component in the optimization model, in which the investment capacity is a continuous variable [14]; secondly, in the planning model, we only consider the optimal component allocation decision-making scheme with fixed capacity, in which the investment capacity of each component is a certain value or the investment capacity is a finite set of discrete data [15]. In this paper, the planning and investment decisions of CHP, heat pumps, absorption refrigerators, gas boilers, and other thermoelectric replacement equipment as well as renewable distributed power and electric energy storage equipment in traditional microgrids are mainly considered. At the same time, considering that most of the multienergy microgrid systems are based on the infrastructure or basic architecture of the existing traditional microgrid, this paper will not consider the investment decision of distribution lines among energy-using nodes, but only the investment planning decision of thermal pipeline network [16]. e two planning models are of practical engineering significance.
e first "capacity configuration-oriented" planning model can more accurately determine the investment capacity of each component and can provide more accurate decision analysis tools for multienergy microgrid operators. However, because both investment decision and investment capacity are decision variables, the nonlinear objective function and constraints in the model will increase the difficulty of solving the model, so it is necessary to linearize the model. e second kind of "component configuration-oriented" planning model has a simpler mathematical expression, and the model is less difficult to solve. e basic framework of the two models is shown in Figure 1.

Multienergy Microgrid Configuration
Optimization and Typical Scenarios of Construction Methods

Capacity Configuration-Oriented Planning Model
3.1.1. Objective Function. e "capacity configuration-oriented" planning model takes the minimum total annual fee cost and the lowest carbon emission intensity of a typical annual as the target to build an optimization model of multienergy microgrid configuration. e objective functions are as follows: where the objective function F 1 (x) indicates the minimum total annual cost of the system; function F 2 (x) indicates the lowest carbon emission intensity of the system; C T is the total annual cost of the system; C I and C OM , respectively, represent the annual investment cost and operation and maintenance cost of each equipment in the multienergy microgrid; C em T represents the carbon emission intensity of the system; and C em in and C em out , respectively, represent the carbon emission intensity of internal energy production and external energy purchase. e specific mathematical expressions of C I , C OM , C em in , and C em out are shown in formulas (3)-(7).
Energy price scenario in upstream wholesale market Different types of load data scenarios, such as electricity, heat, and cooling, for each node in the system area Technical parameters for operation of systems and components Laying distance of thermal pipe network between nodes

Mathematical Problems in Engineering
In formula (3), T , a ts T , and a p T , respectively, represent the fund recovery coefficient of the equivalent annuity of CHP, absorption chiller, heat pump, distributed photovoltaic, distributed fan, gas boiler, thermal and electrical energy storage, and heat storage devices as well as the heat pipe network equipment. e specific mathematical expression is as shown in formula (7). Ω i represents the collection of optional access devices in the multienergy microgrid; c represents the 0-1 decision variable that takes node i as the upstream supply node to lay heating pipeline to node j.
In formula (4), p ω i represents the probability of planning scene ω i ; λ G ω i ,t and λ E ω i ,t , respectively, represent the natural gas price and day-ahead electricity price at time t in scene ω i ; d represent the purchase and sale of electricity from the multienergy microgrid to the main network; δ chp , δ ch , δ bo , δ wt , δ hp , δ pv , δ st , δ es , and δ hs , respectively, represent the unit capacity/area maintenance cost of CHP, absorption chiller, gas boiler, distributed fan, heat pump, distributed photovoltaic, photothermal, electric energy storage, and heat storage equipment, where CHP and distributed fans are related to their actual electrical output P chp i,ω i ,t and P wt i,ω i ,t at a certain time; gas boilers are related to the actual thermal output Q bo i,ω i ,t at a certain time; the absorption refrigerator is related to the heat Q ch i,ω i ,t consumed at a certain time; the heat pump is related to the actual consumption of electricity D e,hp i,ω i ,t at a certain time; distributed PV and photothermals are related to the construction scale B pv i and Y st i ; electrical energy storage and heat storage equipment are related to the actual electrical and thermal energy storage E es i,ω i ,t and E ts i,ω i ,t at a certain time. Formulas (5) and (6), respectively, represent the carbon emission intensity caused by internal and external energy consumption of the multienergy microgrid. f G and f E grid , respectively, represent the carbon emission intensity of natural gas per cubic meter and the carbon emission intensity of electric energy per kilowatt-hour purchased by the main grid.

Mathematical Problems in Engineering
Formulas (8)-(10), respectively, represent the electric power balance, heat balance, and cold balance at node i in time period t under planning scene ω i . P pv i,ω i ,t represents distributed PV output at node i in time period t under planning scene ω i ; P es,dis i,ω i ,t and P es,ch i,ω i ,t , respectively, represent the discharge and charging power of the electrical energy storage equipment at node i in time period t under the planning scene ω i ; P S,in i,ω i ,t and P S,out i,ω i ,t , respectively, represent the main network output and power supply to the main network of node i in time period t under planning scene ω i ; P in,j i,ω i ,t and P out,j i,ω i ,t , respectively, represent the electric power injected from node j to node i and from node i to node j in time period t under planning scene ω i . O(i) represents the set of nodes connected to node i. θ e represents the comprehensive line loss rate of the region. Q chp i,ω i ,t and Q st i,ω i ,t represent the thermal power of CHP and photothermal equipment at node i in time period t under planning scene ω i ; Q ts,dis i,ω i ,t and Q ts,ch i,ω i ,t , respectively, represent the heat release and heat storage power of the heat storage equipment at node i of time period t under the planning scene ω i ; Q hp,th i,ω i ,t is the heat power of the heat pump at node i in time period t under planning scene ω i ; Q in,j i,ω i ,t and Q out,j i,ω i ,t , respectively, represent the power injected from node j to node i and the thermal power injected from node i to node j in the planning scene ω i at time period t. D e i,ω i ,t and D c i,ω i ,t , respectively, represent the electrical and cooling load requirements of node i in time period t under planning scene ω i ; D wth i,ω i ,t and D rth i,ω i ,t , respectively, represent the requirements of hot water heating load and other thermal load at node i in time period t under planning scene ω i ; θ th represents the heat loss of hot pipe per unit length; Q hp,c i,ω i ,t and Q ch,c i,ω i ,t , respectively, represent the cold power of heat pump and absorption refrigerator at node i in time period t under planning scene ω i . Formulas (11) and (12) show the constraint of power exchange between the multienergy microgrid and the main network. Equation (13) is the constraint of the electric power exchange between nodes.
(2) ermal pipeline topological constraint: Formula (14) indicates that only one node between any two nodes i and j can be used as the upstream heating node. Formula (16) indicates that node i can only provide heat for other nodes as an upstream node at most. Formula (17) is the degree limit of the nodes in the directed graph formed by the thermal pipelines and is used to avoid the existence of a loop in the directed graph. Formulas (14)- (17) show the topological structure constraint of the multienergy microgrid thermal pipeline, mainly considering that the actual thermal pipeline network is basically laid in a tree structure in order to avoid heat backflow, which causes difficulties for heating system pressure and heat control [17]. Equation (18) expresses the constraints on the influence of thermal pipeline construction on the heat exchange between nodes. (3) Device selection constraint: Formula (19) indicates that only one type of heat pump and absorption refrigerating machine can be Mathematical Problems in Engineering installed in the same user node, mainly considering the limitation of available installation space in the user's indoors or building. x ch i and x hp i , respectively, represent the 0-1 decision variable of investment in the heat pump and absorption refrigerator at node i; formula (20) represents the land occupation constraints of photothermal and distributed photovoltaics. e area where the same user node has installed solar thermal and distributed photovoltaic conditions is limited (such as available roof area), and the two investment of has certain mutual exclusion. (4) Equipment investment constraints: where B k cap,up and B k cap,low , respectively, represent the upper and lower limits of CHP investment capacity on a single node. (5) CHP operation constraints: where η chp e and η chp th , respectively, represent the electricity conversion and heat conversion efficiency of CHP; formula (21) represents CHP construction investment decision and capacity constraint; and equations (22) and (23) represent the constraints of CHP's electrical and thermal output, respectively. Formula (24) is the constraint of CHP natural gas consumption. (6) Operation constraints of electric energy storage equipment and heat storage equipment: where η es,ch and η es,dis , respectively, represent the charging and discharging efficiency of the electric energy storage equipment and η ts,ch i and η ts,dis i , respectively, represent the heat storage and heat release efficiency of the heat storage equipment. Formula (27) indicates that on the typical day represented by the planning scene, the electricity and heat storage in the initial period is equal to the electricity and heat storage in the end period, which is mainly used for the programming model to solve the relationship between different planning scene. (7) Operation constraints of distributed wind turbines: where x wt i is a 0-1 variable, indicating whether there are installation conditions for distributed wind turbine installation at node i; v i,ω i ,t is the wind speed at node i at time t in the planning scene ω i ; and v ci , v rat , and v co , respectively, represent the cut-in, rated, and cut-out wind speed of the fan. (8) Operation constraints of distributed photovoltaic and photothermal equipment: Formula (29) represents the equipment operation constraints of distributed photovoltaics. Formula (30) represents the operation constraints of photothermal equipment. θ pv i represents the photovoltaic installed capacity per unit area at node i; r i,ω,t represents the light radiation intensity at node i at time period t in the planning scene ω i ; r rated,pv i,ω,t and r rated,st i,ω,t , respectively, represent the rated light radiation intensity of distributed photovoltaics and distributed wind-heating equipment; η pv and η st , respectively, represent the power generation and heating efficiency coefficients of distributed photovoltaics and photothermal equipment. (9) Heat pump operating constraints: Mathematical Problems in Engineering where η ch represents the efficiency coefficient of the absorption chiller. (11) Gas boiler operational constraints: where η bo represents the combustion efficiency coefficient of the gas boiler.

Component Configuration-Oriented Planning Model
e "component configurationoriented" planning model still aims at the minimum total annual cost and the lowest carbon emission intensity of the system in a typical middle year. Unlike the "capacity configuration-oriented" planning model, the investment capacity of the CHP, heat pump, absorption refrigerating machine, and gas boiler in this model are no longer continuous decision variables but are determined by the available equipment set. e equipment investment capacity of the equipment set is determined; that is, "component configuration-oriented" is mainly an investment decision and equipment selection problem. Based on the above assumptions, the composition of the objective function of the "component configuration-oriented" planning model is basically the same as that of the "capacity configurationoriented" planning model, but formulas (3) and (4) need to be adjusted, as shown below: where Ω chp ∈ Π chp , Ω hp ∈ Π hp , Ω ch ∈ Π ch , and Ω bo ∈ Π bo , respectively, represent the indicated ordinal number of the CHP, heat pump, absorption refrigerating machine, and optional equipment of gas boiler; Π chp , Π hp , Π ch , and Π bo , respectively, represent the optional equipment sets for the CHP, heat pump, absorption refrigerating machine, and gas boiler; S chp i,Ω chp is a 0-1 decision variable; Ω chp represents whether to choose to install CHP with indicated ordinal number at node i; B , respectively, represent the electricity output, heat consumption, heat supply, and power consumption of CHP, absorption refrigerating machine, gas boiler, and heat pump selected at node i with the serial numbers of Ω chp , Ω ch , Ω hp , and Ω bo at time period t under the planning scene ω i . e remaining variables in formulas (38) and (39) are defined in the same way as in formulas (3) and (4).

e Constraint
(1) Energy balance constraint: the energy balance constraint in model 2 needs to be adjusted to formulas (8)-(10) in model 1, as shown below.
where Q (2) Device selection constraint: the constraint of equipment selection requires the adjustment of formula (19) in the "capacity configuration-oriented" planning model, as shown below.
where equations (41) and (43), respectively, indicate that the CHP and gas boiler can only be installed in one of the available equipment types at a certain node i; formula (43) indicates that heat pump and absorption refrigerating machine can only be installed one way in the same user node and only one way in the optional equipment type. e constraints on photothermal and distributed photovoltaic occupancy area in model 2 are still the same as in model 1.
(3) Equipment operation constraints: in model 2, equipment investment constraints need to be adjusted to formula (21) in model 1, as shown below.
where B k Ω k represents the equipment capacity indicating ordinal number Ω k , and it is the determined value. S k i,Ω k represents the 0-1 decision variable of whether to install the k equipment (except heat pump) with indicating ordinal number Ω k at node. Since the investment capacity of heat pump in model 2 is no longer a continuous variable but a fixed value, no auxiliary variables should be set to linearize the constraints. (4) CHP operation constraints: in model 2, equipment operation constraints need to be adjusted to formula (22) in model 1, as shown below.
(5) Operation constraints of heat pump: the investment and operation constraints of the heat pump require the adjustment of formulas (31)-(35) in the "capacity configuration-oriented" planning model. e adjusted constraints are as follows: (7) Operation of gas boiler constraint: the investment and operation constraints of gas boiler require the adjustment of formula (37) in the "capacity configuration-oriented" planning model, as shown below.

Generation of Typical Scenarios Based on HMM.
Due to the complex operating conditions of the multienergy microgrid system, the historical data are usually characterized by large scale and high dimension, which brings great difficulties to the optimization calculation. Stochastic generation of typical scenarios based on HMM can effectively identify and compress the number of data of the system, thus improving the computational efficiency. e model uses matrix transformation and cubic transformation to obtain the correlation matrix and stochastic moments of the historical scenes. Four indicators, expectation, standard deviation, skewness, and kurtosis, were selected to represent the deviation degree of the generated typical scenarios and the historical scene so as to measure and evaluate the accuracy and rationality [18,19]: (1) Distributed wind power output, distributed photovoltaic output, electricity, heat, cooling load, and upstream wholesale market price scene were selected as characteristic variables. Equation (49) is used to generate target moments and target correlation matrix (R), and the normalization is processed, where D NM i,k are k normalized moments of column i vector and D M i,k are k target moments of column i vector. k � 1, 2, 3, 4, respectively, represent expectation, standard deviation, skewness, and kurtosis, and i � 1, 2, 3, 4, 5, 6 are the selected characteristic variables, that is, distributed wind power output, distributed photovoltaic (thermal) power, electricity, heat, cooling load, and upstream wholesale market price.
(2) N-dimensional random matrix X n×m could be randomly generated by using the selected characteristic variables of wind power output (X1), photovoltaic output (X2), electrical load (X3), heat load (X4), cooling load (X5), and upstream wholesale market price (X6). (3) Transform X n×m into a matrix Y n×m to satisfy R through matrix transformation, as shown in equation (50), where L is the lower triangular matrix obtained by the decomposition of C by Cholesky. en, transform Y n×m into the matrix Z n×m in the normalized case through equation (51) so as to satisfy the assumption in equation (52) that the moment of the matrix D i,k (Z i ) in the target scene is equal to D M i,k so as to achieve ai, bi, ci, and di in equation (51).
(4) When the error meets the set threshold, equation (53) is used to calculate the uncertainty matrix U V � [u

Analysis of Examples
In this part, based on the actual data of the thermal/electrical load and load node distribution distance in a microgrid pilot project, the CPLEX solver will be used in the software environment of Matlab2014a to solve the configuration model of the multienergy microgrid.

Model Parameters and Random Scene.
is microgrid pilot project has a total of eight load clusters, among which load clusters 1-5 are mainly residential user load, load clusters 6 and 7 are small commercial loads, and load cluster 8 is mainly industrial load. According to the overall planning scheme of the regional government, considering the scale of land available for construction of thermal pipeline networks between load clusters, the distance between each load node is shown in Table 1.
e technical parameters of each component of the multienergy microgrid are shown in Table 2, and the investment and operation and maintenance costs are shown in Table 3.
is part assumes that the operation period of distributed photovoltaic, distributed wind power, CHP, heat pump, gas-fired boiler, absorption refrigerator, and heat pump equipment is 20 years. e operation period of electric energy storage and heat storage equipment is 15 years; the operation period of the thermal pipe network is 30 years.
In this paper, the historical actual load data of the smart park are used as the original historical data of various types of load in the model. e day-ahead market electricity price of the Australian Energy Market Operator (AEMO) from 2013 to 2016 is used as the historical data of the day-ahead purchase price of multienergy microgrid. e price of natural gas purchased on the operation of multienergy microgrid is a fixed value of 2.63 yuan/m 3 .
In the process of generating a planning model which can optimize the planning scene, this paper, based on the uncertainty of the original historical data, first builds user electricity, heat, cooling load, the upstream wholesale market price, distributed wind power, and distributed photovoltaic (thermal) uncertainty of the efforts of the original scene. Because the original scene contains historical data from 2013 to 2016 and distributed photovoltaics, wind power, and so on have great uncertainty in long time scale, the large amount of historical data makes the calculation more difficult simultaneously, and this paper reduces the original uncertainty scenario based on HMM. e relative errors of expectation, standard deviation, skewness, and kurtosis between typical scenarios and historical scenes are shown in Table 4.
As shown in Table 4, after reaching 12 scenarios, the relative error of the expectation, standard deviation, skewness, and kurtosis with historical data is relatively stable. Considering the solution scale of the programming model and the probability measure of the uncertain scenarios, 12 typical scenarios are finally formed based on HMM, and the probability parameters of each scenarios are shown in Table 5.
In conclusion, taking the typical scene set constructed in Table 5 as the planning boundary, the two types of planning models are solved, respectively, to obtain the planning and configuration scheme of a multienergy microgrid in an intelligent park based on the above load data.

Solution Results of the Model.
In order to analyse the applicability of the above planning model, this part will set three different planning external environments to solve and calculate the above two planning models. e three external environments are as follows: External environment 1: traditional planning environment. e configuration of CHP, renewable distributed power supply, absorption refrigerating machine equipment, and the coordinated planning of the heating pipe network are not considered in this region. It is considered that heating relies on traditional electric refrigeration/electric heating technology and a gas boiler. Boilers and photothermal equipment can be used to meet part of the hot water supply load.
External environment 2: traditional power microgrid planning environment. Under the conditions of external environment 1, CHP, renewable distributed power supply, absorption refrigerating machine, heat pump, and other equipment were added. e heating is still considered to rely on traditional electric cooling/ electric heating technology.
is considers the coordinated planning and construction of microgrids and thermal pipe networks in the region.
Based on the external environments, the aforementioned multiobjective optimization model is processed with a single objective through constraints [20], and the Pareto front edges of the two different planning models are shown in Figure 2.
From the perspective of external environment, we compare the three different external environments in Figure 2; no matter which planning model is adopted, the Pareto front edge of external environment 2 is obviously lower than that of 1, and external environment 3 is lower than external environment 2. In other words, the system has better comprehensive planning benefits under external environment 3, followed by external environment 2, and external environment 1 is the worst. From the solution results of the two planning models in external environment 1, it could be found that when there is a lack of distributed renewable energy and thermoelectric replacement equipment in the system, the contribution of changing the heating structure of the user side only by relying solely on the photothermal equipment to reduce the carbon emission intensity of the system is very limited.
From the perspective of the planning model, it can be seen from Figure 2 that under the same external environment, the Pareto front of model 1 is significantly lower than that of model 2, that is, planning model 1 has better optimization results than planning model 2.
For the convenience of expression, the "capacity configuration-oriented" planning model is abbreviated as planning model 1, and the "component configuration-oriented" planning model is abbreviated as planning model 2.
e "results of planning" here refer to ten results from different planning options. e specific planning scheme is shown in Figure 3.  Figure 3(a), it can be found that from results 1 to 10, the capacity of the heat pump equipment is basically unchanged, but the capacity of the gas boiler and the photothermal equipment is gradually increased. e equipment capacity of the heat pump and gas boiler of planning model 2 is larger than that of planning model 1, and the capacity planning of photothermal in model 2 is roughly the same as in model 1. Figure 3(b) shows the planning results of planning model 1 and planning model 2 under external environment 2. As can be seen from Figure 3(b), from result 1 to result 10, the capacity of photovoltaic and CHP equipment has increased significantly, the capacity of heat pump and absorption refrigerator has remained basically unchanged, and the capacity of gas boiler has also been relatively stable. In addition, compared with model 1, the planning capacity of most of the equipment capacity is larger than that of model 2. Figure 3(c) shows the planning results of planning model 1 and planning model 2 under the conditions of external environment 3. By observing Figure 3(c), it can be found that from results 1 to 10, the capacity of heat pump and gas boiler       has shown a downward trend, while the capacity of photovoltaic, solar thermal, CHP, and other equipment has gradually increased. In addition, the equipment capacity results of model 2 are higher than those of model 1 overall. Among them, the capacity of the heat storage equipment in model 2 is significantly increased compared to model 1.
By comparing and viewing Figures 3(a)-3(c), we can find that different external environments could affect the capacity of the device. In external environment 1 and environment 2, the planned capacity of the heat pump is almost unchanged; in external environment 3, unlike the external environments 1 and 2, the capacity of the heat pump equipment changes significantly in different planning results. In addition, the capacity of the gas boiler in external environment 3 is much smaller than the results in the environment 1 and environment 2, and the capacity of the absorption chiller equipment is much larger than the results in the environment 1 and environment 2. e reason is that, compared withthe traditional microgrid, the access of diversified devices increases the available resources for optimization problems, and the planning scheme of multienergy microgrid system will be more reasonable. For example, the access of heat storage devices can loose the thermoelectric coupling of CHP so that it will have a greater regulation margin. In this way, it can better meet users' demands for different types of energy, such as electricity and heat, and also provide more regulating capacity for the system for the consumption of renewable energy power generation.
Comparing Figures 3(a)-3(c), from results 1 to 10, environmental benefits gradually dominate economic benefits during the planning process. Because the operators of the system pay more attention to reducing carbon emissions,   Length of heating pipe to be laid from node i to node j S sup,hn i,j A 0-1 decision variable for laying a heating pipeline to node j with node i as the upstream supply node Represents the natural gas price at time t in the planning scene Represents the day-to-day electricity price at time t in the planning scene     the investment capacity of distributed wind power, distributed photovoltaic, photothermal and thermal energy storage, and electric energy storage equipment is gradually increasing. Although the overall carbon intensity of the system is reduced by increasing renewable energy consumption, the investment cost of the system also rises accordingly. In addition, through a comparative observation of Figures 3(a)-3(c), it shows that planning model 1 has a lower investment capacity than planning model 2, that is, the investment cost of planning model 1 is lower than that of planning model 2.
e investment cost of model 1 was reduced by up to 62.4% compared with that of model 2. It can be concluded that model 1 has better optimization results than model 2, mainly because the constraints set by model 1 are relatively loose and more in line with the actual situation than model 2. However, since there are more decision variables in programming model 1, especially after the linearization of some constraints in the model, its computational complexity is greater than that of programming model 2.
In the calculation example simulation in this section, the calculation was conducted on the platform of Lenovo ink Centre M910 T, CPU i5-7500, 3.4 GHZ, and 16 GM memory platform. e CPU calculation time of planning model 1 was 27% higher than that of planning model 2. Due to the limited scale of the example calculated in this part, when the calculation node increases, the number of decision variables of the model will increase exponentially, which may cause planning model 1 to be unable to be solved eventually, resulting in dimensional disaster.
at is why planning model 2 has better engineering applicability. erefore, the next stage should be a consideration of how to improve the accuracy of the planning results calculated by planning model 2 and how to reduce the difficulty of solving planning model 1. One option would be to combine the two models: first, planning model 2 is used to carry out basic equipment selection and capacity determination, and then the obtained results are brought into planning model 1 to further optimize the investment capacity to improve the optimization degree of the program results under the condition of ensuring the solvability of the model (Table 6).

Conclusion
is paper proposed a multiobjective configuration model for multienergy microgrid system based on typical scenarios constructed by HMM. On the one hand, by using the HMM model, the typical scenarios could be constructed based on the historical operating data of the multienergy microgrid, which can effectively achieve scene compression and thus reduce the computation in the optimization process. On the other hand, by the comparison and analysis of two different planning models and different external planning environments, it can be seen that, compared with the traditional microgrid, the multienergy microgrid has better economy and emission reduction advantages. Particularly, the access of energy storage and different types of heating equipment can improve the optimization ability of the system in time dimension and energy variety dimension (such as the conversion of electricity demand and heat demand) and reduce the dependence on a single energy system and further increase the flexibility of the system and increase the consumption of renewable energy. By comparing the planning models of two different ideas, we can see that the results of the two planning models have relatively small differences in carbon emission intensity but have large differences in investment costs. Although the investment cost of planning model 1 is reduced by at most 62.4% compared with planning model 2, model 2 is closer to the actual situation (configuration decisions and optimization in engineering are usually based on existing equipment types in the market, that is, component-oriented) and it has better engineering applicability. erefore, in actual engineering applications, appropriate planning models should be selected to formulate plans based on the actual condition of project investment and construction. We can also consider providing a preliminary feasible solution through the "component configuration-oriented" planning model and use the "capacity configuration-oriented" planning model to optimize the configuration scheme for the second time to solve the problems. is article mainly analysed the advantages and disadvantages of the two configuration optimizations in the research but did not conduct in-depth research on how to improve the accuracy of the planning results calculated by planning model 2 and how to reduce the difficulty of solving planning model 1; further research could be carried out in the future.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.