Methods, devices, equipment and media for optimizing architectural spatial layout design

By analyzing the building base outline, room type library, and building code text, and combining Latin hypercube sampling and reinforcement learning, an optimized sampling scheme set is generated. Multi-objective calculation and Pareto filtering are then performed, which solves the problem of low efficiency in traditional building space layout design and achieves global performance optimization and multi-objective balance.

CN120930241BActive Publication Date: 2026-04-03LIN COUNTRY XINGLONGJIANAN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Current architectural space layout design relies on traditional CAD software and experience-driven approaches, which is inefficient, makes it difficult to achieve global performance optimization, and makes it difficult to systematically balance multiple performance objectives, such as lighting, circulation, and space utilization.

Method used

By parsing the building base outline, room type library, and building code text, structured data is generated. Combined with Latin hypercube sampling, reinforcement learning, and surrogate model training, an optimized sampling scheme set is generated. Multi-objective calculation and Pareto selection are then performed to ensure that the generated schemes meet both hard constraints and optimization soft constraints.

Benefits of technology

It improves the efficiency and feasibility of architectural space layout design, ensures that the final optimized layout scheme achieves good performance in multiple aspects, realizes optimal global performance, and significantly improves design quality and level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120930241B_ABST
    Figure CN120930241B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, equipment, and medium for optimizing architectural spatial layout design. The method includes: parsing building base outlines, room type libraries, and building code texts to generate structured data; obtaining an optimized sampling scheme set based on geometric boundaries, hard constraint rule sets, and spatial topology graphs through Latin hypercube sampling, reinforcement learning strategies, and supplementary sampling processing; and performing multi-objective computation and surrogate model training on the optimized sampling scheme set based on the spatial topology graph, attribute matrix, and soft constraint target set to obtain a full scheme evaluation set; and performing Pareto filtering, hard constraint repair, and soft constraint optimization processing on the full scheme evaluation set based on the hard constraint rule set and soft constraint target set to generate the final optimized layout scheme. This method improves the design efficiency, scheme compliance, and global optimality of multi-objective performance in architectural spatial layout by using structured parsing of architectural design information, multi-strategy sampling, and multi-objective evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, and in particular relates to methods, devices, equipment and media for optimizing architectural space layout design. Background Technology

[0002] Architectural spatial layout design is a core element in achieving building functionality, safety compliance, and user experience optimization. It must meet building code constraints, functional requirements, and performance optimization needs, making it a complex systems engineering project with multiple constraints and objectives. However, current architectural spatial layout design primarily relies on manual drawing using traditional CAD software and experience-driven scheme adjustments, resulting in inefficiency and insufficient feasibility. On one hand, the current architectural spatial layout design process heavily depends on the designer's personal experience, exhibiting weak ability to coordinate and meet multiple constraints. This often leads to repeated modifications due to overlooked hard constraints, such as inadequate fire separation distances, resulting in low design efficiency. On the other hand, manual design struggles to traverse and evaluate a large number of potential schemes, failing to systematically balance multiple performance objectives such as lighting, circulation, and space utilization. It often only yields locally optimal solutions, failing to achieve globally optimal performance. Summary of the Invention

[0003] Therefore, it is necessary to provide methods, devices, equipment and media for optimizing architectural spatial layout design to address the above-mentioned technical problems, aiming to improve the efficiency of architectural spatial layout design and enhance the feasibility and overall performance optimization capabilities of the scheme.

[0004] Firstly, this application provides a method for optimizing the layout of architectural spaces, including:

[0005] The building base outline, room type library and building code text are parsed and processed to generate structured data, which includes geometric boundaries, attribute matrices, hard constraint rule sets, soft constraint target sets and spatial topology diagrams.

[0006] Based on geometric boundaries, hard constraint rule sets, and spatial topology graphs, an optimized sampling scheme set is obtained through Latin hypercube sampling, reinforcement learning strategies, and supplementary sampling processing. Based on the spatial topology graph, attribute matrix, and soft constraint target set, multi-objective computation and surrogate model training are performed on the optimized sampling scheme set to obtain a full scheme evaluation set.

[0007] Based on the set of hard constraint rules and the set of soft constraint targets, the Pareto screening, hard constraint repair and soft constraint optimization processes are performed on the full scheme evaluation set to generate the final optimized layout scheme.

[0008] In one embodiment, the building base outline, room type library, and building code text are parsed to generate structured data, including:

[0009] Geometric feature extraction is performed based on the building base outline to extract the coordinate boundary information of the building base outline and obtain the geometric boundary.

[0010] The attribute matrix is ​​obtained by converting each room type, minimum area threshold, lighting requirement parameters, and forced adjacency rules between rooms in the room type library into a matrix form.

[0011] The building code text is classified and parsed to identify the clauses that cannot be violated. The clauses that cannot be violated are then coded into rules to generate a set of hard constraint rules. The clauses that can be optimized are then identified. The target parameters of the optimized clauses are quantified to determine the parameter range and generate a set of soft constraint targets. The clauses that cannot be violated include fire separation distances and load-bearing wall locations, while the clauses that can be optimized include natural lighting values.

[0012] Extract the forced adjacency rules between rooms from the attribute matrix, and combine them with geometric boundaries to construct room spatial associations. Use room type as nodes and forced adjacency rules between rooms as edges to construct a spatial topology graph.

[0013] Structured data is obtained by combining geometric boundaries, attribute matrices, hard constraint rule sets, soft constraint target sets, and spatial topology graphs.

[0014] In one embodiment, based on geometric boundaries, a set of hard constraint rules, and a spatial topological graph, an optimized sampling scheme set is obtained through Latin hypercube sampling, reinforcement learning strategies, and supplementary sampling processing, including:

[0015] Based on geometric boundaries and hard constraint rule sets, Latin hypercube sampling is performed within the spatial range defined by the hard constraint rule sets to generate multiple initial layout schemes, thus obtaining an initial scheme set.

[0016] Based on the room type nodes and forced adjacency edges in the spatial topology graph, construct an adjacency matrix;

[0017] The reinforcement learning state space is constructed by using the current position status of the rooms that have been placed, the list of types of the rooms that have not been placed, and the adjacency matrix as spatial dimensions.

[0018] Acquire and optimize actions based on preset layouts to construct a reinforcement learning action space. The preset layout optimization actions include room coordinate adjustment and room rotation angle setting that conform to the adjacency matrix constraints.

[0019] A reinforcement learning agent is constructed using the PPO algorithm. The agent is iteratively trained based on the reinforcement learning state space and action space. Training stops when the constraint compliance rate of the schemes generated by the reinforcement learning agent meets a set threshold, and the trained agent is obtained. The constraint compliance rate is the proportion of schemes that meet the adjacency matrix constraints among the schemes generated by the reinforcement learning agent.

[0020] The initial state of the reinforcement learning state space is input into the trained agent for layout optimization, generating multiple schemes to obtain a set of reinforcement learning schemes.

[0021] The initial scheme set and the reinforcement learning scheme set are merged to obtain a temporary scheme set. Multi-objective computation is performed on the schemes in the temporary scheme set based on the soft-constrained objective set to obtain the objective value set. The Pareto front coverage of the reinforcement learning scheme set and the initial scheme set is calculated using the objective value set.

[0022] When the Pareto front coverage is less than the preset coverage threshold, multiple supplementary layout schemes are generated through supplementary Latin hypercube sampling to obtain a supplementary scheme set.

[0023] The initial scheme set, reinforcement learning scheme set, and supplementary scheme set are merged and deduplicated to obtain the optimized sampling scheme set.

[0024] In one embodiment, based on the spatial topology graph, attribute matrix, and soft constraint objective set, multi-objective computation and surrogate model training are performed on the optimized sampling scheme set to obtain a full scheme evaluation set, including:

[0025] The schemes of the optimized sampling scheme set are split into training samples and fast evaluation samples.

