Automated Optimum Design of Light Steel Frame Structures in Chinese Rural Areas Using Building Information Modeling and Simulated Annealing Algorithm

: Many manual calculations and repeated modeling are required during the traditional structural design process. However, due to the high cost, rural buildings in China cannot be professionally designed and veriﬁed by designers as urban buildings, and their safety and economy cannot easily meet the requirements. Building Information Modeling (BIM) technology and intelligent optimization algorithms can effectively improve the structural design process and reduce design costs, but their applications in the ﬁeld of rural residential buildings in China are limited. Therefore, this paper presents an innovative framework that realizes the structural design of rural light steel frame structures on the BIMBase platform (widely used BIM software in China, BIMBase 2023R1.3). Based on the parametric library of structural components built on standardized component coding, the framework completes the rapid modeling of rural light steel frame structures and the interaction between the BIMBase platform and structural analysis software, SATWE. The improved two-stage simulated annealing (SA) algorithm is applied to the structural design of rural buildings to obtain a design scheme that meets the design requirements and reduces the material consumption as much as possible. Two prefabricated rural light steel frame structures were analyzed to evaluate the ef-ﬁciency of the proposed framework. The results show the feasibility of the proposed framework. Compared with traditional manual design methods, the design period can be reduced by six times while maintaining comparable levels of material consumption and structural design indicators.


Introduction
In recent years, the rural economy in China has grown by leaps and bounds. Under the impetus of the residential construction boom, the development of rural buildings has shifted from quantitative increase to qualitative improvement. The improvement of construction quality and living conditions has become an inevitable requirement for the next stage of the development of rural buildings [1,2].
However, the current design and construction of rural buildings in most parts of China are mostly carried out in accordance with experience, and there are common key problems such as outdated construction techniques, insufficient disaster resistance, and excessive resource and energy consumption [3][4][5][6]. At the same time, the prevailing structural design in China mainly depends on the experience of designers [7]. The designers give the primary scheme by referring to similar engineering designs, then check the structural layout, and optimize it repeatedly according to the design results until a reasonable design scheme is obtained. Given the economic constraints in rural areas, it is impractical to conduct precise and meticulous structural design for every rural building. Sufficient validation of the safety and economic viability of the structural design of rural buildings cannot be provided by relying solely on engineers' experience. Consequently, there is a need to explore a cost-effective and high-quality structural design process that is suitable for rural buildings in China.
In rural areas of China, it is common for households to reside in single-family homes with two stories. In comparison to the prevalent use of concrete and masonry structures, light steel frame structures offer several advantages, including simple structural forms, they are lightweight, have high strength, good ductility, and have a convenient construction [5,6]. In consequence, it is necessary to promote their application in rural areas. The application of building information modeling (BIM) technology and optimization algorithms to realize the automatic design of rural light steel frame structures can effectively improve the efficiency of the traditional structural design while ensuring the safety and economy of the optimized structure [8]. To our best knowledge, these technologies have been extensively applied in urban buildings, but they have not been integrated with rural buildings. Thus, it is of great significance to study the automatic design method of light steel frame structures to ensure the rapid development of the rural construction industry.
BIM, the cornerstone of digital transformation in the architecture, engineering, and construction (AEC) industry, has been widely used in infrastructure construction in recent years [8]. A BIM model can be perceived as a data repository that consolidates all building information throughout various project lifecycle stages, emphasizing the sharing and transmission of model information [9][10][11]. Therefore, BIM can be integrated into the structural design of rural buildings, with its advantages of automation to improve the structural design process and reduce design costs.
Furthermore, the recent advancements in artificial intelligence have had a profound impact on various traditional industries. The resulting effects and challenges have also spurred the transformation of the AEC industries [12]. The intelligent optimization algorithm is called a modern heuristic algorithm. It is the result of the intersection, penetration and mutual promotion of artificial intelligence and engineering science [13]. By integrating the intelligent optimization algorithm with structural design, an intelligent design system and decision support system can be created. This integration not only reduces investment costs but also ensures the accuracy and rationality of each stage in the rural building construction process [14]. It is evident that this technology holds immense potential for extensive application within the AEC industry.
Therefore, the objective of this research is to develop a new framework that combines BIM and optimization algorithms for light steel frame structures in Chinese rural areas. According to the state standard [15,16], a set of standardized components suitable for rural buildings is established, which can be directly used for model assembly on the BIM platform. The standardized component coding and index are studied to facilitate the retrieval of components in the component library for rapid BIM modeling. The interaction between BIM and other structural analysis software is realized through the secondary development of BIM, with the component of the library serving as the basic unit. The improved two-stage simulated annealing algorithm is applied to the structural design and optimization of rural buildings to achieve greater material savings and economical design solutions. Illustrative examples of two prefabricated rural light steel frame structures show the effectiveness and efficiency of the proposed framework in providing structural design and optimization solutions. Through the framework proposed in this paper, a simple, economical and efficient automatic design method can be provided for rural buildings.
The remainder of this paper is organized as follows: Section 2 reviews several works on the interworking between BIM and other software and the research status of structural intelligent optimization algorithms. Section 3 discusses the preparatory steps taken for the proposed framework. Section 4 presents the proposed framework for the automated optimum design of the rural light steel frame structure. In Section 5, two illustrative examples of prefabricated rural light steel frame structures are presented to demonstrate Sustainability 2023, 15, 9000 3 of 23 the efficiency and performance of the proposed framework. Conclusions and future work are discussed in Section 6.

