1 Introduction

The plastic analysis of moment frames consists of a set of methods that are used as a tool for studying the nonlinear behavior of frames. For over half a century, the method has created new possibilities for engineers for designing and analyzing nonlinear behavior of structures. In this method, loads are applied to the structure continuously until it reaches the collapse threshold. This method, aiming to calculate the critical load factor of the frame, is called plastic analysis in reference books (Baker et al. 1980; Chen and Sohal 2013; Wong 2011). Since the beginning of the approach, various methods have been proposed, depending on the specific conditions of the problem and existing constraints. The method of combining the elementary mechanisms is one of these methods. Despite the desirability of this method, its deficiency in high-rise structures made the method less attractive for researchers in several years until the achievements in optimization tools and algorithms. The main advantage of this method, beyond its simplicity, is to recognize the structure's failure mode and investigate its nonlinear behavior. The method itself does not have a particular complexity, but with the increase of structural elements, the search space for the critical load factor determination of the structure significantly increases. With the development of a variety of optimization algorithms in recent years, this problem can be solved efficiently without the requirement of complicated calculations.

In the combination of elementary mechanisms, the number of mechanisms that should be considered as elementary mechanisms is usually not limited, which means that these mechanisms increase with increasing of structural elements. Therefore, combining the elementary mechanisms to find the actual collapse mechanism is a tedious and time-consuming practice. This limitation obliges the application of methods that provide the fastest and most accurate answers as quickly as possible. This is where the heuristic and meta-heuristic algorithms can play an important role. At present, optimization tools can be divided into two general categories: the first category consists of mathematical programming that has a long history of optimization, and the second category includes heuristic and meta-heuristic ones that have been located among optimization tools for about three decades.

In the problem of plastic analysis of moment frames, many researchers have applied some of these optimization algorithms over time in order to find the collapse load factors and the corresponding failure mechanisms. Kaveh and Khanlari (2003, 2004), Kaveh and Jahanshahi (2004) and Kohama et al. (1997) presented studies on the determination of collapse load coefficients of planar frames by genetic algorithm. Kaveh and Jahanshahi studied the limited plastic analysis of frames using meta-heuristic algorithms and ant colony system (Kaveh and Jahanshahi 2006, 2008; Jahanshahi and Pouraghajan 2013; Kaveh et al. 2008). Subsequently, Jahanshahi et al. revealed a comparative study on determining the collapse load of planar frames by the neural network, genetic, and ant colony algorithms (Jahanshahi et al. 2017). Greco et al. (2017) studied the seismic collapse of moment frames, introducing a method for simulating seismic conditions, and used SAP2000 software to validate this method. Daryan et al. (2019) also determined the failure mechanisms and collapse loads of steel moment frames using plastic analysis and presented the modified dolphin echolocation algorithm. In the case of braced frames, both design (Lee et al. 2016) and analytical concepts exist in the literature. Saedi Daryan and Palizi (2020) applied the genetic algorithm for the collapse prediction and hinge formation of braced frames by developing the plastic analysis theory of moment frames to the frames containing braces.

Although numerous studies have been carried out on the plastic analysis of moment frames, few considerations for determination of the failure mechanism of braced frames with the help of the plastic analysis theory exist in the literature. There might be some reasons in this regard, including the presence of significant axial and shear forces in the members, which makes it difficult to determine the elementary mechanisms. In this research, a new approach is introduced that can use the same procedure of mechanism combination in moment frames for the frames with bracings. The procedure starts with the elimination of individual bracings, and their axial capacity is replaced in the exact location instead. Then, the axial and shear forces exerted on the other members, including beams and columns, corresponding to the applied load are calculated. For instance, consider a one-bay and three-story frame that contains a bracing in each story. First, the bracing of the first story is omitted and replaced by its capacity load. Then, the axial and shear forces are calculated in each column and beam under that force. Second, the bracing of the second story is omitted and replaced by its ultimate force. The axial and shear force of other members are determined again. The same procedure is applied to the third bracing. Then, the omission of two bracings is considered (bracing one and two, bracing one and three, and bracing two and three). After that, all three bracings omission is examined, as well. Each time, when a case of omission happens, and new axial and shear forces are determined, plastic analysis of the same procedure for moment frames is performed. The difference here is that by applying axial and shear forces to a member, its plastic moment capacity can be reduced. Thus, the plastic analysis procedure is applied to the newly obtained frame. When the method applied to all the above-mentioned cases, the critical state, or the case with the lowest collapse load factor, is selected as the final solution. Consequently, the bracing mechanism effect is taken into account internally. In this research, the process of optimization is performed by the genetic algorithm and is compared by three other algorithms: modified dolphin echolocation, grey wolf, and whale optimization algorithms.

2 Theory

