A Proposal for the Optimisation of Algorithms for the Calculation of the Energy Demands of Residential Housing

: In response to increased energy consumption and CO 2 emissions, various energy efﬁciency policies, standards and housing certiﬁcations have emerged around the world. These aim to measure and quantify energy efﬁciency and endorse homes for meeting certain standards according to consistent categories that vary by continent or country. These energy rating systems correspond to a series of criteria and formulations that, through the calculation and combination of multiple variables, establish the classiﬁcation values. In Chile, there is the Energy Rating System for Housing (CEV), which performs energy efﬁciency calculations using dynamic heat balance spreadsheets in Microsoft ® Excel. When applied for everyday use and at a large scale, this system has the disadvantage of requiring a great deal of processing time for each simulation. This research proposes an improvement to the CEV energy demand calculation mechanism by generating a solution that takes advantage of the use of multiprocessors and implements the various algorithms in the C programming language. The results show that the CEV values obtained with the proposed calculation engine are equal to those of the current system but demonstrate a 76.5% improvement in their processing time.


Introduction
The construction sector is responsible for more than 36% of all energy consumption, and contributes to 39% of global carbon dioxide emissions, with a 30% increase in building energy demands expected by 2060 if systems to improve efficiency are not implemented [1]. As housing is responsible for a third of the energy consumed globally, focusing on the optimisation of energy consumption in housing is the key to reducing these figures [2]. By 2030, 80% of Europe's population is expected to be using existing housing (i.e., less construction and more renovation); this implies an increase in energy consumption, both due to the deterioration of the infrastructure over time and the costs of the improvements to be made [3].
In light of these challenges, various housing energy policies have been created around the world [4]. These aim to reduce energy consumption and CO 2 emissions without affecting the comfort of their inhabitants through efficient architectural design and the incorporation of construction elements that optimise energy performance [5]. Energy performance certificates for dwellings have been created to standardise the assessments of such buildings. These classify dwellings based on various indicators and standardised categories to support their attributes.
In the European Union (EU), policy initiatives such as the Energy Performance of Buildings Directives (EPBDs) have encouraged the use of Energy Performance Certificates Mathematics 2021, 9,

Background and Context
Presently, Chile's Ministry of Housing and Urban Development (MINVU), through its Technical Division of Study and Housing Development (DITEC), aims to improve people's quality of life by designing, planning and building better cities, neighbourhoods and housing. In this context, the MINVU created the Energy Rating of Homes programme, which makes it possible to determine a dwelling's energy consumption, enabling the institution to identify the most and least energy-efficient buildings. This programme allows the energy classification of a building to be calculated using certain pieces of architectural information. This classification is a theoretical calculation performed using a mathematical model of the building's estimated energy demands with regard to heating, cooling, domestic hot water and lighting. It is delivered through a CEV accreditation certificate and its respective energy efficiency label. The Energy Rating of Homes makes it possible to know the delivered energy quality of a house or apartment, facilitating the search for the best project and negotiations with managers and end users [20,21].
The Spanish context in the area of certifications and energy efficiency is interesting for Chile because Chile has adopted several of Spain's policies for the development of local standards as references. In Spain, three software programs are associated with energy certification: CE3X, LIDER and CALENER [17]. CE3X is a piece of software developed by Efinovatic and the Spanish National Centre for Renewable Energy (CENER) [23]. This program makes it possible to certify any type of building in a simplified way by obtaining any qualification, from A (the most optimal) to G (the least optimal), just as in the Chilean system. This can be adapted to the great variety of situations that the certifying technician must face, offering different options for entering the building's data. In this way, both the thermal envelope and the installations can be entered using known, estimated and default values. CE3X was developed in Python, and it allows data entry, the calculation of values and the delivery of results. Unlike the templates used in the Chilean system, CE3X offers suggestions for possible improvements to the home that can improve its energy rating. It also has a friendly, intuitive and easy-to-use user interface. The main features of this software are as follows: • It uses hybrid procedures based on energy simulations corrected with real data and measurements.

•
It assigns importance to the proposal of measures to improve energy efficiency.

•
It was designed such that, depending on the improvement measures pursued, the necessary initial data are adapted, simplifying the energy consumption calculation process.

