A machine learning approach to appraise and enhance the structural resilience of buildings to seismic hazards

Earthquakes often affect buildings that did comply with regulations in force at the time of design, prompting the need for new approaches addressing the complex structural dynamics of seismic design. In this paper, we demonstrate how strucural resilience can be appraised to inform optimization pathways by utilising artificial neural networks, augmented with evolutionary computation. This involves efficient multi-layer computational models, to learn complex multi-aspects structural dynamics, through several levels of abstraction. By means of single and multi-objective optimization, an existing structural system is modelled with an accuracy in excess of 98% to simulate its structural loading behaviour, while a performance-based approach is used to determine the optimum parameter settings to maximize its earthquake resilience. We have used the 2008 Wenchuan Earth-quake as a case study. Our results demonstrate that an estimated structural design cost increase of 20% can lead to a damage reduction of up to 75%, which drastically reduces the risk of fatality.


Introduction
Earthquakes constitute a major threat for many countries in the world, putting at stake our buildings and infrastructures, and consequently human lives.Building regulations are constantly informed by lessons learnt from earthquake events and technological developments in engineering, often enforcing stringent regulatory compliance as a standard requirement for design and post-disaster structural retrofitting.However, despite an abundant research in resilience [1] and a stringent seismic regulatory landscape, earthquakes are still causing significant human and economic losses in different regions of the world, as illustrated in Fig. 1.
Fig. 1 provides a comparison in terms of Richter magnitude, death toll and financial losses across the most impacting seismic events since the beginning of the 20th century.However, a distinction is made between seismic events before and after 1980, as the implementation of performance-based regulatory frameworks was initiated at the beginning of that decade [12].Fig. 1 evidences how losses endured in the aftermath of major seismic events are still significant and comparable to events that took place prior to the introduction of performance-based structural design (PBD).A meaningful observation is how some countries featured in the "post-1980" seismic events may not have implemented PBD and the proposed distinction is not necessarily neat, given that not all countries may update their regulatory framework in a similar timeframe.
Nonetheless, the key message evidenced by Fig. 1 is the insufficiency of the the past and current regulatory provision to ensureespecially for the existing building stocksufficient safeguard to human lives in face of seismic hazards.On a general basis, the regulatory framework of a nation would undergo improvements and resvisions if proven ineffective after a significant seismic event.However, this is not the case for all countries.
Another finding that can be gathered from Fig. 1 is that the impact of the analysed earthquakes over time did not reduce with the expected improvements of building regulatory frameworks.Nowadays, secondary to the human safeguard, it is of paramount importance to also account for the environmental impact of such seismic disasters.It is crucial to develop a strategy for building design which allows to tailor the structure to the hazard features and existing (or intended, for those buildings undergoing seismic restoration) geometry in order to optimize the usage of construction material and consequently reducing the waste as a result of the minimized damage.
The shift from prescriptive to performance-based regulations [13] involved some substantial changes in structural design.Whilst prescriptive design represents a determinist approach with defined provisions, performance-based design (PBD) entails the achiement of a local or global level of performance which is independent from the features or solicitations affecting a single structural member [14].A noteworthy advantage of performance-based approaches over prescriptive regulations lies in the ease of integration with Machine Learning (ML), including optimization techniques [13,15].As extensively highlighted in the literature [15,16], in a performance-based approach the design is conditional on the attainment of a specific target and therefore trial-and-error processes are generally adopted.Through a series of consecutive approximations, design variables and parameters are refined at each iterations, eventually leading to the solution which best complies with both regulatory requirements and project-related constraints (e.g., time, costs, resources).The integration of machine learning techniques finds its natural application in this domain since certain tasks can be easily automated [15], especially given the availability of engineering analysis tools that publish their own API (Application Programming Interface), thus promoting interoperability.Nonethelss, current performance-based regulatory frameworks still retain some prescriptive features, that don't fully exploit design optioneering [17,18].This is a gap where machine learning can provide informed and actionable solutions.
The paper aims to demonstrate that a performance-based approach to earthquake structural design supported by machine learning, which involves optimizing the governing variables of a structure, yields an enhanced earthquake resilience than current prescriptive approaches to earthquake design.The research focusses on reinforced-concrete (RC) framed buildings and uses an evidence-based methodology to understand the causes that lead to a given state-of-damage through an analytical and neural network-based approach.The research is based on the 2008 Wenchuan Earthquake in China, with a registered magnitude of M w 7.9 [19].
The understanding of the causes of damage can help (a) explore if these would have been avoided/attenuated if the structural dimensioning was optimized while complying with existing earthquake regulations, and (b) inform future practice, including design of new buildings or structural retrofitting of existing ones.
The main contributions of this research is a systems engineering methodology that (a) leverages high precision point cloud data alongside existing documentation (including drawings), (b) promotes integration and interoperability with structural software, and thus enables multi-aspects engineering analysis, (c) exploits neural networks and genetic algorithm techniques for building features' investigation, structural performance prediction and optimization, (d) harnesses on real-time data to promote a more reliable and tailored performance monitoring; and (e) proposes a scalable framework independent from regulatory frameworks specifications or structural analysis algorithms.The proposed research is such to allow integration of different structural analysis methods or alternative regulatory frameworks with minimum modifications within the core algorithm.
The paper is structured into eight sections.Following this introduction, Section 2 summarizes related literature, while Section 3 outlines the overall methodology adopted for the proposed research.Section 4 provides a concise overview of the selected case-study building, while the detailed workflow and algorithms used in the research are detailed in Section 5. Section 6 elaborates on the results obtained from the performed experiments and relevant obversations are presented in Section 7. Finally, Chapter 8 provides concluding remarks, including limitations and future research.

Related work
This section summarizes the related work that underpins the research with a focus on (a) the selection of Engineering Demand Parameters (EDPs), (b) machine learning techniques and (c) dimensionality reduction strategies applied to structural engineering.