Research Background
In the current AEC industry, a shift toward BIM technology has been observed due to its capability to reduce errors, wastage, and cost and also improve efficiency [17]. BIM serves as an integrated database that represents the building and facilitates the exchange of information between different software tools. BIM can be used as the central model for analyzing multiple performance standards, including architectural, structural and lighting aspects [18]. The predominant focus of current research regarding BIM as a central data model for building performance analysis revolves around diverse energy simulation software or tools. The common approach is to convert the BIM models into energy input files to solve interoperability issues and create an automatic link between the energy simulation software and BIM authoring tools [19,20]. However, there are few studies on the integration between BIM and structural analysis software. Existing research has highlighted potential issues with information consistency and missing data when converting models between different BIM and structural analysis software. For instance, when transferring model data between Tekla Structure version 13.1 and Revit Architecture 2008, only geometric components could be successfully transmitted. However, important cross-sectional properties were missing and had to be manually set for models containing multiple elements [21]. Moreover, preliminary tests have revealed that in SAP2000, the imported material information from an industry foundation class file could not be successfully loaded into a structural model for performing structural analysis [22]. When transferred to ETABS and SAFE software (ETABS 2015 or later, and SAFE 2014 or later), various types of boundary conditions in Revit (such as pinned, roller and fixed) are uniformly interpreted as pinned conditions [23]. A limited number of researchers have investigated BIM interoperability workflows between BIM and structural analysis software. Ramaji and Memari [24] outlined three specific workflows connecting building information models with structural analysis models. Aldegeily [23] summarized three types of paths for data transfer between architectural and structural models. However, there remains a deficiency in fundamental methods that facilitate smooth interoperability between BIM and structural analysis software. Furthermore, the current software available for model conversion operations is of limited use in the Chinese construction market due to inadequate alignment with Chinese standards [25,26]. Thus, it is imperative to investigate the integration of mainstream domestic structural analysis software with BIM in order to facilitate structural design for rural buildings in China.
At present, structural engineers in China heavily rely on intuitive knowledge and experience to manually generate and optimize conceptual designs [27]. This is a cumbersome and iterative process during which structural engineers can only consider a few possible alternatives [28]. Restricted by construction costs, it is more difficult to perform manual iterative checking calculations for the structural design of rural buildings in China. Over the past few decades, a multitude of nature-inspired approaches have been developed to optimize engineering design problems. These approaches, referred to as "Meta-heuristic Algorithms," are formulated based on global search techniques. They are designed to overcome the limitations of traditional methods and tackle challenging engineering problems more effectively. Gan [29] proposed an improved genetic algorithm to design high-rise reinforced concrete structures based on structural topology and element optimization. Tafraout [30] developed a genetic algorithm for the automated generation of optimal structures, incorporating seismic stability criteria from relevant design specifications. Zhou [31] conducted an automatic optimization design of shear wall structures using an enhanced genetic algorithm and leveraging prior knowledge. Gholizadeh [32,33] employed intelligent algorithms, including a bat algorithm and dolphin echolocation algorithm for the optimization design of planar steel frame structures. The study focused on optimizing the structural dimensions, resulting in a successful reduction in the total mass of the struc- ture. Furthermore, the study investigated the optimization of shear wall locations and obtained the optimal layout. Kaveh [34] utilized an advanced charging system search algorithm to optimize steel frame structures, resulting in a structure that met the required constraints and limits while significantly reducing the total material cost. Various optimization algorithms have been widely used in reinforcement design [35,36] and high-rise structure design [37][38][39] but few scholars have applied them to the structural design and optimization of rural buildings. In the context of structural design for urban buildings, optimization presents a highly complex problem involving non-convexity, non-linearity, variable discretization, and numerous local optima. Moreover, the optimization targets are characterized by significant structural diversity and strong interactions between components. The quality of the optimization outcomes and the speed of convergence depend heavily on the updating mechanisms and search capabilities of the employed algorithms. When compared to urban buildings, the structural design of rural buildings involves different constraints, with smaller-scale structures and relatively simpler component types. Given the economic limitations of rural areas, algorithms suitable for designing rural buildings must be simpler and more general. Further research is needed to assess the suitability of algorithms for achieving efficient optimization design of rural housing structures.
In view of the above discussion, the aim of this paper is to address the existing challenges in the structural design of rural buildings in China by integrating BIM technology and optimization algorithm. This framework is developed on the foundation of BIMBase, a BIM tool widely used in China, and its programming tool. It integrates the comprehensive information stored in parametric BIM models with structural analysis software, thereby enhancing the accessibility of structural optimization throughout the design process. SATWE is an open-source structural analysis software extensively used in China. In comparison with other structural calculation software, it demonstrates closer integration with China's current specifications and provides support for multi-functional software secondary development. By utilizing an application programming interface (API) to communicate with BIMBase, its structural analysis function can be extended to the BIMBase project level. The structural optimization of rural light steel frame structures is solved by using the SA optimization algorithm. Compared with particle swarm optimization and genetic algorithm, which are widely used in the field of structural optimization, simulated annealing algorithm does not require extensive parallel computing. The calculation speed of each iteration step is faster, which is more suitable for the optimization design of rural buildings with fewer variables and dimensions. The improved two-stage SA algorithm used in this framework is essentially based on the improvement of the technique as formulated by Tort et al. [40]. It has been shown to effectively solve the problem of poor convergence characteristics and inefficient search processes of the traditional simulated annealing algorithm. The significant potential values of this proposed framework lie in its ability to save time and cost through the automation of processes, which are derived from rigorous and reliable analysis. Furthermore, it aims to achieve better quality and higher performance in buildings, further enhancing its value proposition.

