Optimal Design of Earthquake-Resistant Buildings Based on Neural Network Inversion

An effective seismic design entails many issues related to the capacity-based assessment of the non-linear structural response under strong earthquakes. While very powerful structural calculation programs are available to assist the designer in the code-based seismic analysis, an optimal choice of the design parameters leading to the best performance at the lowest cost is not always assured. The present paper proposes a procedure to cost-effectively design earthquake-resistant buildings, which is based on the inversion of an artificial neural network and on an optimization algorithm for the minimum total cost under building code constraints. An exemplificative application of the method to a reinforced-concrete multi-story building, with seismic demands corresponding to a medium-seismicity Italian zone, is shown. Three design-governing parameters are assumed to build the input matrix, while eight capacity-design target requirements are assigned for the output dataset. A non-linear three-dimensional concentrated plasticity model of the structure is implemented, and time-history dynamic analyses are carried out with spectrum-consistent ground motions. The results show the promising ability of the proposed approach for the optimal design of earthquake-resistant structures.


Introduction
The design of earthquake-resistant reinforced-concrete buildings is based on the concepts of ductility, strength hierarchy, and capacity design. Under exceptional seismic events buildings should deform plastically, exhibiting a deformation capacity greater than the demand in elements (typically beams) that are delegated for developing plastic hinges, while keeping more fragile elements (typically columns) safe. To assure this dissipative ductile behavior the code guidelines impose the fulfillment of ductility and strength hierarchy rules, which entail an iterative process for the more suitable choice of the geometrical and reinforcement design parameters. Commercial design programs help the designer to meet building code provisions and to check the fulfillment of rules, but an optimal cost-effective design is not usually ensured.
To design earthquake-resistant buildings, the present paper proposes a procedure, which is based on the inversion of an artificial neural network and on an optimization algorithm to achieve the minimum total cost under code constraints. The procedure is tested on a multistory reinforced-concrete building assumed to be built in a medium seismicity Italian area. Reference to the Italian Building code [1] and to the European Code EC8 [2] was made. Three design parameters are adopted as input variables to obtain about a thousand suitable combinations for the training dataset, while seven code checks are chosen as constraints to obtain the output matrix. A three-dimensional finiteelement model of the building was developed and non-linear dynamic analyses under a suite of seven spectrum-consistent earthquakes were carried out. Among the methods covered by the design regulations, the non-linear dynamic analysis is the most accurate to assess the seismic performance of ductile dissipative structures, although it requires higher computational burden and designer skill [3,4]. It can be successfully applied to both the design of new buildings [5] and the seismic retrofit of existing structures [6,7].
Artificial neural networks (ANNs) have been successfully applied for different purposes in Civil Engineering, from the early warning of ground settlements in urban areas [8] to the control of dynamic effects in bridges and the development of decision support systems for industrialized manufacturing of buildings [9]. ANNs have been also used to predict the seismic response of buildings [10,11] and even to perform an optimal seismic design [12]. A method based on an ANN is proposed in this paper for the code-compliant seismic design of reinforced concrete buildings. The novelty of the present approach is that of adopting an inversion of the ANN, which allows one to solve an inverse problem, that is to find the combination of design variables that meet given code-based performance constraints. Based on the ANN inversion procedure, an optimization algorithm is also presented in this paper which leads to a design configuration that minimizes the cost function. The neural network inversion is a non-standard tool which was exploited for pollution evaluation [13][14][15][16] and for electric capacitance tomography in nondestructive testing [17]. It was never applied, however, for structural design optimization.
To test the proposed method, a multistory reinforced-concrete building will be considered as a case-study. Based on non-linear dynamic analyses carried out under a suite of seven spectrum compatible earthquakes, an input matrix made of many combinations of three design parameters (corresponding to different building design configurations) and a target matrix containing seven performance variables calculated for each of the building configurations, will be obtained. The ANN will be trained on the input and the target datasets and the inversion algorithm will be then applied to find a design solution that falls within the intersection between the input and the output feasibility domains. Based on the trained network, an optimization algorithm will be applied to find a design configuration that minimizes the cost of the building while meeting the code-based seismic performance constraints chosen as target.