Selection of engineering Demand parameters
Performance-based analysis is adopted through the use of Engineering Demand Parameters [20].These are generally identified as values resulting from structural analysis which are (i) representative of the building performance and (ii) used for building regulation compliance [20].It is therefore through the benchmark of the EDP that structural performance is evaluated.However, in order to identify which EDP to consider, a thorough literature review has been conducted.
The literature broadly groups them into two categories, namely local or global EDPs according to the structural element to which they refer.Examples of local EDPs can be chord rotations or node displacements, while the inter-storey drift ratio (IDR) is classified as global as involving the structure in its entirety.Specifically, the IDR is defined as the relative displacement between two consecutive floors divided by the storey height.Research has further shown how the seismic performance of a building can be represented and benchmarked by adopting displacement-based indicators [15].
Grounding on the above considerations, displacement-based EDP are deemed as the most authoritative and reliable method to assess the seismic performance of a building.However, in order to identify which of the EDP to consider for the current research work, an extensive literature review has been conducted to understand their effectiveness and use across different research.In this context, a series of authoritative design codes [21]- [24] have been analysed, as well as two relevant G. Cerè et al. research approaches, namely by Ghobarah [25] and Calvi [26] discussed below.
In order to benchmark the damage on buildings, Limit States are defined and associated to specific drift values [15].Table 1 summarizes different limit values regarding the IDR in accordance with a series of authoritative design codes but also research by Ghobarah [25] and Calvi [26].Both approaches include IDR as the primary indicator for the plasticity of the structure.Ghobarah proposes different limit states in relation to a series of ductility levels of infilled RC frames using the IDR as an indicator.The advantage of Ghobarah's approach lies in providing a coefficient that can be adopted for a quick estimation of damage based on a formerly performed simulation.Therefore, this approach can be useful for instance to provide an overview across a series of buildings, but it does not provide a clear quantification or qualification of the damage undergone by the structure.
Calvi devises classes of vulnerability for both RC (i.e., frame) and masonry (i.e., load bearing wall) structures developing an approach to estimate the damage to a building introducing a series of limit states then adopted to discretize seismic spectra combined with probability distribution.Calvi further accounts for the variation of the elastic seismic spectra due to energy dissipation through the introduction of a bespoke corrective factor.
With respect to regulatory frameworks, Eurocode 8 adopts IDR to quantify the damage in the context of Serviceability Limit Status (SLS), while the EDP for ultimate conditions (i.e., ULS) consists in chord rotations.With respect to IDR limitations, Eurocode 8 distinguishes between elements having different levels of ductility, increasing accordingly from 0.5 % to 1.5 %.Italian building codes differentiate the requested verifications according to the building function and the LS.Ministerial Decree 17 January 2018 [24] shows that global rigidity verifications are requested for specific building functions and limited to serviceability limit states (SLE).It also distinguishes between the level of anchoring of the infill and the frame, providing different limit values for the IDR.With respect to ULS, the ductile capacity and the overall stability must be further investigated with more in-depth techniques which are outside the scope of this research.
Finally, in light of the above analysis it is worth highlighting that the regulatory framework chosen for this research is the Eurocodes.This is due to a series of factors, such as: (i) integration within the framework of IDR; (ii) differentiation of IDR ranges according to limit states; and (iii) more restrictive limitations compared to other regulatory frameworks.

Machine learning techniques applied to structural engineering
Research evidences that the adoption of Artificial Neural Networks (ANN) and Genetic Algorithms (GA) is well established in the domain of structural engineering [28] for design optimization and damage forecasting both in static and dynamic conditions.
Artificial neural networks consist of biology-inspired mathematical abstractions which rely on the exchange of information across simple entities, the neurons [29], which once trained are able to perform highaccuracy data forecasting with a dramatic drop in simulation times.Genetic algorithms (GA) represent a class of evolutionary computing techniques that use metaheuristic and natural selection for complex optimisation problems.The advantages of GA over other evolutionary computing techniques are manifold.Firstly, the overall simplicity of the optimization process [30], which mainly relies on an iterative selection of individuals across different generations based on the best fitness provided in relation to the minimization objective.Furthermore, GAs provide more accurate results when dealing with multi-modal convex problems, enabling a smoother search for the global optimum and therefore outperforming traditional approaches [30].
The numerous applications of intelligent ensembles in the engineering domain [28] stretch from a single element to a whole structure [31,32].Some research employ GA to optimize the shear capacity and location of dampers in a structure under seismic actions and adopting inter-storey drift ratio (IDR) as a benchmark for performance [33].
Research also evidences the application of machine learning to damage prediction in RC frames though the adoption of a multi-layer ANN [32] MATLAB and Opensees are combined to perform reliability assessment targeting IDR as a performance indicator; however the rigid ANN architecture limits the applicability to only one type of building configuration [34].
From an industry perspective, the application of machine learning tends to be limited in day-to-day engineering practices.Buro Happold used Autodesk Robot for topology optimization [35,36].However, their proposed tool doesn't have the capacity to perform predictions on structural performance and is limited to the optimization of the building topology.Also, existing commercial solutions such as Galapagos [37] and Karamba [38] suffer from significant limitations, including optimization running time [39], as a consequence of the computational demand of their underpinning evolutionary algorithms.
Overall, it is observed how existing approaches have limited applications in terms of material or analysis strategies, therefore reducing the scalability of the methodology.Similarly, there is often few implementations of existing simulation software for structural analysis or when those are considered, a consistent lack of integration between the two is observed hence resulting in fragmented applications.