The whole procedure adopted in this research is expressed in three steps as below:

Step 1: Plastic analysis theory and combination of mechanisms methods

In the classic plastic analysis theory of frames, gravity loads are exerted in the middle of the beams as point loads, and the lateral loads are applied on each floor. The possible locations of hinge formation are named critical points (Fig. 1a). Elementary mechanisms in moment frames are beam and floor mechanisms that are also depicted in Fig. 1b, c, respectively. Joint mechanisms, which are the keys to minimizing the load factor, are also depicted in Fig. 1d. In this theory, a work equation is written for each elementary mechanism, and the corresponding load factor is determined. The role of joint mechanisms can be perceived when the elementary mechanisms are combined in order to get a lower load factor in the virtual work equation. By writing the work equation, the collapse load factor is determined as Eq. 1. The external virtual work is determined by multiplying the forces applied to the nodes \((\mathbf{P})\) in the corresponding displacement of those joints for each specific mechanism (Eq. 2). The internal virtual work is also achieved for each mechanism by multiplying the rotations of the plastic hinge (\(\mathbf{r})\) in the plastic moment of the members where the hinges are formed (Eq. 3).

Fig. 1
figure 1

Critical points and hinge formation in possible mechanisms

$${\lambda }_{c}*\left({\it external}\,{\it virtual}\,{\it work}\right)=internal virtual work$$
(1)
$${\it external}\,{\it virtual}\,{\it work}={P}^{T}d$$
(2)
$${\it internal}\, {\it virtual}\, {\it work}={M}_{p}^{T}\left|r\right|$$
(3)

In order to codify the plastic analysis procedure and determine the displacements and rotations automatically, the following procedure is applied.

First, the compatibility matrix (C) should be formed. Each unrestrained joint has a horizontal and vertical movement degree of freedom. The compatibility matrix is written based on the length variation of members in the local coordinates and then is converted to the global coordinates by assembling them. As shown in Fig. 2, \((\mathbf{d})\) is a vector that expresses the displacements of the joints and \((\mathrm{e})\) is the changes in the length of each member in the defined degrees of freedom. Referring to Fig. 2, the change in the length of each element can be determined in the form of Eq. 5. By converting the length variation into global coordinates, the compatibility matrix \((\mathbf{C})\) is concluded. Due to the assumption of the plastic analysis that the elements do not elongate, Eq. 6 needs to be solved by applying the Gaussian elimination on the matric (C). Now, the independent and dependent displacements can be divided and written in Eq. 7 format in terms of the identity matrix (I). Thus, \(({\mathbf{d}}^{\mathbf{i}})\) which indicates the independent displacements, can be written in terms of \(({\mathbf{d}}^{\mathbf{d}})\), or the dependent displacements as Eq. 8.

Fig. 2
figure 2

Details of an element in the global space

$$Cd=e$$
(4)
$$e=\left({d}_{xj}-{d}_{xi}\right)cos\alpha +\left({d}_{yj}-{d}_{yi}\right)sin\alpha$$
(5)
$$Cd=0$$
(6)
$$\left[I|{C}_{d}\right]\left\{\frac{{d}^{i}}{{d}^{d}}\right\}=\left\{\frac{0}{0}\right\}$$
(7)
$${d}^{i}=-{C}^{d}{d}^{d}$$
(8)

After coding the plastic analysis procedure and determining the displacements and rotations due to elementary mechanisms, it is time to combine them and try to obtain the mechanism that includes the minimum load factor. This is the critical load factor, and its corresponding failure mechanism is called the critical failure mechanism of the frame. It is clear that this procedure noticeably increases by increasing the size of the structure; the more the elementary mechanisms, the more possibilities of combinations. Performing this procedure is a time-consuming and demanding task that even the coded format takes a significant computational effort. This is where the optimization algorithms can be helpful while the search space increases. These algorithm's role is to solve these types of problems. In this research, four optimization algorithms are utilized to solve the problem, and then the results are compared. These algorithms include the genetic algorithm (GA) (Man et al. 1996), modified dolphin echolocation (MDE) (Daryan et al. 2019), grey wolf optimization (GWO) (Mirjalili et al. 2014), and whale optimization algorithms (WOA) (Mirjalili and Lewis 2016). In Sect. 3, a summary of these algorithms is stated. For detailed explanations, one can refer to the corresponding papers.

Step 2: Modifying the moment frames procedure for braced frames