Parametric Structural Component Modeling
In the context of structural design for rural buildings, the geometry of the components plays a crucial role as a design parameter that requires iterative testing and optimization to achieve the most reasonable design results. BIMBase is based on the Python language and its own pyp3d database for parametric modeling. Compared with Revit, which uses "family" as the graphic element for "class", modeling in a programming language is more flexible and allows for the more accurate and efficient modeling of more complex geometric components, as well as the accurate expression and transmission of model information. Using the model operation commands provided in the pyp3d database, the parametric component code is written in the Python programming language to generate corresponding parametric components in the BIMBase platform. For a given type of component, the variable parameters should first be determined; afterward, the equation of the geometric logic is determined using the model basic body and the model basic command functions with the variable parameters as variables; finally, the initial values of each variable parameter are set to generate the parametric component in the BIMBase platform. It should be noted that although the various parameters of the component are variable, they still adhere to standard components, and the fixed modulus required by the state standard still must be met. Taking a parametric H-beam component as an example, the process of parametric component modeling is shown in Figure 1. geometric components, as well as the accurate expression and transmission of model information. Using the model operation commands provided in the pyp3d database, the parametric component code is written in the Python programming language to generate corresponding parametric components in the BIMBase platform. For a given type of component, the variable parameters should first be determined; afterward, the equation of the geometric logic is determined using the model basic body and the model basic command functions with the variable parameters as variables; finally, the initial values of each variable parameter are set to generate the parametric component in the BIMBase platform. It should be noted that although the various parameters of the component are variable, they still adhere to standard components, and the fixed modulus required by the state standard still must be met. Taking a parametric H-beam component as an example, the process of parametric component modeling is shown in Figure 1.

Parametric Library of Structural Components for Rural Buildings
The integrated management of structural components through the establishment of a BIM component library can greatly improve the efficiency of BIM applications. The key to integrated management is the coding method of the components. Once the component modeling is completed, component coding is added based on a standardized classification, following a unified standard. This process results in the formation of component information coding in a specific format. Combined with the characteristics of rural buildings, the components in the component library are encoded at five levels with a total length of 12 digits:  Two digits at the first level represent the professional type.  Two digits at the second level represent the structural system.  Two digits at the third level represent the component category.  Three digits at the fourth level represent the sectional dimension.  Three digits at the fifth level represent the component length.
Taking a column with a height of 3000 mm in the □150 × 6 component class as an example, its coding is 020101007007, as shown in Figure 2.

Parametric Library of Structural Components for Rural Buildings
The integrated management of structural components through the establishment of a BIM component library can greatly improve the efficiency of BIM applications. The key to integrated management is the coding method of the components. Once the component modeling is completed, component coding is added based on a standardized classification, following a unified standard. This process results in the formation of component information coding in a specific format. Combined with the characteristics of rural buildings, the components in the component library are encoded at five levels with a total length of 12 digits: • Two digits at the first level represent the professional type. • Two digits at the second level represent the structural system. • Two digits at the third level represent the component category. • Three digits at the fourth level represent the sectional dimension. • Three digits at the fifth level represent the component length.
Taking a column with a height of 3000 mm in the 150 × 6 component class as an example, its coding is 020101007007, as shown in Figure 2.
After determining the coding rules of the components, the components can be stored as model folders in sequence according to the coding sequence and saved in the component library folder. With a reasonable folder level and coding index, the location path of the corresponding component model file can be quickly and conveniently found. After the compilation of structural components of rural buildings is completed, it is packaged and imported into the component library management platform of BIMBase 2023R1.3, facilitating the creation of a parametric library for rural building structural components ( Figure 3). Relying on the versatility of the BIMBase platform, the components can be imported for modeling through a user-friendly visual interface, or their model information can be directly accessed from the component library using Python code. This integrated component management greatly improves the efficiency of modeling rural building structural models After determining the coding rules of the components, the components can be stored as model folders in sequence according to the coding sequence and saved in the component library folder. With a reasonable folder level and coding index, the location path of the corresponding component model file can be quickly and conveniently found. After the compilation of structural components of rural buildings is completed, it is packaged and imported into the component library management platform of BIMBase 2023R1.3, facilitating the creation of a parametric library for rural building structural components ( Figure  3). Relying on the versatility of the BIMBase platform, the components can be imported for modeling through a user-friendly visual interface, or their model information can be directly accessed from the component library using Python code. This integrated component management greatly improves the efficiency of modeling rural building structural models while providing a solid foundation for subsequent structural design and optimization, which is the fundamental work of the framework proposed in this paper.

The Proposed Framework for the Structural Design of the Rural Buildings
The structure of the proposed framework with BIM and optimization algorithm for the structural design of the rural buildings is explained in this section. As shown in Figure  4, four modules are consisted in the proposed framework: (1) Model generation, (2) Model  After determining the coding rules of the components, the components can be st as model folders in sequence according to the coding sequence and saved in the com nent library folder. With a reasonable folder level and coding index, the location pa the corresponding component model file can be quickly and conveniently found. Afte compilation of structural components of rural buildings is completed, it is packaged imported into the component library management platform of BIMBase 2023R1.3, f tating the creation of a parametric library for rural building structural components (Fi 3). Relying on the versatility of the BIMBase platform, the components can be impo for modeling through a user-friendly visual interface, or their model information ca directly accessed from the component library using Python code. This integrated com nent management greatly improves the efficiency of modeling rural building struc models while providing a solid foundation for subsequent structural design and op zation, which is the fundamental work of the framework proposed in this paper.

