Optimization of Apartment-Complex Layout Planning for Daylight Accessibility in a High-Density City with a Temperate Climate

As interest in sustainable design increases, many methods have been suggested to develop an integrated sustainable design process. However, due to the lack of a scientific procedure using parametric tools for an objective evaluation, it is difficult to move forward with integrated sustainable design. In addition, the design priority of the indoor environment is still relatively low because of the score composition of the green-building certification system. Therefore, this study aimed to develop a simulation tool and method to help apartment-complex layout planning in urban contexts by focusing on the indoor daylight environment. In particular, Korean cities are densely formed with high-rise buildings in a small area, so the Korean Building Act has complicated provisions to reduce overshadowing between buildings. To reduce unnecessary wasted time while checking these complicated regulations, a simulation was used to automatically check building offsets. Galapagos, a component of Rhino-Grasshopper, was used to apply a genetic algorithm that discovered optimized results. A standard flat-type apartment complex in Seoul was analyzed with the developed tools in order to compare the existing plan with an optimized layout. The results of the simulation and the suggested analysis methods can help in the initial planning stages of an integrated sustainable design in a high-density city with a temperate climate. This allows architects to utilize the proposed results or use them as a reference for further modification and design.


Introduction
The interior of a city is complexly intertwined with various elements such as nature, architecture, traffic, and other infrastructure that interact with each other. Therefore, when planning a city, it is necessary to not only account for these and other factors but also to understand the entire context of the city and plan for it as a whole. Moreover, as interest in sustainable design and development increases, many methods have been suggested to develop an integrated sustainable design process that reflects various factors working together [1][2][3]. To successfully implement an integrated sustainable design, it is important to specify the direction of the plan and set up goals that can be achieved step-by-step through continuous feedback [4].
However, the lack of a proper scientific analytical procedure and objective evaluation methods and an unclear environmental approach can lead to confusion in the application of integrated sustainable design processes to actual projects [1]. It is also problematic that integrated sustainable design is not carried out from the beginning of the design and that sustainable design solutions are being made by experts later in the design process [3]. Because the goal for apartment-complex planning in urban areas is to create a residence, the interest in the importance of the life satisfaction of those that will be living in residential buildings is increasing.
However, apart from this interest, the design priority of indoor environments is still low due to the score composition of the green-building certification system [5,6]. Besides, previous studies to address the problems in the existing layouts of apartment complexes have focused on reducing energy consumption or increasing the energy efficiency of buildings by changing the height or elevation of several buildings. Some studies have tried to increase the energy efficiency of buildings by suggesting a specific arrangement that can only be applied in a particular city [7][8][9]. Previous studies have also tried to improve the light environment in relatively passive ways through modifying the building elevations or by the addition of shading on the facades rather than improving the building layout plans, which is an initial design stage [10][11][12].
Therefore, this study aims to develop a simulation tool and a technology that assists in finding appropriate building layouts in urban contexts by focusing on the indoor light environment, which is one of the factors that significantly affects occupantsʹ life satisfaction. In particular, most cities in Korea are densely formed by high-rise buildings in a small area. Because of this phenomenon, the shadow of each building can have a negative effect on the accessibility of natural daylight in other buildings. Therefore, the Korean Building Act is complicated and has various regulations on the offset distance between buildings. For this reason, it takes a considerable amount of time to plan the building arrangement of an apartment complex.
To save unnecessary wasted time in checking the regulations, in this study, a simulation tool was used to automatically check the Korean Building Act and confirm what legal problems could occur when planning an apartment complex layout. In addition, based on the Korean Building Act, this study tried to determine the hours of sunshine coming into each of the residential units. A layout was sought that maximized the light environment by using a genetic algorithm to find optimized values under the conditions of the various existing environmental variables. Galapagos, a component of Rhino-Grasshopper [13], was used to apply the genetic algorithm. In addition to the optimal layout arrangement, in our system, when the user attempts to change the building layout, they can quickly identify the range of possible modifications by visualizing the offset distance between buildings and any violation of the building act. Therefore, the user could easily determine the extent to which they could modify the layout changes themselves.
The target site in this study was an apartment complex in Apgujeong, Seoul. The apartments in the site are of a flat-type housing form that is representative of those commonly used in Korea. This site was selected in order to apply the simulation tool to an actual case and review the results. Rhino 6 [14], a three-dimensional (3D) modeling program, was used to create the surrounding environment. It was also utilized to determine building layout plans that satisfied the maximum accessibility of daylight and to form residential buildings that satisfied the building coverage ratio (BCR) and floor area ratio (FAR) requirements.
Finally, this study compared three factors between the optimized apartment complex layout and the existing layout. The factors were the total sunshine hours received by each residential unit, the number of residential units that received two or more consecutive hours of sunshine, and the mean useful daylight illumination (UDI) values of the buildings. By comparing the optimized result and the current plan in the same site, improved building layout planning can be explored. The proposed optimization methods and the technology in this study can be applied in the early stages of the design for apartment-complex layout planning. It will help improve the integrated sustainable design process and simplify some decision-making by allowing the review of a number of building layouts from the simulation results.