In the plastic analysis theory of moment frames, beam and floor as two independent mechanisms are supposed to be combined to find the critical collapse load factor. In a braced frame, one possibility might be the consideration of another elementary mechanism for bracings, but the problem here is that by considering the brace mechanism, no hinges removal occurs when combining other mechanisms with them. Hence, no reduction of load factor happens, and the process of combination is worthless. In order to solve this issue, instead of considering an independent mechanism, each bracing is eliminated individually. Then, the ultimate tensile limit load is replaced instead. Due to this force, axial and shear forces are created in other members. The existence of these forces leads to a decrease in moment plastic capacity of each member (Chen and Sohal 2013; Wong 2011). By applying the brace forces individually and finding the reduction in the plastic capacity of the members, several new frames are derived on which the plastic analysis should be performed. For example, for a frame of one span and two floors containing a tension brace on each floor, the plastic analysis should be done in four cases. The first case is when neither of the two braces is yielded. The second and third cases are considered when the first and second floor’s brace is eliminated individually, and the fourth case is related to the removal of both braces. In each case, different axial and shear forces are exerted on the members; therefore, the reduced plastic capacity in the members is different for each case. For each structure, the plastic analysis is performed, and a minimum load factor is determined, which indicates the critical mechanism in that structure. Among these minimum load factors of each frame, the minimum one is revealed as the critical load factor of the real structure. The correspondent frame of the critical load factor demonstrates which bracing contributes to the final collapse mechanism. This operation can be done with the aid of optimization algorithms. These algorithms are adopted when the elementary mechanisms are combined since the search space increases dramatically as the spans and floors of the structure increases.

The proposed procedure covers all possible mechanisms for a multi-story frame, except the one that is related to the case when the single mechanism of the brace is critical. Although this particular mechanism rarely happens, in order to generalize this method, an attempt has been made to cover this case as well. Thus, the work equation for the sole mechanism of the yielding brace is determined, and the collapse load factor is calculated using the Eq. 9. In this equation, \(\mathrm{A}\) is the cross-section of the brace, \({\mathrm{F}}_{\mathrm{y}}\) is the steel yield stress, and \(\uplambda\) is the load factor (see Fig. 3).

Fig. 3
figure 3

Figure correspondent to Eq. 9

$$\uplambda V.\Delta =\left(A.{F}_{y}.sin\alpha \right).\Delta$$
(9)

Step 3: How to apply the reduction of plastic moment capacity

After removing each brace, the ultimate tensile yield force of the brace is replaced instead. Figure 4 shows how this force is applied. This force results in axial and shear forces in other members, i.e., beams and columns. Thus, there is a reduction in the plastic moment capacity of those members. In order to find this reduction, many solutions exist in the literature (Chen and Sohal 2013; Wong 2011). The interaction relation is mostly adopted for this purpose. Equation 10 for the H sections is presented with the assumption of the stress distribution of Fig. 5.

Fig. 4
figure 4

Application of tensile yield limit force

Fig. 5
figure 5

Stress distribution in the section

$${M}_{pc}={\sigma }_{y}b{t}_{f}{d}_{f}+ \sigma {t}_{w}\left(\frac{{d}_{w}^{2}}{4}-{y}_{0}^{2}\right)$$
(10)

In Eq. 10, \(({\mathrm{M}}_{\mathrm{p}\mathrm{c}})\) is the reduced plastic flexural capacity, \(({\upsigma }_{\mathrm{y}})\) is the yield stress and \((\upsigma )\) is the normal stress of the web, which can be expressed in terms of shear force (\(\mathrm{V}\)) using \((\uptau =\frac{\mathrm{V}}{{\mathrm{t}}_{\mathrm{w}}{\mathrm{d}}_{\mathrm{w}}})\) and the Von Mises relationship (\({\upsigma }^{2}+3{\uptau }^{2}\le {\upsigma }_{\mathrm{y}}^{2}\)). \(({\mathrm{y}}_{0})\) can also be related to the axial force \((\mathrm{P})\) with the equation \((\mathrm{P}=2{\mathrm{t}}_{\mathrm{w}}{\mathrm{y}}_{0}\upsigma )\).

The coding procedure is implemented in Matlab software. This code can remove each brace and replace it with the corresponding ultimate force. Then, the new frames are determined, and the plastic analysis is performed by the employment of optimization algorithms. A concise explanation of all four algorithms is presented in the next section.

3 Optimization Algorithms

3.1 Genetic Algorithm (GA)

The genetic algorithm is one of the first-offered algorithms for optimization and has been applied extensively in engineering problems. In the genetic algorithm, better-fit genes have a higher likelihood of survival and pairing with other survivors to construct new generations. Individuals produced from generation to generation have this feature that inherits the positive aspects of their parents and eliminate weaker ones. These algorithms are used to select the appropriate elementary mechanisms for the combination process.

Chromosomes are strings of binary bits whose number of bits is considered to be the number of independent mechanisms. Number 1 for each bit indicates that its corresponding mechanism is involved in the combination of mechanisms, and 0 means that it is not involved.