Background and Context
Presently, Chile's Ministry of Housing and Urban Development (MINVU), through its Technical Division of Study and Housing Development (DITEC), aims to improve people's quality of life by designing, planning and building better cities, neighbourhoods and housing. In this context, the MINVU created the Energy Rating of Homes programme, which makes it possible to determine a dwelling's energy consumption, enabling the institution to identify the most and least energy-efficient buildings. This programme allows the energy classification of a building to be calculated using certain pieces of architectural information. This classification is a theoretical calculation performed using a mathematical model of the building's estimated energy demands with regard to heating, cooling, domestic hot water and lighting. It is delivered through a CEV accreditation certificate and its respective energy efficiency label. The Energy Rating of Homes makes it possible to know the delivered energy quality of a house or apartment, facilitating the search for the best project and negotiations with managers and end users [20,21].
The Spanish context in the area of certifications and energy efficiency is interesting for Chile because Chile has adopted several of Spain's policies for the development of local standards as references. In Spain, three software programs are associated with energy certification: CE3X, LIDER and CALENER [17]. CE3X is a piece of software developed by Efinovatic and the Spanish National Centre for Renewable Energy (CENER) [23]. This program makes it possible to certify any type of building in a simplified way by obtaining any qualification, from A (the most optimal) to G (the least optimal), just as in the Chilean system. This can be adapted to the great variety of situations that the certifying technician must face, offering different options for entering the building's data. In this way, both the thermal envelope and the installations can be entered using known, estimated and default values. CE3X was developed in Python, and it allows data entry, the calculation of values and the delivery of results. Unlike the templates used in the Chilean system, CE3X offers suggestions for possible improvements to the home that can improve its energy rating. It also has a friendly, intuitive and easy-to-use user interface. The main features of this software are as follows:

•
It uses hybrid procedures based on energy simulations corrected with real data and measurements.

•
It assigns importance to the proposal of measures to improve energy efficiency.

•
It was designed such that, depending on the improvement measures pursued, the necessary initial data are adapted, simplifying the energy consumption calculation process.

•
The procedures were developed so as to make maximum use of the information obtained through inspections and reviews.
One of CE3X's shortcomings is that it only performs the calculations once, without adding the housing rotation variable to simulate the climate in different directions. In spite of this, the program is a simplified option compared with other systems, as it is based on the indirect control of a home's energy demands by the limitation of the characteristic parameters of the enclosures and interior partitions that make up its thermal envelope. The verification is performed by comparing the values obtained in the calculation with the limit values allowed by the Spanish standards [24].
The LIDER and CALENER programs offer a more general option based on the evaluation of buildings' energy demands by means of comparison with a reference building. LIDER enables the calculation of the limitations of the energy demand, but its use is restricted to buildings with no more than 100 different spaces (e.g., rooms) and no more than 500 enclosures of the building envelope. CALENER allows for the calculation of a building's energy rating. It offers two versions: (1) CALENER VyP for residential buildings and small tertiary-sector buildings, and (2) CALENER GT for large tertiary-sector buildings [23]. There is also a tool that joins both programs, called the Unified Tool LIDER/CALENER (HULC), which issues a report for the Energy Certification of Buildings in PDF and XML formats along with the necessary information for registration. Table 1 shows a comparison of the Chilean energy efficiency calculation system with its Spanish counterparts. This comparison indicates that the Chilean system has only four of the 12 relevant characteristics identified for these systems.  Table 1, the calculation system that uses processing templates is highly deficient compared with the other existing tools in this area. This can mainly be seen in the last three criteria compared, which are directly related to the calculations and processing itself. After reviewing and considering this preliminary background in depth, a test was carried out to analyse one of the critical points, namely the processing time or runtime. A set of test data was executed on three different pieces of computer equipment: one local machine belonging to a member of this research team and two external servers in service-on-demand mode, one from Google Compute Engine and the other from the IBM Cloud. These tests were performed to analyse whether the computational resources directly affected the high runtime registered locally. For this preliminary test, 30 different dwelling cases were executed in each team. The average runtimes for each facility are presented in Table 2. The results showed that the characteristics of the computational equipment did not directly affect the processing time. Rather, the performance was affected by the efficiency of the macro code, as measured by the algorithmic complexity and arithmetic operations involved. These aspects are thus considered in the development of this work when determining housing energy demands.