Integrated Sustainable Design Process
As the demand for sustainable buildings increases, it is necessary to establish an approach to integrated sustainable design in order to conduct complex design analysis in sustainable projects.
However, an integrated process for sustainable buildings is limited due to a lack of background knowledge and difficulty in using simulation tools, and the design processes used are often unclear because they are done differently for each project. Therefore, it is crucial to determine the direction of the design by quickly acquiring and organizing the necessary information [1,2].
Reed and Gordon [3] argue that integrated sustainable design can have a positive effect on the natural environment, which would benefit from the construction industry. However, there are problems in that sustainable design experts are often assigned later in the process, and integrated sustainable design is not adequately implemented in managing the entire design process. The integrated sustainable design process takes more labor, time, and money than the traditional method in the initial stages when applying the process to the project. However, when considering the entire project period, a project adopting an integrated sustainable design process needs less money and effort than a project using the traditional process. As a result, the integrated sustainable design process leads to better quality design, resulting in savings to a business's budget.
In addition, Lewis [4] argues that a typical design process without an integrated sustainable design is not well communicated and collaborated among each member. For this reason, the time and cost will increase because it is not likely that a constructive design strategy will be established. Therefore, it is important to have a clear goal with a continuous idea of sustainable design and to review the project often. Furthermore, in order for the integrated sustainable design plan to be conducted smoothly, it is necessary to consider social, ecological, and urban contexts together, beyond the building-centric approach [15]. Therefore, it is very effective to use sustainable computer simulation tools in order to consider various environmental factors in the design and to continuously receive objective feedback from the beginning of a plan to the end. Ultimately, it will help to apply integrated sustainable design to projects in the early stages.

Preference for Residential Space and the Importance of the Light Environment
In 2008, 41.8% of Korean residential-type buildings were apartment complexes, and 49.2% were apartment types in 2018. The proportion of apartment types is steadily increasing [16]. People in Korea increasingly prefer residential space that is facing south, which is suitable for the climate conditions in the country, and the composition of the residential unit plane has tended to change accordingly [17]. Moreover, in Korea, the traditional residential style has been based on its temperate climate and feng shui; so far, the preference for south-facing units has been maintained. Thus, the living room and some other rooms should be located southward [18]. In the case of China, which has a similar urban-type as Korea, buildings' shadows interfere with adjacent buildings in accessing natural daylight because of the overcrowded urban environment. For this reason, the height of the building, floor height, and the building orientation, which affect the accessibility of daylight and right to light as to receiving more sunshine, have a significant impact on the building price [19]. As such, Korea's real-estate values are also closely related to the factors that influence the accessibility of daylight or views from within the building [20,21].
Natural daylight has effects on the psychological aspects and health of the occupants of the building. Natural daylight through windows helps with psychological satisfaction [22], and exposure to natural light has positive effects on people's health and the improvement of their quality of life [23,24]. Lim [25] found that people in Korea are increasingly interested in sustainable residential space, and they are paying attention to sustainable aspects of buildings. Therefore, architecture and construction companies are attempting to provide buildings that meet sustainable building requirements. According to this demand, new aspects of the legal system have been created to improve the quality and quantity of sustainable buildings [26].
Various studies have been conducted to improve urban areas. Some studies have analyzed urban environments or existing urban forms in order to suggest a modified urban form that obtains more solar energy [7,9] or new urban layout plans to reduce energy consumption [8,27]. Moreover, Zhang et al. [28] suggested a suitable block typology in a tropical high-density city by comparing solar potential and energy efficiency according to the arrangement style and forms of the buildings. However, for sustainable city plans, studies need to be concerned not only with the energy efficiency of whole buildings but also with improving the quality of the indoor environment for the occupants. Various previous studies have concentrated on energy problems, but they often do not consider the life satisfaction of the people living in the building. Therefore, there is a need for further research focusing on the improvement of the indoor environment of buildings, such as the light environment.

