latentspace.

Analysis of Apt state-spaces

Objectives

This analysis aims to develop a prototype for deriving the apartment layout starting point for the street housing maintenance project (가로주택정비사업) solution called LBDeveloper (at Spacewalk). The plots under analysis and the corresponding layout analysis are visualized in the images below. A further objective is to define the parameters and the range of each parameter used to optimize the apartment complex layout.

Objectives Objectives Objectives
Objectives Objectives Objectives
Objectives Objectives Objectives
Plots to analyze and visualized layout analysis


Axes rules

Because the orientation of street houses must account for the south-facing of all units, the orientation and the placement axis can be treated separately. The array axes are therefore divided broadly into the following:
  • Longest segment axis of the plot geometry
  • Boundary axis
  • South-facing axis

The rules governing the array axes, derived from the layout analysis, are as follows:
  • One array axis has a minimum of 1 and a maximum of 3 origins.
  • The array axes have a minimum of 1 and a maximum of 2 axes when the Boundary axis is not selected.
  • If the selected array-axis parameter is the Boundary axis, N line segments are offset into the site.
  • A corner-type building is placed at the intersection of the lines offset from the site boundary axis.
  • The range of the offset parameters is SITE_BOUNDARY_OFFSET_DISTANCE_LIST, which follows the analysis below.
  • Analysis of SITE BOUNDARY OFFSET DISTANCE LIST
    Analysis of SITE_BOUNDARY_OFFSET_DISTANCE_LIST

    
        class Consts:
            TOLERANCE_TO_SIMPLIFY = 10
            TOLERANCE_ANGLE_TO_SIMPLIFY = 10
    
            SITE_BOUNDARY_OFFSET_DISTANCE_LIST = [15, 20, 25]
            SITE_BOUNDARY_NUMBER_TO_USE = 4
    
        def get_axis(site_geom):
            simplified_site_geom = gh.SimplifyCurve(
                curve=site_geom, 
                tolerance=Consts.TOLERANCE_TO_SIMPLIFY, 
                angle_tolerance=Consts.TOLERANCE_ANGLE_TO_SIMPLIFY
            ).curve
    
            sorted_simplified_site_geom = sorted(
                exploded_simplified_site_geom,
                key=lambda s: s.GetLength(),
                reverse=True
            )
    
            (...)
    
            # When Boundary axis parameter be selected, 
            # sort the segments of site geometry by the length of each segment 
            # and offset each segment as much as SITE_BOUNDARY_NUMBER_TO_USE
            elif param_axis == Enums.BOUNDARIES_ARRAY_AXIS:
                axis = sorted_simplified_site_geom[:Consts.SITE_BOUNDARY_NUMBER_TO_USE]
    

  • If the Boundary axis is selected, the units' directions follow the site boundary axis.
  • If the aspect ratio of the OBB created for the site's long axis exceeds ASPECT_RATIO_BASELINE, no other axes are searched and the long axis is fixed.
  • 
        class Consts:
            ASPECT_RATIO_BASELINE = 1.91
    
        is_aspect_ratio_gte_baseline = (
                get_aspect_ratio_by_longest_segment(simplified_site_geom)
                >= Consts.ASPECT_RATIO_BASELINE
            )
    
        if is_aspect_ratio_gte_baseline:
            Parameters.param_axis = param_axis = Enums.LONGEST_ARRAY_AXIS
    

Parameterize


Parameter Type Range
param_axis discrete 0, 1, 2, 3, 4
param_axis_count discrete 1, 2
param_axis_flip discrete 0, 1
param_axis_positions continuous [0 ~ 1] * param_axis_count
param_south_facing_degree discrete 0, 1, 2 ... len(SOUTH_FACING_DEGREE_LIST)
param_offset_distance discrete 0, 1, 2 … len(SITE_BOUNDARY_OFFSET_DISTANCE_LIST)
param_building_positions continuous Refer the get_param_building_positions function
param_building_positions_count discrete Refer the get_param_building_positions function


Parameter descriptions:
  • param_axis: Parameter for selecting the axis
  • param_axis_count: The count of axes
  • param_axis_flip: Whether flip 90˚ when Longest segment axis is selected
  • param_axis_positions: Positions of the array axes
  • param_south_facing_degree: Parameter to select south-facing degree
  • param_offset_distance: Offset distance when Boundary axis is selected
  • param_building_positions: Starting point parameter of Apt
  • param_building_positions_count: Starting point count parameter of Apt
State spaces by randomly distributed parameters
State spaces by randomly distributed parameters