Reference Multi-Story Building
A reinforced concrete (RC) multi-story frame is considered to test the procedure. Figure 1 provides a scheme of the building while Table 1 lists the main characteristics of the building. For the sake of simplicity, all beams are assumed to have the same section and reinforcement. Similarly, all columns are supposed to have the same squared section and reinforcement. The base lengths b b of the beams is assumed to be equal to the base length b p of the columns. Clay/cement mix slabs are considered for the floor and roof levels. Table 2 provides the dead loads G 1 and G 2 and the variable loads Q.
Appl. Sci. 2021, 11, x FOR PEER REVIEW 2 of 14 seven spectrum-consistent earthquakes were carried out. Among the methods covered by the design regulations, the non-linear dynamic analysis is the most accurate to assess the seismic performance of ductile dissipative structures, although it requires higher computational burden and designer skill [3,4]. It can be successfully applied to both the design of new buildings [5] and the seismic retrofit of existing structures [6,7]. Artificial neural networks (ANNs) have been successfully applied for different purposes in Civil Engineering, from the early warning of ground settlements in urban areas [8] to the control of dynamic effects in bridges and the development of decision support systems for industrialized manufacturing of buildings [9]. ANNs have been also used to predict the seismic response of buildings [10,11] and even to perform an optimal seismic design [12]. A method based on an ANN is proposed in this paper for the code-compliant seismic design of reinforced concrete buildings. The novelty of the present approach is that of adopting an inversion of the ANN, which allows one to solve an inverse problem, that is to find the combination of design variables that meet given code-based performance constraints. Based on the ANN inversion procedure, an optimization algorithm is also presented in this paper which leads to a design configuration that minimizes the cost function. The neural network inversion is a non-standard tool which was exploited for pollution evaluation [13][14][15][16] and for electric capacitance tomography in nondestructive testing [17]. It was never applied, however, for structural design optimization.
To test the proposed method, a multistory reinforced-concrete building will be considered as a case-study. Based on non-linear dynamic analyses carried out under a suite of seven spectrum compatible earthquakes, an input matrix made of many combinations of three design parameters (corresponding to different building design configurations) and a target matrix containing seven performance variables calculated for each of the building configurations, will be obtained. The ANN will be trained on the input and the target datasets and the inversion algorithm will be then applied to find a design solution that falls within the intersection between the input and the output feasibility domains. Based on the trained network, an optimization algorithm will be applied to find a design configuration that minimizes the cost of the building while meeting the code-based seismic performance constraints chosen as target.

Reference Multi-Story Building
A reinforced concrete (RC) multi-story frame is considered to test the procedure.  Table 1 lists the main characteristics of the building. For the sake of simplicity, all beams are assumed to have the same section and reinforcement. Similarly, all columns are supposed to have the same squared section and reinforcement. The base lengths of the beams is assumed to be equal to the base length of the columns. Clay/cement mix slabs are considered for the floor and roof levels. Table 2 provides the dead loads 1 and 2 and the variable loads .

Design Parameters and Performance Variables
To obtain a database of cases for the training set, three parameters are taken as design parameters and referred to as x 1 , x 2 , and x 3 . The first one is the base of beams and columns, namely b b = b c = x 1 . The second one is the height of the beams h b = x 2 . Finally, the third variable is the ratio between the area of the tension longitudinal steel (typically placed at the bottom of the beam section) and the beam section area, namely ρ b = x 3 . The compression steel ratio was assumed to be ρ b,comp = 0.6x 3 . The ranges of variation of the design parameters are given in Table 3. A Phyton script [18] helped to vary the design parameters to obtain a dataset of examples. Eventually, 1011 cases were found, and a 3 × 1011 input matrix was obtained to be used for the training set. Table 3. Ranges of variation of the design parameters.