Problem to Be Optimised
The CEV system, which enables the calculation of a house's energy quality, is designed using templates programmed in the Visual Basic for Applications (VBA) interface [21]. It is organised into three PBTD, wherein energy demands and consumption are calculated: (1) PBTD, Architecture Data; (2) PBTD, the Energy Demand Calculation Engine; and (3) PBTD, Equipment and Results Data. Figure 2 visualises these steps. The results showed that the characteristics of the computational equipment did n directly affect the processing time. Rather, the performance was affected by the efficien of the macro code, as measured by the algorithmic complexity and arithmetic operatio involved. These aspects are thus considered in the development of this work when det mining housing energy demands.

Problem to Be Optimised
The CEV system, which enables the calculation of a house's energy quality, is d signed using templates programmed in the Visual Basic for Applications (VBA) interfa [21]. It is organised into three PBTD, wherein energy demands and consumption are c culated: (1) PBTD, Architecture Data; (2) PBTD, the Energy Demand Calculation Engi and (3) PBTD, Equipment and Results Data. Figure 2 visualises these steps.
Enter general data on the project and the architectural design of the house.
Enter equipment data for the calculation of energy consumption, based on the results of PBTD 2.

Equipment data and results
Creating PBTD template folders on a personal computer Score sheets This research focuses on PBTD 2, the Energy Demand Calculation Engine. In this st of the CEV system, the calculation of the energy demand of the house is developed. T calculation is related to various internal and external factors: internal load, radiation, th mal enclosure, thermal inertia, infiltrations, ventilation, the thermal bridge and climati tion. Figure 3 schematically shows these elements in a typical house. Climatisation is element that depends on other variables that are not considered for the purposes of t study. Therefore, the energy demand is directly influenced only by the elements of t construction, such that the temperature can vary freely. This research focuses on PBTD 2, the Energy Demand Calculation Engine. In this step of the CEV system, the calculation of the energy demand of the house is developed. This calculation is related to various internal and external factors: internal load, radiation, thermal enclosure, thermal inertia, infiltrations, ventilation, the thermal bridge and climatisation. Figure 3 schematically shows these elements in a typical house. Climatisation is an element that depends on other variables that are not considered for the purposes of this study. Therefore, the energy demand is directly influenced only by the elements of the construction, such that the temperature can vary freely.           The CEV system, based on the scheme in Figure 3 and the factors shown in Figure 4, calculates a house's energy demand according to Equation (1): where: • Internal Loads corresponds essentially to the heat and lighting used by occupants, which depend on the use of space related to power, tabulated according to international regulations. • Radiation corresponds to the radiation that enters the system through the windows. It is affected by the orientation of the windows, possible obstructions (both near and far) and the solar factor. Of the total heat that enters in this way, 70% is absorbed by the mass of the system, which comes from the construction elements, while the remaining 30% goes directly into the air. • Thermal Enclosure corresponds to the heat transfer related to the elements associated with the thermal enclosure, including flows through the roofs, floors, walls and windows. • Thermal Inertia corresponds to the constructive components, which add mass to the system and allow for the exchange of heat with the interior air via convection. The values considered for this factor are tabulated for different materials. Infiltrations corresponds to air renewals due to tabulated infiltrations associated with different types of housing. • Ventilation corresponds to the air renewals per hour or the ventilation rate, which are associated with different conditions of housing use. • Thermal Bridge corresponds to the coefficients of heat transfer associated with different thermal jumpers. • Climatisation corresponds to the heat provided by an air conditioning system-that is, the heat necessary to keep the interior temperature within the limits of the comfort band when the room temperature escapes this range. Table 3 shows the Housing Energy Rating (CEV) system factors and formulae. After calculating the parameters in Table 3, and once all of the flows have been defined, it is possible to inject (heating) or withdraw (cooling) heat from the system in order to keep the temperature within the defined comfort range.
It depends on the time of day when the thermal balance is being carried out, where t varies from 0 to 23 h. Where: Q gen (1) = Q gen _Ocup : heat generated by Occupants Q gen (2) = Q gen _Ilum : heat generated by Lights Q gen (3) = Q gen _Apli : heat generated by Equipments ∆t = ((hour + 1) * 3600) − (hour * 3600) (4) (Values according to international data, NCH 3309) i : orientation on a sur f ace q mass : heat o f the mass m wall : mass participation o f wall {0, 1} Technical Factor: Infiltrations and ventilations Q in f iltrations = volume * month data RAH 3600 * 60[sec] * ρ AIR * C air * (∆T/60[sec]) (12) The comfort band uses the 1998 Adaptive Comfort Adaptive Comfort method proposed in Ashrae The temperature average will depend on the month and thermal zone where the house is located, and they vary during the day and night (22:00 to 7:00), with a variation where a range of 2.5 • C above or below neutral temperature is considered to an average comfort interior temperature (Tn): 5 Therefore: HD(+): the number of hours that the temperature is above the comfort band are directly the hours of discomfort or also known as hours of Overheating. HD(−): the number of hours that the temperature is below the comfort band are directly the hours of discomfort or also known as hours of Subcooling. volume = area * h RAH = air hour replacement ρ AIR = air desity (1.2 kg/m 3 ) C air = speci f ic air heat (1000 J kgK ) ∆T = Temperature outdoor − Temperature indoor Technical Factor: Thermal bridges Where each thermal bridge represents: (P01) a protruding corner between two walls or a wall and a roof slab. This bridge generates an increase in its surface. (P02) an incoming corner between two walls or a wall and a ventilated floor slab. This bridge generates a decrease in its surface. (P03) the encounter between a perimeter wall and an interior wall or between a perimeter wall and an interior floor. (P04) the encounters between a wall and some element that stands out from the outer perimeter lead of the walls, such as cornices or terraces. (P05) the encounter between the window frame and the wall where it is housed.
The linear coe f f icient o f heat trans f er[W/mK] A : area m 2 Mathematics 2021, 9, 1994 9 of 26 Currently, all of the energy demand calculation processing described above is carried out using macros-programming codes that are used to automate tasks and calculations. Depending on the type and frequency of the calculations, the response times may be affected along with the resource use of the computer where they are executed. All of the aforementioned calculations are carried out every 60 s, evaluating the temperature inside the room based on the flows of the input variables.