The Proposed Framework for the Structural Design of the Rural Buildings
The structure of the proposed framework with BIM and optimization algorithm the structural design of the rural buildings is explained in this section. As shown in Fi 4, four modules are consisted in the proposed framework: (1) Model generation, (2) M

The Proposed Framework for the Structural Design of the Rural Buildings
The structure of the proposed framework with BIM and optimization algorithm for the structural design of the rural buildings is explained in this section. As shown in Figure 4, four modules are consisted in the proposed framework: (1) Model generation, (2) Model transformation I, (3) Structural optimization, (4) and Model transformation II, which will be discussed in the following sections. transformation Ⅰ, (3) Structural optimization, (4) and Model transformation Ⅱ, which will be discussed in the following sections.

Model Generation Module
The structural designers can directly import components from the component library to complete the rapid modeling of a three-dimensional structural model of rural buildings in the BIMBase platform according to the previous design experience. The components are organized into model folders in a specific coding sequence and stored in the component library folders. These folders are then packaged and imported into the component library management platform of BIMBase. Designers can directly access these component models on the platform, which greatly improves the modeling efficiency of the model. It should be noted that each component in the component library is indexed by a specific coding sequence and stores its geometric and material information through Python code. Therefore, the three-dimensional structural model can be equivalent to a Python code containing a set of component information. Once the structural modeling of the rural buildings is completed, the model can be further refined by specifying the behavior and physical characteristics of the structure. The behavioral characteristics include information about the loadings (e.g., dead load, live load and wind load) acting on the component, while the physical characteristics include end-support information (e.g., fixed, pinned and roller end-support). An example of a structural frame model built by the component library is given in Figure 5.

Model Generation Module
The structural designers can directly import components from the component library to complete the rapid modeling of a three-dimensional structural model of rural buildings in the BIMBase platform according to the previous design experience. The components are organized into model folders in a specific coding sequence and stored in the component library folders. These folders are then packaged and imported into the component library management platform of BIMBase. Designers can directly access these component models on the platform, which greatly improves the modeling efficiency of the model. It should be noted that each component in the component library is indexed by a specific coding sequence and stores its geometric and material information through Python code. Therefore, the three-dimensional structural model can be equivalent to a Python code containing a set of component information. Once the structural modeling of the rural buildings is completed, the model can be further refined by specifying the behavior and physical characteristics of the structure. The behavioral characteristics include information about the loadings (e.g., dead load, live load and wind load) acting on the component, while the physical characteristics include end-support information (e.g., fixed, pinned and roller end-support). An example of a structural frame model built by the component library is given in Figure 5.

Model Generation Module
The structural designers can directly import components from the component library to complete the rapid modeling of a three-dimensional structural model of rural buildings in the BIMBase platform according to the previous design experience. The components are organized into model folders in a specific coding sequence and stored in the component library folders. These folders are then packaged and imported into the component library management platform of BIMBase. Designers can directly access these component models on the platform, which greatly improves the modeling efficiency of the model. It should be noted that each component in the component library is indexed by a specific coding sequence and stores its geometric and material information through Python code. Therefore, the three-dimensional structural model can be equivalent to a Python code containing a set of component information. Once the structural modeling of the rural buildings is completed, the model can be further refined by specifying the behavior and physical characteristics of the structure. The behavioral characteristics include information about the loadings (e.g., dead load, live load and wind load) acting on the component, while the physical characteristics include end-support information (e.g., fixed, pinned and roller end-support). An example of a structural frame model built by the component library is given in Figure 5.  sic object to achieve model transformation function. However, this approach often involves the extensive identification of coordinate information and frequently results in information loss and deviations, making the transformed structural model inaccurate and unable to perform the next structural calculation directly. In this framework, the components in the component library are served as the basic unit of model transformation. The integral BIMBase three-dimensional structural model is disassembled into component models included in the component library, and the three-dimensional model information of each component is extracted in turn. Through Python language, this three-dimensional model information is transformed into two-dimensional model information of components that can be identified by SATWE so as to generate the two-dimensional structural model of each component. The two-dimensional structural models of these components are assembled into a folder that can be recognized by the SATWE software (SATWE 2022), and a complete SATWE two-dimensional structural model is finally formed. This process enables the automatic transformation from BIMBase three-dimensional structural model to an SATWE two-dimensional structural model.
In the BIMBase three-dimensional structural model, two types of three-dimensional model information can be extracted from any component. The first type of three-dimensional information is standardized component coding. Through this coding, the key information, such as the cross-sectional parameters, material properties and length of the component, can be searched from the component library. The second type of three-dimensional model information is the three-dimensional position coordinates of the component in the BIMBase three-dimensional model, which determines the position of the component in the overall model. When generating components in the SATWE two-dimensional model, it is crucial to first determine the appropriate standard layer and axis network where the components will be situated. Subsequently, the components are positioned on the corresponding nodes or axes based on their type (section information) and two-dimensional position within the standard layer. In order to realize this component generation process, it is necessary to transform the three-dimensional model information extracted from the BIMBase model into the two-dimensional model information required by the SATWE model, as shown in Figure 6. The process of extracting and transforming model information through component-based methods avoids the loss of data and errors in data conversion. This enables smooth collaboration among different software systems during the design process. Furthermore, additional structural behavior and physical information extracted from BIM-Base three-dimensional models are packaged into a compatible data format for structural analysis. Based on the above-mentioned model transformation method, in conjunction with the API interface of the BIMBase platform, a program for the mutual transformation of BIMBase and SATWE is developed to realize the collaborative design of the two pieces of software.

