Optimization and Prediction of Different Building Forms for Thermal Energy Performance in the Hot Climate of Cairo Using Genetic Algorithm and Machine Learning

: The climate change crisis has resulted in the need to use sustainable methods in architectural design, including building form and orientation decisions that can save a signiﬁcant amount of energy consumed by a building. Several previous studies have optimized building form and envelope for energy performance, but the isolated effect of varieties of possible architectural forms for a speciﬁc climate has not been fully investigated. This paper proposes four novel ofﬁce building form generation methods (the polygon that varies between pentagon and decagon; the pixels that are complex cubic forms; the letters including H, L, U, T; cross and complex cubic forms; and the round family including circular and oval forms) and evaluates their annual thermal energy use intensity (EUI) for Cairo (hot climate). Results demonstrated the applicability of the proposed methods in enhancing the energy performance of the new forms in comparison to the base case. The results of the optimizations are compared together, and the four families are discussed in reference to their different architectural aspects and performance. Scatterplots are developed for the round family (highest performance) to test the impact of each dynamic parameter on EUI. The round family optimization process takes a noticeably high calculation time in comparison to other families. Therefore, an Artiﬁcial Neural Network (ANN) prediction model is developed for the round family after simulating 1726 iterations. Training of 1200 conﬁgurations is used to predict annual EUI for the remaining 526 iterations. The ANN predicted values are compared against the trained to determine the time saved and accuracy.