Range of Variation Increment
Step Selected among those stated by the Italian Building Code [1], seven key structural checks were considered to build the performance target matrix. Based on the capacity design and meeting some strength hierarchy rules, these structural checks are expressed as difference between capacity and demand values and assigned to seven parameters y i (i = 1, 7). They are provided in Table 4. The building was assumed to be designed in a high ductility class (DCH) at the life protection (LP) limit state. The values of parameters y i calculated at the most demanded sections for each building's configuration will be stored in the 7 × 1011 target matrix.

Performance Check [1] Variables for the Target Matrix
Bending moment hierarchy rule Shear vs. moment on columns Beam end-section bending moment Shear vs. moment on beams Shear on beam-column node (x direction)

Response Spectrum and Spectrum-Consistent Earthquakes
The reference response spectrum for the Life Protection (LP) limit state is plotted in Figure 2, as obtained according to [1]. A medium-seismicity zone characterized by a peak ground acceleration of 1.6 m/s 2 (for the LP) was considered, with reference to the values provided by Annex B of the Italian Building Code [1]. Consistent with the spectrum in Figure 2, seven couples of records in the x and y directions are obtained through the software REXEL [19], according to code rules [1,2]. Earthquake name, date of occurrence, magnitude M w , and distance ∆ from the epicenter are listed in Table 5.
Shear on beam-column node (x direction) Shear on beam-column node (z direction)

Response Spectrum and Spectrum-Consistent Earthquakes
The reference response spectrum for the Life Protection (LP) limit state is plotted in Figure 2, as obtained according to [1]. A medium-seismicity zone characterized by a peak ground acceleration of 1.6 m/s 2 (for the LP) was considered, with reference to the values provided by Annex B of the Italian Building Code [1]. Consistent with the spectrum in Figure 2, seven couples of records in the x and y directions are obtained through the software REXEL [19], according to code rules [1,2]. Earthquake name, date of occurrence, magnitude Mw, and distance ∆ from the epicenter are listed in Table 5.

Non-Linear Dynamic Analysis on an FEM Model
The Open System for Earthquake Engineering Simulation (OpenSees) software framework [18] was adopted to develop the numerical analyses. A 3D finite element model of the frame was developed in OpenSees by considering force-based beam-column elements. A scheme of the model, with elements and nodes, is provided in Figure 3. A Rayleigh classic damping was assumed in the elastic range, where a constant damping factor ξ = 5% was considered for each mode. A distributed plasticity (fiber-based) was assumed within the beam-column elements. The non-linear Scott-Park [20] and Giuffrè-Menegotto-Pinto [21] stress-strain constitutive models were adopted for concrete and steel, respectively, as implemented in OpenSees [18]. The qualitative scheme of the two models is provided in Figure 4, while the values of the parameters are provided in Tables 6 and 7. factor = 5% was considered for each mode. A distributed plasticity (fiber-based) was assumed within the beam-column elements. The non-linear Scott-Park [20] and Giuffrè-Menegotto-Pinto [21] stress-strain constitutive models were adopted for concrete and steel, respectively, as implemented in OpenSees [18]. The qualitative scheme of the two models is provided in Figure 4, while the values of the parameters are provided in Tables  6 and 7.
0.1 2 1500 Table 7. Values adopted for the constitutive model of reinforcement steel (see Figure 4b).    Seven non-linear time-history analyses were carried out for each one of the 1011 building's configurations under the seven spectrum-consistent earthquakes introduced in Section 2.3 (two orthogonal records are simultaneously applied to the building for each earthquake). A total of 7077 time-history non-linear analyses were finally carried out.
The averaged values of the effects over the seven analyses are calculated, this being allowed by codes [1,2] and the values of the seven parameters ( = 1,7) defined in Table 4 are obtained for all of the involved elements of the structure. The lower the value of the more demand on the element. The lowest values of found for each of the 1011 cases are stored in the 7 × 1011 target matrix. It can be noted that, almost always, the most demanded elements of the case-study building were the column and the beam colored in red in Figure 1