[0026] By using spatial topology graphs, attribute matrices, and soft constraint target sets, multi-objective calculations are performed on the layout schemes in each training sample to obtain a multi-objective set including streamline efficiency, natural lighting, and spatial fitness.

[0027] Spatial features are extracted from each training sample, and the spatial features are matrixed and processed to obtain the spatial feature matrix as input data. The multi-target set corresponding to each training sample is used as label data. Spatial features include room size and room location distribution.

[0028] Using the input data and label data as training data, the initial GNN model, the initial CNN model, and the initial SVR model were trained respectively to obtain the trained GNN model, CNN model, and SVR model. The GNN model was used for streamline efficiency prediction, the CNN model was used for natural lighting prediction, and the SVR model was used for spatial fitness prediction.

[0029] Using GNN, CNN and SVR models, target value prediction processing is performed on the rapid evaluation samples to obtain a multi-objective prediction set including streamline efficiency prediction, natural lighting prediction and spatial fitness prediction.

[0030] The training samples, multi-objective sets, fast evaluation samples, and corresponding multi-objective prediction sets are integrated and processed to obtain the full scheme evaluation set.

[0031] In one embodiment, multi-objective calculations are performed on the layout schemes in each training sample using a spatial topology graph, attribute matrix, and soft constraint objective set, resulting in a multi-objective set including streamline efficiency, natural lighting, and spatial fitness, including:

[0032] Based on the spatial topology graph, Dijkstra's shortest path calculation is performed on the layout schemes in each training sample to obtain the corresponding streamline efficiency.

[0033] Based on the lighting parameters in the soft-constraint target set, Radiance optical simulation calculations are performed on the layout schemes in each training sample to obtain the corresponding natural lighting.

[0034] Based on the minimum room area requirement in the attribute matrix, spatial index calculations are performed on the layout schemes in each training sample. The room rectangularity and area utilization rate of the layout schemes in the training samples are calculated respectively. Based on the room rectangularity and area utilization rate, the corresponding spatial fitness is obtained.

[0035] By combining streamline efficiency, natural lighting, and spatial adaptability, a multi-objective set is obtained.

[0036] In one embodiment, based on the hard constraint rule set and the soft constraint target set, the full scheme evaluation set is subjected to Pareto screening, hard constraint repair, and soft constraint optimization to generate the final optimized layout scheme, including:

[0037] Extract the target values ​​corresponding to each scheme from the overall scheme evaluation set;

[0038] Based on the soft-constraint objective set, a multi-objective function is constructed by maximizing streamline efficiency, maximizing natural lighting, and maximizing spatial fitness. The objective values ​​are input into the multi-objective function, and the NSGA-III algorithm is used to solve the Pareto optimal solution. Non-dominated solution schemes are selected to obtain the Pareto front scheme set.

[0039] Based on the hard constraint rule set, hard constraint compliance detection is performed on each scheme in the Pareto frontier scheme set to identify the non-compliant schemes that violate hard constraints and the non-compliant walls in each non-compliant scheme.

[0040] For the illegal walls in the illegal scheme, the A* path search algorithm is used to perform new location path finding within the space limited by the hard constraint rule set to obtain the new location of the wall that conforms to the hard constraint rule set. Based on the new location of the wall, the coordinates of the illegal walls in the illegal scheme are updated to obtain the set of repaired schemes.

[0041] Based on the soft-constraint target set, optimization indices including optimizing natural lighting, optimizing streamline efficiency, and optimizing spatial adaptability are determined, and the weight coefficients of each optimization index are quantified based on the parameter range of the soft-constraint target set.

[0042] For each scheme in the repaired scheme set, a fitness function is constructed based on the optimization index, and the simulated annealing algorithm is used to perform room exchange optimization to obtain the optimized scheme set.

[0043] Multi-objective calculations are performed on each scheme in the optimized scheme set to obtain the corresponding optimized objective value. The weight coefficients of each optimization index are then weighted and summed with the optimized objective values ​​of each scheme in the optimized scheme set to obtain the comprehensive score of each scheme in the optimized scheme set.

[0044] The comprehensive scores of each scheme in the optimized scheme set are ranked, and the scheme with the highest comprehensive score is taken as the final optimized layout scheme.

[0045] In one embodiment, the spatial fitness is calculated using the following formula:

[0046]

[0047] Where S is the spatial adaptability, n is the total number of rooms, and A i Let i be the actual area of ​​the i-th room. R is the minimum area threshold for the i-th room. i Let U be the room rectangle of the i-th room. 空 U represents the area of ​​the unused blank region within the geometric boundary. 总 λ1, λ2, and λ3 are the total area of ​​the geometric boundary, and their sum is 1.

[0048] Secondly, this application also provides a design device for optimizing the layout of architectural spaces, including:

[0049] The data parsing and structuring module is used to parse and process the building base outline, room type library and building code text to generate structured data. The structured data includes geometric boundaries, attribute matrices, hard constraint rule sets, soft constraint target sets and spatial topology diagrams.

[0050] The initial layout scheme generation module is used to obtain an optimized sampling scheme set based on geometric boundaries, hard constraint rule sets, and spatial topology graphs through Latin hypercube sampling, reinforcement learning strategies, and supplementary sampling processing. Based on the spatial topology graph, attribute matrix, and soft constraint target set, the module performs multi-objective computation and surrogate model training on the optimized sampling scheme set to obtain a full scheme evaluation set.

[0051] The scheme evaluation and optimization module is used to perform Pareto filtering, hard constraint repair and soft constraint optimization on the full scheme evaluation set based on the hard constraint rule set and the soft constraint target set, and generate the final optimized layout scheme.

[0052] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the first aspect.

[0053] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the first aspect.

[0054] The aforementioned architectural spatial layout optimization design methods, devices, equipment, and media firstly transform scattered unstructured input information into standardized, computable structured data by parsing and processing the building base outline, room type library, and building code text, providing a unified data foundation and constraint basis for subsequent layout. Secondly, by using Latin hypercube sampling to reduce invalid sampling through uniform coverage in hard-constrained spaces, and by using reinforcement learning strategies combined with spatial topological relationships to generate schemes that conform to functional logic, supplementary sampling dynamically compensates for insufficient coverage of frontier schemes, providing a rich selection for subsequent scheme optimization. Subsequently, multi-objective calculations can be performed on the optimized sample scheme set to ensure that the schemes achieve good performance in multiple aspects, and by training a surrogate model, the performance of a large number of schemes can be quickly evaluated, improving evaluation efficiency and obtaining a full scheme evaluation set. Finally, Pareto filtering, hard constraint repair, and soft constraint optimization processing are applied to this evaluation set, which not only ensures the feasibility and safety of the generated final optimized layout scheme, but also achieves optimal global performance of the scheme, significantly improving the quality and level of architectural design. Attached Figure Description

[0055] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 A flowchart of a building space layout optimization design method provided as an exemplary embodiment of the present invention;

[0057] Figure 2 A flowchart of a method for multi-objective calculation of layout schemes in each training sample is provided as an exemplary embodiment of the present invention;

[0058] Figure 3 A schematic diagram of a building space layout optimization design device provided as an exemplary embodiment of the present invention. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0060] In one embodiment, such as Figure 1 As shown, a method for optimizing architectural space layout is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0061] S101: Parse and process the building base outline, room type library and building code text to generate structured data, which includes geometric boundaries, attribute matrix, hard constraint rule set, soft constraint target set and spatial topology diagram.

[0062] Specifically, in architectural spatial layout design, the building base outline is the geometric foundation of the architectural spatial layout, defining the building's boundaries and usable space. By analyzing this building base outline, geometric boundaries can be generated. The room type library contains the functional and dimensional requirements of various rooms. By analyzing the room type library, an attribute matrix can be generated, where each row represents a room type and each column represents specific attributes of that room type, such as area, height, and lighting requirements. Building code texts contain the mandatory rules that architectural designs must follow. By analyzing these building code texts, a set of hard constraint rules can be generated to ensure that the design scheme meets safety and compliance requirements. Simultaneously, a set of soft constraint targets can be extracted. While not mandatory requirements, this set can provide a reference for improving the performance and user experience of the design scheme. Furthermore, by analyzing the building base outline and room type library, a spatial topology diagram can be generated. This diagram describes the relative positions and connections between rooms, providing a topological basis for layout optimization.