Introduction
The huge increase in the consumption of world energy by the building sector raised concerns over negative environmental impacts, burnout of energy resources, and supply shortage [1].The energy consumed by the built environment in Egypt is around 66-74% and is expected to significantly increase with serious impacts on economic and social aspects [2,3].There is a serious need for applying sustainable methods in the architectural design process to minimize the energy demand of the built environment thus contributing to solving the climate change crisis.The design of the architectural building form and its orientation, which is considered a primary activity in the architectural design process, is responsible for saving a significant amount of the total energy consumed by a building [4,5].
Many studies that have looked at the optimization of building form for energy performance have manipulated building form and other dynamic parameters simultaneously.For example, in addition to optimizing building form and its orientation, studies by Dong et al. [6] and Lu et al. [7] also optimized WWR or window size; the studies of Zou et al. [8] also optimized building construction, shading devices, and WWR; a study by Ascione et al. [9] also optimized HVAC operation in addition to many envelope parameters related to WWR, walls, floors and roof values, insulation, windows types, and shading types and positions; a study by A. Zhang et al. [10] also optimized glazing material, glazing ratio, and shading type; a study by Konis et al. [11] also optimized WWR and shadings; a study by Tuhus-Dubrow and Krarti [12] also optimized wall construction, roof construction, window type, window area, foundation type, infiltration, and shading.Furthermore, in addition to optimizing building form, a study by Kiss and Szalay [13] optimized also wall and roof insulation type and thickness, WWR, glazing type for each façade, internal walls materials, added a shading windows option (optional shutter, considered in the energy calculation and the embodied impacts), and heating energy source.A study by Zhu et al. [14] also optimized WWR of different facades and of skylights; a study by Camporeale and Mercader-Moyano [15] also optimized shading devices of windows; a study by Fang and Cho [16] also optimized width, length, orientation, and location of three skylights, south window width, louver length, and north window width.A study by L. Caldas [5] also optimized clearstory windows under each roof and the area of windows.Some previous studies using optimization of building form only for energy performance showed the importance of studying the isolated effect of the manipulation of building form in enhancing building energy performance.For example, the studies of Yi and Malkawi [17,18] optimized a simple single zone of a complex building form for energy use in one city at a time and in three cities with different climate zones at another time without mentioning building type.Boonstra et al. [19] optimized the layout and dimensioning of spaces for structural and thermal performance in a city that was not mentioned.Lin et al. [20] optimized a 10-floor office building for energy use and daylighting in Haidian District, Beijing.Du et al. [21] optimized the layout of an office building and generated complex forms with rectangular corners for the temperate climate of Amsterdam.Granadeiro, Duarte, et al. [22] manipulated shape grammar for Frank Lloyd Wright's prairie houses to minimize energy performance in Lisbon (Portugal).Du et al. [21,23] optimized the space planning of an office building to minimize heating, cooling, and lighting demands.The study tested irregular forms with narrow triangular corners and stated that future studies must solve this space efficiency problem.However, all these studies considered only one type of building form for one or three cities with different climate zones.
On the other side, most previous studies using optimization of building form for energy performance that manipulated other dynamic parameters also considered testing one type of building form for one or more cities with different climates ( [5,[8][9][10][11]13,16,[24][25][26]).Some other studies considered comparing two or more types of building forms.For example, Rodrigues et al. [27] optimized two types of house layouts (two cubic-shaped forms) to minimize thermal energy in Coimbra, Portugal.Caruso and Kämpf [28] manipulated one simple type of cubic form (three zones) that takes the S or L shapes and three types of single zone free forms (Taylor series, Fourier series, and snake form) in Basel and Dubai.Zhu et al. [14] used three types of cubic forms (layouts) for EUI, daylighting and thermal comfort in Tianjin, north China.Lu et al. [29] optimized two types of building forms (shoebox and irregular quadrilateral office buildings) for thermal EUI in Beijing, Shanghai, and Shenzhen.Khalil et al. [30] optimized two types of cubic forms for thermal EUI, daylighting, and outdoor view percentage.Despite the fact that these studies considered more than one type of building form, the number and type of building forms were limited and almost all belonged to the same family.To gain a more comprehensive understanding of the results of building form optimization, future studies should systematically test more building forms for the selected city as most studies only consider one or few types of building forms, which is limited compared to the variety of building forms found in reality [29].
Computation 2023, 11, 192 3 of 15 Some building form types might take a long calculation time due to their complexity and irregular surfaces, which requires the interference of machine learning.Machine learning fields focus on constructing computer programs that learn from experience like humans and animals who learn through environment stimulation and reaction to it [31].Machine learning is needed in complicated cases to predict some of the iterations rather than using conventional simulation methods, which require much calculation time (Lila et al., 2021;Lila & Lannon, 2019) [32].Examples of machine learning algorithms are Artificial Neural Networks (ANNS) inspired by the neural system functioning in living organisms [31].
A systematic study that identifies the isolated effect of various building form types on thermal energy performance is needed, in which only architectural form parameters are manipulated with the other parameters constant.In addition, a machine learning prediction model is needed for complicated shapes that consume a lot of calculation time.In this study, an office building typology is chosen as a reference.This study aims to fill the gaps mentioned above by proposing a variety of new form generation methods that optimize building form dynamic parameters only for thermal energy performance in the hot climate of Cairo.Each of these methods includes a variety of basic and complicated forms that belong to a specific family.The effect of alternatives within each family on thermal energy performance is studied.In addition, the thermal performance of all proposed building forms generation methods is compared.The four families are the polygon that varies from pentagon to decagon in addition to other irregular forms; the pixels that are complex cubic forms; letters including H, L, U, T; cross and other complex cubic forms; and the round family that varies between circular and oval forms.All the forms are opaque with no openings to study the isolated effect of each type of building form on thermal energy performance.A total number of around 500 iterations are simulated for each family in the optimization stages.After the optimization, the round form showed the highest calculation time in addition to the highest performance.Therefore, optimization was run again to complete 1726 unique iterations, and scatterplots were created for the total number of simulated iterations.Then, machine learning using ANN was adopted to the round family and the ANN was trained on a selected database of different round form configurations and their annual thermal EUI results.The ANN code was then used to predict the annual EUI for other iterations that were not selected in the training process.Finally, the ANNpredicted values are compared against the simulated iterations to determine the time saved and accuracy.

Workflow
Architects highly prefer simulation tools that have a user-friendly graphical interface, a 3D modeler with geometric capabilities, and the ability to exchange diverse data [33].Grasshopper in Rhinoceros 6 [34] is used to develop each building form generation method.The workflow used in each building form is shown in Figure 1, whereas the first four stages are applied to all building forms, and the six stages are applied once only for the round family.The tools used in each step are written in red.The first four stages include first the parametric modeling of the proposed shape representation or form generation method.Second, the determination of the form and orientation dynamic parameter for each family.Third, converting all building zones into Honeybee thermal zones and applying the solve adjacencies method.Fourth, modeling building envelopes with no openings (opaque) and using appropriate Ashrae materials for the specified climate zone.Finally, optimization is performed on all families and then scatterplots and machine learning models are developed for the round family only.The workflow is discussed in detail as follows: FOR PEER REVIEW 4 of 16 Figure 1.Proposed workflow diagram for all building forms (the first four stages are applied to all building forms while the last two stages are applied to the round shaped only).

Base Case
It is assumed that the base case (Figure 2) building is a low-rise medium-sized office building with three floors (three thermal zones) open plans with a height of 3 m on each floor [35].The base case is an opaque building that is 10 m × 10 m with a total height of 9 m, a total area of 300 m 2 , and a total volume of 1296 m 3 .

Model Architectural Building Form
This study proposes many new and common form generation methods to generate diverse building forms with different shapes and to compare their thermal energy performance.The simple three-floor open plan that generates a diversity of rectangular and squared regular and irregularly shaped forms was proposed before by [35].Its results are considered in comparing the new proposed forms in this paper.Since the manipulation of floor height in this previous study proved to have a negative impact on enhancing energy performance, building height as a dynamic parameter was excluded.Rhino and its plugin Grasshopper [34] are used to model the building forms parametrically and to control their dynamic parameters.First, a letter form is proposed that generates a diversity of building forms, including H, L, U, T, cross-shaped, rectangle, square, and other random complex forms.Figure 3 shows a few examples of the possible forms that could be generated.This letter form is a three-floor cellular office building where each floor has six cells.

Base Case
It is assumed that the base case (Figure 2) building is a low-rise medium-sized office building with three floors (three thermal zones) open plans with a height of 3 m on each floor [35].The base case is an opaque building that is 10 m × 10 m with a total height of 9 m, a total area of 300 m 2 , and a total volume of 1296 m 3 .
Computation 2023, 11, x FOR PEER REVIEW Figure 1.Proposed workflow diagram for all building forms (the first four stages are app building forms while the last two stages are applied to the round shaped only).

Base Case
It is assumed that the base case (Figure 2) building is a low-rise medium-siz building with three floors (three thermal zones) open plans with a height of 3 m floor [35].The base case is an opaque building that is 10 m × 10 m with a total he m, a total area of 300 m 2 , and a total volume of 1296 m 3 .

Model Architectural Building Form
This study proposes many new and common form generation methods to diverse building forms with different shapes and to compare their thermal energy mance.The simple three-floor open plan that generates a diversity of rectangu squared regular and irregularly shaped forms was proposed before by [35].Its re considered in comparing the new proposed forms in this paper.Since the mani of floor height in this previous study proved to have a negative impact on enhan ergy performance, building height as a dynamic parameter was excluded.Rhino plugin Grasshopper [34] are used to model the building forms parametrically and trol their dynamic parameters.First, a letter form is proposed that generates a div building forms, including H, L, U, T, cross-shaped, rectangle, square, and other complex forms.Figure 3 shows a few examples of the possible forms that could b ated.This letter form is a three-floor cellular office building where each floor has The letter forms' dynamic parameters are shown in Table 1.The form is composed

Model Architectural Building Form
This study proposes many new and common form generation methods to generate diverse building forms with different shapes and to compare their thermal energy performance.The simple three-floor open plan that generates a diversity of rectangular and squared regular and irregularly shaped forms was proposed before by [35].Its results are considered in comparing the new proposed forms in this paper.Since the manipulation of floor height in this previous study proved to have a negative impact on enhancing energy performance, building height as a dynamic parameter was excluded.Rhino and its plugin Grasshopper [34] are used to model the building forms parametrically and to control their dynamic parameters.First, a letter form is proposed that generates a diversity of building forms, including H, L, U, T, cross-shaped, rectangle, square, and other random complex forms.Figure 3 shows a few examples of the possible forms that could be generated.This letter form is a three-floor cellular office building where each floor has six cells.The letter forms' dynamic parameters are shown in Table 1.The form is composed of three cells adjacent to another three cells on each floor with equal size.Each of the three vertically connected cells can expand their depth in the outward direction (east and west facades).In addition, each three vertically connected cells in the north and south facades only are allowed to expand their length in the outward direction.The expansion values are in percentages, which means that the base case value is regarded as 1% whereas if the base case is equal to 4 m the value 1.5% is equal to 6 m.Finally, the building is allowed to change its orientation starting from 0 to 2 radians.

No. of parameters
Initial form Dimensions 6 4 1

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
1 (base case),1.5, and 2. Values are in percentages (%).0 (base case), 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, and 2. Angles are in radians.Another three-floor open-plan office with a circular building form is proposed, generating a diversity of simple and complex forms that take the shape of circles or ovals with different sizes and proportions.Table 2 shows circular form dynamic parameters.The whole building expands along the east-west axis, allowing the form to change to an oval shape instead of the circular one.Each floor is allowed to expand from the center outward.Orientation is also added to dynamic parameters to test the oval-shaped forms in different orientations.are in percentages, which means that the base case value is regarded as 1% whereas if the base case is equal to 4 m the value 1.5% is equal to 6 m.Finally, the building is allowed to change its orientation starting from 0 to 2 radians.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
Table 1.Building forms and orientation dynamic parameters for letters form with the north direction.

No. of parameters
Initial form Dimensions 6 4 1

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
Another three-floor open-plan office with a circular building form is proposed, generating a diversity of simple and complex forms that take the shape of circles or ovals with different sizes and proportions.Table 2 shows circular form dynamic parameters.The whole building expands along the east-west axis, allowing the form to change to an oval shape instead of the circular one.Each floor is allowed to expand from the center outward.Orientation is also added to dynamic parameters to test the oval-shaped forms in different orientations.

No. of parameters
Initial form Dimensions 1 3 1

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
Table 3 shows the third proposed family, which is the pentagonal form and its dynamic parameters.The number of pentagon sides is allowed to change from 5 sides to 10 so that it could take the shape of a hexagon, heptagon, octagon, nonagon, or decagon.Each floor is allowed to expand its area from the center outward.Orientation is also considered a dynamic variable but with limited values due to the nature of the form.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.The fourth proposed form generation method is named the pixel family.Table 4 shows its dynamic parameters where each cube of the 27 cubes is allowed to expand its length by 4 m in one of its external surfaces on the condition that each cube has the chance of expanding just one side in each iteration.For example, a cube in the corner of the second floor can expand its height, its x side, or its y side.

Building Expansion along One Axis
Computation 2023, 11, x FOR PEER REVIEW 6 of 16

No. of parameters
Initial form Dimensions 1 3 1

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
Table 3 shows the third proposed family, which is the pentagonal form and its dynamic parameters.The number of pentagon sides is allowed to change from 5 sides to 10 so that it could take the shape of a hexagon, heptagon, octagon, nonagon, or decagon.Each floor is allowed to expand its area from the center outward.Orientation is also considered a dynamic variable but with limited values due to the nature of the form.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.The fourth proposed form generation method is named the pixel family.Table 4 shows its dynamic parameters where each cube of the 27 cubes is allowed to expand its length by 4 m in one of its external surfaces on the condition that each cube has the chance of expanding just one side in each iteration.For example, a cube in the corner of the second floor can expand its height, its x side, or its y side.

Floor Expansion along the Other Axis
Computation 2023, 11, x FOR PEER REVIEW 6 of 16

No. of parameters
Initial form Dimensions 1 3 1

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
Values are in percentages (%).Table 3 shows the third proposed family, which is the pentagonal form and its dynamic parameters.The number of pentagon sides is allowed to change from 5 sides to 10 so that it could take the shape of a hexagon, heptagon, octagon, nonagon, or decagon.Each floor is allowed to expand its area from the center outward.Orientation is also considered a dynamic variable but with limited values due to the nature of the form.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.The fourth proposed form generation method is named the pixel family.Table 4 shows its dynamic parameters where each cube of the 27 cubes is allowed to expand its length by 4 m in one of its external surfaces on the condition that each cube has the chance of expanding just one side in each iteration.For example, a cube in the corner of the second floor can expand its height, its x side, or its y side.

No. of parameters
Initial form Dimensions 1 3 1

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
Values are in percentages (%).Table 3 shows the third proposed family, which is the pentagonal form and its dynamic parameters.The number of pentagon sides is allowed to change from 5 sides to 10 so that it could take the shape of a hexagon, heptagon, octagon, nonagon, or decagon.Each floor is allowed to expand its area from the center outward.Orientation is also considered a dynamic variable but with limited values due to the nature of the form.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.The fourth proposed form generation method is named the pixel family.Table 4 shows its dynamic parameters where each cube of the 27 cubes is allowed to expand its length by 4 m in one of its external surfaces on the condition that each cube has the chance of expanding just one side in each iteration.For example, a cube in the corner of the second floor can expand its height, its x side, or its y side.

No. of parameters
Initial form Dimensions 1 3 1

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
Table 3 shows the third proposed family, which is the pentagonal form and its dynamic parameters.The number of pentagon sides is allowed to change from 5 sides to 10 so that it could take the shape of a hexagon, heptagon, octagon, nonagon, or decagon.Each floor is allowed to expand its area from the center outward.Orientation is also considered a dynamic variable but with limited values due to the nature of the form.

No. of parameters
Initial form Dimensions 1 3 1

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
Values are in percentages (%).Table 3 shows the third proposed family, which is the pentagonal form and its dynamic parameters.The number of pentagon sides is allowed to change from 5 sides to 10 so that it could take the shape of a hexagon, heptagon, octagon, nonagon, or decagon.Each floor is allowed to expand its area from the center outward.Orientation is also considered a dynamic variable but with limited values due to the nature of the form.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.The fourth proposed form generation method is named the pixel family.Table 4 shows its dynamic parameters where each cube of the 27 cubes is allowed to expand its length by 4 m in one of its external surfaces on the condition that each cube has the chance of expanding just one side in each iteration.For example, a cube in the corner of the second floor can expand its height, its x side, or its y side.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
Values are in percentages (%).Table 3 shows the third proposed family, which is the pentagonal form and its dynamic parameters.The number of pentagon sides is allowed to change from 5 sides to 10 so that it could take the shape of a hexagon, heptagon, octagon, nonagon, or decagon.Each floor is allowed to expand its area from the center outward.Orientation is also considered a dynamic variable but with limited values due to the nature of the form.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.The fourth proposed form generation method is named the pixel family.Table 4 shows its dynamic parameters where each cube of the 27 cubes is allowed to expand its length by 4 m in one of its external surfaces on the condition that each cube has the chance of expanding just one side in each iteration.For example, a cube in the corner of the second floor can expand its height, its x side, or its y side.

Floor Expansion
Table 2. Building form and orientation dynamic parameters for circular form.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
Values are in percentages (%).Table 3 shows the third proposed family, which is the pentagonal form and its dynamic parameters.The number of pentagon sides is allowed to change from 5 sides to 10 so that it could take the shape of a hexagon, heptagon, octagon, nonagon, or decagon.Each floor is allowed to expand its area from the center outward.Orientation is also considered a dynamic variable but with limited values due to the nature of the form.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.The fourth proposed form generation method is named the pixel family.Table 4 shows its dynamic parameters where each cube of the 27 cubes is allowed to expand its length by 4 m in one of its external surfaces on the condition that each cube has the chance of expanding just one side in each iteration.For example, a cube in the corner of the second floor can expand its height, its x side, or its y side.

Building Rotation
Table 2. Building form and orientation dynamic parameters for circular form.

No. of parameters
Initial form Dimensions 1 3 1

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.
Values are in percentages (%).Table 3 shows the third proposed family, which is the pentagonal form and its dynamic parameters.The number of pentagon sides is allowed to change from 5 sides to 10 so that it could take the shape of a hexagon, heptagon, octagon, nonagon, or decagon.Each floor is allowed to expand its area from the center outward.Orientation is also considered a dynamic variable but with limited values due to the nature of the form.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.The fourth proposed form generation method is named the pixel family.Table 4 shows its dynamic parameters where each cube of the 27 cubes is allowed to expand its length by 4 m in one of its external surfaces on the condition that each cube has the chance of expanding just one side in each iteration.For example, a cube in the corner of the second floor can expand its height, its x side, or its y side.

No. of parameters
Initial form Dimensions 1 3 1

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.5, 6, 7, 8, 9, or 10.The fourth proposed form generation method is named the pixel family.Table 4 shows its dynamic parameters where each cube of the 27 cubes is allowed to expand its length by 4 m in one of its external surfaces on the condition that each cube has the chance of expanding just one side in each iteration.For example, a cube in the corner of the second floor can expand its height, its x side, or its y side.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.0 (base case), 4 m in the x, y, or z directions.

Run Thermal Energy Simulation
In this study, the Ladybug Tools for Grasshopper Plugins [36] are used to add the envelope's physical properties and to connect with the energy simulation software Energy Plus, 9.0.1.The weather file (.epw) EnergyPlus for Cairo, Egypt runs hourly annual thermal energy simulations.Since the building area, thereby volume, in all families' cases, changes during optimization, the metric thermal energy use intensity (EUI) is used to calculate the annual energy consumed in kWh/m 2 instead of the total thermal energy demand of the entire building.The usage of EUI permits the comparison of annual energy consumed by buildings in different areas [11].Table 5 shows static parameters set and adjusted by authors in addition to some of the model settings automatically assigned by Honeybee to this building type (medium office building).The number of thermal zones considered in the energy simulation differs in the four cases as shown in the table.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.0 (base case), 4 m in the x, y, or z directions.

Run Thermal Energy Simulation
In this study, the Ladybug Tools for Grasshopper Plugins [36] are used to add the envelope's physical properties and to connect with the energy simulation software Energy Plus, 9.0.1.The weather file (.epw) EnergyPlus for Cairo, Egypt runs hourly annual thermal energy simulations.Since the building area, thereby volume, in all families' cases, changes during optimization, the metric thermal energy use intensity (EUI) is used to calculate the annual energy consumed in kWh/m 2 instead of the total thermal energy demand of the entire building.The usage of EUI permits the comparison of annual energy consumed by buildings in different areas [11].Table 5 shows static parameters set and adjusted by authors in addition to some of the model settings automatically assigned by Honeybee to this building type (medium office building).The number of thermal zones considered in the energy simulation differs in the four cases as shown in the table.

Attributes for each parameter
The dimensions are in meters and are regarded as 1 in the values.0 (base case), 4 m in the x, y, or z directions.

Run Thermal Energy Simulation
In this study, the Ladybug Tools for Grasshopper Plugins [36] are used to add the envelope's physical properties and to connect with the energy simulation software Energy Plus, 9.0.1.The weather file (.epw) EnergyPlus for Cairo, Egypt runs hourly annual thermal energy simulations.Since the building area, thereby volume, in all families' cases, changes during optimization, the metric thermal energy use intensity (EUI) is used to calculate the annual energy consumed in kWh/m 2 instead of the total thermal energy demand of the entire building.The usage of EUI permits the comparison of annual energy consumed by buildings in different areas [11].Table 5 shows static parameters set and adjusted by authors in addition to some of the model settings automatically assigned by Honeybee to this building type (medium office building).The number of thermal zones considered in the energy simulation differs in the four cases as shown in the table.

Attributes for each parameter
The dimensions are in meters and regarded as 1 in the values.0 (base case), 4 m in the x, y, or z directions.

Run Thermal Energy Simulation
In this study, the Ladybug Tools for Grasshopper Plugins [36] are used to add the envelope's physical properties and to connect with the energy simulation software Energy Plus, 9.0.1.The weather file (.epw) EnergyPlus for Cairo, Egypt runs hourly annual thermal energy simulations.Since the building area, thereby volume, in all families' cases, changes during optimization, the metric thermal energy use intensity (EUI) is used to calculate the annual energy consumed in kWh/m 2 instead of the total thermal energy demand of the entire building.The usage of EUI permits the comparison of annual energy consumed by buildings in different areas [11].Table 5 shows static parameters set and adjusted by authors in addition to some of the model settings automatically assigned by Honeybee to this building type (medium office building).The number of thermal zones considered in the energy simulation differs in the four cases as shown in the table.

Optimization and Machine Learning
Research often employs algorithms to generate alternative designs that meet specific requirements, such as environmental needs, while building optimization methods enable designers to search for energy-efficient buildings and use fewer resources; in architecture, engineering, and construction, studies generate new design alternatives for building facades, layouts, envelopes, and massing using search algorithms [37][38][39].The Octopus (multi-objective genetic algorithm) Grasshopper plugin optimizes each of the four cases.Octopus is based on the HypE algorithm and SPEA-2 (by ETH Zurich), which is similar to Galapagos by David Rutten, but with the proposal of the Pareto-Front Principle for Multi-Objectives [40].Octopus can be used to run single objective optimization while considering genetic diversity a second objective [41].Settings in Octopus are population size = 100, elitism = 0.5, mutation probability = 0.2, mutation rate = 0.9, and crossover rate = 0.8.For each newly generated form, the percentage of increase or reduction in annual thermal EUI in comparison to the base case is calculated by using the following equation (Equation ( 1)) [30]: F(X) is the value of the objective function that shows the percentage of increase or reduction in annual thermal EUI, F(g) is the annual thermal EUI of a newly generated form, and F(b) is the annual thermal EUI of the base case.The reduction in EUI in comparison to the base case is shown with positive values, and the increase in EUI is shown with negative values [30].
This study stops Octopus after completing 5 generations for each family.The total number of tested configurations for each family is around 500.After performing optimizations for all cases, the round family optimized was run again to complete 1726 iterations to develop the machine learning model.The proposed ANN prediction model used 1200 iterations in the training stage and 527 iterations in the prediction.

Results
The results showed that the proposed method can enhance the thermal energy performance of different building forms in a hot arid climate.This method offers many enhanced design configurations in terms thermal energy performance for each type of building form to explore the optimal forms.This is achieved by optimizing the building form and orientation parameters of four families of building forms that include many shapes.The proposed method helps architects to incorporate thermal energy performance at the early stage of the design process to test the diversity of building shapes, including basic and irregular forms using computational design tools.
For each of the four families, the Pareto-Front configurations are chosen to demonstrate the best and the worst design configurations with the highest and lowest thermal EUI, respectively, as well as several design configurations in between that are presented.For the analysis conducted in this study, the reference building is square-shaped with an assumed enhanced percentage of 0% (i.e., a rectangle with an aspect ratio of 1.0).Compared to this base case, iterations with lower thermal energy performance are shown with a negative percentage.The round shape performs the best in terms of thermal EUI at 27.9% compared to the initial square form, and it is found that polygon, pixel, and letter forms in addition to the rectangular form tested in [35] exhibit the least thermal EUI at 9.96%, 17.7%, and 19.98%, 22.76%, respectively in comparison to the initial square form.
Only shape, orientation, and geometric aspect ratio can vary in this optimization process.As indicated in Figures 4-7, the Pareto-Front iterations for the four cases provide an overview of the shape optimization results with thermal EUI load (a) and the enhanced percentage in comparison to the base case (b) for the four scenarios.
Only shape, orientation, and geometric aspect ratio can vary in this optimization process.As indicated in Figures 4-7, the Pareto-Front iterations for the four cases provide an overview of the shape optimization results with thermal EUI load (a) and the enhanced percentage in comparison to the base case (b) for the four scenarios.All perspectives are taken from the same north-west view angle and position, and a plan precedes each perspective.North arrows are presented in the top left side where the top is for perspectives and the bottom is for plans.Each floor is assigned a color according to its total thermal load with a numerical range between 800 and 40,000 kWh.North arrows are presented in the top left part and each floor is assigned a color according to its total thermal load with a numerical range between 800 and 40,000 kWh.

The First Building Form Family: Polygon Shape
This simulation is implemented on polygon shapes, generally different from each other and in particular with different sides.Figure 4 shows the 10 Pareto solutions for polygon form, where seven of them are before the base case 0%.The optimal shapes tended to expand the three floors and the whole building to take on the shape of a larger

The First Building Form Family: Polygon Shape
This simulation is implemented on polygon shapes, generally different from each other and in particular with different sides.Figure 4 shows the 10 Pareto solutions for polygon form, where seven of them are before the base case 0%.The optimal shapes tended to expand the three floors and the whole building to take on the shape of a larger regular polygon-shaped form, with a slight difference in the size of each layer.The first form at the left is the optimal one, the form is a decagon (10 sides) with a thermal energy use intensity of 106.67 KWh/m 2 , which is enhanced by 9.96% in reference to the square form.Three forms from the Pareto Front provide the worst performance by −1.68%, −2.14%, and −8.59%, respectively.They differ in the expansion of the floors and the sides number of each floor is decreased.

The Second Building Form Family: Pixels
The second building form family introduces a new form generation method entitled Pixels.All iterations resulting in the Pareto Front of the pixels family are better than the base case shown in Figure 5, which shows seven enhanced solutions.Although the variation in the roof height provided forms with less performance than those with flat roofs, these forms still perform better than the regular base case.The optimal solution obtained was enhanced by 17.7% in reference to the initial squared form and its thermal EUI is about 97.48 kWh/m 2 .

The Third Building Form Family: Letters Shape
The optimization is implemented to verify the best and worst optimization resulting from the proposed letters-shaped building form.Figure 6 shows about nine enhanced solutions before the base case in the Pareto Front of the letter's family.The thermal EUI of the optimal form is 94.81 kWh/m 2 and is enhanced by 19.98% in reference to the base case.The cross, U, T, and L forms in the shown orientation and position have the least performance, as they are less than the base case by 0.59%, 1.75%, 3.17%, and 5.44%, respectively.

The Fourth Building Form Family: Round Shape
In terms of thermal performance, the round form outperformed the other forms and confirmed that the worst case in the round family is better than the squared base case, as its thermal EUI is 113.58 kWh/m 2 and is enhanced by 4.13%.
There are eight Pareto Front solutions as shown in Figure 7.In the fifth optimal solution, the second floor is expanded along nearly the north-south axis to shade the ground and first floor.However, produced a lower thermal performance than the first optimal solution in which the first and second floors underwent much less expansion than the ground floor.This first optimal solution differs from the other forms in terms of orientation; it expanded along the east-west axis.This form is enhanced by 27.9% in reference to the base case with a thermal energy performance of 85.42 kWh/m 2 .Thus, expansion along the east-west axis is recommended as it gives a lower thermal performance.

Scatterplots and Machine Learning of the Round Form
In this study, round form optimization took the longest time compared to other forms optimized in a nearly similar low time.For example, round form optimization (five generations) is performed over around 5 days where a much-complicated iteration is simulated in around 12 min using a laptop with an installed memory of 16.0 GB and a 7th Generation Intel ® CoreTM i7-7700HQ Processor (2.80 GHz, up to 3.80 GHz with Turbo Boost) (RAM) while Letters optimization (five generations) is performed in half a day.
After finishing the optimization for all the building forms and finding the round family as the form family with the best performance.Optimization was run again for the round family to test more iterations and to reach 1726 simulated design configurations with no redundancy.Then scatterplots were developed to show the relationship between each dynamic parameter and the annual thermal EUI objective function.Figure 8 shows scatterplots where each graph shows the relationship between one dynamic parameter value and thermal EUI values.In the scatterplots, the trend direction is shown among the simulated iterations.Each blue circle represents one iteration, whereas the Annual thermal EUI (kWh/m 2 ) values are shown on Y-Axis, and the dynamic parameter values are shown on X-Axis.All dynamic parameters appeared to positively impact enhancing annual thermal EUI of the round shape with different levels as the R 2 for the scatterplots ranges between 0.6466 and 0.201.Expansion of the ground floor has the strongest positive impact on enhancing thermal EUI (R 2 = 0.6466) then the whole building expansion (R 2 = 0.533), then the rotation of the building (R 2 = 0.20), and finally, both the first and second floors expansions that have the least positive impact on EUI (R 2 = 0.036 and R 2 = 0.033).A machine learning prediction model is developed for the round family with the highest calculation time and the best performance.This model allows for predicting the rest of the iterations available in the solution space [32,42].The second optimization for the round family was performed to reach sufficient iterations to develop the ANN prediction model.Figure 9 shows two models, each showing the predicted values against the simulated ones.In the first prediction phase (Figure 9a), the 527 indicated random configurations of the round family achieved an R 2 (coefficient of determination) value of 0.1221 that was enhanced in the second phase (Figure 9b) to reach R 2 = 0.798.
Although the prediction of the EUI of the tested prototypes was instant due to the nature of using ANN for prediction, it is essential to note that the training time for these datasets is longer than the prediction time by default.The longest time consumed for training the used data sets was 15 min.with the ANN set to have 30% of the training data as training validation.The ANN structure consisted of three hidden layers of 4, 3, and 2 nodes in order from input to output.The training iterations were set to 1000 to try and compensate for the relatively small size of the database.Better results have been achieved by a lesser number of layers for a smaller portion of the training data, as shown in Figure 9.The self-validation ratio was the same for this one.However, the number of data entries was less, 527 inputs, with two hidden layers of 4 and 2 nodes and 527 iterations in backpropagation training for the ANN.The training time for this training set was around 3 min only.Clearly, this only indicates the time-saving capabilities for such a time costly process.This trial opens the door for further investigation of utilizing ANN applications in the prediction of the different aspects of the performance of the built environment and saves the time consumption costs in the early stages of the design phase.A machine learning prediction model is developed for the round family with the highest calculation time and the best performance.This model allows for predicting the rest of the iterations available in the solution space [32,42].The second optimization for the round family was performed to reach sufficient iterations to develop the ANN prediction model.Figure 9 shows two models, each showing the predicted values against the simulated ones.In the first prediction phase (Figure 9a), the 527 indicated random configurations of the round family achieved an R 2 (coefficient of determination) value of 0.1221 that was enhanced in the second phase (Figure 9b) to reach R 2 = 0.798.
Although the prediction of the EUI of the tested prototypes was instant due to the nature of using ANN for prediction, it is essential to note that the training time for these datasets is longer than the prediction time by default.The longest time consumed for training the used data sets was 15 min.with the ANN set to have 30% of the training data as training validation.The ANN structure consisted of three hidden layers of 4, 3, and 2 nodes in order from input to output.The training iterations were set to 1000 to try and compensate for the relatively small size of the database.Better results have been achieved by a lesser number of layers for a smaller portion of the training data, as shown in Figure 9.The self-validation ratio was the same for this one.However, the number of data entries was less, 527 inputs, with two hidden layers of 4 and 2 nodes and 527 iterations in backpropagation training for the ANN.The training time for this training set was around 3 min only.Clearly, this only indicates the time-saving capabilities for such a time costly process.This trial opens the door for further investigation of utilizing ANN applications in the prediction of the different aspects of the performance of the built environment and saves the time consumption costs in the early stages of the design phase.

Conclusions
This study suggests four new building form generation methods for office building typology and evaluates their thermal energy performance in Cairo's hot climate.Each method produces a range of building shapes that fit into a specific category.These categories include polygons ranging from pentagons to decagons, complex cubic forms resembling pixels, letters such as H, L, U, T, cross, and other intricate cubic shapes, and circular or oval shapes belonging to the round family.The findings demonstrated that the suggested methods are effective in improving thermal energy performance in the newly generated building forms when compared to the standard square-shaped building.The results of the optimizations are compared, and the four categories are analyzed based on their distinct architectural features and thermal performance.Scatterplots are developed for the round family, which has the best performance, to evaluate the influence of each dynamic parameter on enhancing thermal energy performance.The optimization process for the round family requires a significantly longer calculation time than the other families.As a result, an ANN prediction model based on machine learning is developed for the round family after completing 1726 unique iterations in the optimization process.The ANN is trained using 1200 round form configurations and their corresponding annual thermal EUI values.The ANN code is subsequently used to predict the EUI for the remaining 526 iterations, allowing for faster and more efficient optimization.The prediction model demonstrated the applicability of the proposed ANN model with R 2 = 0.798.
Future applications on other climates are recommended to expand this study.The present study considered the dynamic parameters of the form and orientation and the objective function of thermal EUI only to understand the impact of building form and its orientation on enhancing annual thermal EUI.The optimization of envelope parameters such as WWR in addition to the consideration of other objectives, such as daylighting and acoustics, is recommended.In addition, this study's optimization process for all forms except the round family was stopped after performing six generations.Testing more iterations through the increase in the number of generations is also recommended to find better-enhanced solutions.This will be achieved through using better computer resources or increasing the time of calculations.For the letter family, the pure letter forms need to be tested in all orientations.For the prediction phase, future studies will use more than 1726 iterations to enhance the value of the R 2, thereby the prediction accuracy.

Conclusions
This study suggests four new building form generation methods for office building typology and evaluates their thermal energy performance in Cairo's hot climate.Each method produces a range of building shapes that fit into a specific category.These categories include polygons ranging from pentagons to decagons, complex cubic forms resembling pixels, letters such as H, L, U, T, cross, and other intricate cubic shapes, and circular or oval shapes belonging to the round family.The findings demonstrated that the suggested methods are effective in improving thermal energy performance in the newly generated building forms when compared to the standard square-shaped building.The results of the optimizations are compared, and the four categories are analyzed based on their distinct architectural features and thermal performance.Scatterplots are developed for the round family, which has the best performance, to evaluate the influence of each dynamic parameter on enhancing thermal energy performance.The optimization process for the round family requires a significantly longer calculation time than the other families.As a result, an ANN prediction model based on machine learning is developed for the round family after completing 1726 unique iterations in the optimization process.The ANN is trained using 1200 round form configurations and their corresponding annual thermal EUI values.The ANN code is subsequently used to predict the EUI for the remaining 526 iterations, allowing for faster and more efficient optimization.The prediction model demonstrated the applicability of the proposed ANN model with R 2 = 0.798.
Future applications on other climates are recommended to expand this study.The present study considered the dynamic parameters of the form and orientation and the objective function of thermal EUI only to understand the impact of building form and its orientation on enhancing annual thermal EUI.The optimization of envelope parameters such as WWR in addition to the consideration of other objectives, such as daylighting and acoustics, is recommended.In addition, this study's optimization process for all forms except the round family was stopped after performing six generations.Testing more iterations through the increase in the number of generations is also recommended to find better-enhanced solutions.This will be achieved through using better computer resources or increasing the time of calculations.For the letter family, the pure letter forms need to be tested in all orientations.For the prediction phase, future studies will use more than 1726 iterations to enhance the value of the R 2 , thereby the prediction accuracy.

Figure 2 .
Figure 2. Base case to compare results to it.

Figure 1 .
Figure 1.Proposed workflow diagram for all building forms (the first four stages are applied to all building forms while the last two stages are applied to the round shaped only).

Figure 2 .
Figure 2. Base case to compare results to it.

Figure 2 .
Figure 2. Base case to compare results to it.

Figure 3 .
Figure 3. Shows few examples of possible forms that could be generated by letters form representation.

Figure 3 .
Figure 3. Shows few examples of possible forms that could be generated by letters form representation.

Figure 3 .
Figure 3. Shows few examples of possible forms that could be generated by letters form representation.

Figure 3 .
Figure 3. Shows few examples of possible forms that could be generated by letters form representation.

Figure 3 .
Figure 3. Shows few examples of possible forms that could be generated by letters form representation.

Figure 4 .
Figure 4. Shows Cairo Pareto-Front solutions for the polygon building form.Design configurations are ordered from the optimal EUI to the worst (from left to right, and from top to bottom).(a: Thermal EUI (kWh/m 2 ), b: percentage of increase or reduction in comparison to the base case).All perspectives are taken from the same north-west view angle and position, and a plan precedes each perspective.North arrows are presented in the top left side where the top is for perspectives and the bottom is for plans.Each floor is assigned a color according to its total thermal load with a numerical range between 800 and 40,000 kWh.

Figure 4 .
Figure 4. Shows Cairo Pareto-Front solutions for the polygon building form.Design configurations are ordered from the optimal EUI to the worst (from left to right, and from top to bottom).(a: Thermal EUI (kWh/m 2 ), b: percentage of increase or reduction in comparison to the base case).All perspectives are taken from the same north-west view angle and position, and a plan precedes each perspective.North arrows are presented in the top left side where the top is for perspectives and the bottom is for plans.Each floor is assigned a color according to its total thermal load with a numerical range between 800 and 40,000 kWh.

Figure 5 .
Figure 5. Shows Cairo Pareto-Front solutions for the pixels family.Design configurations are ordered from the optimal EUI to the worst (from left to right, and from top to bottom).(a: Thermal EUI (kWh/m 2 ), b: Percentage of increase or reduction in comparison to the base case).All perspectives are taken from the same north-west view angle and position.The North arrow is presented in the top left side and the zones are assigned colors according to their total thermal load with numerical range between 800 and 6400 kWh.

Figure 5 .
Figure 5. Shows Cairo Pareto-Front solutions for the pixels family.Design configurations are ordered from the optimal EUI to the worst (from left to right, and from top to bottom).(a: Thermal EUI (kWh/m 2 ), b: Percentage of increase or reduction in comparison to the base case).All perspectives are taken from the same north-west view angle and position.The North arrow is presented in the top left side and the zones are assigned colors according to their total thermal load with numerical range between 800 and 6400 kWh.

Figure 5 .
Figure 5. Shows Cairo Pareto-Front solutions for the pixels family.Design configurations are ordered from the optimal EUI to the worst (from left to right, and from top to bottom).(a: Thermal EUI (kWh/m 2 ), b: Percentage of increase or reduction in comparison to the base case).All perspectives are taken from the same north-west view angle and position.The North arrow is presented in the top left side and the zones are assigned colors according to their total thermal load with numerical range between 800 and 6400 kWh.

Figure 6 .
Figure 6.Shows Cairo Pareto-Front solutions for the Letter shape.Design configurations are ordered from the optimal EUI to the worst (from left to right, and from top to bottom).(a: Thermal EUI (kWh/m 2 ), b: Percentage of increase or reduction in comparison to the base case).All perspectives are taken from the same south-east view angle and position.The North arrow is presented in the top left side and the zones are assigned colors according to their total thermal load with numerical range between 800 and 6400 kWh.

Figure 6 . 16 Figure 7 .
Figure 6.Shows Cairo Pareto-Front solutions for the Letter shape.Design configurations are ordered from the optimal EUI to the worst (from left to right, and from top to bottom).(a: Thermal EUI (kWh/m 2 ), b: Percentage of increase or reduction in comparison to the base case).All perspectives are taken from the same south-east view angle and position.The North arrow is presented in the top left side and the zones are assigned colors according to their total thermal load with numerical range between 800 and 6400 kWh.Computation 2023, 11, x FOR PEER REVIEW 11 of 16

Figure 7 .
Figure 7. Shows Cairo Pareto-Front solutions for the round family.Design configurations are ordered from the optimal EUI to the worst (from left to right, and from top to bottom).(a: Thermal EUI (kWh/m 2 ), b: Percentage of increase or reduction compared to the base case).All perspectives are taken from the same southeast view angle and position, and a plan precedes each perspective.North arrows are presented in the top left part and each floor is assigned a color according to its total thermal load with a numerical range between 800 and 40,000 kWh.

Figure 8 .
Figure 8. Scatterplots of the round form dynamic parameters values against the EUI.

Figure 8 .
Figure 8. Scatterplots of the round form dynamic parameters values against the EUI.

Figure 9 .
Figure 9. Correlation of prediction and simulation for 527 random configurations of the round family.

Figure 9 .
Figure 9. Correlation of prediction and simulation for 527 random configurations of the round family.

Table 1 .
Building forms and orientation dynamic parameters for letters form with the north direction.

Table 1 .
Building forms and orientation dynamic parameters for letters form with the north direction.

Table 1 .
Building forms and orientation dynamic parameters for letters form with the north direction.

Table 2 .
Building form and orientation dynamic parameters for circular form.Table presents northwest bird's eye perspective, with the north direction.

Table 2 .
Building form and orientation dynamic parameters for circular form.Table presents northwest bird's eye perspective, with the north direction.

Table 3 .
Polygon building form and orientation dynamic parameters for Cairo case.Table presents north-east bird's eye perspective, with the north direction.

Table 2 .
Building form and orientation dynamic parameters for circular form.Table presents northwest bird's eye perspective, with the north direction.

Table 3 .
Polygon building form and orientation dynamic parameters for Cairo case.Table presents north-east bird's eye perspective, with the north direction.

Table 2 .
Building form and orientation dynamic parameters for circular form.Table presents northwest bird's eye perspective, with the north direction.

Table 3 .
Polygon building form and orientation dynamic parameters for Cairo case.Table presents north-east bird's eye perspective, with the north direction.

Table 2 .
Building form and orientation dynamic parameters for circular form.Table presents northwest bird's eye perspective, with the north direction.

Table 3 .
Polygon building form and orientation dynamic parameters for Cairo case.Table presents north-east bird's eye perspective, with the north direction.

Table 3 .
Polygon building form and orientation dynamic parameters for Cairo case.Table presents north-east bird's eye perspective, with the north direction.

Table 2 .
Building form and orientation dynamic parameters for circular form.Table presents northwest bird's eye perspective, with the north direction.

Table 3 .
Polygon building form and orientation dynamic parameters for Cairo case.Table presents north-east bird's eye perspective, with the north direction.

Table 2 .
Building form and orientation dynamic parameters for circular form.Table presents northwest bird's eye perspective, with the north direction.

Table 3 .
Polygon building form and orientation dynamic parameters for Cairo case.Table presents north-east bird's eye perspective, with the north direction.

Dynamic Pa- rameters Polygon Sides Floor Expansion Building Rotation No. of parameters
Table presents northwest bird's eye perspective, with the north direction.

Table 3 .
Polygon building form and orientation dynamic parameters for Cairo case.Table presents north-east bird's eye perspective, with the north direction.
Table presents northwest bird's eye perspective, with the north direction.

Table 3 .
Polygon building form and orientation dynamic parameters for Cairo case.Table presents north-east bird's eye perspective, with the north direction.

Table 4 .
Pixels form dynamic parameters.Table presents north-east bird eye perspective, with the north direction.

Table 4 .
Pixels form dynamic parameters.Table presents north-east bird eye perspective, with the north direction.

Table 4 .
Pixels form dynamic parameters.Table presents north-east bird eye perspective, with the north direction.

Table 5 .
Static building parameters for all families.

form thermal zones no. 18 Pixels form thermal zones no. 27 Circular forms thermal zones no. 3 Pentagonal forms thermal zones no. 3 Floor Height in all forms
ElevationComputation 2023, 11, x FOR PEER REVIEW 7 of 16

Table 4 .
Pixels form dynamic parameters.Table presents north-east bird eye perspective, with the north direction.

Table 5 .
Static building parameters for all families.

Table 5 .
Static building parameters for all families.