Dimensionality reduction strategies
Dimensionality-reduction strategies represent a key process when dealing with relatively large datasets as they allow to identify a smaller number of parameters that can account for the variability of the whole dataset [40].These algorithms are generally adopted in combination with other techniques, oftentimes for ANN training in order to avert overfitting.
In the domain of structural engineering, Principal Component Analysis (PCA) represents the most established dimensionality reduction algorithm.It is widely implemented in the domain of vibration analysis for building seismic performance [41,42].Here, frequency-response functions are generated and then reduced through PCA to be adopted for ANN training in order to perform data prediction.PCA is also employed in combination with sensitivity analysis to investigate relevant factors for local infills seismic failure [43], as well as when adopting modal analysis techniques [44].
Linear approaches such as PCA have been proven sometimes to fail to capture the real variability of the dataset when the interrelations between the variables are too complex.To resolve these shortcomings, nonlinear approaches can be adopted, including Kernel PCA (KPCA), Laplacian Eigenmaps, and Maximum Variance Unfolding.Nonlinear analyses are generally more accurate when dealing with real-world problems.PCA is widely employed in engineering-related applications given the ease of use and the reliability of results.
Similarly to §2.2, it is worth observing how existing approaches in structural engineering tend to perform the structural analysis separately from the machine learning tasks, leading to time-consuming and repetitive calculations that also increase the likelihood for inaccuracies.

Methodology
The methodology involves a case-study based approach using the 2008 Wenchuan Earthquake.The following research questions (RQ) are posited: RQ1.How structural design parameters can be inferred to accurately characterise and model a seismically compromised building?RQ2.How dimensionality-reduction can be achieved to identify a subset of parameters that account for the complex behaviour of a structure under earthquake loading?RQ3.Can these sensitive parameters inform the development of machine learning techniques to assess and enhance the structural performance of a building?
The above research questions translates into the following three main stages, as illustrated in Fig. 2: • Stage 1: Identification of unknown design and as-built parameters.
• Stage 2: Structural sensitivity analysis for dimensionality reduction.
• Stage 3: Structural behavior optimization using Neural Networks and Genetic Algorithms.
The data sources used for the research include: • Displacement time-series of the Wenchuan seismic event (source: IRIS, Wilber 3 database).
• Acquired 3D point-cloud data of the entire site.
• Photographic materials and on-site observations gathered during two field trips.
As illustrated in Fig. 2, the preliminary knowledge investigation involved data collection, through a 3D laser scanning campaign, and two field investigations in Wenchuan (China), which informed the development of a digital model of the site and a selected subset of buildings, as well as their structural appraisal.Point cloud data has been registered and imported in an architectural/BIM modelling tool to deliver an accurate parametric building model.In parallel to these tasks, velocity-time series (from the IRIS database) and the pseudo-acceleration (PSA) spectra in three dimensions (i.e., x,y,z) were collected to simulate the seismic action once implemented into the structural simulation tool.
In order to automate the structural analysis and perform the necessary optimization tasks, the analysis involved reliance on the structural simulation tool API, as well as manipulation of the BIM objects and their properties [45].The main computational work in all stages (1 to 3) involved the adoption of artificial intelligence (AI) techniques, namely genetic algorithms (GA) and Artificial Neural Networks (ANN).

Case study: Building investigation
This section provides a description of the Beichuan Hotel located in Old Beichuan in China (Fig. 3a) and a diagnostic of the failure mechanisms triggered by the seismic hazard.This section is provided in the aim to fulfil the ensuing objectives: (i) to benchmark the proposed building model with the real case-study structure; (ii) to present the relevant building features used to characterize the digital model of the case-study building; (iii) to describe the rationale of the analysis mode employed to obtain the deformed configuration for the modelled building used for the current research work.
The Hotel is a masonry-infilled RC frame structure composed of two main blocks.The Hotel is a masonry-infilled reinforced concrete (RC) frame structure composed by two main blocks featured by different elevations.The lower block serves as a garage, while the other hosts the reception services.The building does not exhibit lateral-force resisting technologies such as shear walls.The only lateral-force resisting system which appears to have been implemented at design stage is façade masonry infills.However, having these only been provided for part of the façade height, their impact is mostly detrimental to the overall building behaviour leading in fact to reduce the effective length of columns and hence increasing their stiffness (and reducing their ductility as a result).
The building features significant geometric irregularities, both inplan and in-height which have contributed to the disrupted configuration evidenced in Fig. 3a.The latter exhibits a classic soft-storey failure due to torsional action resulting from the torque generated by the lever arm created by the centre of mass and the centre of stiffness whichgiven the irregular geometrymay be significantly apart from each other.
This consideration was then validated by the ensuing simulation illustrated in Fig. 3b.This led to a maximum displacement in the junction between the two blocks, i.e. in the corner column highlighted in Fig. 3. Fig. 4 further illustrates the geometry of building in its as-built configuration prior to the deformation due to 2008 seismic event.
The research focusses on the superstructure of the selected building, which based on in-situ surveying doesn't present any differentialsettlement failure.This suggests the adoption of a deep foundation system.Satellite imagery analysis evidences that the date of construction was between 2001 and 2010.Consequently, the regulatory framework used at design stage was identified as the Chinese Code for Seismic Design GB 50011-2001.A first visual assessment helped identify a torsional mechanism initiating a soft-storey phenomenon in the first storey.
Based on the analysed Chinese Building Code it was gathered that for the functionality and typology of the structure, the most likely concrete class used at design stage would be C30.In terms of the frame members features, the columns have been surveyed to be 45x45 cm of section, whereas the beams featured a 45x70 cm section.Differently, the roof beams dimensions been gathered drawing upon the photographic material and point cloud data, inferring therefore a member section of 45x30 cm.The masonry infills are emulated with by-directional struts disposed as a St. Andrew's cross [46]- [48].This technique entails the characterization of two diagonally disposed struts and it is widely established as able to reliably account for the masonry stiffening capabilities [27,49] as presented in Fig. 5.The struts' features are calculated as presented in Equations ( 1) and ( 2), adopting the approach proposed by Stafford-Smith and Carter [50,51].Equation (1) shows how the relative infill to frame stiffness, represented by the product λH, is calculated based on Stafford Smith and Carter formulation [50], where Em and Ec respectively represent the Young modules of masonry and concrete for the infill and the frame.I stands for the second area moment of the column while t and ϑ represent the thickness of the infill and the angle of the diagonal to horizontal.The final strut section "a" (where a represents the section side dimension) is calculated using the Mainstone [52] approach formulated by Equation ( 2) and as shown in Fig. 5, where D represents the diagonal length between two opposite nodes of the masonry infills.Equations 1-4 are factored into the optimization algorithm both for investigation and resilience enhancement strategies in Stage 3.
Considering that Chinese regulations do not provide a methodology to estimate the value the masonry characteristic compressive resistance f k and given the low incidence of masonry in the building's facades, it is herein chosen to adopt the formulation proposed by Eurocode 6 [53].Therefore, in the absence of site-specific data regarding f k [53,54], the Young and shear moduli are calculated respectively according to Equations ( 3) and (4).Equation (3) shows how to attain the value for masonry elastic modulus Em according to regulations stated in Eurocode 6 [53], and f k was inferred based on experimental trials on blocks equivalent to the ones identified in the site [54].
First, the debris from other buildings located in the same site have been analysed to identify equivalent blocks in order to define the typology (e.g., hollow, semi-hollow) and the dimensions.A comparative analysis across five different manufacturers producing infill hollow blocks of similar dimensions have been performed.The resulting loading for the Beichuan Hotel masonry blocks was calculated via interpolation yielding to a value of 11 KN/m 3 .
Grounding on these data, a review of existing literature has been conducted in order to determine masonry properties based on the defined geometry, density and weight [54].Eventually, given the lack of a mathematical formulation to estimate the shear modulus G in Chinese Building Codes, its value has been calculated according to Equation (4), narrowing down the number of independent variables needed to characterize the masonry properties to one, namely f k .
As a result, the properties used to characterize the masonry infills used for this research are the following: The present research involved the application of linear elastic (i.e., modal) analysis.This is due to the unavailability of a detailed enough set of data to characterize the properties necessary to perform a nonlinear simulation.Deploying such algorithm with data inferred featuring an excessive level of uncertainty would have resulted in inaccurate and unreliable findings.