[0063] S102: Based on geometric boundaries, hard constraint rule sets, and spatial topology graphs, an optimized sampling scheme set is obtained through Latin hypercube sampling, reinforcement learning strategies, and supplementary sampling processing. Based on the spatial topology graph, attribute matrix, and soft constraint target set, multi-objective computation and surrogate model training are performed on the optimized sampling scheme set to obtain a full scheme evaluation set.

[0064] Specifically, Latin hypercube sampling is a sampling method that ensures a uniform distribution of samples in the parameter space. Through Latin hypercube sampling, multiple initial layout schemes can be generated within the geometric boundaries of the building space. While these initial layout schemes satisfy basic geometric constraints, they may have shortcomings in functionality and performance. Therefore, a reinforcement learning strategy can be further introduced to dynamically adjust the layout schemes based on the hard constraint rule set and the spatial topology graph, making them more in line with design requirements. This reinforcement learning strategy can continuously optimize the layout schemes by simulating environmental feedback, improving the quality of the schemes. Supplementary sampling can be used to fill in the blank areas in the sampling process, ensuring that the generated scheme set has sufficient diversity and coverage. After obtaining the optimized sampled scheme set, multi-objective calculations and surrogate model training can be performed on the schemes based on the spatial topology graph, attribute matrix, and soft constraint target set. Multi-objective calculations can comprehensively consider multiple design objectives, such as lighting, ventilation, and space utilization, and generate a full scheme evaluation set by calculating the performance indicators of each scheme on these objectives. Surrogate model training can utilize machine learning algorithms to fit and predict the performance indicators of a large number of schemes, improving evaluation efficiency and reducing computational costs. Through multi-objective computation and surrogate model training, high-performance layout schemes can be quickly selected to obtain the full scheme evaluation set, providing a candidate set for final optimization.

[0065] S103: Based on the hard constraint rule set and the soft constraint target set, Pareto filtering, hard constraint repair and soft constraint optimization are performed on the full scheme evaluation set to generate the final optimized layout scheme.

[0066] Specifically, Pareto screening is a multi-objective optimization method that selects the optimal solution from multiple options that achieves the best balance among various objectives. Pareto screening ensures that the final solution performs well across multiple design objectives. Hard constraint repair is used to check and correct potential violations of hard constraints, ensuring the design complies with building codes and safety requirements. Soft constraint optimization further enhances the solution's performance on soft objectives, such as improving spatial comfort and user experience. Therefore, through this process, the generated optimized layout not only satisfies all hard constraints but also achieves optimization on multiple soft objectives, significantly improving the performance and quality of the design.

[0067] The above method generates structured data by parsing and processing building base outlines, room type libraries, and building code texts, integrating multi-dimensional data to provide data support for subsequent precise layout. Secondly, based on geometric boundaries, hard constraint rule sets, and spatial topology graphs, an optimized sampling scheme set is obtained through Latin hypercube sampling, reinforcement learning strategies, and supplementary sampling. Multi-objective computation and surrogate model training then yield a full scheme evaluation set, generating high-quality and diverse layout schemes. Finally, based on the hard constraint rule set and soft constraint target set, Pareto filtering, hard constraint repair, and soft constraint optimization are performed on the full scheme evaluation set, ensuring the global optimality of the schemes and further improving their feasibility and safety, providing a scientific and efficient design basis for building spatial layout.

[0068] In one embodiment, the building base outline, room type library, and building code text are parsed and processed to generate structured data, including:

[0069] Geometric feature extraction is performed based on the building base outline to extract the coordinate boundary information of the building base outline and obtain the geometric boundary.

[0070] The attribute matrix is ​​obtained by converting each room type, minimum area threshold, lighting requirement parameters, and forced adjacency rules between rooms in the room type library into a matrix form.

[0071] The building code text is classified and parsed to identify the clauses that cannot be violated. The clauses that cannot be violated are then coded into rules to generate a set of hard constraint rules. The clauses that can be optimized are then identified. The target parameters of the optimized clauses are quantified to determine the parameter range and generate a set of soft constraint targets. The clauses that cannot be violated include fire separation distances and load-bearing wall locations, while the clauses that can be optimized include natural lighting values.

[0072] Extract the forced adjacency rules between rooms from the attribute matrix, and combine them with geometric boundaries to construct room spatial associations. Use room type as nodes and forced adjacency rules between rooms as edges to construct a spatial topology graph.

[0073] Structured data is obtained by combining geometric boundaries, attribute matrices, hard constraint rule sets, soft constraint target sets, and spatial topology graphs.

[0074] Specifically, a DXF format file of the building foundation can be obtained. DXF is a standard vector graphics format in architectural design, containing basic information such as outlines, layers, and coordinates. Then, a graphic vector analysis algorithm, such as an OpenCV-based outline detection algorithm, can be used to remove redundant layers from the file, such as annotation layers, retaining only the outer outline layer of the foundation and the outline layer of the load-bearing walls. By extracting the coordinates of the vector lines in the retained layers and arranging the vertex coordinates of the outer outline lines in clockwise order, a set of polygon coordinates can be obtained. This set represents the outer boundary of the building foundation. The vertex coordinates of the load-bearing wall outlines are then extracted to form the load-bearing wall coordinate set, which, together with the outer boundary, constitutes the geometric boundary.

[0075] Specifically, room type libraries typically contain three categories of information: room type, functional requirements, and parameter requirements. Traditional table formats cannot be directly used for computer calculations. Therefore, a two-dimensional attribute matrix of m rows × 4 columns can be constructed, using room type as the row index and room type ID, minimum area threshold, lighting requirement parameters, and a list of mandatory adjacent room IDs as column indexes, where m is the number of room types. Building code texts contain numerous clauses. First, a BERT-based text classification model can be used to binary classify the code clauses as directly related to / irrelevant to the building layout, filtering out clauses unrelated to the layout. Then, a secondary classification is performed on the layout-related clauses: unenforceable / optimizable. Unenforceable clauses are core constraints ensuring building safety and structural stability, such as the fire separation distance between civil buildings should not be less than 6m, which can be encoded into a set of hard constraint rules using logical expressions. Optimizable clauses are performance goals used to improve the building's user experience, such as the natural lighting value in office areas should not be less than 0.7, which can be quantified into a set of soft constraint objectives using parameter ranges.

[0076] Specifically, by extracting the mandatory adjacency rules between rooms from the attribute matrix and constructing a spatial topology graph based on geometric boundaries, the logical connections between room functions can be intuitively reflected, avoiding functional zoning confusion in subsequent layout schemes. First, all adjacency pairs can be extracted from the mandatory adjacency room ID list in the attribute matrix. Then, based on the outer contour of the geometric boundaries and the distribution of load-bearing walls, the reasonable adjacent area for each pair of adjacent rooms (i.e., the coordinate range within which adjacent rooms can be arranged within the geometric boundaries, satisfying room area requirements and load-bearing wall avoidance requirements) is calculated. Finally, a spatial topology graph is constructed using room type as nodes, with node attributes including room ID and minimum area, and mandatory adjacency + reasonable adjacent area as edges, with edge attributes including the coordinate range of the adjacent area. This ensures that in subsequent layouts, two rooms not only satisfy the adjacency relationship but can also be arranged within a reasonable space. By combining the geometric boundaries, attribute matrix, hard constraint rule set, soft constraint target set, and spatial topology graph obtained from the above steps, complete structured data can be formed, providing a data foundation for the subsequent generation of optimized sampling scheme sets and the construction of a full scheme evaluation set.

[0077] In one embodiment, based on geometric boundaries, a set of hard constraint rules, and a spatial topological graph, an optimized sampling scheme set is obtained through Latin hypercube sampling, reinforcement learning strategies, and supplementary sampling processing, including:

[0078] Based on geometric boundaries and hard constraint rule sets, Latin hypercube sampling is performed within the spatial range defined by the hard constraint rule sets to generate multiple initial layout schemes, thus obtaining an initial scheme set.

[0079] Based on the room type nodes and forced adjacency edges in the spatial topology graph, construct an adjacency matrix;

[0080] The reinforcement learning state space is constructed by using the current position status of the rooms that have been placed, the list of types of the rooms that have not been placed, and the adjacency matrix as spatial dimensions.

[0081] Acquire and optimize actions based on preset layouts to construct a reinforcement learning action space. The preset layout optimization actions include room coordinate adjustment and room rotation angle setting that conform to the adjacency matrix constraints.

[0082] A reinforcement learning agent is constructed using the PPO algorithm. The agent is iteratively trained based on the reinforcement learning state space and action space. Training stops when the constraint compliance rate of the schemes generated by the reinforcement learning agent meets a set threshold, and the trained agent is obtained. The constraint compliance rate is the proportion of schemes that meet the adjacency matrix constraints among the schemes generated by the reinforcement learning agent.

[0083] The initial state of the reinforcement learning state space is input into the trained agent for layout optimization, generating multiple schemes to obtain a set of reinforcement learning schemes.

[0084] The initial scheme set and the reinforcement learning scheme set are merged to obtain a temporary scheme set. Multi-objective computation is performed on the schemes in the temporary scheme set based on the soft-constrained objective set to obtain the objective value set. The Pareto front coverage of the reinforcement learning scheme set and the initial scheme set is calculated using the objective value set.

[0085] When the Pareto front coverage is less than the preset coverage threshold, multiple supplementary layout schemes are generated through supplementary Latin hypercube sampling to obtain a supplementary scheme set.

[0086] The initial scheme set, reinforcement learning scheme set, and supplementary scheme set are merged and deduplicated to obtain the optimized sampling scheme set.

[0087] Specifically, a two-dimensional layout space coordinate system can first be constructed based on the outer contour coordinates of the geometric boundary and the coordinates of the load-bearing walls. The x-axis represents the horizontal direction, and the y-axis represents the vertical direction. Prohibited layout areas, such as areas occupied by load-bearing walls and reserved areas for fire separation, are delineated according to the hard constraint rule set. Then, the two-dimensional layout space is divided dimensionally according to the number and type of rooms. For example, if five types of rooms need to be laid out, the space is divided into a 10-dimensional parameter space for each room's coordinates (each type of room requires x and y coordinate parameters to determine its location). A Latin hypercube sampling algorithm is used to sample the 10-dimensional parameter space, randomly selecting a sampling point within the parameter range of each dimension to ensure that the sampling points in each dimension are evenly distributed and that the sampling points in different dimensions are independent of each other. By combining the room positions corresponding to each sampling point, the hard constraint rule set is called in real time for compliance verification. This verifies whether the room is completely within the geometric boundary, whether the room spacing meets the fire separation requirements, and whether the room avoids load-bearing wall areas, etc. All sampling points that meet the hard constraints are selected, and the combination of room positions corresponding to each compliant sampling point is used as an initial layout scheme, which is then aggregated to form an initial scheme set. Compared to traditional random sampling, this sampling method ensures a uniform distribution of the initial scheme within the legal space. Schematic, the graphical relationships in the spatial topology graph are difficult to directly use for state and action calculations in reinforcement learning. Therefore, an n×n adjacency matrix A can be constructed, with the number of room types n in the spatial topology graph as the dimension, where matrix elements A... ij The rule for determining the value is that if room type i and room type j have a mandatory adjacent relationship, then A ij =1, if there is no mandatory adjacency relationship, then A ij =0, if i = j (same room type), then A ij =0.

[0088] Traditional sampling methods cannot actively learn room functional relationships, while reinforcement learning can define the current layout environment through a state space and legal layout operations through an action space, thus enabling the agent to actively satisfy adjacency matrix constraints during the sampling process. Specifically, in terms of state space construction, the position state of currently placed rooms can be represented by the set of coordinates of placed rooms, the list of unplaced room types can be represented by an array of unplaced room type IDs, and the adjacency matrix can be directly called from the generator matrix. These three elements together constitute the reinforcement learning state vector. This state vector ensures that the agent clearly understands the current layout environment. In terms of action space construction, the selectable range of room rotation angles can first be determined to ensure that the room remains rectangular after rotation and does not exceed the geometric boundaries. Then, for unplaced room type u, placed rooms p with mandatory adjacency relationships with u are selected based on the adjacency matrix A, and the placeable area around p is calculated. Subsequently, the coordinates (x, y) and rotation angle θ of unplaced room u within the placeable area can be combined into an action, and all legal actions constitute the action space. Through the constraints of this action space, it can be ensured that the agent can only select actions that satisfy functional relationships and conform to physical boundaries, avoiding the generation of invalid actions.

[0089] Specifically, the PPO (Proximal Policy Optimization) algorithm is a policy gradient algorithm that introduces the concept of a trust region in policy updates to limit the differences between old and new policies, thereby achieving stable and efficient training. First, an Actor-Critic dual-network architecture can be used to initialize the agent's neural network structure. The Actor network is responsible for outputting the action probability distribution based on the current state S, while the Critic network is responsible for evaluating the state value based on the current state S. Then, training parameters are set, such as 1000 iterations, 200 samples per iteration, and a constraint compliance threshold of 90%. During training, the agent starts from the current state (P is an empty set, U is a list of all room types, and A is the adjacency matrix), selects action a based on the action probabilities output by the Actor network, and updates the state after executing the action (e.g., placing room u to (x,y), updating P to P∪{(x,y)}, and updating U to U{u}). Once all rooms are placed (U is an empty set), it is determined whether the solution conforms to the adjacency matrix constraint (i.e., all rooms with mandatory adjacency relationships are adjacent). If it does, a positive reward is given (e.g., reward value 1); otherwise, a negative reward is given (e.g., reward value -0.5). Simultaneously, the temporal difference error can be calculated by combining the state value of the Critic network. The parameters of the Actor network and Critic network are updated based on the temporal difference error to minimize policy loss and value loss. After each iteration, the proportion of the 200 solutions generated by the agent that round that conform to the adjacency matrix constraint is calculated. If the constraint conformance rate is ≥90%, training can stop, and the trained agent is obtained. If the threshold is not reached, the next iteration continues.

[0090] After inputting the initial state vector of the reinforcement learning state space into the trained agent, layout optimization can be performed through a process similar to the training phase to generate multiple layout schemes that conform to the adjacency matrix constraints. These schemes are then aggregated to obtain a reinforcement learning scheme set. Compared to the initial scheme set, this scheme set shows a significant improvement in functional relevance. Furthermore, the initial scheme set and the reinforcement learning scheme set can be merged to obtain a temporary scheme set. Subsequently, based on the soft-constrained objective set, multi-objective calculations are performed on each scheme in the temporary scheme set to obtain the streamline efficiency (the ratio of the main streamline length to the ideal streamline length), natural lighting (average room lighting coefficient), spatial fitness, etc., of the scheme, resulting in the objective value vector for each scheme. All objective value vectors constitute the objective value set. Based on this objective value set, the Pareto front P1 of the initial scheme set (i.e., no other initial scheme in P1 is superior to it in all objectives) and the Pareto front P2 of the reinforcement learning scheme set can be solved separately. Then, the number of schemes in P2 that are not covered by P1, i.e., the number of schemes in P2 that are superior to the schemes in P1 in all objectives, is calculated, denoted as C. The Pareto front coverage γ can be obtained by using γ = C / |P2|, where |P2| is the total number of schemes in P2. The larger the Pareto front coverage, the more significant the improvement of the reinforcement learning scheme set on the multi-objective performance of the initial scheme set.

