1. Introduction
Retaining walls are structures widely used in engineering for supporting soil laterally. The design of these walls is a problem of interaction between the soil and the structure to retain a material safely and economically. When the height of a cantilever wall becomes important, the volume of concrete required begins to be considerable. From a height of 8–10 m, buttressed walls economize its design. The design of these structures is mainly carried out following rules very much linked to the experience of structural engineers [
1]. If the initial design dimensions or material qualities are inadequate, the structure is redefined. With this procedure of trial and error, the different designs obtained do not go beyond a few tests. This process leads to a safe, but not necessarily economic, design [
2]. Structural optimization methods have clear advantages over experiencebased design.
Presently, the optimum design of reinforced concrete (RC) structures constitutes a relevant line of research. In practical structural optimization problems, the variables used must be discrete, so they are combinatorial optimization problems. However, combinatorial problems are found in a large number of real problems such as allocation resources [
3,
4], logistics [
5], transport [
6], routing problems [
7,
8], scheduling problems [
6,
9], and engineering design projects [
10,
11], among others. These problems present a space of solutions that grows exponentially with the variables used, so the metaheuristics, which were inspired by natural phenomena for continuous spaces, are a good approach to obtain optimum solutions to engineering problems. However, two important characteristics of metaheuristics, intensification and diversification, must be preserved to design discrete versions of these algorithms.
While structural optimization began by minimizing the weight or cost of structures [
12,
13], other objective functions related to the social, Reference [
14] and environmental sustainability of structures [
15] throughout their entire life cycle have subsequently been incorporated. Reducing the carbon footprint of RC structures is currently investigated as an optimization target. In particular, a hybrid multistart optimization strategic method based on a variable neighborhood search threshold acceptance strategy [
16] was used to reduce the cost and carbonemissions in cantilever retaining walls. A hybrid harmony search together with a threshold acceptance strategy [
17,
18], the black hole algorithm [
17] and a hybrid kmeans cuckoo search algorithms [
10] were applied to minimize both the economic cost and the CO
${}_{2}$ emissions in counterfort retaining walls. A CO
${}_{2}$ and cost analysis in precast–prestressed concrete road bridges was developed in [
15]. In [
14], the importance of the criteria that define social sustainability was analyzed. These criteria considered the complete life of infrastructure. The social sustainability of infrastructure projects was tackled in [
14] using Bayesian methods. In recent works [
19,
20], different metaheuristics algorithms were used for optimal design of RC retaining walls. The life cycle assessment of earthretaining walls was analyzed in [
21,
22].
A strategy that reinforces the results obtained by the metaheuristics has been the hybridization with techniques that deeply modify their way of working. Hybridization is carried out in different ways, the most important of which are: (i) mathematics, integrating mathematical programming and metaheuristics [
23], (ii) hybrid heuristics, combining different metaheuristics [
24], (iii) symmetrical heuristics, where simulation and metaheuristics are combined [
25], and (iv) hybridization between metaheuristics and machine learning.
In this article, we used an emerging line of research that integrates the areas of machine learning and metaheuristic algorithms with the goal of tackle the design of reinforced earth retaining walls problem. This problem presents important challenges in computational complexity since it involves 32 design variables, therefore we have on the order of ${10}^{20}$ possible combinations. Therefore, it is interesting to understand how these types of hybrid techniques perform in this problem, in addition to comparing these ones with the stateoftheart solutions that addressed the design of this type of walls.
The proposed hybrid algorithm uses a machine learning algorithm in a discrete operator that allows continuous metaheuristics to tackle combinatorial optimization problems. In this way, a combinatorial optimization problem, such as the buttressed wall design, can be addressed. The contributions of this work are as follows:
A hybrid Particle Swarm Optimization (PSO) based on a dbscan clustering technique is proposed. The dbscan is very effective in binary combinatorial problems [
6,
10]. PSO is often used to solve continuous optimization problems and its tuning is very simple.
The contribution of the dbscan in the discretization process was studied through a random operator. In addition, the discretization performed by dbscan was compared with methods using kmeans [
5,
26].
The proposed algorithm is applied to obtain lowcarbon, lowcost counterfort wall designs. This hybrid algorithm is compared with an efficient algorithm adapted from the harmony search (HS) proposed in [
18].
The rest of this paper is structured as follows: in
Section 2 we develop a stateoftheart of hybridizing metaheuristics with machine learning; in
Section 3 we define the optimization problem, the variables involved, and the restrictions; then in
Section 4 we detail the discrete dbscan algorithm; we move on with the experiments and results obtained in
Section 5; and conclude with
Section 6 in which we summarize the conclusions and new lines of research.
2. Hybridizing Metaheuristics with Machine Learning
Metaheuristics is a broad collection of incomplete optimization techniques inspired by some realworld phenomenon in nature or in the behavior of living beings [
27,
28]. The objective is to solve problems of high computational complexity in a reasonable execution time so that its optimization mechanism is not significantly affected when the problem to be solved is altered. Then again, the set of techniques capable of learning from a database are the socalled machine learning algorithms [
29]. Depending on the learning mode, these techniques are divided into learning by reinforcement, supervised learning, and unsupervised learning. It is common for these algorithms to be used in a wide range of problems such as regression, dimensionality reduction, transformation, classification, time series or anomaly detection and computer vision problems.
The integration of the machine learning techniques with the metaheuristic algorithms can be done basically with two approaches [
30]. Either machine learning techniques are used to increase the quality of the solutions and the convergence rates obtained by metaheuristics, or metaheuristic are used to enhance the performance of machine learning techniques [
30]. However, metaheuristics often improves the efficiency of an optimization problem concerning machine learning. Based on the work of [
30], we propose an extension of the scheme of techniques in which metaheuristics and machine learning are combined (
Figure 1).
Machine learning can be used as a metamodel to determine from a set of metaheuristics the best one for each instance. In addition, specific machine learning operators can also be embedded into a metaheuristic, resulting in three different groups of techniques: hyperheuristics, algorithm selection, and cooperative strategies [
30].
If we automate the design and tuning of metaheuristics to solve a large number of problems, we obtain the socalled hyperheuristics. The aim of the cooperation strategies is to obtain methods that are more robust by combining the algorithms in a parallel or sequential way. The cooperation mechanism can share the whole solution, or only a part of it. In [
31], a multiobjective optimization of an aerogel glazing system through a surrogate model driven by the crossentropy function was developed with the implementation of the supervised machinelearning method. In [
32] the multilevel thresholding image segmentationbased hyperheuristic method was addressed. Finally, in [
33] an agentbased distributed framework was proposed to solve the problem of permutation flow stores, and in which each agent is implementing a different metaheuristic.
On the other hand, there are operators that allow enhancing the performance of a metaheuristic integrating machine learning operators. Initialization, population management, solution disruption, binaryization, local search operators and parameter setting and are examples of such operators [
30]. Binary operators using unsupervised learning techniques can be integrated into metaheuristics that operate in continuous spaces to perform the binarization process [
6]. In [
34], a percentile transitionranking algorithm was proposed as a mechanism to binarize continuous metaheuristics. In [
9], the application of Big Data techniques was applied to improve a cuckoo search binary algorithm. The tuning of the parameters of metaheuristics is another line of research of interest. In [
35], a tuning method was applied on different sized problem sets for the realworld integration and test order problem. In [
36] a semiautomatic approach designs the fuzzy logic rule base to obtain instancespecific parameter values using decision trees. The use of machine learning techniques improves the initiation of solutions, without the need to start it randomly. A clusterbased population initialization framework was proposed in [
37] and applied to differential evolution algorithms. In [
38] a casebased reasoning technique was applied to initiate a genetic algorithm in a weighted circle design problem. To solve an economic dispatch problem, Hopfield neural networks were used to start solutions of a genetic algorithm [
39].
Metaheuristics improve the machine learning algorithms in problems such as feature selection, grouping, classification, feature extraction, among others. Image analysis to identify breast cancer can be enhanced by a genetic algorithm [
40] that improves the performance of the Support Vector Machine (SVM). The medical diagnoses and prognoses were tackled in [
41] combining swarm intelligence metaheuristics with the probabilistic search models of estimation of distribution algorithms. In [
42], the authors used swarm intelligence metaheuristics for the convolution neural network hyperparameters tuning. In [
32], a multiverse optimizer algorithm was used for text documents clustering. An improved normalized mutual information variable selection algorithm for soft sensors in [
43] was used to perform the variable selection and validate error information of artificial neural networks. A dropout regularization method for convolutional neural networks was tackled in [
44] through the use of metaheuristic algorithms. In [
45], a firefly algorithm was combined with the leastsquares support vector machine technique to address geotechnical engineering problems. Metaheuristics contributed to the problems of regression, as is the case with the prediction of the strength of high strength concretes in [
46]. Another example is the integration of artificial neural networks and metaheuristics for improved stock price prediction [
47]. In [
48], proposes a slidingwindow metaheuristic optimization for predicting the share price of construction companies in Taiwan. In [
49], the least squares support vector machine hybridizing a fruit fly algorithms is applied to simulate the nonlinear system of a MEL time series. Metaheuristics also apply to unsupervised learning techniques, such as clustering techniques. For example, in [
50] a metaheuristic optimization was used for a clustering system for dynamic data streams. Metaheuristics have also been integrated into clustering techniques in the search for the centroids that best group the data under a certain metric. A bee colony metaheuristic was used for energy efficient clustering in wireless sensor networks [
51]. In [
52], a clustering search metaheuristic was applied for the capacitated helicopter routing problem. In [
53], a hybridencoding scheme was used to find the optimal number of hidden neurons and connection weights in neutral networks. Four metaheuristicdriven techniques were used in [
44] to determine the dropout probability in convolutional neural networks. In [
54] the bat algorithm and cuckoo search were used to adjust the weights of neural networks. An algorithm was proposed using simulated annealing, differential evolution, and harmony search to optimize convolutional neural networks was proposed in [
55]. In [
56] longterm short memory trained with metaheuristics were applied in healthcare analysis.
In this paper, the study proposes a hybrid algorithm in which the unsupervised dbscan learning technique to obtain binary versions of the PSO optimization algorithm. This hybrid algorithm was used to obtain a sustainable design buttressed walls. Recently, the dbscan binarization algorithm obtained versions of continuous metaheuristics that have been used to solve the set covering problem [
6] and the multidimensional knapsack problem [
10] which are NPhard problems.
4. The dbScan Discrete Algorithm
As a first step, the algorithm generates a set of valid solutions. These solutions are randomly generated. In this procedure, first, it is validated if the solution variables are started. In the case that they are not all started, the variables are started randomly. Once all the variables are generated, the next step is to verify if the solution obtained is valid. In the event that it is not valid, all variables are removed and regenerated. The detail of the initiation procedure is shown in
Figure 5. Subsequently, PSO is used to produce a new solution in the continuous space. The PSO algorithm will be described in
Section 4.1. Subsequently, the dbscan operator is applied to the continuous solution in order to transform continuous movements into groups associates to transition probabilities. The dbscan operator will be detailed in
Section 4.2. After the dbscan operator generates the groups, the discretization operator applies the corresponding transition probability to each group, generating a new discrete solution. The discretization operator is detailed in
Section 4.3. Finally, the new solution is validated and, in case it meets the restrictions, it is compared with the best solution obtained. If the new value is higher, it replaces the current one. The detailed flow chart of the hybrid algorithm is shown in
Figure 6.
4.1. Particle Swarm Optimization
For the proper functioning of the PSO algorithm, the concepts of population that are usually called a swarm, and each of these solutions is called a particle. The essence of the algorithm is that each particle is guided by a combination of the best value particle obtained so far in the search space (maximum global) together with the best result obtained by the particle (local maximum). The optimization process is iterative until some termination condition is met.
Formally let
$f:{\mathbb{R}}^{n}\to \mathbb{R}$ corresponds to the fitness function to be optimized. This function considers a candidate solution that is represented by a vector in
${\mathbb{R}}^{n}$ and generates a real value as output. This obtained value, represents the value of the objective function for the given candidate solution. The goal is to find a solution for which
$f\left(a\right)\le f\left(b\right)$ for all b in the search space, which would mean that a is the global minimum. The algorithm pseudocode is shown in Procedure 1.
Algorithm 1 Particle swarm optimization algorithm 
 1:
Objective function f(s)  2:
Generate initial solutions of n particles.  3:
Get the particle’s best known position to its initial position: ${p}_{i}\leftarrow {s}_{i}$.  4:
if$f\left({p}_{i}\right)<f\left(g\right)$then  5:
Update the swarm’s best known position: $g\leftarrow {p}_{i}$  6:
end if  7:
Initialize the particle’s velocity: ${v}_{i}$  8:
while stop criterion are meet do  9:
for each particle and dimension do  10:
Pick random numbers: ${r}_{p},{r}_{g}$  11:
Update the particle’s velocity: ${v}_{i,d}\leftarrow \omega {v}_{i,d}+{\varphi}_{p}{r}_{p}({p}_{i,d}{s}_{i,d})+{\varphi}_{g}{r}_{g}({g}_{d}{s}_{i,d})$  12:
Update the particle’s position: ${s}_{i}\leftarrow {s}_{i}+{v}_{i}$  13:
end for  14:
if $f\left({s}_{i}\right)$ < $f\left({p}_{i}\right)$ then  15:
Update the particle’s best known position: ${p}_{i}\leftarrow {s}_{i}$.  16:
if $f\left({p}_{i}\right)$ < $f\left(g\right)$ then  17:
Update the swarm’s best known position: ${p}_{i}\leftarrow {s}_{i}$.  18:
end if  19:
end if  20:
end while