Network Inversion for Structural Design
Artificial Neural Networks (ANNs [22]) represent the smart core of the Decision Support System (DSS) presented in this paper. ANNs are analytical structures the working of   Tables 6 and 7. Table 6. Values adopted for the constitutive model of concrete (see Figure 4a).
0.1 2 1500 Table 7. Values adopted for the constitutive model of reinforcement steel (see Figure 4b). Seven non-linear time-history analyses were carried out for each one of the 1011 building's configurations under the seven spectrum-consistent earthquakes introduced in Section 2.3 (two orthogonal records are simultaneously applied to the building for each earthquake). A total of 7077 time-history non-linear analyses were finally carried out.
The averaged values of the effects over the seven analyses are calculated, this being allowed by codes [1,2] and the values of the seven parameters y i (i = 1, 7) defined in Table 4 are obtained for all of the involved elements of the structure. The lower the value of y i the more demand on the element. The lowest values of y i found for each of the 1011 cases are stored in the 7 × 1011 target matrix. It can be noted that, almost always, the most demanded elements of the case-study building were the column and the beam colored in red in Figure 1.

Network Inversion for Structural Design
Artificial Neural Networks (ANNs [22]) represent the smart core of the Decision Support System (DSS) presented in this paper. ANNs are analytical structures the working of which depends on both their topology and a set of parameters. Several paradigms of ANNs exist referring to the topology, the kind of problem to handle, and the time dependency. The most popular type of ANNs is the Multi-Layer-Perceptron (MLP, Figure 5), which can be used to solve both Classification and nonlinear Regression problems. MLPs have a unidirectional structure with no feedbacks. The layout consists of an input layer of nodes (neurons), one or more intermediate (hidden) layers, and an output layer. Whatever its type, an ANN typically leads to the creation of a model of a physical system starting from the data, rather than from the knowledge of the analytical relationship among the variables. In particular, the aim of MLPs is to imitate the relationship between independent (input) and dependent (output) variables that describe the physical system. For this purpose, a training process is performed to calculate the parameters of the ANN (weights), starting from a randomly assigned set of values. The training consists of an iterative procedure where the minimum of a performance function is sought. Most parts of used algorithms are first or second order minimization procedures, where the performance function is typically represented by the mean squared error of the network, the error being the gap between the output and the measured (target) values.

Inversion Algorithm
A representation of the relationship between inputs and outputs is conveyed in the trained MLP. This information can be exploited to solve the inverse problem, that is to determine the design parameters which meet the set performance requirements [14][15][16][17][23][24][25][26][27]. Since the design parameters represent the input and the performance of the physical system is the output, finding the input corresponding to a given output means determining the design parameters which guarantee the fulfilment of the given require- and assuming an efficient training strategy. Usually a trial and error procedure is performed to determine the best set of these hyper parameters.