[0091] When the Pareto front coverage is less than a preset coverage threshold, supplementary Latin hypercube sampling can be performed to improve the multi-objective diversity of the scheme set. For example, if the Pareto fronts of the initial scheme set and the reinforcement learning scheme set are concentrated in regions with high streamline efficiency but poor lighting, or regions with good lighting but long streamlines, while regions with both high streamline efficiency and good lighting have no scheme coverage, then these regions can be designated as the target areas for supplementary sampling. Subsequently, based on the room layout characteristics corresponding to the target area, such as the uniform distribution of rooms along the lighting surface, the parameter range of Latin hypercube sampling is adjusted within the range defined by the geometric boundaries and the hard constraint rule set. This reduces the sampling probability of rooms in non-lighting areas and increases the sampling probability of rooms in lighting areas. The adjusted Latin hypercube sampling algorithm can generate supplementary layout schemes, and compliance verification can be performed by calling the hard constraint rule set and adjacency matrix to ensure that the supplementary schemes meet the hard constraints and functional associations. Compliant supplementary schemes are then selected and summarized to form a supplementary scheme set. Finally, a coordinate hash matching method can be used to sort the coordinates of all rooms in each scheme by room type ID, generating a unique coordinate hash value. If two schemes have the same coordinate hash value, they are considered duplicate schemes, and only one is retained. By deduplicating and aggregating all compliant schemes, an optimized sampling scheme set can be formed, providing a diverse candidate scheme basis for the subsequent construction of the full scheme evaluation set.

[0092] In one embodiment, based on a spatial topology graph, attribute matrix, and soft-constraint objective set, multi-objective computation and surrogate model training are performed on the optimized sampling scheme set to obtain a full scheme evaluation set, including:

[0093] The schemes of the optimized sampling scheme set are split into training samples and fast evaluation samples.

[0094] By using spatial topology graphs, attribute matrices, and soft constraint target sets, multi-objective calculations are performed on the layout schemes in each training sample to obtain a multi-objective set including streamline efficiency, natural lighting, and spatial fitness.

[0095] Spatial features are extracted from each training sample, and the spatial features are matrixed and processed to obtain the spatial feature matrix as input data. The multi-target set corresponding to each training sample is used as label data. Spatial features include room size and room location distribution.

[0096] Using the input data and label data as training data, the initial GNN model, the initial CNN model, and the initial SVR model were trained respectively to obtain the trained GNN model, CNN model, and SVR model. The GNN model was used for streamline efficiency prediction, the CNN model was used for natural lighting prediction, and the SVR model was used for spatial fitness prediction.

[0097] Using GNN, CNN and SVR models, target value prediction processing is performed on the rapid evaluation samples to obtain a multi-objective prediction set including streamline efficiency prediction, natural lighting prediction and spatial fitness prediction.

[0098] The training samples, multi-objective sets, fast evaluation samples, and corresponding multi-objective prediction sets are integrated and processed to obtain the full scheme evaluation set.

[0099] Specifically, a stratified random sampling method can be used to stratify the total sample according to the compliance type of the scheme, ensuring that the proportion of each type of sample in the training sample and the rapid evaluation sample is consistent, avoiding model training bias caused by uneven sample distribution. The split ratio of the training sample to the rapid evaluation sample is then set to 1:9. Subsequently, based on three key performance indicators—streamline efficiency, natural lighting, and spatial adaptability—and combined with the characteristics of different input data, corresponding calculation methods can be used to perform multi-objective calculations on the training sample, obtaining a multi-objective set. Furthermore, since the spatial characteristics of the layout scheme directly affect its performance, feature extraction can be used to transform the abstract spatial form into quantitative data. For example, this spatial feature can include room size and room location distribution. Room size features are statistically analyzed by room type, extracting the length, width, and area of ​​each room to form a four-dimensional feature vector of room type-length-width-area. Room location distribution features are divided by spatial region, dividing the space within the geometric boundary into four regions along the x and y axes, and statistically analyzing the proportion of each type of room in each region to form a 17-dimensional feature vector of room type-region proportion. By concatenating the spatial features of each training sample in order of room type, a one-dimensional feature vector can be obtained. Arranging the one-dimensional feature vectors of all training samples by row yields a spatial feature matrix, which serves as the input data for training the surrogate model.

[0100] Specifically, streamline efficiency is strongly correlated with spatial topology (dependent on room adjacency), natural lighting is strongly correlated with spatial image features (dependent on the spatial continuity of light distribution), and spatial fitness has a strong linear correlation with numerical features. Therefore, for graph neural network (GNN) models used for streamline efficiency prediction, a GAT (Graph Attention Network) architecture can be adopted. This architecture transforms the room location distribution features in the spatial feature matrix into node features (each room is a node, and the feature is the region proportion), and transforms the spatial topology graph into a graph structure (the weight of the edges between nodes is the room spacing). The input data consists of the graph structure and node features, and the label data consists of streamline efficiency values ​​from a multi-objective set. During training, an attention mechanism is used to guide the model to focus on the adjacency relationships of pairs of main functional rooms. For Convolutional Neural Network (CNN) models used for natural lighting prediction, the LeNet-5 architecture can be employed. This architecture reshapes the room size and location distribution features in the spatial feature matrix into a two-dimensional feature map (simulating a planar image of the building layout). The input data is the two-dimensional feature map, and the label data is the natural lighting values ​​from a multi-objective set. During training, spatial features (such as room clusters and room distribution near windows) are extracted through convolutional layers and mapped to natural lighting values ​​through fully connected layers. For Support Vector Regression (SVR) models used for spatial fitness prediction, RBF can be used as the kernel function. The input data is the spatial feature matrix, and the label data is the spatial fitness values ​​from a multi-objective set. The penalty coefficient and kernel function parameters are optimized using a grid search method.

[0101] Preferably, the trained model can be used to predict target values ​​for the rapid evaluation samples, obtaining predicted values ​​for streamline efficiency, natural lighting, and spatial fitness. The three predicted values ​​for each rapid evaluation sample are combined into a three-dimensional prediction vector, and all prediction vectors are aggregated to form a multi-objective prediction set. Finally, a unique identifier ID is assigned to each training sample, associated with its corresponding multi-objective set (precise calculated value), and a unique identifier ID is assigned to each rapid evaluation sample, associated with its corresponding multi-objective prediction set (model predicted value). By organizing all sample IDs, corresponding layout schemes (room coordinates, rotation angle), and target values ​​(precise or predicted values) into a structured table, a complete scheme evaluation set can be obtained. This complete scheme evaluation set not only contains performance data for all optimized sampling schemes but also distinguishes between precise and predicted values ​​through a value type field. This provides a data priority basis for subsequent Pareto selection, such as prioritizing precise value samples during selection, with predicted value samples serving as a supplement. It also ensures that the performance data of all schemes is traceable and verifiable, providing a complete and accurate evaluation foundation for subsequent constraint optimization stages.

[0102] In one embodiment, such as Figure 2 As shown, using spatial topology graphs, attribute matrices, and soft-constraint objective sets, multi-objective calculations are performed on the layout schemes in each training sample to obtain a multi-objective set including streamline efficiency, natural lighting, and spatial fitness, including:

[0103] S201: Based on the spatial topology graph, Dijkstra's shortest path calculation is performed on the layout schemes in each training sample to obtain the corresponding streamline efficiency.

[0104] S202: Based on the lighting parameters in the soft-constrained target set, Radiance optical simulation calculations are performed on the layout schemes in each training sample to obtain the corresponding natural lighting.

[0105] S203: Based on the minimum room area requirement in the attribute matrix, spatial index calculation is performed on the layout schemes in each training sample. The room rectangularity and area utilization rate of the layout schemes in the training samples are calculated respectively. Based on the room rectangularity and area utilization rate, the corresponding spatial fitness is obtained.

[0106] S204: Combining streamline efficiency, natural lighting, and spatial adaptability, a multi-objective set is obtained.