Crossover is an operation in which two strings are cut and produce new strings. A cut limit with an equal probability \({(\mathrm{P}}_{\mathrm{c}})\) between the first bit and the last bit of strings must be selected.

Mutation is the random change of a randomly-selected bit from zero to one and vice versa. To begin the search for the minimum load factor, an early generation is produced arbitrarily, and a genetic operation is performed on it. The best-fit ones are copied to the new generation, and the same process is repeated over and over, so that a reasonable estimate can be obtained. The best-fit criterion is the result of the evaluation of a function called fitness or cost function, which its goal here is to minimize the load factor of the work equation (Kaveh and Jahanshahi 2008).

3.2 Modified Dolphin Echolocation Algorithm (MDE)

The main steps of dolphin echolocation for discrete optimization are as follows:

  1. 1.

    Initiate (NL) locations for a dolphin randomly.

  2. 2.

    Calculate the (PP) of the loop using Eq. 11.

    $${PP(L}_{i})={PP}_{1}+(1-{PP}_{1})\frac{{L}_{i}^{Power}}{{(Loops Number)}^{Power}-1}$$
    (11)

    Changes in (PP) in an optimization with 200 numbers of loops is presented in Fig. 6 by altering the power in the above equation.

    Fig. 6
    figure 6

    Graphs related to Eq. 11

  3. 3.

    Calculate the fitness of each location. Fitness should be defined in a manner that the better answers get higher values. In other words, the optimization goal should be to maximize the fitness or minimize the cost.

  4. 4.

    Distribute fitness of each location to its neighbors according to a symmetric triangular distribution (Fig. 7) or any symmetric distribution (Number of neighbors that are affected is Re).

    Fig. 7
    figure 7

    Triangular distribution of fitness for ith variable of jth location

  5. 5.

    Add all devoted fitnesses to each variable of each location to form accumulative fitness.

  6. 6.

    Add a small value of \((\upvarepsilon )\) to (AF) matrix to avoid local optimization. \((\upvarepsilon )\) should be chosen according to the way the fitness is defined. It is better to be less than or equal to minimum possible fitness.

    $$AF = AF + \varepsilon$$
    (12)
  7. 7.

    Find the best location achieved and set its (AF) to zero.

  8. 8.

    Calculate the probability by normalizing (AF) as:

    $$P_{ij} = \frac{{AF_{ij} }}{{\sum\nolimits_{i = 1}^{{{\text{MaxAj}}}} {AF_{ij} } }}$$
    (13)

    Where (Pij)is the probability of the ith alternative to appear in the jth dimension; (AFij) is the accumulative fitness of the ith alternative to be in the jth dimension; (MaxAj) is the maximum number of alternatives available for the jth dimension.

  9. 9.

    Select (PP (Loopi)) percent of next step locations from best location dimensions. Distribute other values according to (Pij).

  10. 10.

    Repeat steps 2 to 9 for as many times as the Loops Number

The parameters of this algorithm include:

  • A: Number of loops: For each optimization problem, the computation costs increase with increasing number of loops. The number of loops can be determined by sensitivity analysis when high precision is required. For all investigated problems, (NL) is considered to be 20. Additionally, it is the termination criteria in this problem.

  • B: Convergence curve relation: It is recommended to start the work with a linear curve and then use curves that spend more time (more loops). That is, initially start with (Power = 1), which usually yields good results, and then test states with (Power < 1) to control the improvement of the results. Here, for plastic analysis problem, the (Power = 1) is adapted, and good results obtained, so that there were no need to try other curves.

  • C: Effective radius (Re): This parameter should be selected based on the size of the search space. It is usually advisable to select less than 1/4 of the search space. In this problem, it is assumed zero for convenience in this problem.

  • D: Number of Positions (NL): This parameter is the same as the population size in the genetic algorithm, which should be selected logically. The amount used for these problems is 5 for the second example, and 10 for the third one. It is worth mentioning that increasing this amount irrationally will lead to unnecessary calculation process.

  • E: It is rational to dedicate a number more than 50 for the probability of success in the first loop for a binary problem as there are just two options (0 or 1). Thus, (PP1) in Eq. 11 is considered 60.

  • F: Fitness Function: As mentioned in the context, the goal of plastic analysis theory in combination of mechanisms method is to minimize the load factor by combining the elementary mechanisms. Thus, the fitness function here is Eq. 1.

3.3 Grey Wolf Optimization Algorithm (GWO)

Grey wolves are hunters who are more likely to live in herds. The average population of the herd is 5 to 12 members. Their main behavioral feature is that they have a socially dominant ranking according to Fig. 8.

Fig. 8
figure 8

Social Rating of wolves (Mirjalili et al. 2014)

