Genetic Algorithm (GA) is a search optimization tool used to estimate the best fit parameters of multi-dimensional problems working on the principle of natural selection. The optimization tool works on a predefined pattern of mutations and cross-overs to converge to the optimal solution within a few generations. GA methodology have been successfully implemented to estimate the hysteresis parameters of Bouc Wen hysteresis models in the past (Xiaomin et. al. 2009).

In the current study, a genetic algorithm is developed using MATLAB (2022) software for the estimation of the parameters of the ‘*Hysteresis’* material model for the steel rebars in *OpenSees* software while the rest of the material models were as defined previously. The parameters of the ‘*Hysteretic’* model for which GA model was used were ‘*pinchx’*, ‘*pinchy’*, ‘*damage1’* and ‘*damage2’* while the remaining parameters (*e1p, s1p, e2p, s2p, e3p, s3p*) were adopted from an idealized bilinear uniaxial tensile stress-strain curve for reinforcement steel. The values of stress and strain in the negative loading direction (*e1n, s1n, e2n, s2n, e3n, s3n*) were assumed to equal but opposite sign as that of the corresponding values in the positive loading direction.

Figure 5 illustrates the flowchart of the proposed GA for estimating the hysteresis parameters. The energy dissipated at the end of each cycle of the lateral drift was calculated through numerical integration for both the experiment and the simulation. The difference between the dissipated energy of experiment and simulation served as the fitness function for assessing the hysteretic parameters. The chromosome's representation in a specific generation improves as the fitness function value decreases. This iterative process continued until the optimal values of the parameters were ultimately identified.

## 4.1 Chromosome

The parameters to be estimated makeup the form of the chromosome. In the current study sixteen parameters are required to accurately model the hysteretic material in OpenSees out of which the first twelve parameters were adopted from the idealized stress-strain backbone curve of the reinforcement steel. The stress-strain response for compression was assumed to be the same as that of the uniaxial tension. The remaining four parameters i.e. ‘*pinchx’*, ‘*pinchy’*, ‘*damage1’* and ‘*damage2’* were related to the pinching and degradation of the hysteresis response. Identification of these parameters is crucial as they affect the cyclic response of the member. The minimum and maximum limits for these parameters were specified as inputs and the chromosomes generated a random value between these limits for each parameter. Table 2 gives the adopted lower and upper bounds for each parameter. The chromosome is thus defined as:

$$\:{\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:{\Theta\:}}_{i}=\left\{{pinch}_{x}^{i},{pinch}_{y}^{i},{damage}_{1}^{i},{damage}_{2}^{i}\right\}\:\:\:,\:i=1,\:.\:.\:.\:.,\:N$$

1

Table 2

Upper and lower bounds for the hysteresis parameters

Parameter | Lower bound | Upper bound |

*pinchx* | 0.3 | 1.0 |

*pinchy* | 0.3 | 1.0 |

*damage1* | 0.0 | 0.1 |

*damage2* | 0.0 | 0.1 |

In which N is the maximum number of chromosomes which in the present case was taken as 4 and \(\:i\:\)is the individual chromosome. The objective of the present study is to optimize the parameters with a limited number of chromosomes thereby reducing the run time of the algorithm. Traditional GA requires the algorithm to run for a specific number of generations. However, to optimize the solution as well as the time, an additional check was created which assessed the similarity of the fitness function across the generations to either proceed with the next generation or to terminate the algorithm.

## 4.2 Fitness function and Selection

The reliability of a chromosome can be tested using the fitness function which compares the variance of the predicted and experimental results. The chromosomes must pass through the fitness function sequentially to evaluate their variance. The energy dissipated at the end of each cycle of the lateral loading was estimated from the hysteresis curves of the experiment and simulation and the mean square error (MSE) between the two was computed as the fitness function. The adopted fitness function is defined as follows:

$$\:{fitness}_{i}=\:\frac{1}{n}{\left({E}_{sim}^{i}-{E}_{exp}^{i}\right)}^{2}$$

2

Where \(\:\varvec{n}\:\)represents the total number of displacement cycles in the loading protocol, \(\:{\varvec{E}}_{\varvec{s}\varvec{i}\varvec{m}}^{\varvec{i}}\) and \(\:{\varvec{E}}_{\varvec{e}\varvec{x}\varvec{p}}^{\varvec{i}}\) are the cumulative energy dissipated at the end of \(\:{\varvec{i}}^{\varvec{t}\varvec{h}}\) cycle in the simulation and experiment respectively. As the fitness function represents the error or the variance between the simulated and experimental results, a lower value of fitness would indicate a more reliable model and the corresponding chromosomes are selected and passed on to the next generation.

The Genetic Algorithm replicates the best chromosomes (lower fitness) identified from the fitness function in a particular generation. The available chromosomes in a particular generation are phased into a roulette wheel based on the fitness function and is used to locate and identify the better performing chromosomes. This methodology was employed for its simplicity.

## 4.3 Crossover and Mutation

To further assess the reliability of the best fit chromosomes and to optimize their values, a random pair of chromosomes (variables) from the roulette wheel are swapped in their locations creating two new individuals. Following the cross-over process, another operation randomly mutates the values of one of the variables and produces a new chromosome. This process prevents any impetuous convergence of the solution to local optimum values rather than converging to the true optimal solution. In this article the variable to be mutated is selected by a random number generation within the total number of variables in a chromosome.

## 4.4 Termination

In each generation the chromosome having the least variance (fitness) is stored into a global variable and the algorithm automatically exits after executing the methodology for a fixed number of generations in the traditional GA method. However, since each generation requires at the least eight independent simulations in *OpenSees*, running the algorithm for a fixed number of generations is computationally expensive and ineffective especially if the methodology converges to the optimal solution within a few generations. Hence an appropriate terminal rule was established which assessed the difference in the fitness values across subsequent generations. A threshold was established for this variance, and once this threshold is reached, the GA terminates its operation without needing to iterate through the entire population. Figure 6 shows that the fitness function plateaus after 3 generations rendering subsequent runs of simulations unnecessary.