[0107] Specifically, the spatial topology graph can first be transformed into a weighted connected graph. This involves using each room in the training sample layout as a node, with node attributes including the room's center coordinates, and using direct passageways between rooms as edges, with the edge weight set to the Euclidean distance between the center coordinates of the two rooms. Then, key circulation pairs can be determined based on the building's functional requirements. For example, key circulation pairs for office buildings include the entrance lobby to offices on each floor, while key circulation pairs for residential buildings include the entrance door to the living room. The number of key circulation pairs is set to 5-8 groups depending on the building type to ensure coverage of the main usage scenarios. For each key circulation pair, Dijkstra's algorithm is used to calculate the shortest path length L from node A to node B. s Then, calculate the straight-line distance L0 between node A and node B (i.e., the ideal shortest path without considering obstructions from other rooms), and then define the streamline efficiency η as η = L0 / L s The closer η is to 1, the closer the actual travel path is to the ideal path, and the more convenient the flow is.

[0108] Specifically, the Radiance software's physics-based lighting simulation capabilities can be used to recreate the propagation process of solar radiation within a building, quantifying the sufficiency and uniformity of room lighting. For example, key daylighting parameters are first extracted from a set of soft-constraint targets, such as the building's geographical coordinates, typical days throughout the year (e.g., the summer solstice, June 21st), standard hours of sunshine, window transmittance, and reflectivity of various interior surfaces. Then, a three-dimensional lighting model is constructed based on training sample layout schemes; this involves importing the two-dimensional coordinates of the geometric boundaries into Radiance software and extruding them to generate a 3D building model. Based on the window positions in the layout scheme (determined by the coordinates of the outer contour openings of the geometric boundaries), transparent window components are added to this model and assigned preset transmittance parameters. The interior space is then divided into rooms, and lighting sampling points are set for each room, ensuring that sampling covers all areas of the room. During simulation calculations, the daylight factor (DF) method can be used to calculate the daylight factor at each sampling point, where DF is defined as the ratio of the natural illuminance at a point inside the building to the natural illuminance on an unobstructed horizontal surface outside at the same time. Furthermore, the arithmetic mean of the daylight factor (DF) values ​​at all sampling points can be calculated to obtain the average daylight factor of the room. The daylight uniformity can be obtained by calculating the ratio of the minimum DF value to the maximum DF value within the room. The average daylight factor can be used as the natural daylight value of the room; a higher average daylight factor indicates more sufficient lighting. In addition, the natural daylight value of the room can be obtained by combining the average daylight factor and daylight uniformity to provide a more comprehensive assessment of the room's lighting performance.

[0109] Specifically, spatial adaptability is directly related to the realization of room functionality. First, the minimum area threshold for each room type can be extracted from the attribute matrix. Then, for each room in the training sample layout scheme, its actual area is calculated based on the room's rectangular coordinates. If the actual area is greater than the minimum area threshold, it means the room area meets functional requirements, and the room's area utilization rate is defined as 1. Otherwise, it means the room area is insufficient, and the area utilization rate is defined as the ratio of the two. By taking the arithmetic mean of the area utilization rates of all rooms in the layout scheme, the overall area utilization rate of the scheme can be obtained. The closer this value is to 1, the higher the area satisfaction of the scheme. Rectangularity is an indicator of the regularity of a room's shape; the more regular the shape, the more conducive it is to furniture arrangement and space utilization. For each room, the area of ​​the smallest bounding rectangle containing that room can be calculated (i.e., the area of ​​the smallest rectangle that can completely contain the room). The rectangularity of the room is defined as the ratio of the actual area to the area of ​​the smallest bounding rectangle; the closer the rectangularity is to 1, the closer the room shape is to a rectangle. The arithmetic mean of the rectangularity of all rooms in the scheme is taken to obtain the overall rectangularity of the scheme. Finally, the space fitness can be defined as the weighted sum of area utilization and room rectangularity, with the weighting coefficients set according to the priority in the soft constraint objective set. Finally, the streamline efficiency, natural lighting, and space fitness corresponding to each training sample layout scheme are combined into a three-dimensional objective value vector, and the objective value vectors of all training samples are summarized to form a multi-objective set.

[0110] In one embodiment, the spatial fitness can also be calculated using the following formula:

[0111]

[0112] Where S is the spatial adaptability, n is the total number of rooms, and A i Let i be the actual area of ​​the i-th room. R is the minimum area threshold for the i-th room. i Let U be the room rectangle of the i-th room. 空 U represents the area of ​​the unused blank region within the geometric boundary. 总 λ1, λ2, and λ3 are the total area of ​​the geometric boundary, and their sum is 1.

[0113] The previous embodiment considered only the dimension of a single room in terms of spatial adaptability. It calculated the area utilization rate and the room's rectangularity for each room, then averaged these two indicators for all rooms and summed them using a weighted method to obtain the spatial adaptability. However, the formula above, in addition to weighting the area utilization rate and room rectangularity, also introduces the overall spatial utilization dimension of the building foundation, i.e., through... Expanding the assessment of spatial adaptability from individual rooms to the overall space utilization of the building foundation allows for a more comprehensive consideration of how the building layout utilizes the foundation space.

[0114] In one embodiment, based on a set of hard constraint rules and a set of soft constraint targets, the entire scheme evaluation set is subjected to Pareto filtering, hard constraint repair, and soft constraint optimization to generate a final optimized layout scheme, including:

[0115] Extract the target values ​​corresponding to each scheme from the overall scheme evaluation set;

[0116] Based on the soft-constraint objective set, a multi-objective function is constructed by maximizing streamline efficiency, maximizing natural lighting, and maximizing spatial fitness. The objective values ​​are input into the multi-objective function, and the NSGA-III algorithm is used to solve the Pareto optimal solution. Non-dominated solution schemes are selected to obtain the Pareto front scheme set.

[0117] Based on the hard constraint rule set, hard constraint compliance detection is performed on each scheme in the Pareto frontier scheme set to identify the non-compliant schemes that violate hard constraints and the non-compliant walls in each non-compliant scheme.

[0118] For the illegal walls in the illegal scheme, the A* path search algorithm is used to find the new position of the wall within the space limited by the hard constraint rule set, so as to obtain the new position of the wall that conforms to the hard constraint rule set. Then, the coordinates of the illegal walls in the illegal scheme are updated according to the new position of the wall to obtain the set of repaired schemes.

[0119] Based on the soft-constraint target set, optimization indices including optimizing natural lighting, optimizing streamline efficiency, and optimizing spatial adaptability are determined, and the weight coefficients of each optimization index are quantified based on the parameter range of the soft-constraint target set.

[0120] For each scheme in the repaired scheme set, a fitness function is constructed based on the optimization index, and the simulated annealing algorithm is used to perform room exchange optimization to obtain the optimized scheme set.

[0121] Multi-objective calculations are performed on each scheme in the optimized scheme set to obtain the corresponding optimized objective value. The weight coefficients of each optimization index are then weighted and summed with the optimized objective values ​​of each scheme in the optimized scheme set to obtain the comprehensive score of each scheme in the optimized scheme set.

[0122] The comprehensive scores of each scheme in the optimized scheme set are ranked, and the scheme with the highest comprehensive score is taken as the final optimized layout scheme.

[0123] Specifically, the sample IDs in the full evaluation set can be used as indexes to extract the streamline efficiency, natural lighting, and spatial fitness corresponding to each scheme, forming a data table of scheme ID - target value. This table can also distinguish the type of target value (exact value or predicted value). In subsequent Pareto selection, exact value samples are prioritized, while predicted value samples are only used as a supplement to ensure the reliability of the selection criteria. Then, a multi-objective function can be constructed based on the soft-constraint objective set, and the NSGA-III algorithm can be used to solve for the Pareto optimal solution. For example, based on the soft-constraint objective set, the goals of maximizing streamline efficiency, maximizing natural lighting, and maximizing spatial fitness can be clearly defined to construct a multi-objective function. The extracted target values ​​are then input into this function, and the NSGA-III algorithm is used for solving. That is, 200 schemes can be randomly selected from the full evaluation set as the initial population to ensure that the population covers different performance regions. By stratifying the schemes in the population, schemes not dominated by other schemes can be classified into Layer 1 (Pareto front layer), and the remaining schemes can be classified into Layer 2, Layer 3, etc., according to their degree of dominance. Subsequently, the crowding degree (a measure of the distribution density of schemes in the target space) is calculated for the first-level schemes. The higher the crowding degree, the sparser the distribution of schemes. Schemes with higher crowding degrees are retained to maintain diversity. New populations are generated through selection, crossover, and mutation operations. The non-dominated sorting and crowding degree calculation are repeated. After 50 generations, the schemes of the final first level are summarized to form the Pareto front scheme set.

