## 2 Methodology
Data on thermal comfort and energy generation systems were requested, but for the clustering it was decided not to include the systems because the number of clusters increased considerably. For the application of cost-optimal renovation search, the software created for the HAPPEN project needs to be running for long periods of time. It is not feasible to include the systems from the beginning for this application. The systems will be included as soon as the building envelope is optimized. Because we have six buildings per country (three building periods for two housing types, SFH and MFH) and seven member countries, a total of 42 reference building types are collected. This amount is not manageable for a mass pass study. Due to the framework of the project, these 42 buildings will be evaluated in terms of orientation (north, south, east, west), operation (number of cohabitants), and equipment (types of systems for thermal comfort), which can lead to an immense number of combinations for this purpose. In addition, there are buildings in different countries with similar geometries or similar thermal characteristics of the building envelope. These two reasons lead us to look for groupings that are coherent without losing relevant information. This first clustering generates the results of Clustering Method 1. In order to carry out Clustering Method 2, two construction characteristics, thermal characteristics and geometrical characteristics, were taken into account. Thermal characteristics will depend on the quality of roofs, slab on grade, walls, and windows. In order to be able to label the thermal characteristics, the code TXX is used. As provided in Table 1, each letter corresponds to a specific U-value range for roofs, slabs on grades, walls, and windows. Code TXX (Table 2) represents the number of the 11 thermal clusters which condensate the thermal properties of walls, slabs on grade, roofs, and windows, following the criteria given in the following tables. Letters (A, B, C, D, etc.) indicate the thermal properties of the various components of the building's envelope. As provided in Table 2, each letter corresponds to a specific U-value range for roofs, slabs on grades, walls, and windows. This grouping is made through the study of the thermal characteristics of each of the reference buildings provided by the member countries. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Scale Based on U-Values (W/m\({}^{2}\) K)** & \\ \hline \multicolumn{3}{c}{**Roofs, Slabs on Grade, Walls**} & **Windows** \\ \hline A & 0.01–0.49 & A & 0.90–1.39 \\ B & 0.50–0.99 & B & 1.40–1.89 \\ C & 1.00–1.49 & C & 1.90–2.39 \\ D & 1.50–1.99 & D & 2.40–2.89 \\ E & 2.00–2.49 & E & 2.90–3.39 \\ F & 2.50–2.99 & F & 3.40–3.89 \\ G & 3.00–3.49 & G & 3.90–4.39 \\ H & 3.50–3.99 & H & 4.40–4.89 \\ I & 4.00–4.49 & I & 4.90–5.39 \\ J & 4.50–4.99 & J & 5.40–5.89 \\ K & 5.00–5.49 & K & 5.90–6.39 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Categorization of U-value ranges for walls, slabs on grade, roofs, and windows. Geometric characteristics are broken down into floor area, building shape, number of floors, and position. To label the geometric features, the CYY code is used. In Table 3, code CYY illustrates the number of the scale based on construction geometry, which condensate the footprint area, the shape, the number of stories, and the number of party walls for the cases of SFH and MFH, respectively. Once the partial classification has been carried out, in which the geometric and thermal categories of each of the buildings that make up the building stock of the member countries have been established, we prepare to make groupings in order to reduce the number of reference buildings. To achieve this, the buildings that were the same were reviewed and could be eliminated due to repetition. This second grouping generates the results of the Clustering Method 2 (Figure 2).