Parameters definition:

    class Parameters:
        # Enums.LONGEST_ARRAY_AXIS, 
        # Enums.BOUNDARIES_ARRAY_AXIS
        # Enums.FULL_SOUTH_ARRAY_AXIS
        param_axis = random.randint(0, 2)
        
        # whether flip or not flip when the longest axis selected
        param_axis_flip = random.randint(0, 1)
        param_axis_count = random.randint(1, 2)
            
        @staticmethod
        def get_param_axis_positions(param_axis_count):
            return [random.random() for _ in range(param_axis_count)]
        
        @staticmethod
        def get_param_building_positions(array_axis):
            param_building_positions = []
                    
            for ax in array_axis:
                param_building_positions_count = 1
                
                ax_length = ax.GetLength()
                if ax_length >= Consts.ARRAY_AXIS_LENGTH_BASELINE_HIGHEST:
                    param_building_positions_count = random.randint(2, 3)
                    
                elif ax_length >= Consts.ARRAY_AXIS_LENGTH_BASELINE_MIDDLE:
                    param_building_positions_count = random.randint(1, 2)
                
                each_positions = [
                    random.random() for _ in range(param_building_positions_count)
                ]
                
                param_building_positions.append(each_positions)
            
            return param_building_positions
        
        @staticmethod
        def get_param_south_facing_degree(array_axis):
            param_south_facing_degree = [
                random.randrange(0, len(Consts.SOUTH_FACING_DEGREE_LIST))
                for _ in array_axis
            ]
            
            return param_south_facing_degree
            
        @staticmethod
        def get_param_offset_distance(axis_offset):
            param_offset_distance = [
                random.randrange(
                    0, len(Consts.SITE_BOUNDARY_OFFSET_DISTANCE_LIST)
                ) for _ in axis_offset
            ]
            
            return param_offset_distance


Searching placement starting points

1. Creation sequence of Enums.LONGEST_ARRAY_AXIS
    Analysis of LONGEST ARRAY AXIS
    Analysis of LONGEST_ARRAY_AXIS
    • An OBB is created from the longest segment of the site segments.
    • The axis is moved in the direction perpendicular to the long-axis OBB using the param_axis_position parameter.
    • The intersection line segment between the moved axis and site_geom is derived.
    • The corresponding array_axis is divided into equal parts according to the number of generated param_building_positions_count parameters.
      • This prevents points from appearing at overlapping locations.
    • After the division into equal parts, both ends of each line are reduced by POSITION_REDUCE_LENGTH.
      • If a line segment would disappear, it is used as is without reduction.
    • After the param_building_positions parameter is created, the starting point of each reduced line segment is set to 0 and the end point to 1, and the values are interpolated; the resulting point is used as the starting point for apartment placement.

2. Creation sequence of Enums.BOUNDARIES_ARRAY_AXIS
      Creation result of BOUNDARIES ARRAY AXIS using dummy blocks
      Creation result of BOUNDARIES_ARRAY_AXIS using dummy blocks

    • The site geometry is simplified.
      • TOLERANCE_TO_SIMPLIFY = 10
      • TOLERANCE_ANGLE_TO_SIMPLIFY = 10
    • The simplified site segments are exploded and sorted by the length of each segment.
    • The sorted segments are sliced up to SITE_BOUNDARY_NUMBER_TO_USE.
    • The segments are sliced to the SITE_BOUNDARY_NUMBER_TO_USEth longest segment in length.
    • The site shape is offset using the param_offset_distance parameter.
      • SITE_BOUNDARY_NUMBER_TO_USE = 4
      • SITE_BOUNDARY_OFFSET_DISTANCE_LIST = [15, 20, 25]
    • The intersection points between the offset site segments are drawn.
    • Circles with a radius of max(SITE_BOUNDARY_OFFSET_DISTANCE_LIST) are created at the intersections.
      • A corner-type apartment is placed at each intersection point.
    • The circles are subtracted from the boundary axis, and segments shorter than ARRAY_AXIS_LENGTH_BASELINE_LOWEST are removed.
      • ARRAY_AXIS_LENGTH_BASELINE_LOWEST = 20

3. Creation sequence of Enums.FULL_SOUTH_ARRAY_AXIS
    • This parameter is used only when AABB_OMBR_RATIO_BASELINE is greater than 0.84.
      • If this condition is not satisfied, the axis is recalculated.
      Analysis of BOUNDARIES ARRAY AXIS
      Analysis of BOUNDARIES_ARRAY_AXIS

    • An AABB (Axis-Aligned Bounding Box) is created.
    • The northernmost segment among the AABB segments is derived.
    • The subsequent process is the same as that of Enums.LONGEST_ARRAY_AXIS for deriving the placement starting points.

4. Creation sequence of Enums.N_DEGREE_SOUTH_FACING_ARRAY_AXIS
    • This parameter is intended to handle irregular plots that do not follow any axis of the site line, such as the following:
    • Analysis of N DEGREE SOUTH FACING ARRAY AXIS
      Analysis of N_DEGREE_SOUTH_FACING_ARRAY_AXIS

    • The same placement method as Enums.FULL_SOUTH_ARRAY_AXIS in step 3 is used, with the only difference being the angle of the array axis.
    • Axes are created by fixing a specific axis independently of the site geometry, and blocks are placed at the same south-facing angle.

5. Creation sequence of Enums.N_DEGREE_SOUTH_FACING_ARRAY_AXIS
    • This parameter is considered only when the plot area is greater than or equal to N m².
    • Analysis of BOUNDARIES MULTIPLE OFFSET ARRAY AXIS
      Analysis of BOUNDARIES_MULTIPLE_OFFSET_ARRAY_AXIS

    • The site segments are exploded and sorted by the length of each segment.
    • After sorting, select up to the Mth longest segment (this can be switched to use M or a search).
    • param_offset_distance_indices
      • This parameter selects the offset-distance index among SITE_BOUNDARY_OFFSET_DISTANCE_LIST = [15, 20, 25].
    • param_axis_offset_counts
      • This parameter selects the offset count of each segment (0 ~ 4).
    • When this parameter is selected, the plate-type module is expanded and placed on the offset axis.