Solution Development
Considering the previous context, and in order to write a program using threads of execution that allow for the optimisation of the calculations involved, we needed to model the various associated processes. For the modelling of the processes involved, data flow diagrams (DFD) were used, because they are a simple and easy-to-understand notation, to represent the interaction of the interfering elements, in addition to allowing us to structure the logic of the calculations required in the development of the algorithms implemented. These are shown in Figures 5-8 along with their corresponding algorithms. Figure 5 shows the general diagram of the programming performed. Based on the procedures of the problem studied, the development was based on the optimisation of the algorithms associated with process 2.0 (Calculation management), particularly in process 2.2 (Compute energy demand by month) and its 25 sub-processes (processes 2.2.1-2.2.25).
The algorithms presented show a general idea of the processes involved in these, and the number of lines of code implemented is extensive in order to include them completely; however, it is possible to visualize some general operations, calls to external functions and others developed to modularize the code, in addition to the use of programming in threads, which allow the development of parallel programs that scale appropriately in the environment of a machine that has several processors working simultaneously, providing a model for the handling of several transactions and calculations.
The implemented algorithms were programmed in C using threads that can make resource use more efficient and improve response times. When working with threads, a program can execute different tasks at the same time by creating a new process and simultaneously creating a new execution thread. In a computer with a single processor, the operating system can very quickly run a program's sections in turns (by time segments), giving a sense of emulated simultaneous processors. Figures 6-8 detail how the different processes are connected in order to obtain the indicated parameters. Algorithms 1 through 14 show the programming of these processes. Some algorithms group more than one process together in order to facilitate the technical explanation. Figure 6 shows the first part of the process of obtaining the energy demand solution. The blue lines represent the input data for the various processes (architectural information, weather conditions and internal loads), and the red lines show the output data of this principal process.   1 through 14 show the programming of these processes. Some algorithms group more than one process together in order to facilitate the technical explanation. Figure 6 shows the first part of the process of obtaining the energy demand solution. The blue lines represent the input data for the various processes (architectural information, weather conditions and internal loads), and the red lines show the output data of this principal process. Algorithm 1 represents the process of obtaining the outside temperature and solar irradiance though the windows over a given period. In both procedures, linear interpolation is applied to the analysed variable based on the process in question. Process 2.2.1 corresponds to the outside temperature according to simulation time (hour and month), and process 2.2.2 is applied to solar irradiance through the windows corresponding to the simulation time.  Algorithm 1 represents the process of obtaining the outside temperature and solar irradiance though the windows over a given period. In both procedures, linear interpolation is applied to the analysed variable based on the process in question. Process 2.2.1 corresponds to the outside temperature according to simulation time (hour and month), and process 2.2.2 is applied to solar irradiance through the windows corresponding to the simulation time. Algorithm 2 represents the three processes involved in computing the internal loads of a dwelling by use. This process applies a linear interpolation between the variables of use by the occupants of the dwelling, the heat input through the different lighting fixtures defined in a range of time, and the consumption of different equipment providing heat to the dwelling. Each of these variables corresponds to the simulation time. Subsequently, the sol-air calculation is performed using Equation (14), which aims to obtain the cooling load of the different external walls of the evaluated house (according to Algorithm 4). where: • T 0 = exterior temperature; • a = solar radiation absorptivity; • I = global solar irradiance; and • ∆Q ir = extra infrared radiation due to the differences between the external air temperature and the apparent sky temperature. Algorithm 7 calculates the concrete temperature in order to obtain the heat obtained from the exterior wall through solar radiation.     Figure 8 represents the third part of the diagram in Figure 5, corresponding to the continuation of the calculation of the energy demand of the evaluated house. It contains the processes of the calculation of the ventilation heat, the calculation of the heat infiltration in the air, the calculation of the climate heat, the calculation of the dwelling's indoor temperature, and the calculation of the thermal demand. As a result, the total heat calculation of the evaluated dwelling is obtained.  Algorithm 10 contains two sub-processes. Process 2.2.21 calculates the heat infiltration in the indoor air of the evaluated dwelling, and process 2.2.20 represents the heat-to-air-flow rate needed to achieve the air renewals necessary for health. Algorithm 11 calculates the interior heat of the house in response to weather events. Heat can be added or removed from the structure based on the behaviour of meteorological factors using the monthly data stored by the system. if (((q_sol * 0.15f) + q_internas + q_ventilacion + q_envolvente + q_masa_ad + 12: q_recuperador + q_infiltraciones) > 0) then 13: q_clima = −(q_sol * 0.15f) + q_internas + q_envolvente + q_ventilacion + 14: q_masa_ad + q_recuperador + q_infiltraciones) + volumen * RO_AIRE * CP_AIRE * 15: (

Results
To test the implemented algorithms, it was first necessary to evaluate the maximum capacity for the massive processing of consecutive cases using the macros in the spreadsheets mentioned above. Given the high demand for resources that Microsoft Excel requires, we needed to process consecutive batches of 20 cases. The identification of this number allowed comparisons to be made fairly with the proposed new calculation system. The algorithms were executed on two different computers, the characteristics of which are described in Table 4. To process all of the cases for this experiment, the test instances were executed 10 times in order to ensure that the results remained stable in the different cases used. Each case considered up to 54 variables. In order to obtain a result for each one, it was necessary to compute over 54,000 data points. Accordingly, the runtime of our proposed algorithms needed to use programming techniques to optimise the computational resources.
After testing the cases mentioned before with Algorithm 13 (Thread processing code), the results were compared. We referred to the results obtained from the execution of the current macros as the 'base data', and to those we obtained through the developed algorithms as the 'experimental data'. In order to compare both result sets and calculate the numerical difference between them, Algorithm 14 was written to allow values to be obtained for each instance. The description of the algorithm is shown below.
Algorithm 14 (Accuracy of the calculations) automatised the comparison process. It was thus possible to discover the results obtained and focus on the variables which showed slightly higher differences, although the errors were very insignificant.
Analysing the application of the implemented algorithms allowed us to review three aspects associated with the results: the processing time, the use of computational resources, and the precision of the calculations. In each of these aspects, the results of the proposed algorithms show great improvements over the original method. These algorithms have considerable robustness, especially in the precisions of the results obtained. The new approach, which computes all of the calculations required to determine the energy demand, is demonstrably more efficient, as shown in Table 5, which summarises the main results.  The proposed algorithm uses only 29% of the memory usage that is currently required to process a case.

Precision of calculations
Comparison of the results obtained and evaluation the percentage of error in the calculations made.
To calculate the precision of the results, an algorithm was developed in Python, shown below this table.

•
The final value of the energy demand considers a total of 54 variables (e.g., hour, second, month, interior and exterior temperature), of which 40 were considered in the calculations for the cases under study, with a total of 53,280 intermediate operations for each case. • From the set of processed cases, the difference between the averages of the values for the results of each variable was obtained as follows: Error = initial average − new average / initial average * 100 ) [%] • It is expected that the vast majority of the results will tend toward 0-that is, that the values will be equal or close to each other. It is expected that, if there are differences, they will be minimal and negligible.