Leaders in a group of a woman and a man are called Alpha, who are often responsible for making decisions about hunting, sleeping, waking up, and so on. Alpha’s decisions are dictated to the group. The second rank of wolves is called Beta. Beta wolves are under the Alpha’s commands, which help Alpha in decision-making and other group activities. Beta wolves can be males or females and are the best alternatives to Alpha wolves when they die or become too old. The lowest wolf numbers are Omega. They have to obey other wolves and are the last members allowed to eat. If a wolf were not Alpha, Beta or Omega, this wolf would be called under the command or the Delta. Delta wolves must obey Alpha and Beta, but they are superior to Omega. Scouts, guards, aged wolves, predators, and supervisors belong to this group. In addition to social wolf ranking, group hunting is another exciting behavior of grey wolves. The main phases of their hunting are as follows:

  • Tracking, chasing and approaching the prey.

  • Following, besieging and harassing the prey until it stops.

  • Attack toward the prey.

In the grey wolf algorithm, this hunting method is modeled mathematically for optimization purposes. In this algorithm, the best answer is defined as the Alpha, the second and third best answers are also defined as Beta and Delta, respectively, and the rest of the responses are assumed to be Omega. Hunting is usually conducted by Alpha, although Beta and Delta occasionally participate in hunting. For mathematical simulation, it is assumed that Alpha (the best response candidate), Beta, and Delta have better information about the position of the prey. Therefore, the first three responses are stored and oblige other members (including Omega) to update their position according to the position of the best answer.

In summary, the search process begins by creating a random population of wolves in the algorithm. During the repetition process, Alpha, Beta, and Delta guess the probable position of the prey, and then each response candidate updates its distance from the prey. The relations correspondent to this algorithm are described as following:

$$\overrightarrow{D}=\left|\overrightarrow{C}.{\overrightarrow{X}}_{p}\left(t\right)-\overrightarrow{X}\left(t\right)\right|$$
(14)
$$\overrightarrow{X}\left(t+1\right)={\overrightarrow{X}}_{p}\left(t\right)-\overrightarrow{A}.\overrightarrow{D}$$
(15)
$$\overrightarrow{A}=2\overrightarrow{a}.{\overrightarrow{r}}_{1}-\overrightarrow{a}$$
(16)
$$\overrightarrow{C}=2.{\overrightarrow{r}}_{2}$$
(17)
$${\overrightarrow{D}}_{\alpha }=\left|{\overrightarrow{C}}_{1}.{\overrightarrow{X}}_{\alpha }-\overrightarrow{X}\right|, {\overrightarrow{D}}_{\beta }=\left|{\overrightarrow{C}}_{3}.{\overrightarrow{X}}_{\beta }-\overrightarrow{X}\right|, {\overrightarrow{D}}_{\delta }=\left|{\overrightarrow{C}}_{3}.{\overrightarrow{X}}_{\delta }-\overrightarrow{X}\right|$$
(18)
$${\overrightarrow{X}}_{1}={\overrightarrow{X}}_{\alpha }-{\overrightarrow{A}}_{1}.\left({\overrightarrow{D}}_{\alpha }\right), {\overrightarrow{X}}_{2}={\overrightarrow{X}}_{\beta }-{\overrightarrow{A}}_{2}.\left({\overrightarrow{D}}_{\beta }\right), {\overrightarrow{X}}_{3}={\overrightarrow{X}}_{\delta }-{\overrightarrow{A}}_{3}.({\overrightarrow{D}}_{\delta })$$
(19)
$$\overrightarrow{X}\left(t+1\right)=\frac{{\overrightarrow{X}}_{1}+{\overrightarrow{X}}_{2}+{\overrightarrow{X}}_{3}}{3}$$
(20)

In these relations (t) expresses the current repetition number, \((\overrightarrow{\mathbf{A}})\) and \((\overrightarrow{\mathbf{C}})\) are the coefficient vector, \({(\overrightarrow{\mathbf{X}}}_{\mathbf{p}})\) is the position of the prey vector, and \((\overrightarrow{\mathbf{X}})\) is also the position of the grey wolf vector. The vectors (A) and (C) are obtained as Eqs. 16 and 17, in which the component (a) decreases linearly from 2 to 0 during the repetition stages. \(({\overrightarrow{\mathbf{r}}}_{1})\) and \(({\overrightarrow{\mathbf{r}}}_{2})\) are random vectors in the range of [0, 1]. In Eq. 20, the wolves’ position is updated. In fact, Alpha, Beta, and Delta assume the position of the prey, and other wolves update their position randomly around the prey. Regarding the cases mentioned in the grey wolf algorithm, only two parameters (a) and (C) must be set. This ease of operation with the algorithm is one of the capabilities of most of the meta-heuristic algorithms.

