## 1 Introduction
On the contrary, the usage of metaheuristic techniques or evolutionary algorithms allows the best-fit design variables for linear TMDs to be determined, using actual accelerograms as input excitations. In that sense, this study introduces a novel methodology for the optimal design of passive TMDs located at upper levels of high-rise buildings to improve the seismic safety of structures based on the Whale Optimization Algorithm (WOA) [56]. The algorithm is modified to reduce the maximum horizontal peak displacement of the structure, and the root mean square (RMS) response of displacements as well. Moreover, four additional objective functions, derived from multiple weighted linear combinations of these parameters, are also studied in order to obtain the most efficient TMD design configuration. The results from the WOA optimization are compared with the differential evolution method (DEM) [57], whose effectiveness has been demonstrated extensively for TMDs and TMDIs seismic applications in previous works [58; 59], and an exhaustive search (ES) process with precision to two decimal positions. Then, the proposed methodology is applied to a 32-story case-study derived from an actual building structure, and various accelerograms of recorder earthquakes are considered to assess its seismic performance in the linear-elastic range. The results of the study show a large enhancement in the dynamic response of the building controlled by the WOA designed TMDs, achieving reductions in the maximum floor displacements of up to 43%. Finally, an attempt to establish a single set of design parameters for TMDs based on the methodology proposed by [PERSON] and [PERSON] [60] is implemented to verify the robustness of the optimization. Equations of Motion of \(n\)-DOF Building Structures Controlled via TMDs for Seismic Applications  
The equations of motion that govern the behavior of the \(n\)-DOF structural system equipped with a TMD located at the top floor of the building are deduced from the scheme depicted in Figure 1. The displacement at each story-level is represented by \(x_{i}\), while the stiffness, damping, and mass coefficients of each story-level of the building are defined as \(k_{i}\), \(c_{i}\), and \(m_{i}\), respectively. Besides, the TMD action is introduced as an extra DOF represented by \(x_{d}\), while the stiffness, damping, and mass parameters are identified as \(k_{d}\), \(c_{d}\), and \(m_{d}\), respectively. Subsequently, the structural system controlled via TMD can be modeled as a set of \(n+1\) degrees of freedom, whose equation of motion can be expressed as:  
\[\mathbf{M}\ddot{\mathbf{x}}(t)\mathbf{+}\dot{\mathbf{C}}\dot{\mathbf{x}}(t) \mathbf{+}\mathbf{K}\mathbf{x}(t)\mathbf{=}\mathbf{-}\mathbf{M}1\ddot{x}_{g}(t) \tag{1}\]  
where, \(\mathbf{x}(t)\), \(\dot{\mathbf{x}}(t)\), and \(\ddot{\mathbf{x}}(t)\) are the \(n+1\)-order vectors of displacement, velocity, and acceleration of the system; \(\mathbf{1}\) is a unit vector, and \(\ddot{x}_{g}(t)\) denotes the ground acceleration over time. On the other hand, the matrices \(\mathbf{M}\), \(\mathbf{C}\), and \(\mathbf{K}\) represent the mass, damping, and stiffness matrices of the system, which can be expressed as:  
\[\mathbf{M}=\left[ \begin{array}{cccccc}m_{1}&0&0&0&\cdots&\cdots&0\\ 0&m_{2}&0&0&\cdots&\cdots&0\\ 0&0&m_{3}&0&\cdots&\cdots&0\\ \vdots&\vdots&\vdots&\ddots&\cdots&\cdots&\vdots\\ \vdots&\vdots&\vdots&\vdots&m_{n-1}&0&0\\ \vdots&\vdots&\vdots&\vdots&0&m_{n}&0\\ 0&0&\cdots&\cdots&0&0&m_{d}\end{array} \right] \tag{2}\]  
Figure 1: \(n\)-DOF system controlled via TMDs for seismic applications. \[\mathbf{C}=\left[ \begin{array}{cccccccc}c_{1}+c_{2}&-c_{2}&0&0&\cdots&\cdots&0\\ -c_{2}&c_{2}+c_{3}&-c_{3}&0&\cdots&\cdots&0\\ 0&-c_{3}&c_{3}+c_{4}&-c_{4}&\cdots&\cdots&0\\ \vdots&\vdots&\vdots&\ddots&\cdots&\cdots&\vdots\\ \vdots&\vdots&\vdots&-c_{n-1}&c_{n-1}+c_{n}&-c_{n}&0\\ \vdots&\vdots&\vdots&0&-c_{n}&c_{n}+c_{d}&-c_{d}\\ 0&0&\cdots&0&0&-c_{d}&c_{d}\end{array} \right] \tag{3}\]  
\[\mathbf{K}=\left[