# Machine Learning Models for Ecofriendly Optimum Design of Reinforced Concrete Columns
## 2 Materials and Methods
### Optimization Process and Dataset Generation  
The main objective of this study is to minimize CO2 emissions through the efficient structural design of RC columns. For this purpose, the HS algorithm [PERSON] et al. (2018) was implemented to determine the optimal RC rectangular column dimensions (\(b\) and \(h\)) and total area of the longitudinal reinforcement (\(A_{s}\)) for a given \(M\) and \(N\). A large dataset was generated, including the optimum results of several loading cases. The HS algorithm is employed for the optimization process via MATLAB MATLAB MATLAB (1994) code and is a population-based metaheuristic algorithm developed by [PERSON] et al. [PERSON] et al. (2018), derived from an artificial phenomenon found in musical performance. The HS algorithm, which imitates the musical best-fit search, has been applied to many civil engineering optimization problems including posttensioned RC walls [PERSON] et al. (2018), earthquake analysis [PERSON] et al. (2018), structural vibration control [PERSON] et al. (2018); [PERSON] et al. (2018); [PERSON] et al. (2018); [PERSON] et al. (2018); [PERSON] et al. (2018), retaining walls [PERSON] et al. (2018); [PERSON] et al. (2018); [PERSON] et al. (2018), truss structures [PERSON] et al. (2018); [PERSON] et al. (2018), RC columns and beams [PERSON] et al. (2018); [PERSON] et al. (2018). Figure 2 shows a flowchart of the proposed method for optimization and prediction. In the optimization, the design variables were optimized for the minimization of the objective function. Since the problem is nonlinear because of design constraints, constraints are checked in the optimization process. As considered in previous studies [PERSON] et al. (2018); [PERSON] et al. (2018), these constraints are related to stress limitations and min-max requirements defined in design codes. The concrete compressive strength, steel yield strength, steel unit weight, elastic modulus of steel, unit shortening of concrete at fracture, and unit CO2 emissions of the materials and HS parameters are defined. Moreover, the solution ranges for RC rectangular dimensions and reinforcement area were determined. The objective function of this optimization problem is given in Equation (1):  
\[\text{min}f(CO_{2})=C_{C,CO_{2}}\times V_{S}+C_{S,CO_{2}}\times W_{S}. \tag{1}\]In Equation (1), \(C_{C,CO_{2}}\), \(C_{S,CO_{2}}\), \(V_{C}\), and \(W_{s}\) are the concrete carbon dioxide emission per unit volume, steel carbon dioxide emission per unit weight, total volume of concrete, and the total weight of steel, respectively. The search space for this function will be between the minimum and maximum values of the variables that can take. In the solution of an optimization problem with HS, the initial harmony memory (_HM_) matrix is randomly generated within a predetermined search space, and the size of the solution candidate population is harmony memory size (_HMS_). This matrix contains harmony vectors (_HV_), and each design variable is randomized within the defined solution ranges. Accordingly, if the _HMS_ is \(m\), \(m\) random solution candidates are created between the specified values as follows and stored in the HM matrix as shown in Equation (2). Here, each row represents a design and each column represents a design variable:  
\[HM= \begin{bmatrix}b^{1}&h^{1}&A_{s}{}^{1}&L^{1}&M^{1}&N^{1}&C_{C,CO_{2}}{}^{1}& C_{S,CO_{2}}{}^{1}&f\left(x^{1}\right)\\ b^{2}&h^{2}&A_{s}{}^{2}&L^{2}&M^{2}&N^{2}&C_{C,CO_{2}}{}^{2}&C_{S,CO_{2}}{}^{2}& f\left(x^{2}\right)\\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\ b^{m}&h^{m}&A_{s}{}^{m}&L^{m}&M^{m}&N^{m}&C_{C,CO_{2}}{}^{m}&C_{S,CO_{2}}{}^{m}& f\left(x^{m}\right)\end{bmatrix} . \tag{2}\]  
The function value is calculated by replacing each row of the _HM_ matrix in the function to be minimized. In Equation (2), \(L\), \(M\), \(N\), and \(A_{s}\) are the length of the column, bending moment, axial force, and the total area of the longitudinal reinforcement in the \(i\)-th solution candidate, respectively.