3.4 Whale Optimization Algorithm (WOA)

The whales are the largest mammals in the world and are mainly considered as hunters. One of the largest species of them is called humpback whale, which has dimensions as much as a school bus, and their prey is small snails and groups of small fish. The most interesting fact about these whales is their hunting method. It has been observed that the search for prey is done by creating numerous bubbles in circles similar to the number 9. This behavior has been modeled mathematically for optimization problems.

Humpback whales can detect the position of the prey and surround them. Since the position of the optimal design is not known yet, the WOA assumes that the best response candidate is the target prey, or it is close to optimal response. Once the best agent is defined, agents try to update their position toward the best agent. The following relationships represent this behavior.

$$\overrightarrow{D}=\left|\overrightarrow{C}.\overrightarrow{{X}^{*}}\left(t\right)-\overrightarrow{X}\left(t\right)\right|$$
(21)
$$\overrightarrow{X}\left(t+1\right)=\overrightarrow{{X}^{*}}\left(t\right)-\overrightarrow{A}.\overrightarrow{D}$$
(22)

where (t) is the current repetition number, \((\overrightarrow{\mathbf{A}})\) and \((\overrightarrow{\mathbf{C}})\) are coefficient vectors, \((\overrightarrow{{\mathbf{X}}^{\mathbf{*}}})\) is the position vector of the best answer already obtained, and \((\overrightarrow{\mathrm{X}})\) is the location vector. In addition, if there is a better response, \((\overrightarrow{{\mathbf{X}}^{\mathbf{*}}})\) should be updated at each repetition. The vectors (A) and (C) are also computable as follows:

$$\overrightarrow{A}=2\overrightarrow{a}.\overrightarrow{r}-\overrightarrow{a}$$
(23)
$$\overrightarrow{C}=2.\overrightarrow{r}$$
(24)

In these relations, \((\overrightarrow{\mathbf{a}})\) decreases linearly from 2 to zero during repetitions, and \((\overrightarrow{\mathbf{r}})\) is a random vector in the range of [0, 1]. In order to model the bubble creating behavior, two approaches are designed as follows:

  1. (a)

    Contracting surrender mechanism: This behavior is obtained by reducing the value of \((\overrightarrow{\mathbf{a}})\) in Eq. 17. Note that the variation range of \((\overrightarrow{\mathbf{A}})\) also decreases by \((\overrightarrow{\mathbf{a}})\). In other words, \((\overrightarrow{\mathbf{A}})\) is a random value in the range [− a, a], in which \((\overrightarrow{\mathbf{a}})\) decreases from 2 to 0 during the repetition process. By assigning random values of \((\overrightarrow{\mathbf{A}})\) in [− 1, 1], the new agent position is determined anywhere between the main position of the agent and the position of the best current agent.

  2. (b)

    Updating the position as spirals: This approach first calculates the distance between the whale at the point (X, Y), and the prey that is calculated at the point (\({\mathrm{X}}^{\mathrm{*}}\),\({\mathrm{Y}}^{\mathrm{*}}\)). A spiral relationship between the position of the whale and the prey is determined to simulate the spiral mode of the humpbacked whales as follows:

    $$\overrightarrow{X}\left(t+1\right)=\overrightarrow{{D}^{^{\prime}}. }{e}^{bl}.\mathit{cos}\left(2\pi l\right)+\overrightarrow{{X}^{*}}\left(t\right)$$
    (25)

In this equation, \(\overrightarrow{{D}^{^{\prime}}}=|\overrightarrow{{{\varvec{X}}}^{\boldsymbol{*}}}\left(t\right)-\overrightarrow{{\varvec{X}}}\left(t\right)|\) and represents the distance between the i whale and the prey (the best answer so far), (b) is constant for determining the shape of the logarithmic spiral and (l) is a random number in the range [− 1, 1].

Based on variations of \((\overrightarrow{\mathbf{A}})\), a similar approach can be used to search for the prey. In fact, the whales perform a search according to the location of each other randomly. Thus, for \((\overrightarrow{\mathbf{A}})\), random values greater than (1) and smaller than (− 1) are considered to force agents to move away of the reference whale. Unlike the previous state, the agent location is selected randomly rather than the selection of the best agent already obtained. This mechanism, and \((\overrightarrow{\left|{\varvec{A}}\right|}>1)\), allows the algorithm to perform a global search. Its mathematical model is expressed as follows:

$$\overrightarrow{D}=\left|\overrightarrow{C}.\overrightarrow{{X}_{rand}}-\overrightarrow{X}\right|$$
(26)
$$\overrightarrow{X}\left(t+1\right)={X}_{rand}-\overrightarrow{A}.\overrightarrow{D}$$
(27)