4.2. dbScan Operator
The solutions resulting from the execution of the PSO algorithm are grouped by the dbscan operator. We should note that the dbscan operator can be applied to any swarm intelligence continuous metaheuristics. The spatial clustering technique based on noise density of applications (dbscan), requires for the clustering, a set of points S within a vector space, and a metric, usually, the metric is the Euclidean. Dbscan groups the points of S that meet a minimum density criterion. The rest of the points are considered outliers. As input parameters dbscan requires a radius $\u03f5$ and the minimum number of neighbors $\delta $. The main steps of the algorithm are shown below:
Find the points in the $\u03f5$ neighborhood of every point and identify the core points with more than $\delta $ neighbors.
Find the connected components of core points on the neighbor graph, ignoring all noncore points.
Assign each noncore point to a nearby cluster if the cluster is an $\u03f5$ neighbor; otherwise, assign it to noise.
In the dbscan (dbscanOp) operator, the dbscan grouping technique is used to make groups of points to which we will assign a probability of transition. This probability of transition will subsequently allow the discretization operator to discretize continuous solutions. The grouping proposal uses the movements obtained by PSO in each dimension for all the particles. Suppose
$s\left(t\right)$ is a solution in iteration t, then
${\Delta}^{i}\left(s\left(t\right)\right)$ represents the magnitude of the offset
$\Delta \left(s\right(t\left)\right)$ in the ith position, considering the iterations
t and
$t+1$. After all the displacements were obtained, the grouping is carried out. To obtain the groups, the displacement module will be used, which is denoted by
${\Delta}^{i}\left(s\left(t\right)\right)$. This grouping is done using the dbscan technique. Finally, a generic function
${P}_{tr}$ is used, which is shown in Equation (
2) with the objective of assigning a probability of transition to each group and therefore to each displacement.
Then using the function
${P}_{tr}$, a probability is assigned to each group obtained from the clustering process. In this article, we use the linear function given in Equation (
2), where Clust (
${x}^{i}$) indicates the location of the group to which
${\Delta}^{i}\left(s\right)$ belongs. The coefficient
$\alpha $ represents the initial transition coefficient and
$\beta $ models the transition separation for the different groups. Both parameters must be estimated. The pseudocode of the discretization procedure is shown in Algorithm 2.
where
x represents the value of
$Clust\left({s}^{i}\right)$. Also, because
${s}^{i}\in Clust\left({s}^{i}\right)$, each element of
$Clust\left({s}^{i}\right)$, is assigned the same value
${P}_{tr}$. That is,
${P}_{tr}\left({s}^{i}\right)={P}_{tr}\left(Clust\left({s}^{i}\right)\right)$. On the other hand,
$\gamma =\alpha \ast \beta $ are constants that will be determined in the tuning of parameters, where
$\alpha $ corresponds to the initial transition coefficient and
$\beta $ represents the transition probability coefficient.
Algorithm 2 dbscan operator 
 1:
Function dbscanOp($ls\left(t\right)$,$ls(t+1)$)  2:
Input$s\left(t\right)$, $s(t+1)$  3:
Output lTransitionProbability$(t+1)$  4:
$l{\Delta}^{i}\left(s(t+1)\right)\leftarrow $ getDelta($ls\left(t\right)$, $ls(t+1)$)  5:
$Clust\leftarrow $ getClusters($l{\Delta}^{i}\left(s\left(t\right)\right)$)  6:
lTransitionProbability $(t+1)$← getTranProb( $Clust$, $ls\left(t\right)$)–Equation ( 2)  7:
return (lTransitionProbability$(t+1)$)

4.3. Discretization Operator
The discretization operator receives the list lTransitionProbability
$(t+1)$. This list contains the values of the transition probabilities which were the result delivered by the dbscan operator. Then given a solution
$s\left(t\right)\in ls\left(t\right)$, we select each of its components
${s}^{i}\left(t\right)$ and we proceed to determine through the transition probability if this component should be modified. In the case of large transition probabilities, there is a greater possibility of modification. Then a random number is obtained at [0, 1] and this number is compared with the value of the transition probability assigned to the component. In cases where the modification condition is satisfied, it can increase the value by 1 or decrease it by 1. Finally, the selected value is compared with the best value obtained by the algorithm and remains with the minimum of both. The pseudocode of the discrete procedure is shown in Algorithm 3.
Algorithm 3 Discretization operator. 
 1:
Function DiscOperator(lTransitionProbability$(t+1)$, $ls\left(t\right)$)  2:
Input lTransitionProbability$(t+1)$  3:
Output$s(t+1)$–where $s(t+1)$ is discrete.  4:
movement = 0  5:
for${s}^{i}\in s\left(t\right)\in ls\left(t\right)$do  6:
if ${r}_{1}>0.5$then  7:
movement = 1  8:
else  9:
movement = −1  10:
end if  11:
${s}^{i}$ = max(1,min(${s}_{best}^{i}$,${s}^{i}$+movement))  12:
end for

6. Conclusions
To address the buttressed walls problem, a hybrid algorithm based on the dbscan clustering technique and the PSO optimization algorithm was proposed in this article. This hybridization was necessary because PSO works naturally in continuous spaces and the problem studied is combinatorial. A Dbscan was used as a discretization mechanism. The optimization functions considered were cost and emission of CO${}_{2}$. To measure the robustness of our proposal, three experiments were designed. The first evaluates the performance of the hybrid algorithm with respect to a random operator. Later in the second experiment, the performance was compared with respect to the kmeans clustering technique. Finally, in the last experiment, we studied the performance of the hybrid algorithm when compared to an HS adaptation described in the literature. The first experiment concludes that the dbscan operator contributes to the quality of the solutions, obtaining better values than the random operator, in addition to reducing the dispersion of these. In comparison with kmeans mixed results are obtained, in some cases, kmeans is superior to dbscan and in other dbscan improves the solutions obtained by kmeans. Regarding the dispersion in the different instances, we observed that from height 12 onwards dbscan obtained much smaller dispersions than kmeans. Lastly, in comparison with HS, in general, dbscan surpass HS obtaining better results, especially in the instances where the height was over 12 m.
From the results obtained in this study, several lines of research emerge. The first line is related to population management. In the present work, the population was a static parameter. By analyzing the results generated by the algorithm as it iterates, it is possible to identify regions where search needs to be intensified or regions where further exploration is needed. This would allow for dynamic population management. Another interesting research line is related to the parameters used by the algorithm. According to what is detailed in
Section 5.1, a robust method was used to get the most suitable configuration. However, this configuration is a static one and is not necessarily the best configuration throughout all execution. Proposing a framework that allows adapting the parameters based on the results obtained by the algorithm as it is executed, would allow generating even more robust methods than the current one.