Inversion Algorithm
A representation of the relationship between inputs and outputs is conveyed in the trained MLP. This information can be exploited to solve the inverse problem, that is to determine the design parameters which meet the set performance requirements [14][15][16][17][23][24][25][26][27]. Since the design parameters represent the input and the performance of the physical system is the output, finding the input corresponding to a given output means determining the design parameters which guarantee the fulfilment of the given requirements. The model frozen inside the MLP is represented by a set of equations (Equation (1)), which describe the relationship between the input x and the output y of the network, see Figure 5.
To disentangle the algebraic structure of the MLP, two auxiliary variables, namely k and h, are introduced. They represent respectively the input and the output of the hidden layer. Equation (1) (a) describes the linear relation between the output of the hidden layer and the output of the MLP (h and y, respectively). Equation (1) (b) relates the input and the output of the hidden layer (k and h, respectively), this being a non-linear relation. Finally, Equation (1) (c) describes the linear relation between the input of the MLP and the input of the hidden layer (x and k, respectively). Once the MLP has been trained, Equation (1) allow to propagate the input x up to the output y, which leads to calculate the performance of the system corresponding to a given set of design parameters. On the other hand, if the output variable y is set, the three Equation (1) can be solved in series to obtain the input x, which means finding the design parameters that correspond to the given performance.
In general, a domain of feasibility can be set, rather than requiring the fulfillment of a given value of the performance. For the sake of simplicity, in this formulation such domain is assumed to be linear and convex, so that it can be expressed by means of the set of inequalities given by Equation (2).
The feasibility domain of the output, introduced in Equation (2), sets the requirements of the building. The constraints on the output correspond to as many constraints on the input, namely the design parameters. Thanks to Equation (1), we can transfer the feasibility domain from the output space to the input space. In other words, the requirements are translated into a feasibility domain of the design parameters. In their turn, a set of bounds will be stated on the design parameters, defining a feasibility domain of the input. Solving the inverse problem means finding a design solution that falls within the intersection between the two feasibility domains, respectively defined on the input and on the output.
As described in Figure 6, we will make use of the following four geometrical spaces: Input Space X where the design parameters are defined, Upstream Hidden Space K representing the input of the hidden layer, Downstream Hidden Space H representing the output of the hidden layer, Output Space that is the output of the network. Equation (1) is subdivided into three subsystems: a linear equations system that relates space X with space K, a nonlinear equations system that relates space K with space H, and, finally, a linear equations system that relates space H with the output space Y.
As described in Figure 6, we will make use of the following four geometrical spaces: Input Space X where the design parameters are defined, Upstream Hidden Space K representing the input of the hidden layer, Downstream Hidden Space H representing the output of the hidden layer, Output Space that is the output of the network. Equation (1) is subdivided into three subsystems: a linear equations system that relates space X with space K, a nonlinear equations system that relates space K with space H, and, finally, a linear equations system that relates space H with the output space Y.
Equation (3) denotes a constraint for variable deriving from the feasibility domain of the output. At the same time, variable is limited by the range of the nonlinear activation function of the hidden neurons. Such activation function typically has a sigmoidal shape, and has a range in the interval [−1, 1]. In this work, the hyperbolic tangent function is assumed (see Figure 7). Vector corresponding to the sought solution must be attainable from a feasible , the feasibility range being −1 + ≤ ℎ ≤ 1 − , where is a margin from the saturation of the activation function. We can re-write this equation in the following form: Equation (1) allows us to project both points and domains from one space to any other of the structures. In particular, the feasibility domain of the output, expressed by Equation (2), namely the performance requirements of the building, can be projected into space H by substituting the output variable y as derived from Equation (1) (a) in Equation (2): Equation (3) denotes a constraint for variable h deriving from the feasibility domain of the output. At the same time, variable h is limited by the range of the nonlinear activation function of the hidden neurons. Such activation function typically has a sigmoidal shape, and has a range in the interval [−1, 1]. In this work, the hyperbolic tangent function is assumed (see Figure 7).
Input Space X where the design parameters are defined, Upstream Hidden Space K representing the input of the hidden layer, Downstream Hidden Space H representing the output of the hidden layer, Output Space that is the output of the network. Equation (1) is subdivided into three subsystems: a linear equations system that relates space X with space K, a nonlinear equations system that relates space K with space H, and, finally, a linear equations system that relates space H with the output space Y.
Equation (3) denotes a constraint for variable deriving from the feasibility domain of the output. At the same time, variable is limited by the range of the nonlinear activation function of the hidden neurons. Such activation function typically has a sigmoidal shape, and has a range in the interval [−1, 1]. In this work, the hyperbolic tangent function is assumed (see Figure 7). Vector corresponding to the sought solution must be attainable from a feasible , the feasibility range being −1 + ≤ ℎ ≤ 1 − , where is a margin from the saturation of the activation function. We can re-write this equation in the following form: Vector h corresponding to the sought solution must be attainable from a feasible k, the feasibility range being −1 + ε ≤ h ≤ 1 − ε, where ε is a margin from the saturation of the activation function. We can re-write this equation in the following form: The two systems (3) and (4) can be included in a unique system as: A first check is required to establish if the domain (5) is empty. In this case, no design solution exists which meets the requirements, and the requirements should be relaxed. The domain (5) can be projected on space K by means of Equation (1) (b): Finally, the domain (6) can be projected on the input space Equation (7) describes a nonlinear domain in the input space X. Generally, a feasibility domain is a priori stated on the input space. Often, this domain contains a feasibility range for each design parameter, making the feasibility domain to be a box: L bnd ≤ x ≤ U bnd . More in general, the feasibility domain of the input could be defined by a set of constraints of any kind. For the sake of simplicity, in this work we assumed that such constraints are linear, thus, the domain can be expressed as: The solution of the problem must fall within both the feasibility domains (7) and (8). Therefore, the design problem is transformed into an existence problem. Unfortunately, one of the two systems is nonlinear, therefore finding a feasible solution could be a challenging task.
The existence problem can be solved iteratively making use of the linear programming (LP) [28]. The number of neurons of the hidden layer usually is larger than the number of inputs, which implies that the number of Equation (1) (c) is larger than the number of the input variables, thus the equations system is overdetermined. By means of the pseudoinverse matrix of Moore-Penrose, Equation (1) (c) can be solved with respect to x according to the least square error criteria: By substituting Equation (9) into Equation (8), the feasibility domain of the input is projected in space K, which is still linear: By exploiting Equation (1) (b), any point from space K can be projected to space H and vice-versa. The feasibility domain of the input is linear in space K and nonlinear in space H, while the feasibility domain of the output is linear in space H and nonlinear in space K. Therefore, an iterative procedure can be defined, where the current solution is projected alternatively on the two domains changing space K and H, so that the domain where the solution should be projected is always linear.

