## 3 Problem Definition and Solution Model
### Definition of the Problem
\[f_{dh}(\mathbf{x})=\sum_{i=1}^{m}\Bigl{(}\sigma_{S,\text{In}\,(S_{a,h})}(T_{i})- \sigma_{T,\text{In}\,(S_{a,h})}(T_{i})\Bigr{)}^{2} \tag{4a}\] \[f_{dv}(\mathbf{x})=\sum_{i=1}^{m}\Bigl{(}\sigma_{S,\text{In}\,(S_{a,v})}(T_{i})- \sigma_{T,\text{In}\,(S_{a,v})}(T_{i})\Bigr{)}^{2} \tag{4b}\]  
As defined earlier, the compatibility of spectral shapes of standard deviations of accelerations are computed (see Equations (4a) and (4b)) using the SSE between the standard deviation of the target (\(\sigma_{T,\text{In}\,(S_{a,h})}(T_{i})\)) and acceleration spectra of selected GM records (\(\sigma_{S,\text{In}\,(S_{a,h})}(T_{i})\)). In these terms, subscript \"\(h\)\" is used to define the horizontal direction, but also computations can be made on the other orientation of GMs, so subscript term \"\(v\)\" reflects the vertical direction. In this study, target standard deviations (e.g., \(\sigma_{T,\text{In}\,(S_{a,h})}\) and \(\sigma_{T,\text{In}\,(S_{a,v})}\)) are obtained from GMPEs, as described earlier. However, these values can be changed by either users or practitioners based on their needs. The assessments of compatibility associated with Equations (3) and (4), which rely on the SSE, must be identified through the calculation of average spectral values of horizontal and vertical GMs. For this reason, the mean horizontal spectrum (\(S_{M,h}(T)\)) and mean vertical spectrum \(S_{M,\varphi}(T)\) of a GM set are formulated by Equation (5a) and Equation (5b), respectively. In the equations, \(n\) is the number of GM records used in the set, \(SV_{j}\) is the scaling value of the \(j\)th horizontal/vertical component (note that the single-scale value is considered in all orientations) in the set, \(S_{aj,h}\) is the acceleration spectrum of the \(j\)th horizontal component, and \(S_{aj,p}\) is the acceleration of the spectrum of the \(j\)th vertical component in the set. In the equations, the mean spectrum or spectra of the individual GMs (e.g., \(S_{M,h}(T),S_{M,\varphi}(T),S_{a,h}(T)\), or \(S_{a,\varphi}(T)\)) can be specified as vectors over the predefined period range [\(T_{min}\), \(T_{max}\)] with equal interval periods and/or m numbers of discrete period values, as in Equations (3) and (4). The scaled GMs, which are the numerator part of Equations (5a) and (5b), are also used to compute the standard deviation of the natural logarithm of spectral accelerations (e.g., \(\sigma_{5,h}\left(S_{a}\right)\)). \[S_{M,h}(T)=\frac{\sum_{j=1}^{n}SV_{j}\times\ S_{aj,h}(T)}{n} \tag{5a}\] \[S_{M,\varphi}(T)=\frac{\sum_{j=1}^{n}SV_{j}\times\ S_{aj,p}(T)}{n} \tag{5b}\]  
Optimization problems frequently include constraints that may be in the form of equalities or inequalities based on the characteristics of the problem. In stochastic optimization methods, penalty functions are typically used to manage these constraints [64]. For this study, the penalty functions related to the selection conditions outlined in Section 2.4 are also specified as functions of \(g_{i}(x)\). Details about the computations behind Equation (2) including both spectral shapes and the application of penalty functions for a compatibility check are clearly sketched in the next section as a figure with proposed model steps. For this reason, penalty functions related to spectral shapes are not given here. In addition to ensuring compatibility with the spectral shape of the GM selection, it is also possible to introduce variety in the selection process by opting for only one horizontal component from any GM record in the set and/or limiting the selection to no more than three GM records originating from the same earthquake event, as previously established [23; 24].