[0124] Because the Pareto frontier solution set may contain some hard constraint violations due to sampling errors (such as insufficient fire separation distances or load-bearing wall offsets), each solution can be checked item by item using logical expressions from the hard constraint rule set. For example, the wall distance between any two rooms in the solution can be calculated (based on the minimum distance of the room outline coordinates). If a distance is less than a preset distance, it is marked as a violation, and the violation room pair and actual distance are recorded. Furthermore, the center axis coordinates of the load-bearing walls in the solution can be extracted and compared with the preset set of structural axes in the hard constraint rule set. If the offset is greater than a preset offset value, it is marked as a violation, and the ID of the violation load-bearing wall and the offset are recorded. After detection, a list of violation solutions and corresponding violation wall information can be output, providing clear targets for subsequent repairs. By using the current position of the violation wall as the starting point, the movable area of ​​the wall (such as areas greater than a preset distance from other walls) can be defined based on geometric boundaries and the hard constraint rule set, while infeasible areas (such as the interior of a room) are set as obstacles. Subsequently, a cost function can be constructed based on the actual movement distance from the starting point to the current position and the estimated distance from the current position to the target area. Therefore, starting from the initial point, the search nodes can be expanded in ascending order of cost function value, prioritizing the exploration of directions with lower costs, until a position that meets the hard constraint (i.e., the minimum cost function value) is found. The coordinates of the non-compliant wall can then be updated to the coordinates of the position that meets the hard constraint, while fine-tuning the outlines of adjacent rooms (keeping the room areas essentially unchanged) to ensure that the repaired solution has no cascading violations.

[0125] Specifically, the soft-constraint objective set contains optimizable but non-mandatory performance requirements. The analytic hierarchy process (AHP) can be used to quantify weight coefficients to reflect the importance of different indicators, making the optimization process more aligned with actual design needs. Subsequently, a fitness function can be constructed based on the optimization indicators, and simulated annealing can be used for room exchange optimization to improve the overall performance of the schemes while avoiding over-adjustment that could lead to re-violation of hard constraints. For example, first, a fitness function can be constructed for each scheme in the corrected scheme set based on the optimization indicators. Then, initial parameters such as initial temperature T0 and termination temperature T are initialized. e Secondly, two rooms are randomly selected and their locations are swapped (keeping the room area and shape unchanged) to generate a new solution. The fitness difference ΔF between the new and original solutions is calculated. If the fitness difference ΔF is greater than 0, the new solution is accepted; otherwise, it is accepted with probability P = exp(ΔF / T), where T is the current temperature. This ensures that the higher the temperature, the greater the probability of accepting the inferior solution, thus escaping local optima. The temperature can be decreased every 100 iterations until the termination temperature is reached. Furthermore, the hard constraint rule set can be called in real-time for verification during the optimization process. If a hard constraint violation occurs after the swap, the perturbation is directly rejected, ensuring that the optimization always proceeds within the legal space.

[0126] Specifically, the optimized solution set still contains multiple solutions with different performance focuses. Multi-dimensional objectives can be transformed into single-dimensional evaluations through comprehensive scoring to identify the optimal solution. For example, each optimized solution can be recalculated using multiple objectives to obtain optimized target values, namely natural lighting, streamline efficiency, and spatial adaptability. Then, a weighted summation is performed on each solution using corresponding weights, where the weight coefficients are consistent with the fitness function to ensure a unified evaluation standard. Finally, the comprehensive scores of the optimized solution set can be sorted in descending order, and the solution with the highest score is determined as the final optimized layout solution. The final output optimized layout solution can include complete room coordinates, wall locations, target value parameters, and a compliance report, satisfying all mandatory requirements of the hard constraint rule set while achieving comprehensive optimization in terms of performance indicators of the soft constraint objective set.

[0127] Based on the same inventive concept, such as Figure 3 As shown, this application also provides a building space layout optimization design device 300 for implementing the building space layout optimization design method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the building space layout optimization design device provided below can be found in the limitations of the method embodiments above, and will not be repeated here. The device includes:

[0128] The data parsing and structuring module 301 is used to parse and process the building base outline, room type library and building code text to generate structured data. The structured data includes geometric boundaries, attribute matrices, hard constraint rule sets, soft constraint target sets and spatial topology diagrams.

[0129] The initial layout scheme generation module 302 is used to obtain an optimized sampling scheme set based on geometric boundaries, hard constraint rule set and spatial topology graph through Latin hypercube sampling, reinforcement learning strategy and supplementary sampling processing, and to perform multi-objective calculation and surrogate model training on the optimized sampling scheme set based on spatial topology graph, attribute matrix and soft constraint target set to obtain the full scheme evaluation set;

[0130] The scheme evaluation and optimization module 303 is used to perform Pareto screening, hard constraint repair and soft constraint optimization on the full scheme evaluation set based on the hard constraint rule set and the soft constraint target set, and generate the final optimized layout scheme.

[0131] In one exemplary embodiment, the present invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the architectural space layout optimization design method of this application. A multi-core processor is preferred to improve the system's parallel processing capability. The memory provides sufficient temporary storage space to support program execution and data processing. The memory capacity should be large enough to accommodate large amounts of data and computational tasks.

[0132] In one exemplary embodiment, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the architectural space layout optimization design method of the present application. The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drive (SSD), or optical disk, etc.

[0133] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.

Claims

1. A method for optimizing architectural spatial layout, characterized in that, The method includes: The building base outline, room type library and building code text are parsed and processed to generate structured data, which includes geometric boundaries, attribute matrix, hard constraint rule set, soft constraint target set and spatial topology diagram; Based on the geometric boundary, the set of hard constraint rules, and the spatial topology graph, an optimized sampling scheme set is obtained through Latin hypercube sampling, reinforcement learning strategies, and supplementary sampling processing. Based on the spatial topology graph, the attribute matrix, and the set of soft constraint objectives, the optimized sampling scheme set is subjected to multi-objective computation and surrogate model training to obtain a full scheme evaluation set. Based on the set of hard constraint rules and the set of soft constraint targets, the Pareto screening, hard constraint repair and soft constraint optimization processes are performed on the full scheme evaluation set to generate the final optimized layout scheme.

2. The method according to claim 1, characterized in that, The process of parsing and processing the building base outline, room type library, and building code text to generate structured data includes: Geometric feature extraction is performed based on the building base outline to extract the coordinate boundary information of the building base outline and obtain the geometric boundary. The attribute matrix is ​​obtained by converting each room type, minimum area threshold, lighting requirement parameter, and forced adjacency relationship rule between rooms in the room type library into a matrix form. The building code text is processed by clause classification and parsing to filter out the unviolated clauses in the building code text. The unviolated clauses are then processed by rule encoding to generate the hard constraint rule set. The optimized clauses in the building code text are then filtered out. The optimized clauses are then processed by target parameter quantification to determine the parameter range and generate the soft constraint target set. The unviolated clauses include fire separation distances and load-bearing wall locations. The optimized clauses include natural lighting values. Extract the forced adjacency rules between rooms from the attribute matrix, and combine them with the geometric boundaries to construct room spatial associations. Use the room type as nodes and the forced adjacency rules between rooms as edges to construct the spatial topology graph. The structured data is obtained by combining the geometric boundary, the attribute matrix, the hard constraint rule set, the soft constraint target set, and the spatial topology graph.