National Differences about the Right of Light and Attempting to Find the Optimal Value for Improving the Urban form and Layout
As the awareness of the importance of the light environment increases, governments are increasingly protecting people's right to receive natural light with laws and regulations. However, since countries have different contexts and rules regarding the environment, the scope and influence of the right to sunshine are different in different nations. In the case of the U.S. rights of light, the main purpose so far has been to protect the power of energy generation by solar energy devices on neighboring buildings [29]. In some cases, even if a neighboring landowner has violated an individual's rights of light, there have been rulings in which the exercise of land ownership was given precedence over the infringement [30]. Moreover, often there is not a legal guarantee regarding access to direct sunlight in Western countries unless there has been a deliberate intent to interrupt or disrupt neighbors by restricting or blocking access [31].
However, as cities grow and develop, particularly in countries like China, they have become much denser and have had more problems related to daylight and access to sunlight. For this reason, regulations are being made, revised, and amended in order to prevent problems with sunlight access [32]. Cities in Japan also have significant density, which often causes problems regarding sunlight when new buildings are erected in crowded downtown areas because it is easy to overshadow existing structures and facilities around them. Therefore, a government can control the amounts of lighting and shading times according to sunlight and shadow regulations [33]. Like the two previous countries mentioned, Korea also has high-density cities and is in a similar situation. To some extent, influenced by Japanese legislation, Korea has similar building and land-use classification methods, and through these, various offset distances are established as regulations in the building acts. Sunlight-related problems can occur in any country where many buildings are densely placed in relatively small areas. As a result, in those countries where this is a frequent occurrence, there are typically various building codes to prevent problems in advance, and there are specific and complex methods for evaluating the rights of light to objectively determine whether buildings are infringed.
In a nation with existing high-density urban areas, even when the designers have proceeded in consideration of building acts and regulations containing rights of light and the surrounding environment, it is challenging for a plan to have thoroughly considered all of the factors. Therefore, a genetic algorithm is often used to find optimized results quickly, even though there are many different variables. In addition, it has become increasingly practical to apply any widely available model, which can be relatively easy to understand and use intuitively [34].
Yu et al. [35] focused on indoor thermal comfort and energy consumption according to the building forms and found the optimization results that maximized both factors. Genetic algorithms were used to obtain optimized building space configurations. Improving energy efficiency is essential for coping with global climate change since urban cities consume much energy. Therefore, Keirstead and Shah [8] conducted a study by considering not only building energy efficiency but also transportation costs for urban development to improve the city plan. In their study, a genetic algorithm was used to determine the layout that provided the optimal value of the two factors. Likewise, there are several previous studies to obtain optimal results through genetic algorithms for the improvement of city planning [36][37][38][39]. However, these studies mainly focused on energy consumption or economical costs rather than the living quality of the occupants, such as the impact of the indoor daylight environment. In addition, to improve the light environment, previous studies have used relatively passive methods, such as modifying the building elevations or by the addition of shading on the facades rather than improving the building layout plans in the beginning design stage [10][11][12]. A previous study attempted to optimize building layout plans while considering the light environment from the initial design stage, but in that case, a limited apartment size was used and various light environment factors were not considered, which limited its application to an actual environment and building planning [40].
By using a genetic algorithm, this study proposes an optimized layout plan of an apartment complex that considers three factors related to the light environment, which are daylight accessibility, the indoor daylight environment, and consecutive sunshine hours. In addition, this method can be applied in dense urban contexts with a temperate climate zone while satisfying a complex building act, such as offset distances. In this study, by using a prepared reference plan, the simulation procedure could create various apartment unit combinations, which helps in applying and using an integrated sustainable design from the beginning stages.

Methodology
This study summarizes the elements necessary by law for designing apartments ( Figure 1) and how the legal regulations should be applied to each of the elements as well (Table 1) based on the Korean Building Act [41], the most basic planning in the arrangement of apartment complexes. These legal regulations and restrictions were put into a visual form to show the offset distances between the buildings in the viewport of Rhino 6 (using the algorithms of Rhino-Grasshopper). In addition, the color of the buildings was changed in the visualization when a violation of the building regulations occurred. This allows users of the software to identify problems and easily modify the locations of each building. The Korea Land & Housing (LH) Corporation's building apartment unit plans were used to define the size of the buildings used in the simulation so that they would be similar to the actual buildings. An algorithm was developed to create a flat-type building by combining various residential plans according to a household size of one to four people. Once the desired apartment unit plans and buildings to be constructed were designated, the maximum possible BCR and FAR within the site were automatically calculated and generated as buildings were placed on the site.

