Building indoor space function layout intelligent optimization generation system and method
Patent Information
- Application Number
- CN202610766957.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]然而,传统室内布局设计过度依赖设计师的人工排布,在处理大型办公空间或复杂住宅场景时,难以有效协同采光性能、功能邻接度与动线最短化之间的冲突
[0019] 1. This invention adopts a sequential generation logic of first establishing the framework and then filling in the rooms. It first solves the main topology corridor centerline that satisfies the evacuation distance constraint and the path non-intersection constraint based on the operation research path planning method. Then, the corridor framework is used as the spatial anchor point and hard growth boundary for reinforcement learning agents to place functional rooms. This effectively avoids the technical defects of traditional direct spatial segmentation methods, such as corridor shape distortion, excessive fire evacuation distance and serious space waste.
Smart Images

Figure CN122595440A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer-aided design, specifically relating to an intelligent optimization generation system and method for the functional layout of building interior spaces. Background Technology
[0002] With the deep integration of artificial intelligence and building information modeling (BIM) technology, intelligent layout generation of interior spaces has become an important means to improve design efficiency and spatial quality. Traditional architectural design is shifting from a human experience-driven approach to a digital generation paradigm, using algorithms to seek a balance between complex geometric constraints and functional requirements in order to maximize the value of interior spaces. This technological evolution has significant advantages in handling large-scale construction projects, shortening design cycles, and optimizing the allocation of spatial resources.
[0003] Among them, the intelligent optimization and generation of building interior functional layout involves the multi-faceted coupling of spatial topological relationships, ergonomic dimensions, and building code constraints, and is a core research direction in the field of smart building design. This technology aims to construct a spatial organization with rational flow and complementary functions within a limited building outline by logically expressing room functional modules and combining them with specific performance evaluation indicators. This requires the system to not only handle static geometric divisions but also possess a deep understanding and simulation capability of dynamic traffic flow and complex functional logic.
[0004] However, traditional interior layout design relies excessively on the manual arrangement by designers, making it difficult to effectively coordinate the conflicts between lighting performance, functional adjacency, and minimizing circulation routes when dealing with large office spaces or complex residential scenarios. Existing generative design methods often directly perform spatial geometric segmentation, ignoring the topological guiding role of indoor traffic flow in functional organization. This results in technical defects in the generated solutions, such as distorted corridor shapes, excessive fire evacuation distances, or serious space waste. Furthermore, due to the huge search space and complex constraints, pure connectivity algorithms suffer from slow convergence speed and insufficient solution professionalism when searching for Pareto optimal solutions that meet building codes. Summary of the Invention
[0005] The purpose of this invention is to provide an intelligent optimization generation system and method for the functional layout of building interior spaces, which can effectively solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0007] On the one hand, the intelligent optimization and generation method for the functional layout of building interior spaces includes the following steps:
[0008] Obtain building plan geometric contour data and room requirement data to be arranged, discretize the geometric contour data into a numerical matrix of arrangeable areas, and define attribute parameters for each functional room, including functional attributes and area thresholds.
[0009] Based on the pre-set entrance and exit nodes and the corresponding demand nodes of each functional room in the building plan, under the conditions of satisfying the evacuation distance constraint and the path non-intersection constraint, the shortest path scheme connecting all demand nodes is solved and transformed into a set of polyline segments as the center line of the main topology corridor.
[0010] Construct a constraint graph model whose nodes include a subset of corridor nodes and a subset of functional nodes, and whose edges include spatial anchoring edges established based on functional nodes and the nearest corridor node, as well as functional adjacency edges established between functional nodes based on a preset adjacency weight matrix.
[0011] Using a state tensor composed of the numerical matrix of the deployable area, the rasterized layer of the center line, the cumulative layer of the already laid-out room boundaries, and the distribution layer of the light-receiving interface as input, a deep reinforcement learning agent makes sequential decisions on each functional room, and obtains action parameters through a policy network to generate the geometry and position of each functional room; wherein, the agent's action space is composed of the azimuth offset angle relative to the anchored corridor node, the radial displacement distance, and the room size expansion ratio factor;
[0012] Based on the generated geometry and location, a reward signal is calculated using a pre-defined multi-objective reward function, which includes dimensions such as space utilization, movement efficiency, and compliance. The reward signal is then fed back to the agent to update the policy network parameters. Through a closed loop of sequential decision-making and iterative updates, a complete layout scheme is generated.
[0013] On the other hand, the intelligent optimization and generation system for the functional layout of building interior spaces includes:
[0014] The data preprocessing engine is used to acquire building plan geometric contour data and the required data of functional rooms to be arranged. It discretizes the geometric contour data into a numerical matrix of arrangeable areas and defines attribute parameters for each functional room, including functional attributes and area thresholds.
[0015] The operations research optimization solver is used to solve the shortest path scheme connecting all demand nodes based on the pre-set entrance and exit nodes and the corresponding demand nodes of each functional room in the building plan, under the conditions of satisfying the evacuation distance constraint and the path non-intersection constraint, and transform it into a set of polyline segments as the center line of the main topology corridor.
[0016] The constraint graph model construction module is used to construct a constraint graph model. The nodes of the constraint graph model include a subset of corridor nodes corresponding to the points on the center line of the main topology corridor and a subset of functional nodes corresponding to the functional rooms. The edges of the constraint graph model include spatial anchoring edges established based on the functional nodes and the nearest corridor nodes, and functional adjacency edges established between functional nodes based on a preset adjacency weight matrix.
[0017] The reinforcement learning training architecture deploys a deep reinforcement learning agent, which takes a state tensor composed of the numerical matrix of the deployable area, the rasterized layer of the center line, the cumulative layer of the layout room boundaries, and the distribution layer of the light-receiving interface as input. Within the action space, it makes sequential decisions about the functional rooms, generating the room's geometry and placement. The action space consists of the azimuth offset angle relative to the anchored corridor nodes, the radial displacement distance, and the expansion ratio factor controlling the room size. A preset multi-objective reward function, incorporating dimensions of space utilization, circulation efficiency, and compliance, is used to calculate a reward signal. This reward signal is fed back to the agent to update the policy network parameters. Through a closed loop of sequential decision-making and iterative updates, a complete functional room layout scheme is generated.
[0018] In summary, this application includes at least one of the following beneficial technical effects:
[0019] 1. This invention adopts a sequential generation logic of first establishing the framework and then filling in the rooms. It first solves the main topology corridor centerline that satisfies the evacuation distance constraint and the path non-intersection constraint based on the operation research path planning method. Then, the corridor framework is used as the spatial anchor point and hard growth boundary for reinforcement learning agents to place functional rooms. This effectively avoids the technical defects of traditional direct spatial segmentation methods, such as corridor shape distortion, excessive fire evacuation distance and serious space waste.
[0020] 2. This invention constructs a constraint graph model and encodes it as an additional input channel for a reinforcement learning policy network. It uses spatial anchor edges to enforce the physical connectivity between each functional room and the corridor area, and uses weighted functional adjacency edges to guide the agent to arrange closely related rooms adjacent to each other. Thus, in the generation process, it takes into account both the hard constraints of building codes and the flexible preferences of functional organization, thereby improving the professional compliance of the generated solution.
[0021] 3. This invention employs a deep reinforcement learning agent to make sequential decisions in a state tensor composed of a numerical matrix of deployable areas, a rasterized layer of the centerline, an accumulated layer of the already laid-out room boundaries, and a distribution layer of light-receiving interfaces. Based on a multi-objective reward function that includes space utilization, circulation efficiency, and compliance, the strategy network is optimized. Under complex geometric boundaries and multiple constraints, it can autonomously learn a layout strategy that balances lighting performance, functional adjacency, and the shortest circulation path. The generated solution has both high space utilization efficiency and engineering feasibility. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the overall technical solution for the intelligent optimization generation method of building interior space functional layout in this application;
[0023] Figure 2 This is a schematic diagram of the core principle framework of the sequential allocation of functional rooms based on reinforcement learning in this application;
[0024] Figure 3 This is a logical flow diagram of the backbone topology generation based on the path scheduling algorithm in this application;
[0025] Figure 4 This is a diagram showing the interaction between the reinforcement learning agent and multidimensional building state information and action variables in this application;
[0026] Figure 5 This is a flowchart illustrating the iterative optimization process of the layout scheme based on multi-objective reward feedback and compliance conflict detection in this application. Detailed Implementation
[0027] The following will be combined with the appendix Figures 1 to 5 The technical solution of the present invention is clearly and completely described below. Obviously, the following embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0028] Example 1
[0029] In this embodiment, the intelligent optimization generation method for the functional layout of building interior space is implemented through a highly integrated computing system, which includes a data preprocessing engine, an operations research optimization solver, a reinforcement learning training architecture, and a geometric post-processing operator.
[0030] Step S1: The spatial discretization and demand mapping module performs the following operations.
[0031] In this step, the continuous vector information in the original architectural drawings is converted into discrete numerical matrices that can be directly calculated by subsequent algorithms. Simultaneously, the functional space requirements in the design brief are transformed into a set of structured, quantified constraint parameters. This includes the following:
[0032] Step S101: Load the vectorized geometric profile file of the original building plan through the data reading interface of the computing device. The file follows the DXF or DWG format standard commonly used in the construction industry. The internal elements clearly record the precise closed profile of the core tube structure such as the outer wall boundary line, elevator shaft or pipe shaft, as well as the structural column grid area or fixed equipment occupation area that is pre-specified by the designer and cannot be used for room layout.
[0033] The system performs geometric validity checks and cleans up the imported vector primitives to ensure that the boundaries on which subsequent meshing processing is based are continuous and unambiguous closed polygons.
[0034] Step S102: Call the scan line filling algorithm or polygon meshing algorithm in the graphics processing module to perform spatial discretization operation on the continuous vector geometric contour verified in step S101, and convert it into a two-dimensional pixel raster image with preset precision; during the discretization conversion process, each square pixel unit is set to correspond to a square area of preset size in the actual physical space.
[0035] Step S103: After the pixel raster mapping is completed, a binary numerical matrix with dimensions of M rows × N columns is established to establish the precise correspondence between any spatial location inside the building and the discrete mathematical coordinate system.
[0036] The number of rows M and columns N of the binarized numerical matrix correspond to the maximum pixel span that the building plan can be divided into in the vertical and horizontal directions with an accuracy of 0.1m, respectively. During the traversal of pixel-by-pixel assignment, the matrix elements corresponding to the effective areas whose spatial coordinates are located inside the outer boundary of the building and are not occupied by the core tube or the preset non-arrangeable components are uniformly marked with the value 1. The matrix elements corresponding to the outer area of the building boundary, the scope of the core tube entity, and the preset non-arrangeable areas are uniformly marked with the value 0.
[0037] The generated binarized matrix is used for subsequent geometric calculations, collision detection, and spatial growth decisions for reinforcement learning agents.
[0038] Step S104: After completing the discretization representation of the building's physical boundaries, proceed to the functional requirement mapping stage to define the set of functions covered by this layout task. Where n represents the total number of rooms to be arranged in this task, and each element All of these correspond to the specific functional rooms clearly listed in the design brief. Examples of functional rooms include office area, meeting room, finance office, reception room, tea room, and restroom.
[0039] Step S105: For each element in the function set F It adds a predefined attribute parameter package to each room, which serves as both rigid constraints and flexible guidance signals that the agent must follow during subsequent optimization. The attribute parameter package must contain at least the following three fields.
[0040] The first field is the minimum area threshold parameter, denoted as The minimum area threshold parameter uses the number of pixels in the pixel grid of step S103 as the unit of measurement, and specifies the minimum usable area that the corresponding room must reach in the final generated scheme. The minimum area threshold parameter uses the number of pixels as the unit of measurement, and converts the actual minimum area value into the number of pixels according to the preset spatial resolution as a hard constraint.
[0041] The second field is the daylighting weight coefficient parameter, denoted as ω. The value of the daylighting weight coefficient parameter is set to a continuous floating-point value within the range of 0 to 1; the closer the value of ω is to 1, the higher the dependence of the functional space on natural lighting. In the reinforcement learning decision-making process of the subsequent step S4, the reward signal and state guidance mechanism will be modulated by the daylighting weight, thus tending to push the generation location of rooms with high ω values to the outer edge area of the building with external windows. For example, the ω of open office areas is preset to 0.8 to 0.9, while that of equipment rooms or storage rooms that do not require natural lighting is preset to 0.1 or 0.
[0042] The third field is the functional attribute annotation parameter, denoted as Tag. This parameter, in the form of a metadata tag string, explicitly records the specific function of the room. Tag content may include phrases such as "open-plan office area," "independent supervisor's office," or "dry area restroom." In subsequent processes, the system will use the Tag field as an index key to automatically query and retrieve the associated extended constraint group from the preset design specification template database. This includes professional design requirements such as the maximum allowable aspect ratio of the room, the minimum clear width of evacuation doorways, and whether drainage points need to be reserved, thereby ensuring the engineering feasibility of the generated plan.
[0043] Through the above step S1, this embodiment unifies the physical boundary of the building to be designed and the abstract functional logic requirements into the same digital computing framework. This not only provides quantifiable constraint inputs for the generation of the backbone topology corridor based on the operations research model in the subsequent step S2, but also provides clear and unambiguous initial state tensors and optimization goal guidance for the sequential decision-making behavior of the reinforcement learning agent in step S4.
[0044] Step S2: The backbone topology generation module based on the path scheduling algorithm performs the following operations.
[0045] In this step, before the specific geometry of any room is determined, path planning methods from operations research are used to generate an indoor traffic skeleton that conforms to fire evacuation regulations and has the optimal total length of circulation routes. This skeleton serves as the spatial anchor point and rigid growth boundary for the subsequent arrangement of all rooms. This includes the following:
[0046] Step S201: Read the preset coordinates of the main entrance center point from the building plan data loaded in step S1, and establish this coordinate point as the starting node of the path scheduling model. The role of the starting node in the model is equivalent to that of the parking lot node in the vehicle routing problem. Its two-dimensional coordinate values remain fixed in the subsequent solution process and are not changed or optimized by the algorithm.
[0047] Step S202: Arrange each functional room to be arranged in the functional set F. Abstracted as demand nodes in a path planning problem; in this abstract modeling stage, the room The specific geometric outline is still in an ungenerated state, but its logical center point, which will inevitably exist in the future, is regarded as the target location that the corridor network must visit or pass through.
[0048] The system assigns a unique identifier to each demand node and uniformly sets the demand of each demand node for the main corridor to 1 unit, thereby indicating that each room needs to be connected to the corridor network once.
[0049] In this embodiment, the initial two-dimensional coordinates of each demand node are determined in the following way:
[0050] A preset functional relationship topology template is used, which records the ideal relative positions and distances between common functional rooms (such as office areas, meeting rooms, and tea rooms). During the initialization phase, the coordinates of the main building entrance center point read in step S201 are used as the reference origin, and the relationships between rooms in the functional set F are determined. The functional attribute label Tag and the topology template are used to calculate and assign an initial logical coordinate relative to the reference origin for each requirement node. For rooms or relationships not explicitly defined in the topology template, their initial coordinates are randomly generated within a preset radius determined based on the total building area and centered on the reference origin. This ensures that the path solver has a clear initial input with professional prior knowledge, so as to efficiently start the iterative optimization process.
[0051] Step S203: Call the embedded operations research optimization solution component. The component integrates the RoutingModel solver from the open-source constraint solver library OR-Tools. The system inputs the starting node coordinates determined in step S201 and the set of required nodes constructed in step S202 into the solver, and constructs a distance callback function for calculating the cumulative path length. The calculation logic of the distance callback function is the two-dimensional Euclidean distance formula, that is, for any two input node coordinates, it returns the straight-line distance between them as a cost metric for path planning.
[0052] Step S204: To meet the mandatory requirements of the building fire protection code for evacuation distance, an evacuation distance constraint dimension is introduced into the RoutingModel solver. The specific settings are implemented by calling the AddDimension method in the solver application interface, and the distance callback function constructed in step S203 is specified as the cost accumulation calculation function for this dimension.
[0053] Based on this, the SetUpperBound method of the evacuation distance constraint dimension is called to set the preset value. Set as the cumulative upper limit of this dimension over the entire path; The value is automatically retrieved by the system from the built-in specification database based on the fire resistance rating of the current building plan and the room function type.
[0054] Step S205: During the iterative search process performed by the solver, the constraint solving engine of RoutingModel traverses the candidate solution space. For each path scheme generated from the starting node and passing through several demand nodes in sequence, the distance dimension accumulator then calculates the cumulative topological distance from the main entrance along the main corridor to each room demand node.
[0055] When the constraint solving engine detects that the cumulative distance value of any requirement node exceeds the value set in step S204... If the upper limit threshold is set, the path scheme is determined to be an infeasible solution that violates the evacuation distance constraint and is pruned and removed from the search space. This ensures that in the final output scheme, the path topology distance from each room node to the main entrance of the building is strictly less than or equal to the evacuation distance threshold specified in the standard.
[0056] Step S206: Within the feasible solution subspace that satisfies the evacuation distance constraint, the solver optimizes by minimizing the total path cost. The optimization algorithm uses metaheuristic strategies such as guided local search and simulated annealing to iteratively search for the route that connects all required nodes and has the shortest total path length in the huge discrete combination space composed of node arrangement and path combination.
[0057] The total path length here is the shortest, which minimizes the traffic area occupied by the corresponding corridor in the subsequent geometry generation stage, thus reserving more usable layout space for functional rooms.
[0058] Step S207: In order to obtain a corridor network with a clear structure and no redundant space, the system applies a path non-intersection constraint in the solver configuration; in specific implementation, by adding a constraint condition that prohibits edge intersection to the solver model, it is ensured that no two corridor segments geometrically intersect at non-node positions.
[0059] The constraint-guided solution results present a hierarchical structure in the topology as a tree or radial pattern, avoiding closed loops. The resulting corridor network has a clear hierarchical relationship and spatial orientation, and there is no waste of space or chaotic flow caused by path intersections.
[0060] Step S208: After the solution process converges, the system extracts the final path node access sequence and its connecting line segments from the results returned by the RoutingModel solver. The node sequence and line segment set are transformed into geometric data of polyline segments that are connected end to end and do not intersect each other, and output to memory cache or persistent storage in the form of a vector line element set.
[0061] The output vector set is defined as the centerline of the main topology corridor of the indoor traffic flow in this project.
[0062] Through step S2 above, this embodiment pre-lays a traffic flow framework within the building outline that both meets mandatory fire evacuation regulations and achieves the shortest traffic flow. It should be noted that the corridor centerline is not a wall positioning line that can be directly used in the final construction drawings, but rather a high-dimensional topological constraint and geometric reference datum.
[0063] Step S3: The constraint graph model construction module performs the following operations.
[0064] In this step, a mathematical constraint network with both mandatory connectivity and flexible proximity preference is established between the corridor skeleton generated in step S2 and the set of functional rooms defined in step S1. This network serves as the search boundary and guiding map for the reinforcement learning agent when exploring room layout schemes. This includes the following:
[0065] Step S301: First, load the vector data of the main topology corridor centerline output in step S2. This data contains a series of polyline segments and their precise two-dimensional coordinates. When the building has multiple entrances and exits and a centerline network is generated, load the vector data of each branch in the centerline network. The system offsets the corridor centerline or each branch in the centerline network to both sides by a preset half-width value. The half-width value can be set to 0.75m or 1.2m depending on the building type, thereby geometrically defining a clear corridor area polygon as a spatial reference for constructing all connection relationships in this step.
[0066] Step S302: Create a constraint graph model with graph data structure as its core, denoted as graph G.
[0067] A constraint graph model consists of a set of nodes V and a set of edges E, represented as follows: In the constraint graph model, the node set V consists of two subsets: the first subset is the corridor node subset. Each node corresponds to a turning point or segment midpoint on the centerline of the main corridor; the second subset is the functional node subset. Each node corresponds to a room to be arranged in the function set F. The edge set E is used to describe different types of relationships between nodes.
[0068] Step S303: Assign specific attributes to the nodes and edges in graph G.
[0069] For functional nodes Its attributes include a minimum area threshold inherited from step S105. Lighting weight coefficient ω and functional attribute labeling tag; for corridor nodes The attributes it carries are the two-dimensional coordinates of the node and the direction vector of the connecting line segment.
[0070] Step S304: Begin constructing strong connection edges between functional nodes and corridor nodes.
[0071] The specific construction method is as follows: for each functional node Calculate its relationship with all corridor nodes. The system calculates the two-dimensional Euclidean shortest straight-line distance between the nodes; it then selects the corridor node with the smallest distance value from the calculation results and designates it as the anchor node for that functional room, denoted as... And add undirected edges of type spatial anchoring to the edge set E of graph G, connecting... and .
[0072] Step S305: Assign hard geometric constraints to each spatial anchoring edge established in step S304.
[0073] The constraints stipulate that in the geometry generation stage of the subsequent step S4, the corresponding functional rooms... The closed polygon boundary must have at least one edge or vertex that geometrically overlaps with the corridor region polygon generated in step S301, or the shortest distance between them must be less than a preset minimum threshold. , The value is usually taken as 0.05m.
[0074] By enforcing the above constraints, it is ensured from a topological perspective that each functional room has an opening that leads directly to the main corridor.
[0075] Step S306: The system further constructs the adjacency relationship edges between functional rooms.
[0076] The system reads the preset adjacency weight matrix, denoted as W, which has an n×n dimension, where n is the total number of functional rooms; the elements in the adjacency weight matrix... Representing the room With the room The intensity of functional adjacency requirements between different areas is determined in advance based on architectural design data sets or domain knowledge. For example, in an office setting, the w-value between the finance office and the manager's office is set to 0.9, between the meeting room and the tea room to 0.7, and between the server room and the restroom to 0.1.
[0077] Step S307: Traverse all non-zero elements in the adjacency weight matrix W.
[0078] For each pair, the condition is satisfied. For the room combinations, add undirected edges of type functional adjacency to the edge set E of graph G, and attach a weight attribute to the edge. The larger the weight value, the more the system tends to place the geometric center points of the two rooms closer together in the subsequent layout solution process.
[0079] Step S308: To pass the above graph structure information to the subsequent reinforcement learning agent, the system performs feature encoding on the constraint graph G. Specifically, feature encoding is performed on the constraint graph G to generate a multidimensional constraint tensor, which serves as an additional input channel for the reinforcement learning policy network.
[0080] Through step S3 above, this embodiment integrates the abstract corridor skeleton generated in step S2 with the specific functional requirements defined in step S1 into a unified, computable spatial constraint graph model. It not only locks the architectural design baseline that each room must be adjacent to the corridor in the form of hard edge constraints, but also conveys the professional experience preferences of which rooms should be close to each other to the subsequent reinforcement learning agent through the weighted adjacency matrix, providing structured spatial prior knowledge for the agent's sequential decision-making in the reasonable solution space in step S4.
[0081] Step S4: The function room sequential allocation module based on reinforcement learning performs the following operations.
[0082] In this step, the building boundaries, corridor framework, and room constraints established in steps S1 to S3 are treated as a dynamically changing environment. A deep reinforcement learning agent is trained to autonomously decide the specific geometry and placement of each functional room within this environment, ultimately generating a complete and compliant room layout scheme. This includes the following:
[0083] Step S401: Construct a deep reinforcement learning agent whose decision-making mechanism is a deep convolutional neural network. The input layer of the network is designed to receive and process a state tensor composed of multiple layers of stacked two-dimensional matrices, and the output layer corresponds to a Gaussian probability distribution that defines the geometric parameters of the room. Before training begins, the network weights are randomly initialized using the Xavier method.
[0084] Step S402: The system defines the environmental state space observed by the agent at each decision step. The environmental state space is encoded as a multidimensional tensor with a fixed channel order, specifically composed of the following four independent layers stitched together in the depth dimension.
[0085] The first layer tensor is a binary mask layer of the building's outer contour. This layer is directly copied from the M×N binary matrix generated in step S103. Pixels with a value of 1 represent the effective area where rooms can be arranged, while pixels with a value of 0 represent unusable areas such as the exterior of the building or the core tube, thus defining the upper limit of the physical boundary for the growth of rooms for the intelligent agent.
[0086] The second tensor is a centerline rasterization layer. This layer is presented in the form of a binary image. It is generated by rasterizing the main corridor centerline vector data or the branch vector data in the centerline network output in step S208 onto a canvas of the same size as the first tensor using the Bresenham line drawing algorithm, and setting the pixel where the line is located to 1 and the rest of the background to 0, thereby providing the intelligent agent with the spatial anchor point reference that must be attached when placing the room.
[0087] The third layer tensor is the accumulated layer of the layout room boundaries. This layer dynamically records the pixel area occupied by all rooms that have completed geometry generation before the current decision step. Whenever a room is successfully placed, the corresponding rectangular or polygonal area of the room is filled into the corresponding pixel position of this layer with a value of 1. This layer is used by the agent to perform collision detection to ensure that the rooms placed later will not overlap with the existing rooms.
[0088] The fourth layer tensor is the distribution layer of light-receiving interfaces. This layer is generated based on the preprocessing of the building's outer contour data. Specifically, it traverses the outer wall segments, identifies the segments marked as windows or curtain walls, and offsets these segments towards the interior by a fixed pixel width, such as 3 pixels corresponding to 0.3m. The pixels in the offset area are assigned a value of 1. The numerical distribution of this layer will be combined with the light-receiving weight coefficient ω of each room to guide the agent to push rooms with high light-receiving requirements to these areas.
[0089] Step S403: The system also defines the action space that the agent can execute at each decision step. The action space is composed of three continuous scalar variables that together describe the geometric parameters of the functional room to be placed relative to its designated corridor anchor node.
[0090] The first variable is the azimuth offset angle θ, which represents the center point of the room to be placed relative to the anchor node determined in step S304. In polar coordinates, θ is the angular offset, ranging from 0 to 2π, in radians. When θ is 0, it means that the center of the room is located on the normal direction pointing from the corridor anchor point to the outside of the building.
[0091] The second variable is the radial displacement distance d, which represents the distance from the center point of the room to be placed to the anchor node along the azimuth offset angle θ. The straight-line distance, d, is preset to a range of 1.5m to 8.0m in meters. After being converted into pixel values, it is used for network output. This variable determines whether the room is arranged close to the corridor or extends into the depth of the building's perimeter.
[0092] The third variable is the expansion ratio factor. and This variable is a pair of values that control the initial scaling factor of the room's dimensions along the horizontal X-axis and vertical Y-axis, respectively; the system multiplies the preset baseline dimensions of the functional room by... and The actual generated width and depth of the room in this decision step are obtained; and The value range is usually set to 0.8 to 1.5.
[0093] By combining and sampling the above three variables, the agent can flexibly adjust the orientation, distance, and size proportion of the room in polar coordinate space with the corridor anchor point as the origin, in order to adapt to the complex shape of the remaining available space.
[0094] Step S404: In each sequential decision step, the agent's convolutional neural network takes the four-layer state tensor constructed in step S402 as input. The forward propagation process of the network is as follows: The input tensor first passes through three consecutive convolutional modules. Each module contains a convolutional layer with a kernel size of 3×3 and a stride of 2, followed by a batch normalization layer and a ReLU activation function to extract spatial features step by step. The output feature map of the convolutional module is then flattened into a one-dimensional vector and input into a fully connected layer consisting of 128 neurons.
[0095] Step S405: The output of the fully connected layer is split to the output of the policy network, which consists of two parallel fully connected heads: the first head outputs the action mean vector μ, which has a dimension of 4 and corresponds to θ, d, and d respectively. and Mean prediction; second head output action variance vector Its dimension is also 4, and the variance is always positive through the Softplus function; the network finally outputs a multidimensional Gaussian distribution, denoted as . The agent obtains a set of specific action parameters by randomly sampling from this distribution. These action parameters include the azimuth offset angle θ, the radial displacement distance d, and the expansion scaling factor, which are used to determine the geometry and position of the room. and .
[0096] Step S406: The system uses a near-end policy optimization algorithm to train the above policy network offline or online.
[0097] During training, each time the agent generates and places a room, the environment calculates an immediate reward value according to the multi-objective reward function defined in step S5. The system stores the state transition tuple in the experience replay buffer. Once a sufficient number of samples have accumulated in the buffer, the system maximizes the truncated agent objective function in the PPO algorithm and updates the weight parameters of the policy network using stochastic gradient descent. The value network, as an auxiliary network, shares convolutional layers with the policy network but has its own fully connected head, outputting a scalar. This is used to estimate the expected cumulative reward of the current state, thereby reducing the variance of the policy gradient estimate.
[0098] Step S407: The trained policy network is deployed for inference generation.
[0099] When faced with a completely new building outline, the agent makes sequential decisions according to the priority of room functions. The specific rules for prioritizing room functions are defined as follows:
[0100] The system is for each room in the function set F. The functional attribute tag is preset with an integer priority index value. In this embodiment, the index value setting rules are as follows: functions directly facing public reception and traffic distribution (such as lobbies and hallways) have an index value of 1; primary functions (such as open office areas and main conference rooms) have an index value of 2; secondary functions (such as private offices and finance offices) have an index value of 3; auxiliary service functions (such as tea rooms, printing rooms, and restrooms) have an index value of 4; and logistics and storage functions (such as warehouses and computer rooms) have an index value of 5. The smaller the index value, the higher the decision priority and the earlier it is sequentially placed.
[0101] When multiple rooms have the same functional priority index value, they are further sorted from high to low according to their daylighting weight coefficient ω in their attribute parameters; if ω is also the same, they are sorted according to their minimum area threshold. Sort from largest to smallest, and the priority sorting rules can also be customized by designers through configuration files or graphical user interfaces.
[0102] After the order is determined, the agent makes sequential decisions. After each room is placed, the third layer of the state tensor is updated, and then the agent moves on to the next room placement step, until all rooms in the function set F have been assigned.
[0103] Through the above step S4, this embodiment transforms the complex combinatorial optimization problem of building interior layout into a sequential decision-making process that can be efficiently solved by deep neural networks through gradient descent. By utilizing the powerful spatial feature extraction capability of convolutional neural networks and the stable policy update characteristics of near-end policy optimization algorithms, the agent can autonomously learn a layout strategy that takes into account functional adjacency requirements, lighting requirements and circulation efficiency from a massive number of geometric arrangement possibilities.
[0104] Specifically, in step S5, the multi-objective reward feedback and iterative optimization module performs the following operations.
[0105] In this step, after the agent in step S4 completes the placement of each room or the overall layout, a multi-dimensional quantitative evaluation of the current solution is performed, and the evaluation results are converted into reward signals to drive the update of the policy network parameters. Simultaneously, local conflicts violating building codes are corrected in real time at the geometric level, and a round of post-processing optimization is performed after the global layout is completed, ensuring that the final output solution meets the requirements of the construction drawing depth. This includes the following:
[0106] Step S501: First, establish a multi-objective weighted reward function R to quantify and score any complete room layout scheme or its intermediate state. The mathematical expression of this reward function R is:
[0107] ;
[0108] Where R represents the overall score of the current layout scheme, and the higher the score, the better the quality of the scheme; U, E, and C are the scores for space utilization, circulation efficiency, and compliance, respectively. The specific calculation methods for these three dimensions will be detailed in subsequent steps; coefficients α, β, and γ are three preset weighting coefficients used to adjust the relative importance of different evaluation dimensions in the overall score. In this embodiment, α is set to 0.3, β to 0.3, and γ to 0.4, to slightly emphasize compliance. The values of the coefficients can be customized by the user according to different project types.
[0109] Step S502: The system calculates the space utilization score U. The specific calculation method is as follows: First, calculate the total pixel area occupied by all functional rooms allocated in step S4, denoted as U. Then, read the total pixel area of the effective arrangement region with a value of 1 in the binarized matrix generated in step S103, and denot it as... The formula for calculating U is defined as follows:
[0110]
[0111] The ratio ranges from 0 to 1. The closer the value is to 1, the more fully the effective area inside the building is utilized. During the optimization process, the system sets U≥0.85 as the preferred target threshold. When U exceeds the preferred target threshold, this component in the reward value will no longer increase significantly, so as to avoid squeezing the necessary traffic and buffer space due to excessive pursuit of area utilization.
[0112] Step S503: The system calculates the circulation efficiency score E, which is based on the centerline of the main topology corridor generated in step S2 and the coordinates of the center points of each functional room determined in step S4. The formula for calculating E is defined as follows:
[0113]
[0114] In this formula, n is the total number of rooms in the function set F, which is the same as n in step S104; Represents the i-th functional room The shortest topological path distance to the main entrance of the building is calculated as follows: First, determine the room... Anchor nodes attached to the center line of the corridor Then, along the broken line segment of the main corridor centerline generated in step S208, from... By backtracking segment by segment to the main entry starting node established in step S201, the sum of the lengths of all traversed segments is obtained. , The unit is meters.
[0115] The reward structure is designed so that rooms closer to the main entrance contribute more to the E value, thus guiding the agent to prioritize the placement of high-frequency rooms such as the front desk, reception room, and open office area at the front of the circulation path, while pushing low-frequency rooms such as warehouse and server room to the back.
[0116] Step S504: The system calculates the compliance score C, which is composed of multiple penalty sub-items. Each sub-item corresponds to an unacceptable situation that violates building design codes or rules of experience. The initial value of C is 0.
[0117] The first sub-item penalizes violations of room aspect ratio; the system iterates through each placed functional room. Calculate the width of its bounding rectangle. With depth The ratio; if satisfied If the room shape is too long and narrow and does not meet the usage requirements, then a preset penalty constant is deducted from C. In this embodiment, The value is 1.0.
[0118] The second sub-item penalizes violations of minimum clear width. The system checks the minimum span of each room in the direction perpendicular to the corridor opening. If this span value is less than the minimum value corresponding to the room's functional attribute tag (e.g., no less than 2.4m for offices), a penalty constant is deducted from C. In this embodiment, The value is 1.0.
[0119] The third sub-item penalizes violations related to lighting satisfaction, and the system combines this with the lighting weighting coefficient assigned to each room in step S105. Based on the distribution of light-transmitting interfaces in the fourth layer tensor of step S402, calculate the overlap ratio between the room boundary and the light-transmitting area; if a room satisfies If the overlap ratio between the room and the area with available sunlight is less than 0.2, then the room with high sunlight requirements is deemed not to receive sufficient sunlight, and a penalty constant is deducted from C. In this embodiment, The value is 2.0.
[0120] Through the aforementioned penalty mechanism, the C-value remains at or near 0 when the solution is fully compliant, while the C-value decreases significantly when there are violations, thereby internalizing the mandatory requirements of the standard into part of the optimization goal.
[0121] It should be noted that the compliance score C, as a pure penalty, has no explicit lower bound in form. However, since the types of violations that can be determined in a single decision step and the number of occurrences of each violation are limited, and the system limits the number of rooms and the possibility of space encroachment from a physical space level through the accumulated layer of room boundaries and the conflict detection correction operator, the value of C is actually limited to a predictable and finite range during implementation. Furthermore, since this system uses a proximal policy optimization algorithm to update the policy network, the algorithm limits the policy update magnitude by truncating the surrogate objective function and uses an independent value network to provide a stable baseline for policy gradient estimation. Therefore, even if the value of C temporarily becomes large and negative, it will not cause gradient explosion or gradient vanishing problems in the policy network, and can ensure smooth convergence of the training process.
[0122] Step S505: After the agent completes the growth decision for each room in step S4, the system calls the conflict detection and correction operator in real time; the conflict detection and correction operator first checks the newly placed room. Whether the geometric boundary of the room overlaps with the corridor area polygon generated in step S301 at the pixel level indicates the necessary passage width of the corridor encroached upon by the room.
[0123] If overlap is detected, the system will automatically calculate a minimum translation vector t, and the direction vector of vector t is... The calculation method is as follows: Take any point within the overlapping area, find the foot of the perpendicular from that point to the center line of the corridor. The direction in which the foot of the perpendicular points to that point is the normal direction of the center line. Then, shift the line outwards towards the room side, and the translation distance is the pixel distance required to eliminate the overlap. The system then moves the room... All boundary points along The entire corridor is shifted by 't' in the direction of fire protection design to ensure that it always maintains a legally required net width of not less than 1.5m or 2.4m as specified in the building fire protection design code.
[0124] Step S506: After the sequential allocation module in step S4 completes the placement of all rooms in the function set F, it enters the global post-processing stage. The primary operation in this stage is wall alignment optimization. Since the room boundaries generated by the reinforcement learning agent are pixel-based, the shared walls between adjacent rooms often appear jagged, making it difficult to directly guide construction.
[0125] The system employs a graph-cut algorithm-based wall alignment process: First, it identifies all pairs of approximately parallel and adjacent room boundary line segments within a tolerance range, such as within 0.3m. Then, it constructs a graph model with the endpoints of the line segments as nodes and the alignment adjustment amount as edges. By minimizing the cost function of the number of all line segment vertices and the total displacement, multiple originally misaligned boundaries are unified onto the same straight line. After processing, the pixelated room outline is transformed into a combination of rectangles or polygons composed of regular horizontal and vertical line segments, which can be directly used for dimensioning.
[0126] Through the above step S5, this embodiment integrates the reward signal calculation, real-time standardization conflict correction and final scheme post-processing in reinforcement learning training into a closed loop. The multi-objective reward function provides a clear optimization direction for the agent's autonomous learning, the real-time conflict correction ensures that each step in the growth process remains within the feasible domain, and the global post-processing refines the slightly random pixel scheme generated by the agent into a regular plane that conforms to engineering drawing standards.
[0127] Example 2
[0128] Based on the system framework and algorithm flow constructed in Example 1, this embodiment further provides an enhanced layout optimization scheme specifically for complex irregular contour building planes. When the outer contour of the building to be processed presents an irregular polygonal shape, such as a triangle, a fan shape, or a plane containing arbitrary arc boundaries, the generation logic based on uniform precision grid and linear corridor skeleton in Example 1 will expose the problem of insufficient local adaptability.
[0129] In response to the improvement of the spatial discretization step in step S1, the system in this embodiment enables adaptive mesh subdivision technology. When the system identifies the presence of curved wall segments in the building outline, or detects that the local curvature radius of the building plane is less than a preset threshold such as 5.0m, it will no longer use the uniform 0.1m pixel precision in embodiment 1, but will instead perform mesh refinement operation on the area within a preset influence range of such complex boundaries.
[0130] The specific refinement strategy is as follows: the system uses the geometric center of the curved wall segment as a reference and expands the distance buffer zone outward. The pixel grid precision inside the distance buffer zone is subdivided from 0.1m to 0.02m step by step. In terms of algorithm implementation, it is completed by recursive partitioning of a quadtree. That is, each initial 0.1m×0.1m pixel unit, if it intersects with the arc, is uniformly divided into 5×5 0.02m×0.02m sub-pixel units. This ensures that the room boundary generated later can fit the irregular exterior wall with higher fidelity and avoids the generation of unusable fragmented spaces at the corners of the building due to discretization errors.
[0131] Meanwhile, when defining the attribute parameters of each room in the functional set F in step S105, this embodiment introduces an additional parameter called spatial deformation tolerance, denoted as τ. The value range of τ is also set to a continuous floating-point value between 0 and 1. The closer the τ value is to 1, the greater the non-rectangular deformation allowed for the functional room during subsequent growth. For example, for auxiliary functional spaces such as storage rooms, equipment rooms, or pipe shafts, their τ value is usually preset to 0.8 to 1.0, meaning that when the system fills irregular sharp corner areas in the building plan, it can accept that the final shape is a triangle, trapezoid, or any polygon with more than pentagons, without forcing it to remain rectangular.
[0132] In practical implementation, the expansion scaling factor of the reinforcement learning agent in the output room... and Afterwards, the system will decide whether to call additional Boolean operation shaping operators based on the value of τ. When τ is greater than 0.5, the Boolean operation shaping operator is activated. Its function is to jointly trim and merge the initially generated rectangular boundary of the room with the irregular exterior wall outline to which the room is attached and the boundary of the adjacent already laid-out rooms, thereby actively filling the corner spaces that cannot be covered by regular rectangles, so as to maximize the space utilization rate U defined in step S502.
[0133] The two improvements together enhance the system's ability to capture geometry under complex boundary conditions and improve its space-filling efficiency.
[0134] Regarding the improvement of the main topology corridor generation step S2, considering that there are often multiple evacuation entrances and exits located in different directions in large public buildings or irregular planes, this embodiment upgrades the single-parking lot path planning model in Embodiment 1 to a multi-parking lot vehicle path planning model.
[0135] When constructing the solver input, the system no longer simply sets the main entrance coordinates as the starting node, but instead includes all coordinate points on the building plan marked as fire evacuation exits or secondary entrances into the starting node set. Subsequently, in step S202, when abstracting functional rooms into demand nodes, the system pre-assigns each demand node to the nearest starting node based on the principle of closest two-dimensional Euclidean distance. This forms k demand node subclusters.
[0136] Based on this, the operations research and optimization solver is configured to solve the multi-parking lot vehicle routing problem. During the solution process, each starting node... Each of these will serve as the root node of an independent corridor branch, growing paths that cover the corresponding demand node subclusters. At the same time, to ensure the connectivity of the entire building's circulation, the system adds global connectivity constraints to the model, forcing these k corridor branches growing from different entrances and exits to converge and connect at at least one common node inside the building.
[0137] Ultimately, the solver outputs no longer a single linear corridor, but a tree-like or semi-mesh network of corridor centerlines with interconnected root systems merging at intersections. This network can more efficiently cover remote corners of irregularly shaped planes and ensure that, starting from any room within the building, one can find the nearest evacuation route that meets the required evacuation distance. The required escape route.
[0138] To improve the action space of the reinforcement learning agent in step S4, in order to enable the geometry of the functional room to better conform to the direction of the irregular exterior wall, this embodiment adds a fourth continuous action variable in addition to the three action variables in embodiment 1: the overall room rotation angle φ; the value range of variable φ is from 0 to 2π, and the unit is radians, which represents an additional rigid body rotation angle applied in the two-dimensional plane around the center point of the functional room to be placed after its rectangular outline is generated.
[0139] At the output of the agent policy network, the dimension of the mean vector μ is correspondingly expanded from 4 dimensions to 5 dimensions, i.e. The variance vector σ² is also simultaneously expanded to 5 dimensions; after the agent samples a set of action parameters containing φ from the Gaussian distribution, the system will first, when generating the pixel mask of the room, determine the appropriate parameters based on the given parameters. and Generate an axis-aligned rectangle, and then apply a rotation matrix transformation with the center point as the origin to the coordinates of all its vertices. The rotation angle is φ.
[0140] The aforementioned improvements enable the agent to autonomously learn a strategy of radially tilting the rooms along the normal direction of the exterior wall in the curved exterior wall area, thereby ensuring that the lighting surface of each room can achieve a more uniform contact interface with the exterior wall, rather than rigidly occupying space in an orthogonal manner.
[0141] To improve the multi-objective reward function and post-processing in step S5, this embodiment first introduces a fourth evaluation dimension into the reward function R: the spatial regularity score, denoted as G. Correspondingly, the original reward function formula is expanded to:
[0142]
[0143] Wherein, δ is the newly added preset weighting coefficient, and in this embodiment, δ is set to 0.1. The formula for calculating G is defined as:
[0144]
[0145] In this formula, n is the total number of functional rooms. Let be the perimeter of the geometric outline of the i-th room, in meters; This represents the area of the room, in square meters; for a perfectly circular room, The value is 1; for a square, the ratio is approximately 1.27; for rooms with large aspect ratios or jagged edges, the ratio will increase significantly.
[0146] Therefore, the closer the value of G is to 1, the higher the spatial regularity of the overall scheme. The system punishes growth decisions that produce too many invalid concave and convex boundaries or excessively distorted shapes by maximizing G.
[0147] In addition, before the global post-processing stage described in step S506, this embodiment adds a user interactive intervention interface. After the system completes the sequential allocation of all rooms in step S4 and displays the preliminary plan, the designer is allowed to manually adjust any control node in the main topology corridor centerline network to a new coordinate position by dragging and dropping with the mouse through the graphical user interface. The control node is the endpoint or intersection of each polyline segment in the centerline network.
[0148] After the system's background event listener captures the drag-and-release event, it immediately locks the current coordinates of the moved node and uses them as a new hard constraint to re-drive the VRP operator in step S2. The VRP operator will perform fast local replanning on the affected remaining corridor branches and update the corridor centerline network within milliseconds, based on the newly anchored node coordinates.
[0149] After the corridor network is updated, the system will trigger a lightweight layout adjustment process: for all functional rooms that have not been manually locked by the user, the reinforcement learning agent will continue to perform decision optimization for a limited number of steps under the constraints of the new corridor skeleton, starting from the current position as the hot start point, and automatically fine-tune parameters such as the center offset angle θ and radial distance d of these rooms to adapt to the changes in the corridor; while for rooms that have been manually locked by the user, their geometric state remains unchanged.
[0150] The above mechanism enables real-time scheme deliberation through human-machine collaboration, organically combining the efficiency of algorithm generation with the spatial intuition of human designers.
[0151] Through the enhanced technical means described above for irregular contours and complex constraints in this embodiment, the method provided by the present invention can still stably output an interior functional layout scheme that meets all mandatory building codes and has high space utilization efficiency and morphological regularity when facing non-standard building plans; Embodiment 2 and Embodiment 1 together constitute the complete technical coverage of the present invention for different project types and site conditions.
[0152] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects.
[0153] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment includes only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for intelligently optimizing and generating the functional layout of building interior spaces, characterized in that, Includes the following steps: Obtain building plan geometric contour data and room requirement data to be arranged, discretize the geometric contour data into a numerical matrix of arrangeable areas, and define attribute parameters for each functional room, including functional attributes and area thresholds. Based on the pre-set entrance and exit nodes and the corresponding demand nodes of each functional room in the building plan, under the conditions of satisfying the evacuation distance constraint and the path non-intersection constraint, the shortest path scheme connecting all demand nodes is solved and transformed into a set of polyline segments as the center line of the main topology corridor. Construct a constraint graph model whose nodes include a subset of corridor nodes and a subset of functional nodes, and whose edges include spatial anchoring edges established based on functional nodes and the nearest corridor node, as well as functional adjacency edges established between functional nodes based on a preset adjacency weight matrix. The system takes a state tensor consisting of a numerical matrix of deployable areas, a rasterized layer of the center line, an accumulated layer of the boundaries of the already deployed rooms, and a distribution layer of the light-receiving interfaces as input. It uses a deep reinforcement learning agent to make sequential decisions on each functional room and obtains action parameters through a policy network to generate the geometry and position of each functional room. The agent's action space consists of the azimuth offset angle relative to the anchored corridor node, the radial displacement distance, and the room size expansion ratio factor. Based on the generated geometry and location, a reward signal is calculated using a pre-defined multi-objective reward function, which includes dimensions such as space utilization, movement efficiency, and compliance. The reward signal is then fed back to the agent to update the policy network parameters. Through a closed loop of sequential decision-making and iterative updates, a complete layout scheme is generated.
2. The intelligent optimization generation method for functional layout of building interior space according to claim 1, characterized in that, When the building plan contains curved wall segments or irregular contours with local curvature radii less than a preset threshold, adaptive mesh subdivision is performed during the geometric contour data discretization process, including: Identify curved wall segments in the building's outer contour and extend a preset distance buffer zone outward with reference to the geometric center of the curved wall segment; The pixel grid inside the distance buffer zone is recursively partitioned into quadtrees, and the initial precision pixel units are subdivided into higher precision sub-pixel units, so that the functional room boundary fits the irregular exterior wall outline with higher fidelity.
3. The intelligent optimization generation method for functional layout of building interior space according to claim 2, characterized in that, When defining attribute parameters for each functional room, a spatial deformation tolerance parameter is also introduced, which represents the degree of non-rectangular deformation that the functional room is allowed to undergo during growth. When the spatial deformation tolerance parameter exceeds the preset threshold, the Boolean operation shaping operator is activated to jointly trim and merge the initially generated rectangular boundary of the functional room with the irregular exterior wall outline to which the functional room is attached and the boundaries of adjacent already laid-out rooms, in order to fill the corner space of the irregular outline.
4. The intelligent optimization generation method for functional layout of building interior space according to claim 1, characterized in that, When there are multiple preset entrance / exit nodes within the building plan, the process of finding the shortest path connecting all required nodes includes: Each preset entrance and exit node is included in the set of starting nodes, and each demand node is pre-assigned to the nearest starting node according to the two-dimensional Euclidean distance principle, forming multiple demand node sub-clusters; Add a global connectivity constraint to the constraint solver used to find the shortest path solution, which forces corridor branches growing from different starting nodes to meet and connect at at least one common node inside the building, thereby generating a tree-like or semi-mesh corridor centerline network with multiple interconnected roots.
5. The intelligent optimization generation method for functional layout of building interior space according to claim 1, characterized in that, When the building plan contains an irregular outline, the action space of the deep reinforcement learning agent also includes the overall room rotation angle, which represents the additional rigid body rotation angle applied in the two-dimensional plane around the center point of the functional room to be placed after its rectangular outline is generated. The dimension of the mean vector output by the policy network is expanded accordingly to include the overall rotation angle of the room. After the agent samples and obtains the rotation angle parameters, it applies a rotation matrix transformation with the center point as the origin to the coordinates of all vertices of the pixel mask representing the geometric occupancy of the room.
6. The intelligent optimization generation method for functional layout of building interior space according to claim 1, characterized in that, The multi-objective reward function also includes a spatial regularity dimension score, which is calculated based on the geometric shape of each functional room generated by the sequential decision. The calculation method is as follows: Obtain the perimeter and area of the geometric outline of each functional room, construct a regularity metric based on the ratio of the square of the perimeter to the area, and impose penalties on room shapes with jagged boundaries or large aspect ratios to guide the agent to generate functional rooms with regular boundaries.
7. The intelligent optimization generation method for functional layout of building interior space according to claim 4, characterized in that, After the deep reinforcement learning agent completes the sequential decision-making for all functional rooms and presents the initial plan, the system also includes a user interactive intervention step, including: The graphical user interface captures the user's drag-and-drop operation on any control node in the corridor centerline network, and uses the endpoints or intersections of each polyline segment in the polyline segment set as control nodes, locking the node coordinates after the drag is released as new hard constraints. The path planning solution is redriven based on the new hard constraints, and local replanning is performed on the affected remaining corridor branches and the corridor centerline network is updated. Using the updated corridor centerline network as constraints and the current room location as the hot start point, the agent is driven to perform a limited number of decision optimizations on functional rooms that have not been locked by the user in order to automatically fine-tune their position parameters.
8. The intelligent optimization generation method for functional layout of building interior space according to claim 1, characterized in that, After generating the complete layout scheme, the wall alignment optimization step is also included, including: Identify all pairs of room boundary line segments that are approximately parallel and adjacent within a preset tolerance range; A graph model is constructed with the endpoints of the boundary line segments as nodes and the alignment adjustment amount as edges. By minimizing the cost function of the number of all line segment vertices and the total displacement, multiple misaligned boundary line segments are unified to the same straight line, thereby transforming the room outline expressed in pixel form into a geometric scheme composed of regular line segments.
9. The intelligent optimization generation method for functional layout of building interior space according to claim 4, characterized in that, The spatial anchoring edges in the constructed constraint graph model include: The corridor area polygon is generated by offsetting the center line of the main topology corridor or each branch in the main topology corridor center line network to both sides by a preset half-width value. Calculate the shortest straight-line distance between each functional node and each corridor node, and select the node with the smallest distance as the anchor node. Add spatial anchor edges to the constraint graph model, which carry the following geometric constraints: the boundary of the corresponding functional room must overlap with the polygon of the corridor area or the distance between them must be less than a preset threshold.
10. An intelligent optimization and generation system for the functional layout of building interior spaces, characterized in that, The system is used to implement the intelligent optimization generation method for functional layout of building interior space as described in any one of claims 1 to 9, the system comprising: The data preprocessing engine is used to acquire building plan geometric contour data and the required data of functional rooms to be arranged. It discretizes the geometric contour data into a numerical matrix of arrangeable areas and defines attribute parameters for each functional room, including functional attributes and area thresholds. The operations research optimization solver is used to solve the shortest path scheme connecting all demand nodes based on the pre-set entrance and exit nodes and the corresponding demand nodes of each functional room in the building plan, under the conditions of satisfying the evacuation distance constraint and the path non-intersection constraint, and transform it into a set of polyline segments as the center line of the main topology corridor. The constraint graph model construction module is used to construct a constraint graph model. The nodes of the constraint graph model include a subset of corridor nodes corresponding to the points on the center line of the main topology corridor and a subset of functional nodes corresponding to the functional rooms. The edges of the constraint graph model include spatial anchoring edges established based on the functional nodes and the nearest corridor nodes, and functional adjacency edges established between functional nodes based on a preset adjacency weight matrix. The reinforcement learning training architecture deploys a deep reinforcement learning agent, which takes a state tensor composed of the numerical matrix of the deployable area, the rasterized layer of the center line, the cumulative layer of the layout room boundaries, and the distribution layer of the light-receiving interface as input. Within the action space, it makes sequential decisions about the functional rooms, generating the room's geometry and placement. The action space consists of the azimuth offset angle relative to the anchored corridor nodes, the radial displacement distance, and the expansion ratio factor controlling the room size. A preset multi-objective reward function, incorporating dimensions of space utilization, circulation efficiency, and compliance, is used to calculate a reward signal. This reward signal is fed back to the agent to update the policy network parameters. Through a closed loop of sequential decision-making and iterative updates, a complete functional room layout scheme is generated.