Disclosure of Invention
The invention aims to provide an optimization method for building multi-performance oriented design, which constructs the optimization method for building multi-objective oriented design by coupling a building information modeling technology, an agent model technology, a machine learning algorithm and a multi-objective optimization algorithm and can enhance the decision efficiency and decision reliability of a building department.
The invention is realized by the following technical scheme:
a method for optimizing a multi-performance oriented design of a building comprises the following steps:
step 1, determining a building design decision target and potential influence factors thereof as an optimization target and an optimization variable respectively, and defining constraint conditions so as to construct an optimization model;
the optimization model comprises three parts of an optimization target, an optimization variable and a constraint condition:
the optimization target at least comprises the annual heating energy consumption demand of the building, the annual cooling energy consumption demand of the building and the annual thermal comfort level of the building, and the annual comfort hour proportion, namely the heating energy consumption density HEUI, the cooling energy consumption density CEUI and the annual comfort hour proportion are respectively used as measurement indexes; the calculation formulas of HEUI and CEUI are as follows:
wherein, EUhiAnd EUciRespectively representing the time-by-time heating energy consumption demand and the cooling energy consumption demand, NhRepresents the heating hours of the whole year, NcRepresents annual cooling hours, and M represents air-conditioning area;
the annual cumulative comfort CTR is adopted as a thermal comfort measure, and the CTR calculation formula is as follows:
wherein T represents a comfort index, NPDenotes the total number of hours, TupperAnd TlowerThe upper and lower boundaries of the thermal comfort zone;
Tupperand TlowerThe calculation formula of (a) is as follows:
wherein, TcIndicating the temperature of the indoor thermal center, TdRepresents the thermal comfort bandwidth, which is 7 ℃ when considering 80% acceptability;
the optimization variables at least comprise design parameters of heat preservation, density and specific heat of an outer wall and a roof, heat preservation of an outer window, solar heat gain coefficient, window-wall ratio and air tightness related to building form and building layout;
the constraint condition is the value range of the optimization variable and is mainly limited by the building design standard required to be met;
step 2, obtaining a building performance sample library with statistical representativeness, wherein the step comprises the construction of an optimized variable sample matrix, the setting of a building physical model, the construction of a building performance output matrix and the construction of a building multidimensional input-multidimensional output sample matrix:
the method comprises the following steps of obtaining an optimized variable sample, wherein the steps of specifying the distribution form of the optimized variable, determining a sampling method, determining the size of the sample and executing a sampling process are as follows: sampling is performed on the optimized variables, and an optimized variable sample matrix X is constructed, wherein the optimized variable sample matrix X is represented by the following formula:
wherein m and n are respectively an optimized variable number and a sample number;
setting a physical model of the building: setting boundary conditions in EnergyPlus software, wherein the boundary conditions at least comprise weather files, building sizes, layout and enclosure information as non-optimized parameter information;
the construction process of the building performance output matrix comprises the following steps: sequentially reading each group of optimized variables in the X and writing the optimized variables into an IDF file of EnergyPlus software, and sequentially executing annual simulation of building performance according to time step length to obtain building performance output;
constructing an optimized performance index matrix Y as shown in the following formula:
wherein, p is the number of the performance index;
constructing a sample matrix (total sample) of multidimensional optimization variable input-multidimensional performance output:
step 3, constructing a simplified relation model between the optimization variables and the optimization targets by adopting a machine learning algorithm to serve as an agent model;
and 4, taking the agent model as a fitness function of the optimization algorithm, executing building multi-objective optimization, and obtaining a pareto optimization result.
The agent model building process of step 3 comprises the following steps:
establishing a model performance measurement index, adopting an error index specified in ASHRAE criterion 14-2002 as the performance measurement index, and when the standard mean deviation NMBE and the root mean square error variation coefficient CV-RMSE are respectively less than +/-5% and +/-15%, the model is accurate and reliable;
the formula for NMBE and CV-RMSE is as follows:
wherein, y
i,
Respectively representing a software simulation actual value, a predicted value and a mean value of the actual value, wherein n is a sample size;
dividing the total sample into two parts according to the proportion of 3:1, and respectively taking the two parts as a training set and a test set;
respectively carrying out agent model training on each building performance by taking the training set as a basis;
testing the trained agent model by taking the training set as a data base to obtain NMBE and CV-RMSE indexes of the training set;
finally, it is judged whether NMBE and CV-RMSE are less than + -5% and + -15%, respectively, to evaluate the accuracy of the model.
The optimization solution identification process of the step 4 comprises the following steps:
setting hyper-parameters including competition scale, population size, cross probability, mutation probability and maximum genetic algebra;
setting optimization variables and ranges;
setting a fitness function of the NSGA-II algorithm;
randomly generating a first generation population, wherein the population is a design scheme; calculating a fitness function value according to the fitness function;
judging whether the evolution reaches the maximum algebra; if not, selecting, crossing and mutating to generate a new population, and entering the next cycle; if yes, an optimization solution is generated.
The method has positive guiding significance for early design of the building, the provided optimization method enables the multi-objective optimization process of the building performance to be more scientific and standard, the invocation of the Energyplus software in the optimization process is reduced through the coupling agent model and the multi-objective genetic algorithm, and the optimization time is shortened.
Detailed Description
The following detailed description of embodiments of the invention will be made with reference to the accompanying drawings.
As shown in FIG. 1, the present invention is an overall flow chart of a method for optimizing a multi-performance oriented design of a building. The process specifically comprises the following steps:
step 1, determining a building design decision target and potential influence factors thereof as an optimization target and an optimization variable respectively, and defining constraint conditions;
and 2, acquiring a building performance sample library with statistical representativeness. The method mainly comprises the steps of constructing an optimized variable sample matrix, setting a building physical model, constructing a building performance output matrix and constructing a building multidimensional input-multidimensional output sample matrix.
Obtaining the optimized variable sample includes specifying a distribution form of the optimized variable, determining a sampling method, determining a sample size, and performing a sampling process. For the building performance optimization problem, the probability of each design scheme appearing can be considered as equal possibility, so the distribution form of the design variables is a continuous uniform variable. The sampling method used is Latin Hypercube Sampling (LHS), which is a method for approximating random sampling from multivariate parameter distribution and belongs to a layered sampling technology. Under the same precision, the sample size required by LHS is smaller than that of the simple random sampling, and is generally not less than 10 times of the number of sampling variables.
Adopting LHS to perform sampling on the optimized variables, and constructing an optimized variable sample matrix X as follows:
wherein m and n are respectively an optimized variable number and a sample number.
And setting a physical model of the building. Setting a physical model of the building, namely setting boundary conditions in EnergyPlus software. The method mainly comprises weather files, building size, layout, building envelope information and other non-optimized parameter information.
And (5) building a building performance output matrix. Sequentially reading each group of optimized variables in the X by adopting a Python language and writing the optimized variables into an IDF file of EnergyPlus software; and sequentially executing annual simulation of the building performance by the EnergyPlus software according to the time step length to obtain the building performance output.
The optimized performance index matrix Y is constructed as follows:
wherein p is the number of the performance index.
Constructing a sample matrix (total sample) of multidimensional optimization variable input-multidimensional performance output:
step 3, constructing a simplified relation model between the optimization variables and the optimization targets by adopting a machine learning algorithm to serve as an agent model;
and 4, taking the agent model as a fitness function of the optimization algorithm, executing building multi-objective optimization, and obtaining a pareto optimization result.
As shown in FIG. 2, the optimization model includes three parts, an optimization goal, an optimization variable and a constraint condition.
(1) Optimizing the target: the building performance greatly influenced by outdoor environment is mainly considered, the heating energy consumption requirement of the building all the year round, the cooling energy consumption requirement of the building all the year round and the thermal comfort level of the building all the year round are respectively used for heating energy consumption density HEUI (unit: kWh/m)2a) Cooling energy consumption density CEUI (unit: kWh/m2a) And annual comfort hour ratio (%) as a measure.
The calculation formulas of HEUI and CEUI are as follows:
wherein, EUhiAnd EUciRespectively representing the heating energy consumption demand and the cooling energy consumption demand (unit: kWh) by time; n is a radical ofhRepresents the heating hours of the whole year, NcNumber of annual cooling hours, M tableIndicating the air conditioning area (unit: m)2)。
On the basis of the adaptive model, the annual cumulative Comfort (CTR) is taken as a thermal comfort measure, and the calculation formula is as follows:
wherein T represents a comfort index, here room temperature, NPDenotes the total number of hours, TupperAnd TlowerThe upper and lower boundaries of the thermal comfort zone.
TupperAnd TlowerThe calculation formula of (a) is as follows:
wherein, TcIndicating the temperature of the indoor thermal center, TdRepresenting a thermal comfort bandwidth of 7 c when considering 80% acceptability.
It should be noted that the default is that the indoor hot environment meets the thermal comfort requirement during building heating and cooling. The building is in a self-running state in the transition season, and can be naturally ventilated to adjust the indoor thermal environment. The invention adopts ASHRAE-55 self-adaptive model to establish the indoor heat center temperature TcAnd the outdoor monthly average temperature TrThe relationship between the indoor temperature and the ambient temperature, to evaluate the indoor thermal environment in the transition season. Indoor neutral temperature TcThe calculation formula of (a) is as follows:
Tc=0.31×Tr+17.8
(2) optimizing variables: passive parameters are taken as main parameters and are related to performance parameters of building components, such as design parameters of heat preservation, density, specific heat and the like of an outer wall and a roof; design parameters such as heat preservation, solar heat gain coefficient and the like of the external window, design parameters such as window-wall ratio, air tightness, building layout (orientation) and the like related to the building form.
(3) Constraint conditions are as follows: the boundaries of the optimized variables should preferably meet the requirements in the current relevant design standards, and for variables that are not well defined in the standards, it should be ensured that the prior art in the market can achieve this.
The objective function (fitness function) is as follows:
fig. 3 is a flowchart illustrating the sample database acquisition process according to the present invention. The method specifically comprises the following steps:
obtaining an optimized variable sample with statistical significance comprises the steps of specifying the distribution form of optimized variables, determining a sampling method, determining the size of the sample and executing a sampling process; this step is done in Python programming language, all alternatives are equally possible for early building design, thus setting the optimization variables to be continuously and uniformly distributed to fully cover the building feature space. The sampling method used is Latin Hypercube Sampling (LHS), which is a method for approximating random sampling from multivariate parameter distribution and belongs to a layered sampling technology. Under the same precision, the sample size required by LHS is smaller than that of the simple random sampling, and the sample size is generally not less than 10 times of the number of sampling variables.
Adopting LHS to perform sampling on the optimized variables, and constructing an optimized variable sample matrix X as follows:
wherein m and n are respectively an optimized variable number and a sample number. Each sample is a set of design solutions.
And (5) building a physical model of the building. And setting a physical model of the building, namely simulating the set boundary conditions of the building in EnergyPlus software. The method mainly comprises weather files, building size, layout, building envelope information and other non-optimized parameter information.
And (5) building a building performance output matrix. Sequentially reading each group of optimized variables in the X by adopting a Python language and writing the optimized variables into an IDF file of EnergyPlus software; and sequentially executing annual simulation of the building performance by the EnergyPlus software according to the time step length to obtain the building performance output. The step consists of two cycles, which are completed by coupling Python programming language and EnergyPlus;
the building performance output matrix Y is shown as follows:
wherein p is the number of the performance index.
Constructing a sample matrix of multi-dimensional optimization variable input-multi-dimensional performance output:
as shown in fig. 4, the agent model building process mainly includes the following five steps:
establishing a model performance measurement index: the error index specified in ASHRAE criterion 14-2002 is used as a performance measurement index, and when NMBE and CV-RMSE are respectively less than +/-5% and +/-15%, the model is accurate and reliable;
dividing samples: total samples were as follows 3:1, dividing the ratio into two parts which are respectively used as a training set and a test set;
training a model: respectively carrying out agent model training on each building performance by taking the training set as a basis;
test model and evaluation model: testing the trained agent model by taking the training set as a data base to obtain NMBE and CV-RMSE indexes of the training set;
finally, it is judged whether NMBE and CV-RMSE are less than + -5% and + -15%, respectively, to evaluate the accuracy of the model.
As shown in fig. 5, a simplified flowchart of the pareto solution set acquisition includes the following specific operation steps:
and taking the constructed proxy model of the building performance as a fitness function of the NSGA-II, setting a super parameter, executing an optimization process, and finally obtaining a group of pareto optimization solutions. In the NSGA-II algorithm, a roulette selection method and a two-point crossover are selected, and main super parameters comprise competition scale, population size, crossover probability, variation probability and maximum genetic algebra.
FIG. 6 is a flow chart of a computational process of the multi-objective optimization method. First, the optimization variables and ranges are set, and a fitness function is specified. A first generation population is then randomly generated, which is the design solution in this study. And calculating a fitness function value according to the fitness function. And judging whether the evolution reaches the maximum algebra. And if not, selecting, crossing and mutating to generate a new population, and entering the next cycle. If yes, generating an optimized solution.
FIG. 7 is a schematic diagram of a process in which a proxy model participates in optimization as a fitness function. And inputting the design scheme into the fitness function to obtain a corresponding fitness function value. The fitness function value is the optimized target value. Screening the individuals with high fitness function values is to select some design schemes with better performance according to the optimization target. Cross-mutation refers to changing component variable parameters according to cross-probability exchange and according to mutation probability, respectively. A new generation of population is a new set of design solutions.
The invention mainly provides guidance for early design of buildings and serves building designers; the method provided by the invention is not only suitable for residential buildings, but also suitable for other building types such as large public buildings and the like. The following description will be given only by taking a certain residential building as an example.
The optimization method is shown by taking a certain residential building in Tianjin city as an example. The building has three layers, namely, the north is sitting and the south is facing, and each layer is provided with three units. Total building area 1029.6m2The floor area is 31.2m × 11.0m (length × width), the layer height is 2.9m, and the figure coefficient is 0.299. The aim is to optimize the heating energy consumption, the cooling energy consumption and the indoor comfort of the building on the premise of meeting the requirements of the passive house.
(1) Firstly, determining an optimization variable and a value range. The optimization variable range mainly refers to relevant regulations of 'residential building energy-saving design standards in severe cold and cold regions' JGJ26-2010 and 'passive low-energy-consumption residential building energy-saving design standards'. The optimized variables and value ranges are shown in Table 1
TABLE 1
(2) And sampling the optimized variable by adopting an LHS method, wherein the sample size is 1100. And sequentially executing the annual dynamic performance simulation of the building by coupling Python and EnergyPlus software to obtain an optimized performance output matrix. For the convenience of optimization, heating and cooling energy consumption is integrated into an optimization target, namely the annual HVAC energy consumption (EUI) of the building.
And combining the optimized variable matrix and the optimized performance output matrix to form a total sample. In the sample, the EUI distribution ranged from about 13 to 27kWh/m2a, CTR of about 0.82-0.87%.
(3) And constructing a proxy model of the building performance by adopting a Gradient Boosting Decision Tree (GBDT) algorithm. The agent model has better fitting performance between the predicted value and the simulated value, and the fitting coefficient (R) of EUI and CTR2) 0.996 and 0.935, respectively. The performance of the proxy model meets the requirements of ASHRAE 14-2002: the EUI and CTR had 2.45% and 1.78% NMBE and 3.36% CVRMSE and 2.36% CVRMSE, respectively.
(4) And (3) performing building performance optimization by taking the building energy consumption and comfort agent model constructed by adopting the GBDT algorithm as a fitness function of the NSGA-II algorithm. Since the NSGA-II algorithm is typically used to optimize both minimization objectives simultaneously, the thermal comfort level maximization is replaced with a thermal Discomfort (DCTR) minimization, DCTR 100% -CTR. As shown in Table 2, the hyper-parameter setting for NSGA-II was determined.
TABLE 2