A. Building Coverage Ratio (BCR), Floor-Area Ratio (FAR)
Type F. The Right of Sunshine Hours 4 All residential units in the building can secure sunshine for more than two consecutive hours between 9 am and 3 pm based on the winter solstice 5 As the next design step, daylight analysis should be conducted to improve daylight accessibility, consecutive sunshine hours, and the overall indoor light environment of the buildings in the apartment complex. For the light environment simulation, the energy plus weather file (EPW) of Seoul, Korea, was used. South Korea is located in Eastern Asia, and the latitude and longitude are 37° 00'00'' N, 127° 30'00'' E, respectively. In the case of the climate, South Korea lies in the temperate zone with four distinct seasons [42]. More precisely, according to Köppen-Geiger climate classification, South Korea mainly has a monsoon-influenced hot-summer humid continental climate (Dwa), hotsummer humid continental climate (Dfa), and humid subtropical climate (Cfa). Seoul has a Dwa climate [43,44]. Utilizing Diva for Rhino-Grasshopper [45], which can extract solar vectors over time, an algorithm was developed to identify the sunshine hours of each of the residential units and whether the units met the requirement of more than two consecutive sunshine hours. The analysis point was set at the center point of a main window for each residential unit in the buildings according to the method commonly used in Korea. The size of the analysis mesh depends on the selected reference plans, which are summarized in Figure 2. The detailed analysis method is described in Section 4.4. In addition, useful daylight illumination (UDI), which is one of the standards for accessing indoor daylight quality, was used to confirm the daylight environment of the buildings. For this simulation, the approximate height of a desk (0.8 m) was designated as the analysis height, and the analysis mesh size was set to 2 m 2 . The material properties of the walls, floors, sealings, windows, and the ground required for the light environment analysis are summarized in Table 2.
The genetic algorithm embedded in the Grasshopper Galapagos component was used to find an optimal layout plan for all the units in the apartment complex to maximize all three factors with the same weighting and importance. The analysis time was set at a maximum of 14 h. The organization of the overall process is shown in Figure 3.
The typical apartment types in Korea are flat-type, tower-type, and L-type apartments. Among these types, flat-type apartments are typically selected to improve daylight accessibility and ventilation performance. Since flat-type apartments are often monotonously arranged facing in a southern direction, regardless of the surrounding environment, this study was intended to confirm whether the layout plan of a southern orientation is the best arrangement type for securing daylight accessibility. Therefore, an apartment complex in Apgujeong (Figure 4), where this representative flat-type building was located, was selected as a target site to apply the developed algorithm. The simulation was performed under as many similar conditions as possible with the characteristics of the legal code and buildings of the existing site. With this approach, the study was able to compare the sunshine hours results between the actual and optimized layout plan and examine any differences. Ground OutsideGround_20 This is a purely diffuse reflector with a standard reflectivity Opaque Reflectivity: 20%

Building Act Check
Essentially, the Building Act aims to contribute to the promotion of public welfare by improving the safety, function, environment, and aesthetics of buildings. In particular, the reason that BCR, FAR, and various offsets are defined is to prevent an excessive density of buildings and to promote a desirable environment through the enhancement of sunlight, lighting, and ventilation by securing a minimum amount of public space on the land. However, promoting a desirable environment with offset distance regulations does not include the purpose of energy generation or collection, and the requirements do not depend on the climate zone. Some of the laws can be illustrated in diagrams such as Figure 5. Distances that must be maintained according to the types of buildings and land uses following the regulation outlines were identified and applied to the simulations. In addition, an algorithm was constructed for visual identification by changing the color of buildings that violate the building act to red when non-compliance occurs ( Figure 6). This makes it easier for simulation users to detect problems visually and correct them.

Building Generation
For the simulation, this study identified the proper dimensions of the residential plans of the flat-type apartments by referencing the plans from the LH corporation. The plans were divided into three parts: corridor space, exclusive residential space, and a balcony (Figure 2). The reason for the division in the simulation was that BCR and FAR was to be calculated, including corridor and exclusive residential space (but the balcony was excluded). In addition, to facilitate the simulation analysis, the space was changed into a rectangular shape while maintaining the same measured area, and the core space was excluded. As seen in Figure 2, residential units were set into five types from E to I according to household sizes. Different unit types could be combined in different arrangements, and these could be changed for different floors, which created various types of residential buildings (Figure 7).

Building Layout Method
After creating the buildings with combinations of the residential plans and setting the land use, additional buildings were created within the maximum BCR and FAR according to the Korean Building Act restrictions (Figure 8). Buildings were composed of cuboids, and legal properties were assigned to each of the building envelopes. According to the building envelope properties, the offset distances between buildings and between the buildings and building lines were calculated, respectively.
On the selected site, buildings were placed at a random location that satisfied more than the minimal legal offset distances, such as between the building and the site boundary or between the new building and other existing ones. The placement angle of the building was also configurable. In this simulation, the angle of the building orientation could be one of two options, zero or 90 degrees, and one of the orientations was randomly selected when each building was placed in the site ( Figure  9). Areas inside the site can also be designated to not allow building placement so that the user must work around those constraints. Figure 8 is an example of a building layout according to the process described. The building used was set to House Type I, and the land use was set to A-2 zoning.
Then, based on the building act, the buildings had to meet the specified offset distance between each of the building elements: the BCR should not be more than 50%, and the FAR should not be less than 100% and not more than 150%. Through simulation, the maximum number of buildings that comply with the regulations of BCR and FAR of the building act was calculated and the buildings were generated. In Figure 8a, four different types of buildings were built and duplicated, creating a total of 10 buildings. Figure 8c is a result of the randomized placement at the site except for the exclusion areas.