3. The method according to claim 1, characterized in that, Based on the geometric boundary, the hard constraint rule set, and the spatial topology graph, an optimized sampling scheme set is obtained through Latin hypercube sampling, reinforcement learning strategies, and supplementary sampling processing, including: Based on the geometric boundary and the set of hard constraint rules, Latin hypercube sampling is performed within the spatial range defined by the set of hard constraint rules to generate multiple initial layout schemes and obtain an initial scheme set. Based on the room type nodes and forced adjacency edges in the spatial topology graph, an adjacency matrix is ​​constructed; The current position status of the rooms that have been placed, the list of types of the rooms that have not been placed, and the adjacency matrix are used as spatial dimensions to construct the reinforcement learning state space; Acquire and construct a reinforcement learning action space based on preset layout optimization actions, wherein the preset layout optimization actions include room coordinate adjustment and room rotation angle setting that conform to the adjacency matrix constraints; A reinforcement learning agent is constructed using the PPO algorithm. The agent is iteratively trained based on the reinforcement learning state space and the reinforcement learning action space. Training stops when the constraint compliance rate of the scheme generated by the reinforcement learning agent meets a set threshold, and the trained agent is obtained. The constraint compliance rate is the proportion of schemes that meet the adjacency matrix constraints among the schemes generated by the reinforcement learning agent. The initial state of the reinforcement learning state space is input into the trained agent for layout optimization, generating multiple schemes to obtain a reinforcement learning scheme set. The initial scheme set and the reinforcement learning scheme set are merged to obtain a temporary scheme set. Multi-objective computation is performed on the schemes in the temporary scheme set based on the soft-constrained objective set to obtain an objective value set. The Pareto front coverage of the reinforcement learning scheme set and the initial scheme set is calculated using the objective value set. When the Pareto front coverage is less than a preset coverage threshold, multiple supplementary layout schemes are generated through supplementary Latin hypercube sampling to obtain a supplementary scheme set. The initial scheme set, the reinforcement learning scheme set, and the supplementary scheme set are merged and deduplicated to obtain the optimized sampling scheme set.

4. The method according to claim 1, characterized in that, Based on the spatial topology graph, the attribute matrix, and the soft-constraint objective set, the optimized sampling scheme set undergoes multi-objective computation and surrogate model training to obtain a full scheme evaluation set, including: The optimized sampling scheme set is split into training samples and fast evaluation samples. Using the spatial topology diagram, the attribute matrix, and the soft constraint target set, multi-objective calculations are performed on the layout schemes in each of the training samples to obtain a multi-objective set including streamline efficiency, natural lighting, and spatial fitness. Spatial features are extracted from each of the training samples, and the spatial features are matrixed to obtain a spatial feature matrix. The spatial feature matrix is ​​used as input data, and the multi-target set corresponding to each of the training samples is used as label data. The spatial features include room size and room location distribution. Using the input data and the label data as training data, the initial GNN model, the initial CNN model, and the initial SVR model are trained respectively to obtain the trained GNN model, CNN model, and SVR model. The GNN model is used for streamline efficiency prediction, the CNN model is used for natural lighting prediction, and the SVR model is used for spatial fitness prediction. Using the GNN model, the CNN model, and the SVR model, target value prediction processing is performed on the fast evaluation samples to obtain a multi-objective prediction set including streamline efficiency prediction value, natural lighting prediction value, and spatial fitness prediction value. The training samples, the multi-objective set, the fast evaluation samples, and the corresponding multi-objective prediction set are integrated and processed to obtain the full scheme evaluation set.

5. The method according to claim 4, characterized in that, The process involves performing multi-objective calculations on the layout schemes in each of the training samples using the spatial topology graph, the attribute matrix, and the soft constraint target set, resulting in a multi-objective set including streamline efficiency, natural lighting, and spatial fitness. Based on the spatial topology graph, Dijkstra's shortest path calculation is performed on the layout schemes in each training sample to obtain the corresponding streamline efficiency. Based on the lighting parameters in the soft-constraint target set, Radiance optical simulation calculations are performed on the layout schemes in each training sample to obtain the corresponding natural lighting. Based on the minimum room area requirement in the attribute matrix, spatial index calculations are performed on the layout schemes in each training sample. The room rectangularity and area utilization rate of the layout schemes in the training samples are calculated respectively. Based on the room rectangularity and the area utilization rate, the corresponding spatial fitness is obtained. The multi-objective set is obtained by combining the streamline efficiency, the natural lighting, and the spatial adaptability.

6. The method according to claim 1, characterized in that, The process of performing Pareto filtering, hard constraint repair, and soft constraint optimization on the full scheme evaluation set based on the hard constraint rule set and the soft constraint target set to generate the final optimized layout scheme includes: Extract the target values ​​corresponding to each scheme from the full scheme evaluation set; Based on the soft-constraint objective set, a multi-objective function is constructed by maximizing streamline efficiency, maximizing natural lighting, and maximizing spatial fitness. The objective values ​​are input into the multi-objective function, and the NSGA-III algorithm is used to solve the Pareto optimal solution. Non-dominated solution schemes are selected to obtain the Pareto front scheme set. Based on the set of hard constraint rules, hard constraint compliance detection is performed on each scheme in the Pareto frontier scheme set to identify the schemes that violate hard constraints and the illegal walls in each of the illegal schemes. For the illegal walls in the aforementioned violation scheme, the A* path search algorithm is used to perform pathfinding processing for the new position of the walls within the spatial range defined by the hard constraint rule set, to obtain the new position of the walls that conforms to the hard constraint rule set, and the coordinates of the illegal walls in the aforementioned violation scheme are updated based on the new position of the walls to obtain the repaired scheme set; Based on the soft-constraint target set, optimization indicators including optimizing natural lighting, optimizing streamline efficiency, and optimizing spatial adaptability are determined, and the weight coefficients of each optimization indicator are quantified based on the parameter range of the soft-constraint target set. For each scheme in the repaired scheme set, a fitness function is constructed based on the optimization index, and room exchange optimization is performed using the simulated annealing algorithm to obtain the optimized scheme set. Multi-objective calculations are performed on each scheme in the optimized scheme set to obtain the corresponding optimized target value. The weight coefficients of each optimization index are then weighted and summed with the optimized target values ​​of each scheme in the optimized scheme set to obtain the comprehensive score of each scheme in the optimized scheme set. The comprehensive scores of each scheme in the optimized scheme set are sorted, and the scheme with the highest comprehensive score is taken as the final optimized layout scheme.

7. The method according to claim 5, characterized in that, The spatial fitness is calculated using the following formula: ; in, For the spatial fitness, The total number of rooms. For the first The actual area of ​​each room For the first Minimum area threshold for each room For the first The rectangularity of the room. The area of ​​the unused blank region within the geometric boundary. The total area of ​​the geometric boundary. , and All are preset weighting coefficients, and their sum is 1.

8. A device for optimizing architectural space layout, characterized in that, The device includes: The data parsing and structuring module is used to parse and process the building base outline, room type library and building code text to generate structured data. The structured data includes geometric boundaries, attribute matrices, hard constraint rule sets, soft constraint target sets and spatial topology diagrams. The initial layout scheme generation module is used to obtain an optimized sampling scheme set based on the geometric boundary, the hard constraint rule set, and the spatial topology graph through Latin hypercube sampling, reinforcement learning strategy, and supplementary sampling processing. Based on the spatial topology graph, the attribute matrix, and the soft constraint target set, the optimized sampling scheme set is subjected to multi-objective calculation and surrogate model training processing to obtain a full scheme evaluation set. The scheme evaluation and optimization module is used to perform Pareto filtering, hard constraint repair and soft constraint optimization on the full scheme evaluation set based on the hard constraint rule set and the soft constraint target set, and generate the final optimized layout scheme.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Building design evaluation method of multi-objective optimization driven algorithm

    CN118364720A

  • AIGC technology-based indigenous building space design generation method

    CN119624382A