Proposed approach for seismic resilience enhancement
The proposed methodology as described earlier in the paper involves 3 stages: (a) investigation of unknown parameters, (b) sensitivity analysis, and (c) optimum calculation of the unknown parameters.Each of these stages is elaborated below.
Stage 1: Investigation on unknown design parameters.Table 3 summarizes the scenarios devised to validate the proposed methodology by simultaneously answering the first research question.This is attained by performing single (i.e., SO) and multi (i.e., MO) optimization where the objective is the minimization of the discrepancy between the EDP value derived from the optimization EDP GA and the known one EDP REAL , as per Equation ( 5).Table 4.
Any object within the model is univocally identified by means of a label.As a result, when manipulating such objects as part of the research work, multiple actions are performed which can result in the alteration of such labels.As an example, if a new object (e.g., a column) is created Fig. 5. Illustration of the equivalent struts method [48].and in order to feature it with all necessary properties such as e.g., material or section, it needs to be associated to a label.Two methodologies are considered in this research for the creation of new labels, one automated (i.e., automated label, "-AL") and the other one requiring user input (i.e., provided labels "-PL").
Considering the example of the aforementioned label pertaining a new section for a column, in the case of "-AL" the algorithm would fetch the section dimensions from the new element and automatically construct the string and the resulting label object.On the contrary, the "-PL" scenario would require the algorithm to prompt the user to insert the section details as input for the label string and object.
In terms of optimization strategies instead, another distinction is to be highlighted.Whereas single-objective (SO) optimization aggregates the displacement (or IDR) in its three spatial directions (i.e., x,y,z) in one value consisting in their sum.Conversely, the multi-objective optimization strategy adopts the displacement (i.e., absolute node displacement or IDR) in each direction as an individual objective.
With respect to the automated detection of section labels (i.e., -AL), case-specific constraints were introduced in the detection algorithm.The number of design variables involved in the GA is known based on the number of unknown parameters to be investigated, which in this specific scenario coincides with all the section-related dimensions of the frame.Based on field investigation, the columns' section is square (CB = CH), and its side equals the beams' section base (CB = CH = BB).Therefore, the investigated variables consist of 2 different columns' typologies (i.e., CB1 and CB2) and 3 beams' heights (i.e., BH1, BH2, BH3) based on the building's topology and 3D laser scanning data.The array V providing the input values for each iteration of the GA is represented in Equation ( 6); however for the case study, it is considered n = 2 and m = 3.
With each constraint condition representing an inequality, Equation 7 can be then formulated in a matrix form.To overcome the casespecificity of the constraint definition, Equation 7shows how the different coefficients Ri were calculated based on the model values of the investigated variables in order to establish a proportional relationship across the dimension of the elements.(7).The final matrix containing the inequalities, hence constraints relationships, is then formulated in Equation (8).This is needed to establish a cap for the variation of geometrical features.The values of the individual variables range according to their pre-defined lower and upper bounds.
Table 3 details the scenario in relation to the genetic algorithm specifications where the established constraints are evidence-based.It is therefore assumed that the post-seismic displacement is measurable by means, for instance, of in-place sensors or 3D laser scanning.In this specific case, the number of variables has been reduced to two as the columns' section was observed to be square and physically corresponding to the beam width.The GA objective is the minimization of the discrepancy between the EDP value derived from the optimization EDP GA and the known one EDP REAL .
Stage 2: Sensitivity analysis and neural network design.This section summarizes the dimensionality-reduction process, which aids the identification of the key governing variables for structural performance.This stage answers the second research question and it is structured into two related phases: (a) sensitivity analysis and (b) ANN engine creation.
The structural building model in Robot is iteratively invoked via COM-based APIs in MATLAB [45] for a total of 1000 simulations, and relevant outputs are collected in a matrix.The matrix is then elaborated in MATLAB using Principal Component Analysis (PCA) in order to perform the dimensionality reduction process.The relevant outputs are the variance and coefficient matrixes [55].However, the number of PCs to be considered is determined by the total variance represented by the cumulative sum of each PC's variance.The number of PCs representing at least 99 % of the entire data set consists in the final PC number that is going to be adopted as input for the neural network training.
It is worth noting that we have used 1000 samples of simulations to benchmark the ANN and the node displacement data is based on the results of the individual ANN.The accuracy of the ANN is presented in Table 6.
The output of the neural network is adopted in one case as IDR and in the other in terms of node displacement.Both have been used as objectives in the first stage of the research (i.e., investigation of unknown parameters) while in this context, they consist in the target for the ANN training.In order to investigate the benefit of adopting multi-layer neural networks, a set of simulations was conducted adopting a trialand-error approach.The selected artificial net consists in a backpropagation feedforward neural network featured by 4 hidden layers  and trained using a Bayesian regression algorithm, given its more accurate performance with a potentially noisy data set [31].The ''logsig'' activation function is adopted for information exchange between the neurons, given its more reliable performance in the case of multilayer ANNs [56].
As part of this stage, it is also noteworthy illustrating the rationale behind the ANNs devised for the proposed methodology.As presented in Table 6, 11 different neural network structures were considered in this stage and calibrated based on the variables (i.e., EDPs) proposed in stage 1.
The combination of ANN-GA is then adopted to perform the proposed experiments.The devised neural networks were trained using the IDR and the node displacement (ND) as targets and calibrated on the variables proposed in stage 1.The number of hidden layers and neurons were adjusted to maximise the performance and reduce the likelihood of overfitting.This was attained by reducing the number of neurons for each hidden layer when increasing their number.
A comparison between the performance obtained during test, training and the overall one is presented in Table 6.Table 6 also outlines the accuracy of the proposed neural networks in terms of precision during the calibration stage adopting the variables investigated in stage 1.Globally, the IDR outperforms the ND in terms of overall performance and accuracy although in some instances, the ND exhibits a lower discrepancy between training and test phases.Despite that, the highest accuracy is attained by experiment 11 adopting IDR as the target, where an accuracy of 98 % is achieved, and an approximate discrepancy between training and test stages consists in about 3 %.
The results also evidence how the ND performs better for single or double-layer neural networks, whereas the IDR exhibits a consistently stable performance and an increasing accuracy when introducing neural networks techniques.However, it is observed how a single layer ANN for the IDR provides better performance than a 4-layer ANN even though the results attained by the latter are 2 % more accurate.Fig. 6 shows to this regard the plots for the ANN trained with the IDR target devised for experiment 11.It is observed how a good fit is achieved as the dataset appears well distributed along the 45 • degrees line.Grounding on these observations, the neural network devised for experiment 11 is then adopted.
Stage 3: Optimum calculation of the unknown parameters.This section describes the methodology adopted to replace the structural simulation engine with a mulit-layer intelligent surrogate.The process starts from the identification of design variables and their initialization.Next, the GA iteratively optimizes the unknown parameters thanks to the implemented neural network which replaces the structural simulation tool.Analogously to Stage 1, the benchmark process for the GA entails the minimization of the discrepancy between the target IDR and the one attained by the ANN model.A dedicated neural network, the Reinforcement ANN, is then trained in order to provide reinforcement percentages data based on frame sections and infill features.The optimum design variables resulting from the GA-ANN utilization correspond to the input array for the reinforcement ANN.Both the Design ANN and the Reinforcement one are trained as part of Stage 2 and the resulting multi-layer ANNs are adopted across this stage to identify the optimum design variables (e.g., frame-related features, longitudinal and shear reinforcement percentages).
The integration of the reinforcement ANN benefits both post-disaster structural assessment and investigation phases, but it can also be adopted as a predictive performance-based tool for a specific event by adjusting the performance indicator (i.e., IDR).The proposed strategy does not require user input, apart from the Target IDR needed to