•
The average percentage of error for all the calculated values was 2.48 × e −8 .
As shown in Table 6, with regard to the comparison of the precision of the calculations, it is important to note that the cases executed considered 37 of 54 variables. Some were not used in the cases run in this experiment because they did not lead to a significant difference in the results, and because some of them depended on the thermal zone in which the housing construction was geographically located. Table 6 summarises the comparisons of the errors obtained for each variable between the original calculations using macros in Excel and the set of proposed algorithms.

Discussion
As shown in Table 6, for each variable in the study, the error is calculated indicating the mean. The average is in the order of precision of e (−12) , the same as the 50% and 75% quartiles. The 25% quartile is even better, with an order of error of e (−13) . The standard deviation (SD) has an order of error of e (−11) . The average maximum error was only e (−8) , which is still a very good value. The best value in each column is marked in bold. The 'Min.' column represents the minimum value of error of the calculations for each variable. The fact that the entire column is composed of values of zero means that there were many values with an error of 0, indicating that the computation was exact in both methods of calculation.
For the data shown in the previous table, almost all of the values demonstrate that between the results obtained with the original method and those obtained with the proposed algorithm there were very small error percentages, which did not alter the final calculated values. In other words, in most of the cases that present differences, such differences were minimal due to the number of decimal places used by Excel when rounding. The smallest error in the maximum column occured for the variable Qgen pers [W], with an error of 5.7007 × e −14 , and the largest for the variable Q_piso_vent_SA [W], with an error of 2.20253 × e −7 .
Despite their similar results, it is important to note that other comparable studies have incorporated more variables that could not be validated in our work because of the geographical conditions of the cases. However, there are no elements that directly consider CO 2 emissions as a variable, which resembles the approach of most studies.
The results presented in the previous section show that both methods of calculation obtained similar results. Therefore, the set of proposed algorithms proved to be a good alternative to calculating the energy demands of residential housing. These indicators are directly related to the error analysed in this study to demonstrate the reliability of the structure and design of the techniques used, as well as the appropriate selection of the programming language.
Regarding the runtime, the field of programming relies on the proper use of the control structures incorporated in the algorithms and the optimisation of the arithmetic operations. These are, in themselves, simple: linear interpolations, summations and defined functions for certain ranges of domains, among others. However, because algorithms contain several such operations, incorporate iterations, and are conditioned on certain other factors, optimising in this way can significantly improve the execution time and achieve a more efficient use of the computational resources required for processing.