Indoor Daylight Environment Analysis
The purpose of this study was to provide a better residential environment as well as to satisfy the Korean Building Act provisions. Thus, this study developed algorithms to evaluate the indoor daylight environment in the residential space. In Korea, there are legal regulations regarding the evaluation of the indoor daylight environment, which must be assessed as the hours of sunshine coming into each of the residential areas from 9 am to 3 pm at the winter solstice (December 22nd), and the maximum sunshine hours for that date are approximately 9 h and 34 min. To analyze this, the path of the sun's movement and the corresponding solar vector are needed. Therefore, the energy plus weather file (EPW) of Seoul, Korea, was used. The latitude and longitude of Seoul are 37°34ʹ00ʺ N and 126°58ʹ41ʺ E, respectively.
The daylight accessibility is judged by whether shadows cover the center points of the main windows of the residential units, which is the most commonly utilized simulation method in Korea [46]. Reference points are placed in the center of each unit's main windows. When shadows cover those points, it is judged that the residential units do not receive daylight. On the contrary, when a part of the window is shadowed but the reference point is not covered, it is judged to receive sunshine ( Figure 10). This study also adopted the same method as a way to evaluate the daylight environment.
Each unit received different color codes on the visual depending on the hours of sunshine received, making it easier to identify visually. Between 9 am and 3 pm, each of the residential units was coded in white when receiving a total of 7 hours sunshine, and in black if there was no daylight access. There are also important legal incentive conditions regarding sunshine hours to mitigate offset distances. When there are no residential units which cannot secure two consecutive hours of sunshine between 9 am and 3 pm, a building can receive incentives to mitigate the offset distance regulation. In the simulation, the units that did not meet the minimum requirement of sunshine hours were coded in purple ( Figure 11). In addition, it is necessary to analyze the indoor daylight environment by using not only daylight accessibility but also standard daylight environment assessment indicators. In this study, UDI, which is one of the typical standards, was used to determine the level of the light environment. UDI is a value that identifies hourly the natural illumination during a one-year occupancy time and shows how often the illumination satisfied a certain threshold (100 to 2000 lux). This allows one to see how much appropriate illumination is provided indoors. The UDI analysis also used the Seoul EPW and applied the materials in the buildings and the site as shown in Table 2. This study assumed that each of the residential units had a main window on the south or east side, and the window-wall ratio was set to 0.45 points. Figure 12 is the result of the sample UDI analysis.

Genetic Algorithm Process for Discovering the Layout Plans to Maximize Fitness Value
In this study, an algorithm was configured to find a layout that would receive the maximum sunshine hours, with the maximum number of residential units receiving more than two consecutive sunshine hours, and a UDI that satisfied the requirements of the Korean Building Act. A genetic algorithm built into the Galapagos component in Rhino-Grasshopper was used to optimize the layout of the apartment complex. The optimization was largely divided into two parts: (1) the evaluation process for the fitness values and (2) the process of the genetic algorithm.