In these equations \(({\mathbf{X}}_{\mathbf{r}\mathbf{a}\mathbf{n}\mathbf{d}})\) is the random position vector that is selected from the existing population.

The WOA algorithm begins with a set of random responses. In each repetition, the agents update their position either with regard to agents selected as random or based on the best obtained answer. The parameter (a) decreases from 2 to 0. A random agent is selected when \((\overrightarrow{\left|\mathbf{A}\right|}>1)\), while the best answer is chosen when \((\overrightarrow{\left|\mathbf{A}\right|}<1)\). Depending on the value of (p), the algorithm is able to move between any spiral or circular movement. Finally, the WOA algorithm terminates with the satisfaction of the termination criteria.

Theoretically, the WOA algorithm can be considered as a global optimizer, since the mechanism described above defines the search space in the neighborhood of the best answer, and allows other agents to extract the best existing response from this range. Moreover, with a decrease of \((\overrightarrow{\mathbf{A}})\), some repetitions are allocated to the inspection phase \((\overrightarrow{|{\varvec{A}}|}\ge 1)\), and the rest are allocated to the extraction phase. Finally, for this algorithm, only two main internal parameters must be set which are (A) and (C).

After explaining the proposed method in Sect. 2, and the procedure of each algorithm in this section, the whole process can be explained as the following steps:

Step 1:

Obtain the frame properties in terms of geometry, plastic capacity, and the location of the braces.

Step 2:

Eliminate braces, and replace their capacity loads on the exact location of their removal.

Step 3:

Generate new frames by considering all possible combinations of brace removal.

Step 4:

Perform the plastic analysis theory of elementary mechanism combination on the newly obtained frames.

Step 5:

Apply the optimization algorithm to investigate the critical load factor and its corresponding failure mode by searching the possible combinations of elementary mechanisms. Note that the concept is the same for all algorithms, but the formulation of the algorithms are different, which are presented in Sect. 3.

Step 6:

Determine the critical load factor of each frame and report the minimum of them.

Step 7:

Decode the derived mechanism to determine which braces contribute to the critical mechanism.

Step 8:

Apply the pushover analysis to verify the proposed method, which is performed for two examples in the following section.

4 Verification

As mentioned in previous sections, validating the proposed method is performed by a static nonlinear pushover analysis. In this analysis, the structure is subjected to gravity, and lateral loadings, which continuously increase until an ultimate condition is reached. This procedure is very similar to the plastic analysis of frames of the elementary mechanism combination method. In pushover analysis, loads increment until the plastic hinge formation leads to the collapse of the structure. However, in the plastic analysis method, a reverse concept is observed. This method provides several failure mechanisms, each time with different hinge formation. Then investigates whether this failure mode satisfies the ultimate conditions or not. This condition is related to the critical load factor of the structure, which must be minimum. Based on this similarity, the pushover analysis is performed for two sample frames in the commercial software Etabs2015.

4.1 Sample One

A single-story and single-span frame is considered as Fig. 9. The sections of the members and their properties are shown in Table 1. This frame includes beam, floor, and brace mechanisms as three elementary mechanisms. The beam and floor mechanisms are similar to those of the moment frame where the brace mechanism is added to. In order to consider the brace mechanism, the yielding of the brace section, which is equivalent to the tensile yield limit force (\(A\times {F}_{y}\)) of the brace section, is applied to the frame according to Fig. 10.

Fig. 9
figure 9

Sample one frame

Table 1 Section properties of the frame sample one
Fig. 10
figure 10

The elementary mechanism of the sample one

By replacing the yield limit force of the brace (\({\mathrm{P}}_{\mathrm{y}}\)) with the brace and obtaining axial and shear forces generated in the beam and the columns, the reduced capacity of the members will be obtained according to step three in Sect. 2 which is shown in Fig. 11. Note that \({\mathrm{M}}_{\mathrm{p}\mathrm{c}}\) is the reduced plastic capacity of the members.

Fig. 11
figure 11

Axial and shear forces and new plastic capacities in the members

By extracting new plastic moment capacities, new frames are obtained and the plastic analysis needs to be performed for each frame. Due to few number of elementary mechanisms for this specific example, without the need for an optimization algorithm, the code is able to obtain the exact collapse mechanism by examining all of these situations. These are all the possible situations of the combination of the mechanisms that are shown in Fig. 12. The corresponding load factor is also written below each one.

Fig. 12
figure 12

Possible situations of the collapse mechanisms in sample frame one