Structural Optimization Module
Considering that the structural design scheme selected by experience is often conservative, this excessive structural redundancy design will lead to a waste of resources and high construction costs. Therefore, further optimization design of the primary structural scheme is required. Due to the limited budget of rural buildings in China, it is difficult for designers to complete a large number of structural trials. Therefore, the optimization algorithm is applied in this framework to the structural design optimization of rural buildings. A number of variations and enhancements of the SA algorithm have been proposed in the literature to improve its performance [40][41][42][43][44][45]. The two-stage SA algorithm employed in this framework is based on the improvement of the technique, as formulated by Tort et al. [40]. The basic elements involved in this algorithm are outlined briefly in the following.

Structural Optimization Module
Considering that the structural design scheme selected by experience is often conservative, this excessive structural redundancy design will lead to a waste of resources and high construction costs. Therefore, further optimization design of the primary structural scheme is required. Due to the limited budget of rural buildings in China, it is difficult for designers to complete a large number of structural trials. Therefore, the optimization algorithm is applied in this framework to the structural design optimization of rural buildings. A number of variations and enhancements of the SA algorithm have been proposed in the literature to improve its performance [40][41][42][43][44][45]. The two-stage SA algorithm employed in this framework is based on the improvement of the technique, as formulated by Tort et al. [40]. The basic elements involved in this algorithm are outlined briefly in the following.

Mathematical Model and Boundary Conditions of Intelligent Structural Optimization
The objective of structural intelligent optimization is to ensure that the structural design scheme meets the limit state of bearing capacity and the limit state of normal use while the steel consumption of the structure reaches the lowest possible value. For any SATWE two-dimensional model of rural buildings, the structural design scheme can be simplified as the mathematical model represented by Equation (1) In Equation (1), represents the structural design scheme imposed on column components and beam components. represents the i-th column component and represents the j-th beam component. Their structural two-dimensional model information

Mathematical Model and Boundary Conditions of Intelligent Structural Optimization
The objective of structural intelligent optimization is to ensure that the structural design scheme meets the limit state of bearing capacity and the limit state of normal use while the steel consumption of the structure reaches the lowest possible value. For any SATWE two-dimensional model of rural buildings, the structural design scheme can be simplified as the mathematical model represented by Equation (1): In Equation (1), P represents the structural design scheme imposed on m column components and n beam components. C i represents the i-th column component and B j represents the j-th beam component. Their structural two-dimensional model information is determined using three variables: standard layer number, F, type of component, T, and two-dimensional position of the components, S, which correspond to the three modules of the standard layer, type of component and two-dimensional position of the components in SATWE two-dimensional model information, respectively.
In general, for a given component, S, the standard layer number F and two-dimensional position will be determined during the design of the building scheme. That is, in this mathematical model, F and S are constants, and T is the design variable to be optimized. Then, the structural design scheme P can be simplified as a function related to the variable T: P = g T c1 , T c2 , T c3 , . . . , T ci , . . . , T cm , T b1 , T b2 , T b3 , . . . , T bj , . . . , T bn = g(T) For a specific standardized component, the material consumption of the component is constant, as its cross-sectional dimension and length of component are constant. For an overall structural design scheme, the total material consumption of the structure, Q, is related to the component type of all components. Therefore, the objective function of the algorithm can be organized as follows: According to the state standard [15,16], the following structural constraints need to be considered in the optimal design of rural light steel frame structures.
Normal stress constraint: Overall stable stress constraint: In-plane stability: Out-plane stability: Maximum interlayer displacement angle constraint: Period ratio constraint: In Equations (4)-(10), σ k represents the maximum stress of the k-th component, σ u represents the yield strength of the steel. E k , A k , W xk , W yk , N k , M xk , M yk , f represent elastic modulus, cross-sectional area, x-direction gross cross-section modulus, y-direction gross cross-section modulus, axial force, x-direction maximum bending moment, y-direction maximum bending moment and strength design value of k-th component, respectively. λ xk , λ yk represent the slenderness ratio of k-th component to x axis and y axis. γ xk , γ yk represent the overall stability coefficient of k-th component to x axis and y axis under axial compression. β mxk , β myk , β txk , β tyk represent the in-plane and out-plane equivalent bending moment coefficients of k-th component. η k represents the sectional influence coefficient, dr χ represents the interlayer displacement angle of χ-th layer, dr u represents the limit of the interlayer displacement angle, r p represents the period ratio, r u represents the limit of the period ratio.
The external penalty function method is used to calculate the total steel consumption of the structure after punishment, and the auxiliary function is constructed to deal with the constraints. The expression is: In Equation (11), g i represents the constraint value, which can be calculated by Equations (4)- (10).
Through the auxiliary function, the constraint conditions are taken into account in the objective function, and the pseudo-objective function after punishment is obtained. The mathematical expression is: In Equation (12), λ 1 represents the penalty coefficient, and t represents the total number of constraints.