The Evaluation Process for the Fitness Values.
The fitness value was calculated according to the following order: 1. Set building use, land use, location, and weather. 2. Create buildings by setting the combination of unit plans and the number of floors. 3. Automatically create additional buildings while satisfying the maximum BCR and FAR. 4. Generate the offset distance according to the previous set value. 5. Rotate created buildings at any input rotation values. 6. Place in a random area those buildings that can be placed in order. Check if there are missing buildings that cannot be placed. If so, the fitness value is evaluated as zero. 7. Evaluate a fitness value for the completed layout.
The values set for this simulation, the derived values, and descriptions of the variables are summarized in Table 3. The target site should be selected, and the land use ( ) and building use ( should be set because the applied building act varies with the setting. Land use is divided into five purposes in total, and in the case of buildings, it is divided into two purposes (Housing Type Ⅰ and Ⅱ) as shown in Table 1. This is expressed as follows: , To determine the amount of light, the weather data (W) that can be identified from the latitude and longitude and the light environment with solar vector should be input. In this study, the EPW of Seoul, Korea, was used. Next, it is necessary to combine the reference plans, such as in Figure 2, and set the number of floors to create the desired buildings. The combination of unit plans is expressed as follows: U is the set of unit reference plans and has a total of five plans. ⃗ is a building created through a combination of unit plans. The created building is shown in Figure 7. After the combination setting is finished to create apartment buildings, they are additionally duplicated to satisfy the maximum FAR and BCR of the target site ( Figure 8). The values of building height (ℎ), building volume ( ), total number of residential units of buildings, and the total number of created buildings ( ) are automatically set. The values so far generate the offset distances between a building and the site boundary and each building from the others around it. The building is set to choose a rotation ( ) value of 0 degrees or 90 degrees at random and is placed in any possible open area as shown in Figures 8 and 9. The buildings are placed in the site on the basis of their footprint centroid coordinates ( , ). However, it is possible that one or more of the buildings cannot be placed when following this placement process (e.g., due to obstructions or a lack of available contiguous open space), in which case, the fitness value is calculated to be zero. If all of the created buildings are placed in the site, the fitness value is obtained through calculation. The fitness value is calculated as follows: ⃗ , , , ⋯ , , , ⃗ , which is a fitness function, depends on the rotation variable ( and the placement location of the building ( , . ⃗ is the layout form of the buildings located on the site. The vectors of ⃗ consist of the angle of the building and the placement position. The layout of the buildings through these variables is calculated by the three factors, which are the sum of the sunshine hours available for each generation, ⃗ ; the sum of the number of residential units satisfying the two consecutive sunshine hours requirement, ℎ ⃗ ; and the average value of the UDI for the entire generation, ⃗ . All three factors are calculated as values between 0 and 1, which means each of the parameters has the same importance and weighting. ⃗ , therefore, can appear as a value from 0 to 3. represents constraints, which is the number of buildings placed in the target site. Only if is equal to the number of all created buildings ( is ⃗ calculated. ⃗ is the value of how much daylight time each generation can receive in the corresponding deployment. According to the Korean Building Act, it is necessary to figure out how many sunshine hours come in during the seven hours from 9 a.m. to 3 p.m. Thus, the value of 7 is input in ⃗ . The placed buildings have a total of n residential units; assuming that there is no interference from each building, it is possible to receive a total of 7 * n hours of sunlight. However, practically placed buildings will interfere with each other in receiving sunshine hours due to their overshadowing. The most commonly used method in Korea, such as that shown in Figure 10, provides the value of total sunshine hours that each residential unit receives. refers to the sum of the actual sunshine hours each residential unit receives. If = 3, the first residential unit receives three hours between 9 a.m. and 3 p.m. ∑ refers to the sum of the sunshine hours received by all residential units, and dividing this by 7n (which is the maximum sunshine hours), it can be shown as a value between 0 and 1.
h ⃗ is the value of how many residential units are satisfied with the two or more consecutive sunshine hours in the layout. The value is the number of residential units that satisfy the qualification, and n is the total number of residential units. Therefore, for example, if the total number of residential units is 100, and 50 residential units are satisfied with more than two consecutive hours of sunshine, it is calculated as 0.5.
⃗ is a formula for evaluating the indoor light environment of buildings through the UDI, one of the standards for a light environment in the corresponding layout. If the analysis points are satisfied with the value between 100 and 2000 lux during all the occupied times in a year, it is calculated as 1, or otherwise 0. Since multiple analysis points are set for the simulation, there are various UDI values for each analysis point. Therefore, ⃗ is evaluated by the average value of the UDI based on the many analysis points.

The Process of the Genetic Algorithm
Galapagos' genetic algorithm is calculated according to the following order [47,48]: 1. Fitness function 2. Selection mechanism 3. Coupling algorithm 4. Coalescence algorithm 5. Mutation factory A genetic algorithm needs to be given criteria to determine which results are more suitable with regard to the desired goals. The genes of each generation are scored through a fitness function, giving them a comparative advantage, which is the basis for the optimization process. After the fitness value assessment is completed, the next step is the selection mechanism process. There are several representative selection mechanisms in a genetic algorithm, such as exclusive selection and biased selection.
Exclusive selection is a method of sorting by the fitness values and surviving only the top N% of the population before the mating process. Biased selection means that a population with a higher fitness value is more likely to be selected and survive. In the case of Galapagos, exclusive selection is used.
Next, a coupling mechanism process is included to obtain more diversity. Survivors are bound with other objects and exchange their genomes. However, before exchanging genomes, the similarity between each individual is measured as to whether it is appropriate that certain individuals will be coupled. This is because in an incestuous mating method (in which similar individuals are coupled), the next generation's diversity could be drastically reduced. To avoid adversely affecting the optimization process, individuals that are too similar should not be paired. On the contrary, if bounding occurs between extremely dissimilar individuals (which is zoophilic mating), it could also have negative effects on the optimization process. Therefore, it is recommended that individuals with moderate differences be coupled together. In Galapagos, this mechanism is controlled by an inbreeding factor.
When individuals are mated, they exchange genomes and produce offspring, called coalescence algorithms. A common method is crossover coalescence. The method determines an arbitrary split point in which the genome is to be broken, and the offspring inherits each genome segment based on that point. In Galapagos, a blend coalescence method is used. David Rutten states that "genes in evolutionary solvers like Galapagos behave like floating point numbers, that can assume all the values between two numerical extremes" [49]. The method generates new genomes based on a match to both parents before the inheritance of the generated genomes. Basically, a genome is generated by the mean value of both parents, but it can also be generated as being closer to the parent's genome that has a higher fitness value.
The final step is a mutation process that converts some genomes into other variant genomes with low probabilities. As the genetic algorithm process progresses, the diversity among the population will gradually decrease. To compensate for this problem, the mutation process is needed to continue to stimulate more diversity.
When the process has completed, meaning that there are no genes left to process that have the desired fitness value, the algorithm is repeated by going back to the first step.

The Features of the Existing Target Apartment Complex
The first (B) and third (A) complex of the Apgujeong Hanyang apartments were selected as target sites to apply the developed optimization algorithm (Figure 13). This apartment site was considered to be a good place to apply the algorithm because it was a representative complex where typical Korean flat-type buildings are placed. The land use of both the A and B areas was a B-3 zoning district, and in this area, Housing Type Ⅰ could be constructed on the sites. Since the two areas A and B were simulated together, the average values of the two areas were calculated according to their proportions within the total land area. In this simulation, the L-shaped buildings were considered as two separate buildings. The details of the characteristics of the complex are summarized in Table 4.  The number in parentheses was due to considering one L-type building as two separate buildings for the purpose of the simulation. 2 Mean value depending on land area.

Optimization Results
To simulate the situation similar to the existing Hanyang apartment complex, the A+B values shown in Table 4 were used. The analysis area was set up as the Hanyang A and B complexes, and the number of buildings was equal to 17; the buildings were also formed on 12-and 13-floor structures. The land use and building use were also set as B-3 zoning district and Housing Type Ⅰ, respectively. The BCR and FAR of the current Hanyang apartment complex were 19% and 240%, respectively. Accordingly, the BCR and FAR values in the simulation were set similarly to 19.29% and 240.85%, respectively. The location of the park areas inside the existing apartment complex was also designated so that buildings were not placed in those areas when conducting the simulation.
Under these conditions, this study investigated using the genetic algorithm to maximize three factors: sunshine hours of each residential unit, the number of residential units that received more than two consecutive sunshine hours, and the mean UDI value of the buildings. In the case of the genetic algorithm, if the population is too small, the optimization will not work properly, and if it is too large, the calculation time will be too long. Therefore, the number of each generation was set to 100, which is considered a balanced population scale in Galapagos.
The optimization analysis was conducted for 12 generations, and the layout result with the highest score was 2.1014 points after a total of 1300 implementations, which took approximately 13 hours. The reason for the simulation stop was that there was no improvement in the performance results for three successive generations. The existing Hanyang apartments received a total of 1.9829 points when using the previously proposed assessment formula. The sunshine hours value was 0.7934; the residential units that received more than two consecutive sunshine hours value was 0.9500; and the mean UDI value was 0.2395. Meanwhile, the optimal layout obtained 2.1014 points (with values for the same factors of 0.8406, 0.9804, and 0.2804, respectively). The values increased overall by 5.97%, and individually by 5.94%, 3.20%, and 17.07%, respectively, which showed that the indoor daylight environment was improved for each measured factor.
When comparing the two layouts of the buildings, the existing Hanyang apartments mainly had a southwest orientation, while the buildings of the optimal layout mostly had a southeast orientation (Figure 14). A genetic algorithm is a method to extract higher results using scores through a continuous repetition. Therefore, by assembling the analysis results, it was possible to extract not only the layout with the highest score but also other layouts with similarly high scores and compare them. There were over 90 generated layouts better than the current layout score based on the solar time assessment formula (1). The nine top-score layouts are shown in Table 5.

Discussion
Since Korean cities are formed in areas where high-rise buildings are concentrated, it is easy to infringe on the right of light through the overshadowing of buildings. For this reason, there are various regulations on the offset distance between buildings to avoid this problem. Therefore, this study aimed to develop a simulation procedure for the optimization of apartment complex layout planning for daylight accessibility and indoor daylight quality in a high-density city with a temperate climate.
This study used parametric methods to consider the various contexts for apartment-complex layout planning, which would help to plan the initial stages of integrated sustainable design. The simulation tool helps to visualize the offset distances to comprehend the legal regulations. The building placements that violate the building act were changed to a red color to facilitate identifying the problems and correcting them. In addition, it was possible to analyze the total sunshine hours of each residential unit, residential units that satisfy a condition of more than two consecutive hours of sunshine, and the mean UDI of the buildings. Finding optimized plans for daylight accessibility and quality was possible through a genetic algorithm. The algorithm was constructed to enable more diverse unit types to be combined in a building configuration so that more options in various plans could be examined. The apartment unit plan used in the simulation was also based on the reference plans from the LH Corporation. Therefore, there were no significant differences between the simulation and the actual apartment building combinations.
In Korea, most flat-type apartments are uniformly placed in southern orientations. However, depending on the conditions of the city and site, a batch of southward deployments cannot be considered the answer to providing an optimal solar environment for maximum sunshine hours and a high-quality daylight environment. The reason is that meeting the offset distance regulations alone cannot secure enough sunshine hours for each residential unit. Therefore, this study added an analysis algorithm of the sunshine hours to understand how much daylight would be received by each unit, thus providing an improved daylight environment for residents. The daylight analysis is dependent on the surrounding context. Thus, a genetic algorithm, one of the optimization methods, was used to extract the number of best cases, since it is challenging to plan the building layout and mass design by considering all the various variables in the general method. Rather than just one case of the best arrangement that can receive maximum daylight, the results include many different highperforming layouts according to the fitness function for the solar time assessment. Therefore, it is possible to select the layout that meets other conditions by comparing the results.
Moreover, the layout results from the simulations can be modified so that other conditions can be considered, and the layout plan can be changed accordingly. This will allow architects to utilize the proposed results as they are or use them for reference to propose better plans while getting feedback quickly and accurately through the use of the simulation tool.
In a further study, if other conditions are added in the analysis algorithm, it would be possible to create layout plans that consider more varied factors. The method proposed in this study was to generate flat-type buildings with a combination of residential units in a straight line. However, if the method of combining units is diversified, other types of buildings such as tower-type and L-type can also be created, providing more diverse layout plans. In addition, by adding variables and factors related to energy savings proposed in other existing studies, this method can optimize energy consumption and daylight quality together, and also by adjusting the weighting ratio of the objectives, the simulation can set priorities among the various parameters.

Definition
Definition of facades in Korean law  Facade Type 1: A facade containing windows  Facade Type 2: A facade without windows or containing the windows smaller than 50 m 2 in area.

Definition of zonings in Korean law 
A-1 zoning district: The area needed to protect the residential environment centered on singlefamily houses. It is possible to build single-family houses and neighborhood service facilities with a floor area of 1000 square meters or less.  A-2 zoning district: The area needed to protect the residential environment centered on multifamily houses. It is possible to build single-family houses, multi-family houses, and neighborhood service facilities with a floor area of 1000 square meters or less.  B-1 zoning district: The residential area centered on low-rise houses. It is possible to build single-family houses with floors less than five, multi-family houses, neighborhood service facilities, schools, and child and geriatric welfare institutions.  B-2 zoning district: The residential area centered on middle-rise houses. It is possible to build single-family houses, multi-family houses, neighborhood service facilities, religious facilities, schools, and child and geriatric welfare institutions.  B-3 zoning district: The residential area centered on middle and high-rise houses. It is possible to build single-family houses, multi-family houses, neighborhood service facilities, religious facilities, schools, and child and geriatric welfare institutions.
Definition by types of multi-family housing in Korean law  Housing Type Ⅰ: A house where all or part of the facilities of a building can be used jointly by several units and ensuring independent living for each residential unit. The dormitory and Housing Type II are excluded.  Housing Type Ⅱ: A house where total floor area is equal to or less than 660 ㎡, and the number of floors is less than five.  Dormitory: A building used for students or workers. It has structures for joint cooking, but it does not have an independent residential space.
Korea's weather characteristics and definition of the winter solstice.  Overall: Temperate weather zone with four distinct seasons. In winter, it is cold, clear, and dry under the influence of the Siberian air mass, and in summer, it is hot, cloudy, and rainy due to the influence of the North Pacific air mass. In spring and autumn, there are many clear and dry days due to the influence of mobile high pressure [42].  Köppen-Geiger climate classification of South Korea: Monsoon-influenced hot-summer humid continental climate (Dwa), hot-summer humid continental climate (Dfa), and humid subtropical climate (Cfa). Seoul has a Monsoon-influenced hot-summer humid continental climate (Dwa) [43,44].  Winter solstice: The standard date is December 22nd in Korea. The date is used to determine daylight accessibility for each residential unit because the sun's southern middle altitude is the lowest, meaning that shadows are the longest on that day.