As can be seen, with the help of the plastic analysis theory and by combining the elementary mechanisms together, all possible situations are investigated. The critical collapse mechanism in this example is a mechanism with the lowest load factor (\(\uplambda =2.74\)). In Fig. 13, the results of the standard nonlinear static analysis of this frame in the Etabs2015 software are presented. As can be seen, the results are exactly the same as the ones obtained from the presented MATLAB code. As the structure becomes larger, with the increase in the number of elementary mechanisms, the stated method will actually lose its effectiveness. However, using optimization algorithms, the correct response can be obtained in the shortest possible time. The following two examples will show the application of this algorithm using the stated theory.

Fig. 13
figure 13

The pushover analysis result of sample one

4.2 Sample Two

A larger frame is investigated here. The geometry of the frame, and the properties of the sections are shown in Fig. 14 and Table 2 respectively. By replacing the braces with their yield limit load individually, and obtaining the axial and shear forces for each case, new frames for plastic analysis is investigated. For this example, all possible cases are depicted in Fig. 15. These cases represent the following frames:

  • Frame with no braces being yielded

  • Frame with only the second floor brace being yielded

  • Frame with only the first floor brace being yielded

  • Frame with both the first and the second floor braces being yielded

Fig. 14
figure 14

Sample two frame

Table 2 Section properties of the frame sample two
Fig. 15
figure 15

Studied frames in sample two

The code here is able to calculate the axial and shear forces due to braces removal, and then perform the plastic analysis by utilizing four optimization algorithms described in the previous sections. The actual collapse mechanism of this frame derived from pushover analysis is shown in Fig. 16. By applying GA, MDE, and GWO, this collapse mechanism also achieved. However, WOA presented another collapse mode, depicted in Fig. 17, with a different critical load factor. The convergence diagram of all algorithms is shown in Fig. 18 as well.

Fig. 16
figure 16

The actual, GA, MDE, and GWO collapse mechanism of sample two

Fig. 17
figure 17

The WOA collapse mechanism of sample two

Fig. 18
figure 18

Convergence diagram of sample two in all algorithms

4.3 Sample Three

A five-story, two-span frame is studied here as Fig. 19. The sections are stated in Table 3. This frame is also analyzed by four optimization algorithms. Using the Genetic and Modified Dolphin Echolocation algorithms, and implementing the related code, the collapse mechanism is determined according to Fig. 20. The obtained critical collapse mechanism, which is derived from the code, has a convincing agreement with the response obtained from the pushover analysis (Fig. 21). The only minor difference is observed in a hinge formation in the column of fourth-floor, which was formed in the fifth floor's beam of the Etabs model. This can be considered as an acceptable error, such that had been observed in the classic plastic analysis of moment frames. This frame is also analyzed by two other optimization algorithms: grey wolf, and whale optimization algorithms. This time, the collapse mechanism is derived distinctly different in comparison with the pushover analysis in Etabs2015. The GWO and WOA collapse mechanism is depicted in Fig. 22. The convergence diagram of all algorithms is illustrated in Fig. 23. In order to compare these results together, Table 4 is drawn.

Fig. 19
figure 19

Sample three frame

Table 3 Section properties of the frame sample three
Fig. 20
figure 20

Collapse mechanism obtained from GA and MDE in sample three

Fig. 21
figure 21

Collapse mechanism obtained from static nonlinear pushover analysis in ETABS2015 in sample three

Fig. 22
figure 22

Collapse mechanism obtained from GWO and WOA in sample three

Fig. 23
figure 23

Convergence diagram of sample three in all algorithms

Table 4 Comparison of the results

5 Conclusions

In the present study, a new procedure for plastic analysis of braced frames is introduced by the application of optimization algorithms. The combination of mechanisms method in plastic analysis theory of moment frames is a simple and efficient way for determining the critical load factor and the failure mechanism of a frame. In this way, optimization algorithms facilitate the procedure. Although numerous studies are performed and then developed by various optimization algorithms, few studies are related to the plastic analysis of braced frames. The present research introduced a novel procedure to reach this goal. In this regard, the theory is applied in a single-story and single-span frame, and the result is compared with the manual solution. Hence, the accuracy is verified in the first step before the utilization of the optimization algorithms. In the second step, in order to develop the procedure for the larger frames, the genetic algorithm as the mostly employed optimization algorithm is used for determining the critical collapse mechanism of the frame. The result compared to the pushover analysis in the commercial software Etabs2015. Except for a negligible and, of course, predictable error in one hinge formation in the third example, the results were completely accurate. In the third step, the newly introduced procedure is done by three other optimization algorithms to develop the achieved results.

Modified dolphin echolocation, grey wolf optimization, and the whale optimization algorithms are the applied algorithms. Among the results, MDE showed better results and convergence speed, even better than the GA. While GWO converged to the optimum result pretty fast, an error in the largest frame was observed that might be due to the local optimal point stuck. Nevertheless, WOA results were far from the optimum answer. It seems that this algorithm needs to be modified for binary problems because it has revealed accurate results in other optimization problems.