Intelligent Structural Optimization Based on the Two-Stage Simulated Annealing Algorithm
A number of variations and enhancements of the annealing algorithm have been proposed in the literature to improve its search performance. The two-stage SA algorithm employed in the present study is based on the improvement of the technique as formulated by Tort et al. [40]. The generated flow chart of the initial solution is shown in Figure 7. In the first stage of this method, only the size of the frame columns in the primary structural scheme obtained from the engineer's experience is optimized by the annealing algorithm, while the frame beams are sized with a fully stressed design based on the heuristic approach. The initial design is rapidly improved in a relatively small number of iterations. In the second stage, the previously obtained optimal design is utilized as the initial solution, and under a set of new annealing parameters, the structural component size variables are iteratively optimized until the structural design scheme, satisfying both safety and economy, is obtained. The main process of the algorithm (Figure 8) is as follows.  Stage 1: Step 1. Initialization and setting of a cooling schedule: The first step is initialization and setting of an appropriate cooling schedule, including the starting temperature , the finial temperature and the cooling factor .

Stage 2:
In the second stage, the simulated annealing algorithm is iteratively implemented for all component sizes, and the optimal design obtained in stage 1 is used as the initial design for stage 2. Therefore, the search in stage 2 starts with a more reasonable design, eliminating the need for a highly detailed cooling schedule. A milder cooling schedule is chosen that makes the algorithm under a reduced number of cooling cycles with a new set of annealing parameters. The results of the examples show that stage 2 produces a solution comparable to the simulated annealing algorithm. However, it employs a milder cooling schedule and requires much less computation time, thereby reducing design costs.

Model Transformation Ⅱ Module
This module can be regarded as the reverse operation of model transformation Ⅰ module, through the component of the component library as the basic unit to complete the model transformation. Each component in the SATWE two-dimensional model contains the standard layer, the type of components and the two-dimensional position of components. In the BIMBase three-dimensional model, the component is only determined by its component type (standardized component coding corresponding to the component library) and the three-dimensional position coordinates of the components. Through the mapping relationship shown in Figure 6 and leveraging the Python language, the extracted information of each component from the SATWE two-dimensional model is transformed and packaged into a BIMBase-compatible data format. This process involves Step 1. Initialization and setting of a cooling schedule: The first step is initialization and setting of an appropriate cooling schedule, including the starting temperature T s , the finial temperature T f and the cooling factor η.
In Equations (13)-(15), P s represents the starting acceptance probability, P f represents the final acceptance probability and N c represents the number of cooling cycles.
Step 2. Generation of an initial design: The structural model built by the engineer based on experience is set as the preliminary scheme. The structural mechanics analysis of the initial design is completed by the model transformation module, and the calculation results of the structure are extracted and sorted based on the Python language. The pseudo-objective function of the initial design is calculated using Equation (12).
Step 3. Creating and resizing of candidate designs: The new structural arrangement is obtained by randomly perturbing the cross-sectional dimensions of one or more frame columns in the initial design. Under the new structural design scheme, the sectional dimensions of all frame beams are adjusted using the heuristic method based on a complete stress design to generate candidate designs.
(1) Set the size variable of all frame beams to 1. It should be noted that the dimension variables of each component are represented by the index numbers corresponding to the selected sections in the component library. That is to say, the section of all frame beams is set to the smallest section type in the component library.
(3) Only check the stress constraints of each component, including normal stress constraints and stable stress constraints. For components with stress exceeding the limit, by increasing the size variable of the component, a larger cross-section is used from the list of component library and other variables are kept unchanged.
(4) Repeat (2) and (3) until all components meet the stress constraints or the section size of all components is set to the maximum section in the component library.
Step 4. Evaluating the candidate design and Metropolis test: Each time a candidate design is generated, it will compete with the pseudo-objective function of the current design. If the candidate design provides a better design, the current design is automatically accepted and replaced; otherwise, Metropolis tests are performed using the acceptance probability P of bad candidate designs determined by Equations (16)- (18). Metropolis generates a random number r between 0 and 1. If r ≤ p, the candidate design is accepted and the current design is replaced. Otherwise, the candidate design will be rejected, and the current design will be maintained.
In Equations (16)- (18), ϕ represents the correction factor introduced to ensure that the actual average acceptance probability follows the theoretical average acceptance probability, represent the theoretical and practical average acceptance probability for the k − 1-th cooling cycle, ∆∅ represents the pseudo-objective function difference, ∆∅ tra represents the change value of ∆∅, T (k) represents the temperature at the k-th cooling cycle, K is a Boltzmann parameter and its value is the average of ∅. The basic principle and more details of Equations (16)-(18) are given in Tort et al. [40]. For the sake of simplicity, they are not repeated here.
Step 5. Iterations of a cooling cycle: Cooling cycle iteration refers to the case where the cross-sectional dimensions of all frame columns are selected to be perturbed once and the corresponding candidate designs are generated. The cooling cycle is generally iterated a certain number of times in the same way, thereby ensuring that the pseudo-objective function is reduced to a reasonable value related to the cooling cycle temperature. The number of cooling cycle iterations i c can be determined as follows: In Equation (19), i s , i f represent the starting and final cooling cycles, both of which were taken as 1 to reduce the computation time.
Step 6. Reducing temperature: When the iteration of a cooling cycle is completed, the temperature is reduced by the cooling factor and the temperature of the next cooling cycle is set, as shown in Equation (20).
Step 7. Termination criterion: Steps 3-6 are repeated until the whole cooling cycles are finished.