Application of the Inversion Algorithm to the Case-Study
With reference to the case-study described in Section 2, an ANN is firstly trained over a dataset of examples and then the inversion algorithm described in Section 3.1 is applied to find a set of design parameters meeting the chosen code-compliant seismic performance requirements.

Training Phase
A population of 1011 examples was considered for the training phase, given by an input matrix and a target matrix. The input matrix M x stored 1011 sets of the design parameters x 1 , x 2 , and x 3 defined in Section 2.2, all of them falling within the ranges provided in Table 3. Corresponding to the above sets of design parameters, a 7 × 1011 output target matrix M y was obtained, storing the seven values of the capacity-design performance variables y i (see Table 3) calculated through numerical non-linear FEM analyses under spectrum consistent earthquakes (as described in Section 2.4) for each of the 1011 cases. It should be stressed that the output performance variables y i (i = 1, 7) were not asked to meet the code-compliant constraints. This means that the population of examples also includes cases of unsafe seismic designs of the building, as well as sets of design parameters out of the feasibility domain.
The 1011 examples dataset was divided into three subsets: a training set (80% of the population), a validation set (10% of the population), and a test set (10% of the population). The training process was applied to the training set to find the connections' weights. The verification set was involved in the training process but only to monitor the evolution of the error, this set having no influence on the calculus of the connections' weights. The test set is not involved in the training process, but it was used to monitor the generalization capability of the trained neural network.

Inversion Phase
Once the network was trained, the inversion algorithm was applied. The design constraints on the output variables (Equation (2)) were in this case given by the following set of inequalities imposed over the seven performance variables y i defined in Table 4, according to the Italian Building code [1]: The minimum number of neurons of the hidden layer needed to guarantee the required precision was found to be 12. The inversion procedure converged after 88 iterations, (see Figure 8).
A population of 1011 examples was considered for the training phase, given by an input matrix and a target matrix. The input matrix stored 1011 sets of the design parameters 1 , 2 , and 3 defined in Section 2.2, all of them falling within the ranges provided in Table 3. Corresponding to the above sets of design parameters, a 7 × 1011 output target matrix was obtained, storing the seven values of the capacity-design performance variables (see Table 3) calculated through numerical non-linear FEM analyses under spectrum consistent earthquakes (as described in Section 2.4) for each of the 1011 cases. It should be stressed that the output performance variables (i = 1, 7) were not asked to meet the code-compliant constraints. This means that the population of examples also includes cases of unsafe seismic designs of the building, as well as sets of design parameters out of the feasibility domain.
The 1011 examples dataset was divided into three subsets: a training set (80% of the population), a validation set (10% of the population), and a test set (10% of the population). The training process was applied to the training set to find the connections' weights. The verification set was involved in the training process but only to monitor the evolution of the error, this set having no influence on the calculus of the connections' weights. The test set is not involved in the training process, but it was used to monitor the generalization capability of the trained neural network.