Conclusions
Although the results of our approach and the original approach were similar, indicating that the calculations in both cases were correct, the implementation of the proposed method resulted in improvements. Namely, the approach of the proposed set of algorithms allowed us to reduce the execution time of the current system. This was one of the most important aspects of this study. The results obtained with the implemented algorithms allowed us to improve the arithmetic and performance operations, making more efficient use of the computational resources.
The proper use of different tools, technologies and programming techniques allows researchers to find alternative solutions that can optimise results in the field of scientific computing. Unfortunately, in Chile, the level of investment in technological development is not sufficient to obtain better results or to move to an energy classification system in residential housing, which requires not only improvements in technologies but also in the definitions of their technical standards. The proposed calculation system highlights their deference in implementation, procedure and methodology to computed data. The use of thread processing allows for the effective use of the resources available to process data, mainly the central processing unit and RAM where the algorithms and data reside, and on which read and write operations can be performed.
On the other hand, the results of the study carried out could allow further investigation into the detail of the individual elements involved in the calculation of energy demand, in order to identify those aspects that interfere more significantly with energy losses. Along with the above, taking into account the materiality of the houses, it would also be possible to know the optimal energy value for certain construction elements, and from the difference between the energy demand required with the optimal value, it would be possible to determine the rejected energy.
Finally, we conclude this study by suggesting some guidelines for future work and the deepening of the subject. These would include the introduction of other variables in the calculation carried out, based on characteristics that allow a better approximation of the construction itself and its surroundings, in order to obtain more precise results from real cases of residential homes. This could also give a way to extend the study to the industrial sector, where energy demand could be classified depending on the area and the production processes involved. Another interesting point would be to incorporate the air conditioning elements that exist in the system under study, an element that directly affects the calculation of the energy demand required, and that was not included in the scope of this work.