Stage 2:
In the second stage, the simulated annealing algorithm is iteratively implemented for all component sizes, and the optimal design obtained in stage 1 is used as the initial design for stage 2. Therefore, the search in stage 2 starts with a more reasonable design, eliminating the need for a highly detailed cooling schedule. A milder cooling schedule is chosen that makes the algorithm under a reduced number of cooling cycles with a new set of annealing parameters. The results of the examples show that stage 2 produces a solution comparable to the simulated annealing algorithm. However, it employs a milder cooling schedule and requires much less computation time, thereby reducing design costs.

Model Transformation II Module
This module can be regarded as the reverse operation of model transformation I module, through the component of the component library as the basic unit to complete the model transformation. Each component in the SATWE two-dimensional model contains the standard layer, the type of components and the two-dimensional position of components. In the BIMBase three-dimensional model, the component is only determined by its component type (standardized component coding corresponding to the component library) and the three-dimensional position coordinates of the components. Through the mapping relationship shown in Figure 6 and leveraging the Python language, the extracted information of each component from the SATWE two-dimensional model is transformed and packaged into a BIMBase-compatible data format. This process involves matching the components in the component library to complete the modeling of the corresponding three-dimensional model in BIMBase.

Illustrative Examples
In this section, a complete description of the considered design examples was provided that utilized for performance evaluation of the proposed framework. Two kinds of design examples of rural buildings were considered in this paper with different plans in order to evaluate the efficiency of the proposed framework.

Example I
The first example is a two-story light steel frame with 14 column components and 17 beam components. The three-dimensional model of the structure built from the components in the component library selected by the designer based on experience is shown in Figure 5. The standardized component coding, the three-dimensional position coordinates of the components and the structural global parameters were extracted from the BIMBase three-dimensional model. The algorithm program corresponding to the Model transformation I of this framework was used to transform and package the data into a format compatible with the structural calculation software SATWE and generated the SATWE two-dimensional model corresponding to this example. It should be noted that the beam and column components in this example were smaller in section type compared to the primary scheme in the component library, as the conservative structural design scheme was chosen based on experience. This building was designed using both the SA and two-stage SA algorithms by performing three independent runs. Tables 1 and 2 display the results of the runs in terms of the optimized weight of the design scheme and the computation time in each run of the SA and two-stage SA algorithms, respectively. It can be seen from this example that the average performance of the two-stage SA algorithm is slightly better than that of the SA algorithm, even though the former located the optimum approximately two times faster. The comparison of structural design layout schemes of example I is shown in Figure 9. The comparison of key design indexes of example I is presented in Table 3. The results show that the steel consumption of the optimized structure is saved by 12.66%. The calculation results of the scheme are similar to those of the manual optimization scheme, which has an obvious optimization effect while meeting the calculation efficiency. The stress ratio of the structural components of example I is presented in Figure 10. It can be concluded that for the optimized design obtained by the proposed framework, the stress ratios of the structural components have high values and are close to the allowable value while retaining a certain safety reserve. This also verifies that the provided optimum design has less accessible cross-sections, thereby reflecting an economically favorable design perspective.       After the structural design scheme was optimized, the final module of the proposed framework was executed. The optimized SATWE two-dimensional model was returned to the BIM platform to generate a BIMBase three-dimensional model for subsequent detailed design. Both geometric and material information were correctly extracted and mapped, as demonstrated above. The process of implementing the proposed framework of example I is shown in Figure 11. The overall running time of the entire framework for this example is a little over half an hour. In contrast, the conventional structural layout scheme completed by experienced designers takes about 3 h, which is six times longer than the intelligent structural design enabled by the proposed framework. This shows that the proposed framework is an effective approach. After the structural design scheme was optimized, the final module of the proposed framework was executed. The optimized SATWE two-dimensional model was returned to the BIM platform to generate a BIMBase three-dimensional model for subsequent detailed design. Both geometric and material information were correctly extracted and mapped, as demonstrated above. The process of implementing the proposed framework of example I is shown in Figure 11. The overall running time of the entire framework for this example is a little over half an hour. In contrast, the conventional structural layout scheme completed by experienced designers takes about 3 h, which is six times longer than the intelligent structural design enabled by the proposed framework. This shows that the proposed framework is an effective approach. Sustainability 2023, 15, x FOR PEER REVIEW 18 of 24 Figure 11. The process of implementing the proposed framework of example I.

Example Ⅱ
The second example is a two-story light steel frame with 35 column components and 50 beam components. The three-dimensional model of the structure is shown in Figure  12. Again, this building was designed using both the SA and two-stage SA algorithms by performing three independent runs each. The results are reproduced in Tables 4 and 5 in terms of the optimized weight of the design scheme and the computation time in each run of the SA and two-stage SA algorithms, respectively. For this example, the two-stage SA algorithm shows slightly better performance than the SA algorithm on average, with a significant reduction in computation time. The comparison of structural design layout schemes of example Ⅱ is shown in Figure 13. The comparison of the key design indexes of example Ⅱ is presented in Table 6. After example Ⅱ is intelligently optimized by the proposed framework, the steel consumption of the algorithm optimization scheme is significantly reduced by 11.67 % compared with the empirical primary scheme. Compared with the design scheme given by manual optimization, the difference between the two results is 2.75 %. The stress ratio of the structural components of example Ⅱ is presented in Figure  14. It can be concluded from the comparison results of the three schemes that for example Ⅱ, the proposed framework can better optimize the structure of the empirical primary scheme. After the cooling calculation, the steel consumption is significantly reduced, and the given structural design scheme can meet the design requirements of the ultimate state of bearing capacity and the ultimate state of normal use. Compared with the results of the manual optimization scheme, the key design indexes of the algorithm optimization scheme are close to the manual optimization scheme.
The optimized SATWE two-dimensional model was returned to the BIM platform to generate a BIMBase three-dimensional model. Other professional designers could conduct the detailed design based on the existing optimized structural design model to guide the detailed design and construction of rural buildings. The results showed a 100% precision rate in generating the BIMBase three-dimensional model, and both geometric and