Inversion Phase
Once the network was trained, the inversion algorithm was applied. The design constraints on the output variables (Equation (2)) were in this case given by the following set of inequalities imposed over the seven performance variables defined in Table 4, according to the Italian Building code [1]: The minimum number of neurons of the hidden layer needed to guarantee the required precision was found to be 12. The inversion procedure converged after 88 iterations, (see Figure 8). As a result of the inversion algorithm, the set of design parameters listed in the first row of Table 8 was found. To check the validity of the procedure, a numerical analysis on the FEM model of the building was performed. In fact, integer values, rounded up, were considered for the section's dimensions 1 and 2 , while the values of the steel percentage 3 was rounded up by considering commercial steel diameters. The second row of As a result of the inversion algorithm, the set of design parameters listed in the first row of Table 8 was found. To check the validity of the procedure, a numerical analysis on the FEM model of the building was performed. In fact, integer values, rounded up, were considered for the section's dimensions x 1 and x 2 , while the values of the steel percentage x 3 was rounded up by considering commercial steel diameters. The second row of Table 8 gives the values of the design parameters adopted in the numerical model of the building for the comparison test. Non-linear time-history analyses under the suite of seven earthquakes were carried out, the averaged effects were calculated and the numerical values of the variables y i were finally obtained. They are given in Table 9. It can be noted that the values of y i (i = 1, 7) meet the code-compliant constraints (11).  Table 9. Performance variables from the FEM model with the design parameters in Table 7.

Optimization Procedure for the Case-Study
The solution found in the previous section fulfils the requirements of both Input (design parameters) and Target (performance of the building). While meeting these specifications, it is generally possible to improve the solution found according to predefined target functions. Since the compliance with the target is expressed in terms of thresholds, the margins for optimization concern the design parameters, which are linked to the cost of the RC frame. In the case-study example, beam and column base b b = b c = x 1 , beam height h b = x 2 , and beam tension longitudinal steel ratio ρ b = x 3 , have been assumed as design parameters. Related to these parameters, the following cost function was defined: C = n b l b (γ con c con x 1 x 2 + γ ste c ste x 1 x 2 1.6 x 3 ) + n c l c γ con c con x 2 2 + γ s c s ρ c x 2 2 (12) Here n b and n c denote the number of beams and columns, l b and l c being their longitudinal length, respectively; γ con and γ ste are the specific weight of concrete and steel; c con and c ste the cost per unit weight of concrete and steel; while ρ c is the longitudinal steel ratio in columns.
By introducing the following parameters: α = n b l b γ con c con ; β = 1.6 l b γ ste c ste ; δ = n c l c (γ con c con + γ ste c se ρ c ) (13) the cost function writes: The numerical values of the coefficients α, β, and δ for the case under study are provided in Table 10, the values of the cost function being directly expressed in euros (€). To find the set of parameters x 1 , x 2 , and x 3 that minimize function C, the gradient descent algorithm is here adopted. This algorithm is based on an iterative procedure that moves in the negative direction of the function gradient ∇C from an initial set of parameter values, say point X i , toward a set of final parameter values that minimize the cost function. Each iteration step is governed by the rule: where η is the step size, taken initially equal to 1 × 10 −6 and then updated at each iteration. According to (14), the gradient ∇C writes: The solution provided by the inversion algorithm (first row of Table 8) was chosen as a starting set of design parameters. The optimization algorithm returns the set of design parameters listed in Table 11, which corresponds to a point on the frontier of the domain where the Karush-Kuhn-Tucker condition is met [29]. The set of design parameters were assigned to the FEM model and the results of the dynamic analyses lead to the values of the performance variables given in Table 12. Such values confirm that the building designed with the optimum set of design parameters meets the capacity design requirements assumed as target. Table 11. Design parameters from the optimization procedure.
Optimum design values 0.42 0.42 0.0058 The trend of the cost function during the optimization procedure is plotted in Figure 9. The optimal point was reached after five iterations, with a final cost of EUR 18,323 over the initial cost of EUR 26,664. It is worth noting that other categories (labor, transport, and non-structural components) contribute to the total cost of the construction. For the sake of simplicity, however, reference only to the naked RC frame was made in the optimization procedure here presented. A more comprehensive study should of course account for all the categories of cost, even if it would not affect the validity of the method proposed. It should be noted finally that the design parameters found by the optimization algorithm do not belong to the dataset of training examples.
The solution provided by the inversion algorithm (first row of Table 8) was chosen as a starting set of design parameters. The optimization algorithm returns the set of design parameters listed in Table 11, which corresponds to a point on the frontier of the domain where the Karush-Kuhn-Tucker condition is met [29]. The set of design parameters were assigned to the FEM model and the results of the dynamic analyses lead to the values of the performance variables given in Table 12. Such values confirm that the building designed with the optimum set of design parameters meets the capacity design requirements assumed as target. The trend of the cost function during the optimization procedure is plotted in Figure  9. The optimal point was reached after five iterations, with a final cost of EUR 18,323 over the initial cost of EUR 26,664 . It is worth noting that other categories (labor, transport, and non-structural components) contribute to the total cost of the construction. For the sake of simplicity, however, reference only to the naked RC frame was made in the optimization procedure here presented. A more comprehensive study should of course account for all the categories of cost, even if it would not affect the validity of the method proposed. It should be noted finally that the design parameters found by the optimization algorithm do not belong to the dataset of training examples.