Table 6
Overview of ANNs adopted to perform the trial-and-error process to identify the optimum structure of the final neural network.establish building regulatory compliance.As previously outlined in Section 2, the regulatory framework chosen to validate this research work is the Eurocodes and specifically for shear reinforcement design a capacity design approach has been adopted.The process is iterated until the optimum values are achieved in compliance with existing regulations.In this case, it is considered the maximum 4 % of reinforcement areas prescribed by Eurocode 2 [57].Different benchmarks for the IDR were adopted in accordance with the reviewed authoritative building regulations and the correlation between building damage, and IDR is presented in Table 5.
In order to fully characterize the frame performance, reinforcement data were collected as follows: • Identification of the storey with the highest IDR; • Within the storey, selection of the most stressed beam Bn and column Cn based on the maximum value between shear and moment achieved for a specific load combination Lc, as in Equations ( 9) and (10).With respect to beams, the maximum moment and shear is picked between the middle span and supports given the inversion of the diagram in those positions; • The reinforcement is then calculated in 5 points for the previously selected elements and specifically to the most demanding load combination along the beam/column; • The maximum value for both shear and moment reinforcement is then selected out of the minimum required values, as outlined in Eqs.(11) and (12).Longitudinal reinforcement is represented in percentage while stirrups are calculated in mm 2 /m of beam's length.
A beam,R = max(min A consideration worth mentioning is related to the reinforcement calculation pertaining to each face of the section.On one sidebased on the performed site investigationsthe original design does not appear to be reflected in the frame design (e.g., section sizing and reinforcement provision) the geometric irregularities as well as the impact on such aspect of the seismic spectrum.On the contrary, the proposed algorithm yields to a reinforcement provision which allows to provide the optimum performance (i.e., IDR) also taking into account potential geometric irregularities of the structure.
In order to factor the complexity of a buildings' structural system, three different datasets were generated as presented in Fig. 7 by gradually expanding the set of variables from the geometry to the loads, but also considering infills-related parameters.When the variables are not changed, their initial value in the model is preserved and considered for calculation.The masonry infill load Wi on the frame at each new iteration results from the product between the factor R and the load from the previous iteration, as shown in Equation ( 13).This stems from the assumption of constant masonry density, which is an approximation adopted for this research.The multiplying factor R is instead defined as the ratio between the infill thicknesses of two subsequent iterations, as in Equation (13).

Results
This section presents the results following the application of the proposed methodology.The results reported in this section will address the following objectives: • Investigation of the specific building features through the integration of commercial structural behaviour simulation tools and a proposed machine learning module.
• Calculation of optimum values for a specific set of variables which promote a more risk-based seismic design of RC structures.
• Damage forecasting and assessment at the building level and consequent cost implications.

Investigated geometrical frame features
Stage 1 entails the investigation of the variables hypothesised as unknown adopting both node displacement and IDR as objective for the GA.These results are plotted in Fig. 8. Overall, the best-fit results from the scenarios where a specific set of labels are investigated (i.e., -PL), rather than where the whole set of building section typologies is involved (i.e., S1_MO_1P_AL).This is perhaps due to the highest variables number entailed in the latter scenario and consequently resulting Fig. 7. Variables and approaches involved in the generation of each data set produced throughout stage 3.
G. Cerè et al. in lower accuracy.Node displacement appears to be a more representative EDP compared to IDR, however, it is worth noting that the latter is mostly accepted by in-force building regulations.

Optimised values for structural building features
This section presents the validation and deployment of the methodology proposed for Stage 3, which represents an evolution of Stage 1, and entails the integration of the Design ANN into the GA to replace the structural simulation tool.

As-built values vs neural network results
This section presents the validation of the methodology proposed for Stage 3, which represents an evolution of Stage 1, and entails the integration of the Design ANN into the genetic algorithm to replace the structural simulation tool.As anticipated in previous sections, two different EDPs were initially considered, however, the IDR was selected as the most appropriate both because of the results achieved and its adoption in various building regulations.Removing the equality constraint for section geometry, the number of investigated variables grows up to 6.
Fig. 6 represents a comparison across the values for the six considered building features as attained adopting node displacement and IDR as EDPs.Fig. 9 shows that despite the increase of variable number, the neural network still provides a considerably reliable level of accuracy.
This drops though in relation to the masonry characteristic compressive resistance (i.e.f k ) and the infills' thickness (i.e., tt).Coherently with the real failure mechanism of the building and its irregularities in elevation, the algorithm selects the first storey as the one featured with the highest IDR therefore confirming the consistency between the results attained and the as-built situation.Grounding on the above, the ANN adopting the IDR as a benchmark is selected to calculate the optimum values for the analysed building features.

Calculation of optimum frame and optimum reinforcement
This section presents the results of the combination of the Design ANN in the context of the GA and the subsequent reinforcement calculation using the pertinent neural network engine (i.e., Reinforcement ANN).Given the impact of frame elements' inertia on the seismic performance, the discrepancy between horizontal (i.e., beams) and vertical (i.e., columns) dimension of structural elements is factored in the optimization process.These results are plotted in Fig. 10 for the three different datasets displaying an evident correlation between the level of damage (i.e., IDR) and the section inertia discrepancy.While Fig. 8a and 8b exhibit a consistent trend, Fig. 10c shows an anomaly in relation to the unconstrained dataset in correspondence to the 2 % IDR, which can be explained by analysing Fig. 8.
Analysing the inertia of the structural elements separately in Fig. 8 it can be observed that (i) the discrepancy across the dataset its maximum for the 2 % IDR as in Fig. 10c and (ii) beams appear to be mainly accountable for the dynamic inertia discrepancy in seismic conditions.In detail, regarding frame elements, a lower level of damage (e.g., IDR equal to 0.5 %, hence damage level 1/2) could have been achieved enhancing the columns' shear capacity in terms of inertia, as it can be seen in Figs. 10 and 11.
Fig. 12 shows the stirrups' area percentage for the most stressed structural members for the storey registering the highest IDR as per algorithm detection.Fig. 13 presents instead the stirrups's area in relation to the corner column as highlighted is Section 3. Due to surveying limitations, only the columns reinforcement data are available for comparison.Fig. 11 shows that across the three datasets a negligible discrepancy exists between the real stirrup area for columns (i.e., AsB_column) and the percentage resulting from the algorithm.
On the contrary, Fig. 14 reveals a significant deficiency of longitudinal reinforcement for columns.Given the non-variability across the three datasets in relation to this parameter, Fig. 13 presents only the output regarding the first dataset.Fig. 14 shows a breakdown of section sizing across the three different data sets generated using the GA-ANN framework and compared with the as-built condition (i.e., AsB) relatively to the IDR value of 2 %, being the effective damage level undergone by the building.This is limited to the constrained scenario where one of the column's sides (i.e., CH) is imposed as equal to the beam's base (i.e., BB) and therefore being more consistent for a comparison with the as-built configuration.It is worth noting that the second data set D2 appears to always provide a more convenient solution rather than one effectively adopted in the building.
Fig. 15 also highlights the potential for a twofold risk-reduction and financial benefit.Considering the current state of damage coinciding with a 2 % IDR and comparing it with the sections resulting from the second data set and specifically with the 0.5 % IDR, it is evident how an optimization-based technique would have entailed an overall approximate increase of 20 % of concrete volume adopted for construction.Correspondingly, an IDR reduction of up to 75 % can be obtained with an estimated cost increase of 20 %.
Based on the above results, it is therefore possible to devise the optimized column section while benchmarking this with the as-built one, as presented respectively in Fig. 16b and 16a.The optimized column section is devised regarding dataset 1, an IDR of 0.5 % (i.e., damage levels 1/2) and an overall minimum longitudinal reinforcement area of 1.7218 %.Through the introduction of 12 φ20 bars, an overall percentage of longitudinal reinforcement corresponding to 1.752 % is achieved, satisfying the minimum required area.Thanks to the introduction of 4-arms stirrups, the optimized section exhibits a better binding through the longitudinal bars compared to the as-built section.The Chinese seismic code adopted for design, the GB 50010-2001, prescribes a minimum longitudinal reinforcement area of 0.2 % for each column's side.Besides, specifically for corner columns, the requested minimum total area is 0.8 %.The as-built columns' longitudinal reinforcement for each column's side approximately corresponds to the percentage of 0.22 % and the total of 16φ12 in the whole section corresponds to 0.89 %, proving the regulatory compliance.
With respect to shear reinforcement, the Chinese seismic code GB 50010-2001 provides indications relatively to the minimum requirements for hoops.Considering a hoop diameter φ6, the most likely  spacing corresponds to either 6 or 8 times the diameter of the hoop, as it appears lower than 10-15 cm following to site investigations.As a result, and given the above considerations, the sections were effectively designed in accordance to in-effect building regulations.

Discussion
The previous section has evidenced how the adoption of an optimization-based approach can effectively benefit seismic design.The results also suggest that regulatory compliance does not necessarily guarantee a high level resilience of a structure to seismic stressors.The building characteristics (i.e., frame sizes and masonry properties) and performance-related variables were calculated based on an imposed EDP, namely the inter-storey drift ratio (IDR).The final decision to adopt the IDR as main EDPand to discard the node displacementfor structural performance assessment was validated by the data presented in this research but it could be expected given the nature of this particular indicator.As a matter of fact, the IDR provides a relative representation of the structural displacement whereas the node displacement only accounts for the absolute displacement of a particular point (i.e., node) of the structure.Utilizing the node displacement could have led to an underestimation of the level of stress for the structural members, particularly relevant for the casestudy proposed in this research where the soft-storey behaviour led to a displacement-induced failure of the structure.
Considering the real IDR registered for the Beichuan Hotel, corresponding to 2 %, it is evident that the building reinforcement has been consistently under dimensioned.This is evident from the frame sections representation, with a clear steel area deficiency.Conversely, the stirrups density appears to be comparable in relation to the minimum required values, as shown in Figs. 12 and 13.The columns' sections calculated adopting the combination of GA-ANN show how the longitudinal reinforcement percentage displayed in Figs. 12 and 13 can be distributed across the corner column section.This is relevant when compared to the as-built situation, reinforcing the effective section in its current form.Overall, despite regulatory compliance, the as-built configuration performed inefficiently under the seismic action.Comparing Figs.11 and 12, it can noted how both the singularity column and the most stressed element of the storey featuring the highest IDR undergo significant shear stress.Nonetheless, columns exhibit a higher fluctuation in stirrups density than beams, specifically for the corner column element.This leads to two considerations: (a) the consistency with a seismically stressed RC frame where columns supply the majority of shear resistance, given the generally higher horizontal seismic acceleration component compared to the vertical one; (b) the coherence between results and the hypothesis of a layout irregularity leading to a concentrated deformation in the portion corresponding to a change in rigidity.This coincides with the height variation in the two blocks as in Fig. 1a, which leads to local surge in the shear action of the analysed corner column and globally to torsional mechanisms triggering the soft-storey phenomenon.
The data set that best fits the frame sizing individually is the first one, and specifically the constrained option, given its consistency with the real frame geometry in relation to the equality between the beam's    section base and one column's side.Nevertheless, the consideration of the frame alone in this particular analysis would be inaccurate, given the significant contribution to the overall stability and rigidity of the structure provided by the infills [46,47].As a result, it would be more representative for this case-study to consider the third dataset as it factors in the infills' contribution to the overall structural stability favouring the adoption of leaner frame sections and a more costeffective material allocation, but preserving the benefits in terms of resilience enhancement.
However, an IDR of 2 % as in the as-built configuration is not a desirable option.It can, therefore, be acknowledged that in order to pursue a significantly lower level of damage such as 1 or 2 (i.e., IDR imposed of 0.5 %), it is necessary to adopt a bespoke design that factors in the dynamic capacity of the structure.Therefore, for an expected IDR of 0.5 %, the optimum section parameters can be fetched from Fig. 13a.In a complementary way, the sections' second area moment discrepancy for a target IDR of 0.5 % is significantly low and notably, much lower than the one registered for an IDR of 2 %.This shows the consistency with the hypothesis of a direct relationship between the endured damage in the form of IDR and second area moment discrepancy between vertical (i.e., columns) and horizontal (i.e., beams) frame elements.Furthermore, an increase in structural resilience is ensured where the second area moment is higher for columns than it is for beams, albeit this appears more evident in the case of the constrained scenario.
The resulting second area moment discrepancy and the section sizing show how the structure's dynamic behaviour would have benefitted from the adoption of the proposed approach in terms of costs and performance, based on two factors: (i) the simultaneous compliance to building regulations and (ii) the selection of the optimum option across a much broader set of options compared to the ones that could be considered through manual calculations.Nonetheless, it has to be noted that an expected damage level of 1 or 2 on the proposed scale would entail higher costs given the need to increase the resilience of the structure to dynamically withstand the seismic action.This is confirmed by Fig. 15a, where the frame geometry only is optimized, preserving the existing values for masonry and infill properties.However, Fig. 15a also exhibits a requirement of significantly consistent columns' sections across the three data sets, even in correspondence with the highest IDR where it would be expected for the structure to be leaner and more deformable.This is motivated by the significantly higher shear stress that columns undergo during seismic hazards.Where the infills are not optimized and preserved in their original form, such as in the case of the first dataset, the frame has to supply the necessary stiffness.However, being unable to do so, a significant damage increase is registered, justifying the results of the first dataset.It is evident with respect to the three data sets how the consideration of infills features benefits more columns than beams, confirming the above-mentioned considerations.
It is worth mentioning that it was not possible to retrieve the original design material such as calculation reports or blue prints and therefore most of the information pertaining reinforcement provision have been acquired via site investigation.Based on this, it was possible to acknowledge that the reinforcement provision was symmetrical within the section, conversely to what it would have been expected considering the geometric irregularities of the structures.This yields to consider that no distinction was made at the design stage to differentiate in terms of solicitation the top and bottom face of the frame members.
On the contrary, the proposed algorithm does not pose a constraint in terms of this aspect, allowing the opportunity for the reinforcement and section geometry to be combined in the optimum way such to provide the best performance given a target IDR.
The potential for a twofold risk-reduction and financial benefit appears when analysing Fig. 15.Considering the current state of damage coinciding with a 2 % IDR and comparing it with the sections resulting from the second data set, it is evident how an optimization-based technique would have entailed an overall approximate increase of 20 % of concrete volume.Similarly, referring to Fig. 12 and assuming a target IDR of 0.5 % for the second data set, the main increase in materials, hence in cost, can be attributed to columns.In fact, Fig. 13b and 15c illustrate how moving from an IDR of 2 % to 0.5 %, the beam's section and one of the column's sides remain also unchanged.However, the main increase in material and hence in cost can be attributed to the other column's side, as shown in Fig. 15a.This is consistent with the above considerations that columns account for the majority of seismic resistance.Therefore, an approximate 20 % of the additional cost could result in a reduction to up to a fourth of the damage.

Conclusion
The paper argues that earthquakes often affect buildings that did comply with regulations in force at the time of design and evidences the potential of adopting machine learning and optimization strategies to enhance the seismic resilience of buildings, while promoting an informed cost / risk reduction analysis.
As such, the paper proposed an evidence-based methodology to assess and enhance the seismic resilience of RC buildings using neural networks and optimization techniques, involving three main stages: (i) investigation of unknown design and as-built variables, (ii) dimensionality reduction and sensitivity analysis to determine the variables governing the building dynamic performance, and (iii) calculation of the optimum value for a specific set of variables.
The contribution of 3D laser scanning techniques has been extremely beneficial to determine accurate measurements in the absence of documentation.As such, the proposed approach can also inform structural retrofitting strategies.
The proposed research demonstrates how an multi-layer neural network approach and optimization-based technique can effectively lead to resilience enhancement with a clear reduction of the risk factor to occupants.The proposed methodology can be applied at the building level for structural assessment both through the design and post-disaster diagnostic phases.Overall, the contributions provided by the current work to the existing body of knowledge can be summarized as follows: • Devising a generic and scalable methodology applicable both to new and existing structures, hence suitable for risk-based design but also in the event of post-disaster assessment; • Providing a viable tool for engineers to enhance building structural surveys and thus avoiding often time-consuming bureaucratic processes and hurdles, exacerbated by the lack of technical documentation; • Developing a methodology that can be easily integrated with other disciplines (e.g., architecture) while promoting a holistic approach to the design/post-disaster assessment of a structure; • Creating a process that can exploits recent advances in both building engineering and computational structural analysis, augmented with machine learning; • Presenting a fully scalable methodology which can be used featuring several analyses algorithms (e.g., linear, nonlinear) simply by customizing the relevant parameters through the API.
In sum, the devised research work stands out given its comprehensive approach in tackling structural analysis, as opposed to traditional techniques seldom involving all the above aspects simultaneously.Additionally, its transferability and potential for integration with any architectural or structural behaviour simulation toolas well as regulatory frameworksmakes it advantageous for practical applications.The proposed research is also suitable for applications using different analyses algorithms (e.g., nonlinear) from the one presented herein.For this scope, the user shall customise the relevant analysis setting via the API prior to performing the simulation.
Finally, a limitation of this study is identified in the way costs are accounted for.Namely, in order to extensively quantify costs it would be necessary to consider the Expected Annual Loss function in conjunction with a quantity surveying report of the predicted costs connected to the optimized layout.It is in fact acknowledged that the relationship between building's layout and costs is not linear as there are several additional cost-related variables to be considered in terms of construction site, material provision, design and maintenance.Our approach estimates cost reduction based on the amount of construction material for a specific layout.Future work could consider integrating the development of a cost analysis based on material quantity takeoff facilitated by a BIM-based design.

Declaration of Competing Interest
The authors declare the following financial interests/personal relationships which may be considered as potential competing interests: Yacine Rezgui reports financial support was provided by Cardiff University School of Engineering.Yacine Rezgui reports a relationship with Natural Environment Research Council that includes.

Fig. 3 .
Fig. 3. Beichuan Hotel, following the earthquake (a) and top view of building model with torsional mechanism as per first mode (b).

Fig. 6 .
Fig. 6.Training (a), Test (b) and overall (c) performance of the Design neural network devised for the 11th experiment.

Fig. 8 .
Fig. 8.Comparison between values attained across the different investigation algorithms for stage 1.

Fig. 10 .
Fig. 10.Inertia discrepancy of frame section elements (i.e., beams and columns) in relation to the first (a), second (b) and third (c) set of data.

Fig. 11 .
Fig. 11.Inertia section values for individual variables (i.e., beams and columns) in relation to the third set of data.

Fig. 12 .
Fig. 12. Stirrups density of most stressed column and beam for the storey registering the highest IDR, respectively relatively to the first (a), second (b) and third (c) data sets.MS = most stressed.

Fig. 13 .
Fig. 13.Stirrups corner column and beam for the storey registering the highest IDR, respectively relatively to the first D1 (a), second D2 (b) and third D3 (c) data sets.

Fig. 14 .
Fig. 14.Longitudinal reinforcement percentage of most stressed beam and column for the storey registering the highest IDR, respectively relatively to the first dataset.MS = most stressed.

Fig. 15 .
Fig. 15.Comparison between as-built (AsB) condition and different frame section sizing across the three data sets in constrained conditions for CB (a), CH = BB (b) and BH (c).

Fig. 16 .
Fig. 16.Comparison between current column section for a 2% IDR (a) the calculated one for a 0.5% of IDR (b).

Table 1
Inter-storey drifts limits according to different building regulations and literature.

Table 3
Scenario description.

Table 5
Damage scale addressing earthquake disruption level to RC structures.