Example II
The second example is a two-story light steel frame with 35 column components and 50 beam components. The three-dimensional model of the structure is shown in Figure 12. Again, this building was designed using both the SA and two-stage SA algorithms by performing three independent runs each. The results are reproduced in Tables 4 and 5 in terms of the optimized weight of the design scheme and the computation time in each run of the SA and two-stage SA algorithms, respectively. For this example, the two-stage SA algorithm shows slightly better performance than the SA algorithm on average, with a significant reduction in computation time. The comparison of structural design layout schemes of example II is shown in Figure 13. The comparison of the key design indexes of example II is presented in Table 6. After example II is intelligently optimized by the proposed framework, the steel consumption of the algorithm optimization scheme is significantly reduced by 11.67% compared with the empirical primary scheme. Compared with the design scheme given by manual optimization, the difference between the two results is 2.75%. The stress ratio of the structural components of example II is presented in Figure 14. It can be concluded from the comparison results of the three schemes that for example II, the proposed framework can better optimize the structure of the empirical primary scheme. After the cooling calculation, the steel consumption is significantly reduced, and the given structural design scheme can meet the design requirements of the ultimate state of bearing capacity and the ultimate state of normal use. Compared with the results of the manual optimization scheme, the key design indexes of the algorithm optimization scheme are close to the manual optimization scheme. material information were correctly extracted and mapped, as demonstrated above. The process of implementing the proposed framework of example Ⅱ is shown in Figure 15. The running time of the whole framework for this example is about one and a half hours, while the conventional structural layout scheme completed by experienced designers takes about 8 h, which is almost six times longer than the intelligent structural design facilitated by the proposed framework. This demonstrates the promising practical applications of the proposed framework.         The stress ratio of the structural components of example Ⅱ. Figure 14. The stress ratio of the structural components of example II.
The optimized SATWE two-dimensional model was returned to the BIM platform to generate a BIMBase three-dimensional model. Other professional designers could conduct the detailed design based on the existing optimized structural design model to guide the detailed design and construction of rural buildings. The results showed a 100% precision rate in generating the BIMBase three-dimensional model, and both geometric and material information were correctly extracted and mapped, as demonstrated above. The process of implementing the proposed framework of example II is shown in Figure 15. The running time of the whole framework for this example is about one and a half hours, while the conventional structural layout scheme completed by experienced designers takes about 8 h, which is almost six times longer than the intelligent structural design facilitated by the proposed framework. This demonstrates the promising practical applications of the proposed framework.

Conclusions
The structural design of rural buildings in China is limited by economic conditions. It is not realistic to carry out accurate and detailed structural design for each rural building. While only in accordance with the experience of rural building design, its safety and economy cannot be fully verified. Therefore, this paper presents a new framework with

Conclusions
The structural design of rural buildings in China is limited by economic conditions. It is not realistic to carry out accurate and detailed structural design for each rural building. While only in accordance with the experience of rural building design, its safety and economy cannot be fully verified. Therefore, this paper presents a new framework with BIM and an optimization algorithm for the automated optimum design of rural light steel frame structures. The developed framework integrates BIM technology with structural analysis applications and an improved two-stage SA algorithm to automate and simplify the structural design process of rural buildings. Two different rural light steel frame structures are used to verify the applicability and efficiency of the developed framework. Based on this study, the following conclusions are obtained: (1) Under the guidance of the corresponding standardized component coding, the parametric library of structural components for rural buildings based on the state standard established on the BIM platform can realize the integrated management of BIM components, which is convenient for the subsequent retrieval of components and rapid modeling of structure.
(2) The model transformation method based on the component as the basic unit prevents data loss and conversion errors. It realizes the transformation of the BIMBase threedimensional model and SATWE two-dimensional model and provides a data basis for subsequent structural intelligent optimization. (3) An optimization method for rural light steel frame structures based on a two-stage SA algorithm is proposed. The example results show that the material consumption and key structural indexes of the algorithm optimization scheme are comparable to those of the manual optimization scheme. The proposed optimization algorithm reduces the iteration time of the simulated annealing algorithm to search for the optimal result and has good convergence and better optimization performance. (4) The intelligent structural design reduces the computational time by six times compared to the conventional design for both example I and example II (i.e., 0.5 h versus 3 h/1.5 h versus 8 h). The proposed framework requires less adjustment and is shown to be automated, effective and efficient.
In addition, this study has some limitations for which recommendations are suggested for future work. The intelligent design method proposed in this paper still requires engineers to intervene in terms of data input and information transmission and is limited to light steel frame structures. In future research, joint connections and the seismic performance of the structure and multi-objective optimization should also be addressed.