Conclusions
An Artificial Neural Network (ANN) inversion procedure was proposed in this paper to obtain an optimal code-compliant seismic design of reinforced-concrete buildings. This procedure allows to solve an inverse problem, finding the design parameters which guarantee the fulfilment of some given code-compliant performance requirements while minimizing the cost function.

Conclusions
An Artificial Neural Network (ANN) inversion procedure was proposed in this paper to obtain an optimal code-compliant seismic design of reinforced-concrete buildings. This procedure allows to solve an inverse problem, finding the design parameters which guarantee the fulfilment of some given code-compliant performance requirements while minimizing the cost function.
The procedure was applied to a multistory three-dimensional (3D) building supposed to be built in a medium-seismicity Italian area. A set of 1011 different configurations of the building were obtained by varying three design parameters in suitable ranges. A 3 × 1011 input matrix storing the considered sets of design parameters was thus obtained. Nonlinear dynamic analyses on 3D finite element models of the 1011 building's configurations under a suite of seven spectrum compatible earthquakes were then carried out. The values of seven capacity-design performance variables calculated at the most demanded sections for each of the building configurations were then stored in the 7 × 1011 target matrix. The ANN was trained on the input and target datasets and the inversion algorithm was then applied to find a design solution that fell into the intersection between the input and the output feasibility domains. As checked by means of the FEM numerical analyses, this led to a design solution meeting the code-compliant performance requirements chosen as the target.
An optimization iterative procedure was finally proposed to find a set of design parameters that minimized the cost of the building while meeting the code-based seismic performance constraints. The optimization procedure was based on the trained ANN and applied a gradient descent algorithm, which iteratively moved in the negative direction of the cost function gradient, starting from the set of design parameters found through the inversion procedure and stopping at a set of final values of design parameters that minimized the cost function. The seismic performance of the building corresponding to the design parameters provided by the optimization procedure was checked by means of the FEM numerical analyses, finding that it met the seven capacity-design requirements assumed as target control parameters. It should be noted that, for the sake of simplicity, only three design parameters were assumed to obtain the building configurations while only some of the performance checks stated by the Italian Building code were taken as indexes of the building's structural safety in the present application of the method. However, the method can be easily extended to account for any number of design parameters in the input matrix and any number of code-based performance checks in the target matrix.