Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

3.1 Introduction

This chapter consists of two parts. In the first part, an optimization algorithm based on some principles from physics and mechanics is presented, which is known as the charged system search (CSS) [1]. In this algorithm the governing Coulomb law from electrostatics and the governing laws of motion from the Newtonian mechanics are utilized. CSS is a multi-agent approach in which each agent is a charged particle (CP). CPs can affect each other based on their fitness values and their separation distances. The magnitude of the resultant force is determined by using the electrostatics laws, and the quality of the movement is determined using the governing laws of motion from the Newtonian mechanics. CSS can be utilized in all optimization fields; especially it is suitable for non-smooth or non-convex domains. CSS needs neither the gradient information nor the continuity of the search space.

In the second part, CSS is applied to optimal design of skeletal structures, and high performance of CSS is illustrated [2].

3.2 Charged System Search

3.2.1 Background

3.2.1.1 Electrical Laws

In physics, an electric charge creates an electric field in its surrounding space, which exerts a force on other electrically charged objects. The electric field surrounding a point charge is given by Coulomb’s law. Coulomb confirmed that the electric force between two small charged spheres is proportional to the inverse square of their separation distance. The electric force between charged spheres A and B in Fig. 3.1 causes the spheres to either attract or repel each other, and the resulting motion causes the suspended fiber to twist. Since the restoring torque of the twisted fiber is proportional to the angle through which the fiber rotates, a measurement of this angle provides a quantitative measure of the electric force of attraction or repulsion [3]. Coulomb’s experiments showed that the electric force between two stationary charged particles:

Fig. 3.1
figure 1

Coulomb’s torsion balance, used to establish the inverse-square law for the electric force between two charges [1]

  • Is inversely proportional to the square of the separation distance between the particles and directed along the line joining them

  • Is proportional to the product of the charges q i and q j on the two particles

  • Is attractive if the charges are of opposite sign and repulsive if the charges have the same sign

From the above observations, Coulomb’s law provides the magnitude of the electric force (Coulomb force) between the two point charges [3] as:

$$ {F}_{ij}={k}_e\frac{q_i{q}_j}{r_{ij}^2} $$
(3.1)

where k e is a constant called the Coulomb constant and r ij is the distance between the two charges.

Consider an insulating solid sphere of radius a, which has a uniform volume charge density and carries a total positive charge q i . The electric field E ij at a point outside the sphere is defined as:

$$ {E}_{ij}={k}_e\frac{q_i}{r_{ij}^2} $$
(3.2)

The magnitude of the electric field at a point inside the sphere can be obtained using Gauss’s law. This is expressed as:

$$ {E}_{ij}={k}_e\frac{q_i}{a^3}{r}_{ij} $$
(3.3)

Note that this result shows that \( {E}_{ij}\to 0 \) as \( {r}_{ij}\to 0 \). Therefore, the result eliminates the problem that would exist at \( {r}_{ij}=0 \) if E ij is varied as 1/r 2 ij inside the sphere as it does outside the sphere. That is, if \( {E}_{ij}\propto 1/{r}_{ij}^2 \), the field will be infinite at \( {r}_{ij}=0 \), which is physically impossible. Hence, the electric field inside the sphere varies linearly with r ij . The field outside the sphere is the same as that of a point charge q i located at \( {r}_{ij}=0 \). Also the magnitudes of the electric fields for points inside and outside the sphere coincide when \( {r}_{ij}=a \). A plot of E ij versus r ij is shown in Fig. 3.2, Ref. [3].

Fig. 3.2
figure 2

A plot of E ij versus r ij for a uniformly charged insulating sphere [1]

In order to calculate the equivalent electric field at a point (r j ) due to a group of point charges, the superposition principle is applied to fields which follows directly from the superposition of the electric forces. Thus, the electric field of a group of charges can be expressed as:

$$ {E}_j={\displaystyle \sum_{i=1,i\ne j}^N{E}_{ij}} $$
(3.4)

where N is the total number of charged particles and E ij is equal to:

$$ {E}_{ij}=\left\{\begin{array}{c}\hfill \frac{k_e{q}_i}{a^3}{r}_{ij}\kern1.5em \mathrm{if}\ {r}_{ij}<a\hfill \\ {}\hfill \frac{k_e{q}_i}{r_{ij}^2}\kern2.5em \mathrm{if}\ {r}_{ij}\ge a\hfill \end{array}\right. $$
(3.5)

In order to obtain both the magnitude and direction of the resultant force on a charge q j at position r j due to the electric field of a charge q i at position r i , the full vector form is required which can be expressed as:

$$ {\mathbf{F}}_{ij}={E}_{ij}{q}_j\frac{{\mathbf{r}}_i-{\mathbf{r}}_j}{\left|\left|{\mathbf{r}}_i-{\mathbf{r}}_j\right|\right|} $$
(3.6)

For multiple charged particles, this can be summarized as follows:

$$ {\mathbf{F}}_j={k}_e{q}_j{\displaystyle \sum_{i,i\ne j}\left(\frac{q_i}{a^3}{r}_{ij}\cdot {i}_1+\frac{q_i}{r_{ij}^2}\cdot {i}_2\right)}\frac{{\mathbf{r}}_i-{\mathbf{r}}_j}{\left|\left|{\mathbf{r}}_i-{\mathbf{r}}_j\right|\right|}\kern1em \left\langle \begin{array}{l}{i}_1=1,{i}_2=0\iff {r}_{ij}<a\\ {}{i}_1=0,{i}_2=1\iff {r}_{ij}\ge a\end{array}\right. $$
(3.7)

3.2.1.2 The Governing Laws of Motion from the Newtonian Mechanics

Newtonian mechanics or classical mechanics studies the motion of objects. In the study of motion, the moving object is described as a particle regardless of its size. In general, a particle is a point-like mass having infinitesimal size. The motion of a particle is completely known if the particle’s position in space is known at all times. The displacement of a particle is defined as the change in its position. As a particle moves from an initial position r old to a final position r new , its displacement is given by:

$$ \Delta \mathbf{r}={\mathbf{r}}_{new}-{\mathbf{r}}_{old} $$
(3.8)

The slope of tangent line of the particle position represents the velocity of the particle as:

$$ \mathbf{v}=\frac{{\mathbf{r}}_{new}-{\mathbf{r}}_{old}}{t_{new}-{t}_{old}}=\frac{{\mathbf{r}}_{new}-{\mathbf{r}}_{old}}{\Delta t} $$
(3.9)

When the velocity of a particle changes with time, the particle is said to be accelerated. The acceleration of the particle is defined as the change in the velocity divided by the time interval during which that change has occurred:

$$ \mathbf{a}=\frac{{\mathbf{v}}_{new}-{\mathbf{v}}_{old}}{\Delta t} $$
(3.10)

Using Eqs. (3.8), (3.9), and (3.10), the displacement of any object as a function of time is obtained approximately as:

$$ {\mathbf{r}}_{new}=\frac{1}{2}\mathbf{a}\cdot \Delta {t}^2+{\mathbf{v}}_{old}\cdot \Delta t+{\mathbf{r}}_{old} $$
(3.11)

Another law utilized in this article is Newton’s second law which explains the question of what happens to an object that has a nonzero resultant force acting on it: the acceleration of an object is directly proportional to the net force acting on it and inversely proportional to its mass:

$$ \mathbf{F}=m\cdot \mathbf{a} $$
(3.12)

where m is the mass of the object.

Substituting Eq. (3.12) in Eq. (3.11), we have

$$ {\mathbf{r}}_{new}=\frac{1}{2}\frac{\mathbf{F}}{m}\cdot \Delta {t}^2+{\mathbf{v}}_{old}\cdot \Delta t+{\mathbf{r}}_{old} $$
(3.13)

3.2.2 Presentation of Charged Search System

In this section, a new efficient optimization algorithm is established utilizing the aforementioned physics laws, which is called charged system search (CSS). In the CSS, each solution candidate X i containing a number of decision variables (i.e., X i  = {x i,j }) is considered as a charged particle. The charged particle is affected by the electric fields of the other agents. The magnitude of the resultant force is determined by using the electrostatics laws as discussed in Sect. 3.2.1.1, and the quality of the movement is determined using the governing laws of motion from the Newtonian mechanics. It seems that an agent with good results must exert a stronger force than the bad ones, so the amount of the charge will be defined considering the objective function value, fit(i ). In order to introduce CSS, the following rules are developed:

Rule 1

Many of the natural evolution algorithms maintain a population of solutions which evolve through random alterations and selection [4, 5]. Similarly, CSS considers a number of charged particles (CPs). Each CP has a magnitude of charge (q i ) and as a result creates an electric field in its surrounding space. The magnitude of the charge is defined considering the quality of its solution as follows:

$$ {q}_i=\frac{fit(i)- fitworst}{ fit best- fitworst},\kern1em i=1,2,\dots, N $$
(3.14)

where fitbest and fitworst are so far the best and the worst fitness of all particles; fit(i ) represents the objective function value or the fitness of the agent i; and N is the total number of CPs. The separation distance r ij between two charged particles is defined as follows:

$$ {r}_{ij}=\frac{\left|\left|{\mathbf{X}}_i-{\mathbf{X}}_j\right|\right|}{\left|\right|\left({\mathbf{X}}_i+{\mathbf{X}}_j\right)/2-{\mathbf{X}}_{best}\left|\right|+\varepsilon } $$
(3.15)

where X i and X j are the positions of the ith and the jth CPs, X best is the position of the best current CP, and ε is a small positive number to avoid singularities.

Rule 2

The initial positions of CPs are determined randomly in the search space:

$$ {x}_{i,j}^{\left(\mathrm{o}\right)}={x}_{i, \min }+ rand\cdot \left({x}_{i, \max }-{x}_{i, \min}\right),\kern1em i=1,2,\dots, n $$
(3.16)

where x (o) i,j determines the initial value of the ith variable for the jth CP; x i,min and x i,max are the minimum and the maximum allowable values for the ith variable; rand is a random number in the interval [0,1]; and n is the number of variables. The initial velocities of charged particles are zero:

$$ {v}_{i,j}^{\left(\mathrm{o}\right)}=0,\kern1em i=1,2,\dots, n $$
(3.17)

Rule 3

Three conditions could be considered related to the kind of the attractive forces:

  • Any CP can affect another one; i.e., a bad CP can affect a good one and vice versa ( p ij  = 1).

  • A CP can attract another if its electric charge amount (fitness with revise relation in minimizing problems) is better than the other. In other words, a good CP attracts a bad CP:

    $$ {p}_{ij}=\left\{\begin{array}{c}\hfill \begin{array}{l}1\kern1.5em fit(j)> fit(i)\\ {}\end{array}\hfill \\ {}\hfill 0\kern1.75em \mathrm{else}\kern3.5em \hfill \end{array}\right. $$
    (3.18)
  • All good CPs can attract bad CPs and only some of bad agents attract good agents, considering following probability function:

    $$ {p}_{ij}=\left\{\begin{array}{c}\hfill \begin{array}{l}1\kern1.5em \frac{fit(i)- fit best}{fit(j)- fit(i)}> rand\vee fit(j)> fit(i)\\ {}\end{array}\hfill \\ {}\hfill 0\kern1.75em \mathrm{else}\kern13.25em \hfill \end{array}\right. $$
    (3.19)

    According to the above conditions, when a good agent attracts a bad one, the exploitation ability for the algorithm is provided, and vice versa if a bad CP attracts a good CP, the exploration is provided. When a CP moves toward a good agent, it improves its performance, and so the self-adaptation principle is guaranteed. Moving a good CP toward a bad one may cause losing the previous good solution or at least increasing the computational cost to find a good solution. To resolve this problem, a memory which saves the best so far solutions can be considered. Therefore, it seems that the third of the above conditions is the best rule because of providing strong exploration ability and an efficient exploitation.

Rule 4

The value of the resultant electrical force acting on a CP is determined using Eq. (3.7) as:

$$ {\mathbf{F}}_j={q}_j{\displaystyle \sum_{i,i\ne j}\left(\frac{q_i}{a^3}{r}_{ij}\cdot {i}_1+\frac{q_i}{r_{ij}^2}\cdot {i}_2\right)}{p}_{ij}\left({\mathbf{X}}_i-{\mathbf{X}}_j\right),\kern1em \left\langle \begin{array}{l}j=1,2,\dots, N\\ {}{i}_1=1,{i}_2=0\iff {r}_{ij}<a\\ {}{i}_1=0,{i}_2=1\iff {r}_{ij}\ge a\end{array}\right. $$
(3.20)

where F j is the resultant force acting on the jth CP, as illustrated in Fig. 3.3.

Fig. 3.3
figure 3

Determining the resultant electrical force acting on a CP [1]

In this algorithm, each CP is considered as a charged sphere with radius a, which has a uniform volume charge density. Here, the magnitude of a is set to unity; however, for more complex examples, the appropriate value for a must be defined considering the size of the search space. One can utilize the following equation as a general formula:

$$ a=0.10\times \max \left(\left\{{x}_{i, \max }-{x}_{i, \min}\Big|i=1,2,\dots, n\right\}\right) $$
(3.21)

According to this rule, in the first iterations where the agents are far from each other, the magnitude of the resultant force acting on a CP is inversely proportional to the square of the separation distance between the particles. Thus the exploration power in this condition is high because of performing more searches in the early iterations. It is necessary to increase the exploitation of the algorithm and to decrease the exploration gradually. After a number of searches where CPs are collected in a small space and the separation distance between the CPs becomes small say 0.1, then the resultant force becomes proportional to the separation distance of the particles instead of being inversely proportional to the square of the separation distance. According to Fig. 3.4, if the first equation \( \left({F}_{ij}\propto 1/{r}_{ij}^2\right) \) is used for \( {r}_{ij}=0.1 \), we have \( {F}_{ij}=100\times {k}_e{q}_i{q}_j \) that is a large value, compared to a force acting on a CP at \( {r}_{ij}=2 \) \( \left({F}_{ij}=0.25\times {k}_e{q}_i{q}_j\right) \), and this great force causes particles to get farther from each other instead of getting nearer, while the second one \( \left({F}_{ij}\propto {r}_{ij}\right) \) guaranties that a convergence will happen. Therefore, the parameter a separates the global search phase and the local search phase, i.e., when majority of the agents are collected in a space with radius a, the global search is finished and the optimizing process is continued by improving the previous results, and thus the local search starts. Besides, using these principles controls the balance between the exploration and the exploitation.

Fig. 3.4
figure 4

A comparison between the equations [1]. (a) \( {F}_{ij}\propto 1/{r}_{ij}^2 \) and (b) \( {F}_{ij}\propto {r}_{ij} \) when \( {r}_{ij}<a \)

It should be noted that this rule considers the competition step of the algorithm. Since the resultant force is proportional to the magnitude of the charge, a better fitness (great q i ) can create a bigger attracting force, so the tendency to move toward a good CP becomes more than a bad particle.

Rule 5

The new position and velocity of each CP is determined considering Eqs. (3.9) and (3.13) as follows:

$$ {\mathbf{X}}_{j, new}= ran{d}_{j1}\cdot {k}_a\cdot \frac{{\mathbf{F}}_j}{m_j}\cdot \Delta {t}^2+ ran{d}_{j2}\cdot {k}_v\cdot {\mathbf{V}}_{j, old}\cdot \Delta t+{\mathbf{X}}_{j, old} $$
(3.22)
$$ {\mathbf{V}}_{j, new}=\frac{{\mathbf{X}}_{j, new}-{\mathbf{X}}_{j, old}}{\Delta t} $$
(3.23)

where k a is the acceleration coefficient; k v is the velocity coefficient to control the influence of the previous velocity; and rand j1 and rand j2 are two random numbers uniformly distributed in the range of (0,1). Here, m j is the mass of the CPs which is equal to q j . Δt is the time step and is set to unity.

The effect of the pervious velocity and the resultant force acting on a CP can be decreased or increased based on the values of the k v and k a , respectively. Excessive search in the early iterations may improve the exploration ability; however, it must be deceased gradually, as described before. Since k a is the parameter related to the attracting forces, selecting a large value for this parameter may cause a fast convergence, and vice versa a small value can increase the computational time. In fact k a is a control parameter of the exploitation. Therefore, choosing an incremental function can improve the performance of the algorithm. Also, the direction of the pervious velocity of a CP is not necessarily the same as the resultant force. Thus, it can be concluded that the velocity coefficient k v controls the exploration process, and therefore, a decreasing function can be selected. Thus, k v and k a are defined as:

$$ {k}_v=0.5\left(1- iter/ite{r}_{\max}\right),\kern1em {k}_a=0.5\left(1+ iter/ite{r}_{\max}\right) $$
(3.24)

where iter is the actual iteration number and iter max is the maximum number of iterations. With this equation, k v decreases linearly to zero while k a increases to one when the number of iterations increases. In this way, the balance between the exploration and exploitation is saved. Considering the values of these parameters, Eqs. (3.22) and (3.23) can be rewritten as:

$$ \begin{array}{l}{\mathbf{X}}_{j, new}=0.5 ran{d}_{j1}\cdot \left(1+ iter/ite{r}_{\max}\right)\cdot {\displaystyle \sum_{i,i\ne j}\left(\frac{q_i}{a^3}{r}_{ij}\cdot {i}_1+\frac{q_i}{r_{ij}^2}\cdot {i}_2\right)}{p}_{ij}\left({\mathbf{X}}_i-{\mathbf{X}}_j\right)\\ {}\kern3.75em +0.5 ran{d}_{j2}\cdot \left(1+ iter/ite{r}_{\max}\right)\cdot {\mathbf{V}}_{j, old}+{\mathbf{X}}_{j, old}\end{array} $$
(3.25)
$$ {\mathbf{V}}_{j, new}={\mathbf{X}}_{j, new}-{\mathbf{X}}_{j, old} $$
(3.26)

Figure 3.5 illustrates the motion of a CP to its new position using this rule. The rules 5 and 6 provide the cooperation step of the CPs, where agents collaborate with each other by information transferring.

Fig. 3.5
figure 5

The movement of a CP to the new position [1]

Rule 6

Considering a memory which saves the best CP vectors and their related objective function values can improve the algorithm’s performance without increasing the computational cost. To fulfill this aim, charged memory (CM) is utilized to save a number of the best so far solutions. In this chapter, the size of the CM (i.e., CMS) is taken as N/4. Another benefit of the CM consists of utilizing this memory to guide the current CPs. In other words, the vectors stored in the CM can attract current CPs according to Eq. (3.20). Instead, it is assumed that the same number of the current worst particles cannot attract the others.

Rule 7

There are two major problems in relation to many metaheuristic algorithms; the first problem is the balance between exploration and exploitation in the beginning, during, and at the end of the search, and second is how to deal with an agent violating the limits of the variables.

The first problem is solved naturally through the application of above-stated rules; however, in order to solve the second problem, one of the simplest approaches is utilizing the nearest limit values for the violated variable. Alternatively, one can force the violating particle to return to its previous position or one can reduce the maximum value of the velocity to allow fewer particles to violate the variable boundaries. Although these approaches are simple, they are not sufficiently efficient and may lead to reduced exploration of the search space. This problem has previously been addressed and solved using the harmony search-based handling approach [4, 6]. According to this mechanism, any component of the solution vector violating the variable boundaries can be regenerated from the CM as:

$$ {x}_{i,j}=\left\{\begin{array}{c}\hfill \mathrm{w}.\mathrm{p}.\kern0.5em \mathrm{C}\mathrm{M}\mathrm{C}\mathrm{R} = = > \mathrm{select}\ \mathrm{a}\ \mathrm{new}\ \mathrm{value}\ \mathrm{f}\mathrm{o}\mathrm{r}\ \mathrm{a}\ \mathrm{variable}\ \mathrm{f}\mathrm{r}\mathrm{o}\mathrm{m}\ \mathrm{C}\mathrm{M}\kern1.25em \hfill \\ {}\hfill \kern4.5em == > \mathrm{w}.\mathrm{p}.\kern0.75em \left(1-\mathrm{P}\mathrm{A}\mathrm{R}\right)\kern0.5em \mathrm{do}\kern0.5em \mathrm{nothing}\kern2em \hfill \\ {}\hfill \kern7em == > \mathrm{w}.\mathrm{p}.\kern0.75em \mathrm{P}\mathrm{A}\mathrm{R}\ \mathrm{choose}\kern0.5em \mathrm{a}\ \mathrm{neighboring}\ \mathrm{value}\hfill \\ {}\hfill \mathrm{w}.\mathrm{p}.\kern0.5em \left(1-\mathrm{CMCR}\right) = = > \mathrm{select}\ \mathrm{a}\ \mathrm{new}\ \mathrm{value}\ \mathrm{r}\mathrm{a}\mathrm{ndomly}\kern4.75em \hfill \end{array}\right. $$
(3.27)

where “w.p.” is the abbreviation for “with the probability”; x i,j is the ith component of the CP j; the charged memory considering rate (CMCR) varying between 0 and 1 sets the rate of choosing a value in the new vector from the historic values stored in the CM; and (1 − CMCR) sets the rate of randomly choosing one value from the possible range of values. The pitch adjusting process is performed only after a value is chosen from CM. The value (1 − PAR) sets the rate of doing nothing. For more details, the reader may refer to Refs. [4, 6].

Rule 8

The terminating criterion is one of the following:

  • Maximum number of iterations: The optimization process is terminated after a fixed number of iterations, for example, 1000 iterations.

  • Number of iterations without improvement: The optimization process is terminated after some fixed number of iterations without any improvement.

  • Minimum objective function error: The difference between the values of the best objective function and the global optimum is less than a prefixed anticipated threshold.

  • Difference between the best and the worst CPs: The optimization process is stopped if the difference between the objective values of the best and the worst CPs becomes less than a specified accuracy.

  • Maximum distance of CPs: The maximum distance between CPs is less than a prefixed value.

Now we can establish a new optimization algorithm utilizing the above rules. The following pseudo code summarizes the CSS algorithm:

Level 1: Initialization

  • Step 1: Initialization. Initialize CSS algorithm parameters; initialize an array of charged particles with random positions and their associated velocities (Rules 1 and 2).

  • Step 2: CP ranking. Evaluate the values of the fitness function for the CPs, compare with each other, and sort increasingly.

  • Step 3: CM creation. Store CMS number of the first CPs and their related values of the objective function in the CM.

Level 2: Search

  • Step 1: Attracting force determination. Determine the probability of moving each CP toward others (Rule 3), and calculate the attracting force vector for each CP (Rule 4).

  • Step 2: Solution construction. Move each CP to the new position and find the velocities (Rule 5).

  • Step 3: CP position correction. If each CP exits from the allowable search space, correct its position using Rule 7.

  • Step 4: CP ranking. Evaluate and compare the values of the objective function for the new CPs; and sort them increasingly.

  • Step 5: CM updating. If some new CP vectors are better than the worst ones in the CM, include the better vectors in the CM and exclude the worst ones from the CM (Rule 6).

Level 3: Terminating Criterion Controlling

  • Repeat search level steps until a terminating criterion is satisfied (Rule 8).

The flowchart of the CSS algorithm is illustrated in Fig. 3.6.

Fig. 3.6
figure 6

The flowchart of the CSS [1]

3.3 Validation of CSS

In order to verify the efficiency of the new algorithm, some numerical examples are considered from literature. The examples contain 18 unimodal and multimodal functions. These numerical examples are presented in Sect. 3.1. The performance of the CSS to optimize these functions is investigated in Sect. 3.2. In Sect. 3.3, some well-studied engineering design problems taken from the optimization literature are used to illustrate the way in which the proposed method works.

3.3.1 Description of the Examples

In this section, a number of benchmark functions chosen from Ref. [7] are optimized using CSS and compared to GA and some of its variations to verify the efficiency of CSS. The description of these test problems is provided in Table 3.1. When the dimension is selected as 2, a perspective view and the related contour lines for some of these functions are illustrated in Fig. 3.7.

Table 3.1 Specifications of the benchmark problems
Fig. 3.7
figure 7figure 7figure 7figure 7

A perspective view and the related contour lines for some of function when n = 2, [1]. (a) Aluffi-Pentini, (b) Bohachevsky 1, (c) Bohachevsky 2, (d) Becker and Lago, (e) Branin, (f) Camel, (g) Cb3, (h) Cosine mixture, (i) Exponential, (j) Griewank, (k) Rastrigin, (l) Rosenbrock

3.3.2 Results

Similar to the other metaheuristics, for the CSS a large value for the number of CPs increases the search strength of the algorithm as well as the computational cost, and vice versa a small number causes a quick convergence without performing a complete search. Here, the number of CPs is set to 20, and the maximum number of the permitted iterations is considered as 200. These values seem to be suitable for finding the optimum results. The value of HMCR is set to 0.95 and that of PAR is taken as 0.10 [4]. The results obtained by CSS are listed in Table 3.2 along with those obtained by GA and some of its variations, which are directly derived from [7]. The numbers denote the average number of function evaluations from 50 independent runs for every objective function described in Sect. 3.1. The numbers in parentheses represent the fraction of successful runs in which the algorithm has located the global minimum with predefined accuracy, which is taken as ε = f min  − f final  = 10−4. The absence of the parentheses denotes that the algorithm has been successful in all independent runs. Although the GEN-S-M-LS finds good results in some cases, it must be noted that GEN-S-M-LS utilizes some auxiliary mechanisms such as an improved stopping rule, a new mutation mechanism, and a repeated application of a local search procedure. To sum up, comparison of the results demonstrates that CSS has a faster convergence than original GA and its variations.

Table 3.2 Performance comparison for the benchmark problems

In order to have some general idea about the way the CSS works, Fig. 3.8 is prepared to show the positions of the current CPs and the stored CPs in the CM for the first example. It can be seen that in the first iterations, the CPs investigate the entire search space to discover a favorite space (global search). When this favorable region containing a global optimum is discovered, the movements of the CPs are limited to this space in order to provide more exploitation (local search).

Fig. 3.8
figure 8

The positions of the current CPs and the stored CPs in the CM for the first example [1]. Asterisk Position of the current CPs. Square Position of the CPs stored in the CM

For many metaheuristic algorithms, it is common property that if all the agents get gathered in a small space, i.e., if the agents are trapped in part of the search space, escaping from this may be very difficult. Since prevailing forces for the CSS algorithm are attracting forces, it looks as if the above problem has remained unsolved for this method. However, having a good balance between the exploration and the exploitation, and considering three steps containing self-adaptation, cooperation, and competition in the CSS, can solve this problem. As illustrated in Fig. 3.9 which shows the positions of the CPs for the first example when all the initial agents are located in a small part of the space, CSS can escape from this space and go toward the favorite space.

Fig. 3.9
figure 9

The positions of the CPs for the first example when the all initial agents are introduced in a small part of the space [1]. Asterisk Position of the current CPs. Square Position of the CPs stored in the CM

3.4 Charged System Search for Structural Optimization

3.4.1 Statement of the Optimization Design Problem

For optimum design of structures, the objective function can be expressed as:

$$ \mathrm{minimize}\kern1.5em W\left(\mathbf{X}\right)={\displaystyle \sum_{i=1}^n{\rho}_i\cdot {x}_i\cdot {L}_i} $$
(3.28)

where W(X) is the weight of the structure; n is the number of members making up the structure; ρ i represents the material density of member i; L i is the length of member i; x i is the cross-sectional area of member i chosen between x min and x max; and min is the lower bound and max is the upper bound. This minimum design also has to satisfy inequality constraints that limit design variable sizes and structural responses (Lee and Geem [8]).

3.4.1.1 Constraint Conditions for Truss Structures

For truss structures, the constraints are as follows:

$$ \begin{array}{l}{\delta}_{\min}\le {\delta}_{\mathrm{i}}\le {\delta}_{\max}\kern1.75em i=1,2,....,m\\ {}{\sigma}_{\min}\le {\sigma}_{\mathrm{i}}\le {\sigma}_{\max}\kern1.5em i=1,2,....,n\ \\ {}{\sigma}_i^b\le {\sigma}_{\mathrm{i}}\le 0\kern3.40em i=1,2,....,nc\end{array} $$
(3.29)

in which m is the number of nodes; nc denotes the number of compression elements; σ i and δ i are the stress and nodal displacement, respectively; and σ b i represents allowable buckling stress in member i when it is in compression.

3.4.1.2 Constraint Conditions for Frame Structures

For the frame structures, according to the ASD-AISC [9] code, the constraints are as follows:

The stress limitations:

$$ \frac{f_a}{F_a}+\frac{f_{bx}}{F_{bx}}+\frac{f_{by}}{F_{by}}\le 1,\kern0.75em \mathrm{F}\mathrm{o}\mathrm{r}\kern1em \frac{f_a}{F_a}\le 0.15 $$
(3.30)
$$ \frac{f_a}{F_a}+\frac{C_{mx}{f}_{bx}}{\left(1-\frac{f_a}{F_{ex}^{\hbox{'}}}\right){F}_{bx}}+\frac{C_{my}{f}_{by}}{\left(1-\frac{f_a}{F_{ey}^{\hbox{'}}}\right){F}_{by}}\le 1,\kern0.75em \mathrm{F}\mathrm{o}\mathrm{r}\kern1em \frac{f_a}{F_a}>0.15 $$
(3.31)
$$ \frac{f_a}{0.6{F}_y}+\frac{f_{bx}}{F_{bx}}+\frac{f_{by}}{F_{by}}\le 1,\kern0.75em \mathrm{F}\mathrm{o}\mathrm{r}\kern1em \frac{f_a}{F_a}>0.15 $$
(3.32)

The slenderness ratio limitation:

$$ \left\{\begin{array}{l}{\lambda}_{\mathrm{i}}=\frac{k_i{L}_i}{r_i}\le 300\kern0.5em \mathrm{F}\mathrm{o}\mathrm{r}\kern0.5em \mathrm{tension}\ \mathrm{members}\kern3em \\ {}{\lambda}_{\mathrm{i}}=\frac{k_i{L}_i}{r_i}\le 200\kern0.5em \mathrm{F}\mathrm{o}\mathrm{r}\kern0.5em \mathrm{compression}\ \mathrm{members}\end{array}\right. $$
(3.33)

where f a (=P/A i ) represents the computed axial stress. The computed flexural stresses due to bending of the member about its major (x) and minor ( y) principal axes are denoted by f bx and f by , respectively. F ' ex and F ' ey denote the Euler stresses about principal axes of the member that are divided by a factor of safety of 23/12. The allowable bending compressive stresses about major and minor axes are designated by F bx and F by . C mx and C my are the reduction factors, introduced to counterbalance overestimation of the effect of secondary moments by the amplification factors \( \left(1-\frac{f_a}{F_{ex}^{\hbox{'}}}\right) \). For unbraced frame members, these factors are taken as 0.85. For braced frame members without transverse loading between their ends, these are calculated from \( {C}_m=0.6-0.4{M}_1/{M}_2 \), where M 1/M 2 is the ratio of smaller end moment to the larger end moment. Finally, for braced frame members having transverse loading between their ends, these factors are determined from the formula \( {C}_m=1+\psi \left({f}_a/{F}_e^{\hbox{'}}\right) \) based on a rational approximate analysis outlined in ASD-AISC [9] Commentary-H1, where ψ is a parameter that considers maximum deflection and maximum moment in the member. F a stands for the allowable axial stress under axial compression force alone and is calculated depending on elastic or inelastic bucking failure mode of the member according to the slenderness ratio:

$$ {F}_a=\left\{\begin{array}{l}\left[\left(1-\frac{\lambda_i^2}{2{C}_C^2}\right){F}_y\right]/\left(\frac{5}{3}+\frac{3{\lambda}_i}{8{C}_C}-\frac{\lambda_i^3}{8{C}_C^3}\right)\kern0.75em \mathrm{F}\mathrm{o}\mathrm{r}\kern0.5em {\lambda}_i<{C}_C\\ {}\frac{12{\pi}^2E}{23{\lambda}_i^2}\kern14.1em \mathrm{F}\mathrm{o}\mathrm{r}\kern0.5em {\lambda}_i\ge {C}_C\end{array}\right. $$
(3.34)

where E = the modulus of elasticity; F y  = the yield stress of steel; \( {C}_C= \) the slenderness ratio dividing the elastic and inelastic buckling regions \( \left({C}_C=\sqrt{2{\pi}^2E/{F}_y}\right) \); λ i  = the slenderness ratio \( \left({\lambda}_i=k{L}_i/{r}_i\right) \); k = the effective length factor; and r i  = the governing radius of gyration. For an axially loaded bracing member whose slenderness ratio exceeds 120, F a is increased by a factor of (1.6 − L i /200r i ) considering relative unimportance of the member. Equation (3.23) represents the slenderness limitations imposed on all members such that maximum slenderness ratio is limited to 300 for members under tension and to 200 for members under compression loads.

Geometric constraints:

Geometric constraints are considered between beams and columns framing into each other at a common joint for practicality of an optimum solution generated. For the two beams B1 and B2 and the column shown in Fig. 3.10, the following geometric constraints are written (Saka and Hasançebi [10]):

Fig 3.10
figure 10

Beam-column geometric constraints [2]

$$ {b}_{fb}\le {b}_{fc} $$
(3.35)
$$ {b}_{fb}^{\hbox{'}}\le \left({d}_c-2{t}_f\right) $$
(3.36)

where b fb , b ' fb , and b fc are the flange width of the beam B1, the beam B2, and the column, respectively; d c is the depth of the column; and t f is the flange width of the column. Equation (3.35) ensures that the flange width of the beam B1 remains smaller than that of the column. On the other hand, Eq. (3.36) guarantees that flange width of the beam B2 remains smaller than clear distance between the flanges of the column.

Maximum lateral displacement:

$$ \frac{\Delta_T}{H}\le R $$
(3.37)

Inter-story displacement constraints:

$$ \frac{d_i}{h_i}\le {R}_I,\kern1em i=1,2,\dots, ns $$
(3.38)

where Δ T is the maximum lateral displacement, H is the height of the frame structure, R is the maximum drift index (=1/400), d i is the inter-story drift, h i is the story height of the ith floor, ns represents the total number of stories, and R I is the inter-story drift index permitted by the code of the practice (=1/400).

3.4.1.3 Design Loads for Frame Structures

The frame examples are subjected to various gravity loads in addition to lateral wind forces. The gravity loads acting on floor slabs cover dead (D), live (L), and snow (S) loads. All the floors excluding the roof are subjected to a design dead load of 2.88 kN/m2 and a design live load of 2.39 kN/m2. The roof is subjected to a design dead load of 2.88 kN/m2 plus snow load. The design snow load is computed using Equation (7–1) in ASCE 7–05 [11], resulting in a design snow pressure of 0.75 kN/m2. The calculated gravity loads are applied as uniformly distributed loads on the beams using distribution formulas developed for slabs. The design wind loads (W) are also computed according to ASCE 7–05 using the following equation:

$$ {p}_w=\left(0.613{K}_z{K}_{zt}{K}_d{V}^2I\right)\left(G{C}_p\right) $$
(3.39)

where p w is the design wind pressure in kN/m2; K z (=1.07) is the velocity exposure coefficient; K zt (=1.0) is the topographic factor; K d (=0.85) is the wind directionality factor; I (=1.15) is the importance factor; V (=46.94 m/s) is the basic wind; G (=0.85) is the gust factor; and C p (=0.8 for windward face and −0.5 for leeward face) is the external pressure coefficient. The calculated wind loads are applied as uniformly distributed lateral loads on the external beams of the frames located on windward and leeward facades at every floor level.

The load combination per ASD-AISC specification is considered as:

$$ \begin{array}{l}\left(\mathrm{D}+\mathrm{L}+\mathrm{S}+{\mathrm{W}}_{\mathrm{x}}\right).\\ {}\left(\mathrm{D}+\mathrm{L}+\mathrm{S}+{\mathrm{W}}_{\mathrm{y}}\right).\end{array} $$

It should be noted that for wind forces in the above load combinations, two cases are considered. In the first case, the wind loading is acting along x-axis, whereas in the second one it is applied along y-axis.

3.4.2 CSS Algorithm-Based Structural Optimization Procedure

As defined in the previous section, there are some problem-specific constraints in structural optimization problems that must be handled. The penalty function method has been the most popular constraint-handling technique due to its simple principle and ease of implementation. In utilizing the penalty functions, if the constraints are between the allowable limits, the penalty will be zero; otherwise, the amount of penalty is obtained by dividing the violation of allowable limit to the limit itself. Since the CSS is independent of the type of penalty function, one can easily utilize another approach in the application of CSS.

Detailed procedure of the proposed CSS algorithm-based method to determine optimal design of structures is shown in Fig. 3.11. Considering the rules defined for the CSS in Sect. 3.3, and utilizing the penalty functions to handle the problem-specific constraints, the CSS algorithm-based structural optimization procedure can be divided into the following three phases:

Fig. 3.11
figure 11

The flowchart of the CSS for the truss structures [2]

Phase 1: Initialization

CSS algorithm parameters such as N, CMS, k v , k a , and design variable bounds are initialized. An array of N Charged Particles (CPs) with random positions are generated considering the variable bounds together with their associated velocities. The structures associated with the generated CPs are analyzed and the fitness functions values of the CPs are evaluated considering the weight of the structure and the penalty functions. Then, CPs are ranked in the increasing order of their fitness function values. CMS number of the first CPs and their related values of the fitness function are stored in the CM.

Phase 2: Search

Each CP moves to the new position considering the probability of motion [Eq. (3.24)], the magnitude of the attracting force vector [Eq. (3.25)], and the motion laws [Eqs. (3.26) and (3.27)]. If each CP exits from the allowable search space, its position is corrected using the harmony-based algorithm. Then, the new CPs are analyzed to evaluate the fitness function values of their corresponding CPs and to sort them increasingly. Then, some of the good new CPs are stored in the CM and the worst ones are excluded from the CM.

Phase 3: Terminating Criterion Controlling

Search level is continued until a terminating criterion is satisfied.

3.5 Numerical Examples

In this section, three truss and two frame structures are optimized utilizing the new algorithm. The final results are then compared to the solutions of other advanced metaheuristic methods to demonstrate the efficiency of this work. For the CSS algorithm, a population of 20 CPs is used for the first and the second truss examples, and a population of 50 candidates is selected for the remaining examples. The effect of the pervious velocity and the resultant force affecting a CP can be decreased or increased based on the values of the k v and k a . Here, k v and k a are defined as:

$$ \begin{array}{l}{k}_v=c\left(1- iter/ite{r}_{\max}\right)\\ {}{k}_a\kern0.3em =\kern0.2em c\left(1+ iter/ite{r}_{\max}\right)\end{array} $$
(3.40)

where iter is the iteration number, iter max is the maximum number of the iterations, and c is set to 0.5 and 0.2 when the population of 20 and 50 CPs are selected, respectively. With this equation, k v decreases linearly while k a increases when the number of iterations increases. In this way, the balance between the exploration and the exploitation is saved.

In order to investigate the effect of the initial solution on the final result and because of the stochastic nature of the algorithm, each example is independently solved several times. The initial population in each of these runs is generated in a random manner according to Rule 2. The first two truss examples are optimized by the CSS algorithm for 50 times, while performance comparisons of the CSS method in other examples is based on 20 evaluations. The algorithms are coded in MATLAB and structures are analyzed using the direct stiffness method.

3.5.1 A Benchmark Truss

The topology and nodal numbering of a 25-bar spatial truss structure, shown in Fig. 3.12, are known as a benchmark example in the field of structural optimization. The material density is considered as 0.1 lb/in3 (2767.990 kg/m3), and the modulus of elasticity is taken as 10,000 ksi (68,950 MPa). The twenty-five members are categorized into eight groups as follows:

Fig. 3.12
figure 12

Schematic of a 25-bar spatial truss [2]

  • (1) A1, (2) A2–A5, (3) A6–A9, (4) A10–A11, (5) A12–A13, (6) A14–A17, (7) A18–A21, and (8) A22–A25

This spatial truss is subjected to two loading conditions shown in Table 3.3. Maximum displacement limitations of ±0.35 in (±8.89 mm) are imposed on every node in every direction, and the axial stress constraints vary for each group as shown in Table 3.4. The range of cross-sectional areas varies from 0.01 to 3.4 in2 (0.6452–21.94 cm2).

Table 3.3 Loading conditions for the 25-bar spatial truss
Table 3.4 Member stress limitation for the 25-bar spatial truss

The CSS algorithm achieves the best solution after 7000 searches. However, the HBB–BC (Kaveh and Talatahari [12]) and HPSACO (Kaveh and Talatahari [4]) algorithms find the best solution after about 12,500 and 9875 analyses, respectively, which are 50 and 41 % more than the present work. The best weight of the CSS is 545.10 lb. Although the CSS approach has slightly worse performance than the improved methods IACS (Kaveh et al. [13]) and HPSACO (Kaveh and Talatahari [4]), it performs better than other algorithms GA (Rajeev and Krishnamoorthy [14]), PSO (Schutte and Groenwold [15]), and HS (Lee and Geem [8] when the best weight, t he average weight, or the standard deviation are compared. Table 3.5 presents a comparison of the performance of the CSS algorithm and other metaheuristic algorithms.

Table 3.5 Performance comparison for the 25-bar spatial truss

3.5.2 A 120-Bar Dome Truss

The topology and group numbers of a 120-bar dome truss are shown in Fig. 3.13. The modulus of elasticity is 30,450 ksi (210,000 MPa), and the material density is 0.288 lb/in3 (7971.810 kg/m3). The yield stress of steel is taken as 58.0 ksi (400 MPa). The dome is considered to be subjected to vertical loading at all the unsupported joints. These loads are taken as −13.49 kips (−60 kN) at node 1, −6.744 kips (−30 kN) at nodes 2 through 14, and −2.248 kips (−10 kN) at the rest of the nodes. The minimum cross-sectional area of all members is 0.775 in2 (2 cm2), and the maximum cross-sectional area is taken as 20.0 in2 (129.03 cm2). The constraints are considered as follows:

Fig. 3.13
figure 13

Schematic of a 120-bar dome-shaped truss [2]

  1. 1)

    Stress constraints (according to the AISC-ASD (1989) code):

    $$ \left\{\begin{array}{l}{\sigma}_i^{+}=0.6{F}_y\kern1em for\kern0.5em {\sigma}_i\kern-0.2em \ge \kern-0.2em 0\\ {}{\sigma}_i^{-}\kern4.3em for\kern0.5em {\sigma}_i\kern-0.2em <\kern-0.2em 0\end{array}\right. $$
    (3.41)

    where \( {\sigma}_i^{-} \) is calculated considering the slenderness ratio [Eq. (3.34)].

  2. 2)

    Displacement limitations of ±0.1969 in (±5 mm) are imposed on all nodes in x, y, and z directions.

Table 3.6 illustrates the best solution vectors, the corresponding weights, and the required number of analyses for convergence in the present algorithm and some of other metaheuristic methods. Except IACS which uses two auxiliary mechanisms for searching, the CSS algorithm has the best convergence rates. Figure 3.14 shows the best and average convergence history for the results of the CSS. In addition, CSS and HPSACO find the best result among the other metaheuristics. A comparison of the allowable and existing stresses and displacements of the 120-bar dome truss structure using CSS is shown in Fig. 3.15. The maximum value for displacement is equal to 0.19689 in (5 mm) and the maximum stress ratio is equal to 99.98 %.

Table 3.6 Performance comparison for the 120-bar dome truss
Fig. 3.14
figure 14

Convergence history of the 120-bar dome-shaped truss for the CSS algorithm [2]

Fig. 3.15
figure 15

Comparison of the allowable and existing constraints for the 120-bar dome-shaped truss using the CSS [2]. (a) Displacement in the x direction. (b) Displacement in the y direction. (c) Displacement in the z direction. (d) Stress

3.5.3 A 26-Story-Tower Space Truss

The 26-story-tower space truss containing 942 elements and 244 nodes is considered as a large-scale truss example. Fifty-nine design variables are used to represent the cross-sectional areas of 59 element groups in this structure, employing the symmetry of the structure. Figure 3.16 shows the geometry and the 59 element groups. The material density is 0.1 lb/in3 (2767.990 kg/m3) and the modulus of elasticity is 10,000 ksi (68,950 MPa).

Fig. 3.16
figure 16

Schematic of a 26-story-truss tower [2]

The members are subjected to the stress limits of ±25 ksi (172.375 MPa), and the four nodes of the top level in the x, y, and z directions are subjected to the displacement limits of ±15.0 in (38.10 cm) (about 1/250 of the total height of the tower). The allowable cross-sectional areas in this example are selected from 0.1 to 20.0 in2 (from 0.6452 to 129.032 cm2). The loading on the structure consists of:

  1. 1)

    The vertical load at each node in the first section is equal to −3 kips (−13.344 kN).

  2. 2)

    The vertical load at each node in the second section is equal to −6 kips (−26.688 kN).

  3. 3)

    The vertical load at each node in the third section is equal to −9 kips (−40.032 kN).

  4. 4)

    The horizontal load at each node on the right side in the x direction is equal to −1 kips (−4.448 kN).

  5. 5)

    The horizontal load at each node on the left side in the x direction is equal to 1.5 kips (6.672 kN).

  6. 6)

    The horizontal load at each node on the front side in the y direction is equal to −1 kips (−4.448 kN).

  7. 7)

    The horizontal load at each node on the back side in the x direction is equal to 1 kips (4.448 kN).

The CSS method achieved a good solution after 15,000 analyses and found an optimum weight of 47,371 lb (210,716 N). The best weights for the GA, PSO, BB–BC, and HBB–BC are 56,343 lb (250,626 N), 60,385 lb (268,606 N), 53,201 lb (236,650 N), and 52,401 lb (233,091 N), respectively. In addition, CSS has better performance in terms of the optimization time, standard deviation, and the average weight. Table 3.7 provides the statistic information for this example. The stress constraints are dominant in this example. The maximum value of stress ratio is equal to 96.7 %. Figure 3.17 compares the allowable and existing stresses in the elements for the CSS result. The convergence history is shown in Fig. 3.18. The final designs obtained by the CSS technique for this example is given in Table 3.8.

Table 3.7 Performance comparison for the 26-story-tower spatial truss
Fig. 3.17
figure 17

Comparison of the allowable and existing stress constraints for the 26-story-tower truss using the CSS [2]

Fig. 3.18
figure 18

Convergence history of the 26-story-tower truss for the CSS algorithm [2]

Table 3.8 The optimum design of the CSS algorithm for the 26-story-tower spatial truss

3.5.4 An Unbraced Space Frame

A 10-story space steel frame consisting of 256 joints and 568 members is shown in Fig. 3.19. This problem has been formerly studied by Saka and Hasançebi [10] to evaluate the performance of an HS-based technique in real-size optimum design of steel frames considering ASD-AISC as the code of the practice.

Fig. 3.19
figure 19figure 19

Schematic of an unbraced space frame [2]. (a) Three-dimensional view, (b) elevation, (c) plan, (d) member grouping

The columns in a story are collected in three member groups as corner columns, inner columns, and outer columns, whereas beams are divided into two groups as inner beams and outer beams. The corner columns are grouped together as having the same section in the first three stories and then over two adjacent stories thereafter, as are inner columns, outer columns, inner beams, and outer beams. This results in a total of 25 distinct design groups.

The optimum design of the space frame described above is carried out using the CSS and compared with those of the simulated annealing (SA), evolution strategies (ESs), particle swarm optimizer (PSO), tabu search optimization (TSO), simple genetic algorithm (SGA), ant colony optimization (ACO), and harmony search (HS) methods (Saka and Hasançebi [10]). In each optimization technique, the number of iterations was taken as 50,000, when ASD-AISC is used as the code of the practice. Our investigation shows that 12,500 analyses are sufficient as the maximum number of analyses for the CSS. This shows that the CSS can reach a similar result as the other methods with smaller number of analyses. The design history of each run by each technique is shown in Fig. 3.20.

Fig. 3.20
figure 20

Comparison of the convergence history for the unbraced space frame [2]

The optimum design attained by the CSS method for this example is 225,654.0 kg, while it is 228,588.3 kg for the ESs. Among the metaheuristic algorithms, the adaptive harmony search algorithm is the third best which is 1.6 % heavier than the one obtained by evolutionary strategy algorithm. The optimum result for the TSO, SA, ACO, SGA, and PSO is 235,167.5 kg, 238,756.5 kg, 241,470.31 kg, 245,564.80 kg, and 253,260.23 kg, respectively. The minimum weights as well as W-section designations obtained by some of the best algorithms are provided in Table 3.9.

Table 3.9 Optimal design for the unbraced space frame

3.5.5 A Braced Space Frame

The second frame example considered in this chapter is a 36-story braced space steel frame consisting of 814 joints and 1860 members, as shown in Fig. 3.21 (Saka and Hasançebi [10]). An economical and effective stiffening of the frame against lateral forces is achieved through exterior diagonal bracing members located on the perimeter of the building, which also participate in transmitting the gravity forces.

Fig. 3.21
figure 21

Schematic of a braced space frame [2]. (a) 3D view of the frame, (b) Front view, (c) side view, (d) plan

The 1860 frame members are collected in 72 different member groups, considering the symmetry of the structure and the practical fabrication requirements. That is, the columns in a story are collected in three member groups as corner columns, inner columns, and outer columns, whereas beams are divided into two groups as inner beams and outer beams. The corner columns are grouped together as having the same section over three adjacent stories, as are inner columns, outer columns, inner beams, and outer beams. Bracing members on each facade are designed as 3-story deep members, and two bracing groups are specified in every six stories.

The minimum weight design of the frame is equal to 2301.69 t for the CSS algorithm, while it is 2383.60 and 4438.17 t for the adaptive harmony search and the simple harmony search algorithms, respectively. Figure 3.22 shows the design history graph obtained for this example. In the optimum design process, CSS finds the optimum design after 12,500 analyses, while ES needs 50,000 searches to determine the optimum solution.

Fig. 3.22
figure 22

Comparison of the convergence history for the braced space frame [2]

3.6 Discussion

3.6.1 Efficiency of the CSS Rules

Solution of a number of design examples shows the superiority of the CSS algorithm to the other existing metaheuristics. To investigate the effect of some utilized rules, a number of the CSS-based algorithms are defined as follows:

  • Case 1: Rule 3 is changed as:

    The kind of the electric forces between two charged particles is selected randomly.

  • Case 2: Rule 4 is changed as:

    Any CP can act on another one; i.e., a bad CP can affect a good one and vice versa ( p ij  = 1).

  • Case 3: Rule 4 is changed as:

    Only good CPs can attract bad CPs.

  • Case 4: Rule 5 is changed as:

    Always i 1 = 0 and i 2 = 1.

  • Case 5: Rule 5 is changed as:

    Always i 1 = 1 and i 2 = 0.

Table 3.10 shows the results of the 50 runs of the first example for each case. Comparing the result of Case 1 with the result of the original CSS (Table 3.5) confirms that considering repulsive forces between CPs reduces the power of the algorithm. Although when a good agent attracts a bad one, the exploitation ability for the algorithm is provided, and vice versa if a bad CP attracts a good CP, the exploration is provided, differences between the results of the Cases 2 and 3 with the original CSS indicated that when all bad agents attract good ones, a disorder will be created and when only good CPs attract bad ones the convergence will occur very soon and a complete search will not be performed. As a result, at least the computational cost to reach a good solution may increase for the condition of the Cases 2 and 3.

Table 3.10 Investigation on the performance of various CSS-based algorithms for the 25-bar truss in 50 runs

3.6.2 Comparison of the PSO and CSS

Both the CSS and the PSO are multi-agent algorithms in which the position of each agent is obtained by adding the agent’s movement to its previous position; however, the movement strategies are different. In the PSO algorithm, each particle continuously focuses and refocuses on the effort of its search according to both local best and global best, while the CSS approach uses the governing laws from electrical physics and the governing laws of motion from the Newtonian mechanics to determine the amount and the direction of a charged particle’s movement. The focus of the PSO is placed upon finding the direction of an agent movement, while the CSS method can determine not only the directions but also the amount of movements. In the PSO, the direction of an agent is calculated using only two best positions containing local best and global best. However, in the CSS the agent’s direction is calculated based on the overall forces resulted by the best agents stored in the CM and some of the best current CPs. CSS can recognize the end of the global phase and change the movement updating equation for the local phase to have a better balance between the exploration and exploitation. One of the greatest disadvantages of the PSO approach is the existence of some difficulties in controlling the balance between the exploration and exploitation due to ignoring the effect of other agents (Kaveh and Talatahari [4]).

3.6.3 Efficiency of the CSS

CSS utilizes the Coulomb and Gauss laws to determine the direction and the amount of the movement of each agent and uses some laws of the Newtonian mechanics to complete the movement process. Compared to other metaheuristics, CSS has less computing cost and can determine the optimum result with a smaller number of analyses. Due to having a good balance between the exploration and exploitation, the performance of the CSS in both global search stage (initial iterations) and the local search stage (last iterations) is good. The comparison of the CSS results with those of the other metaheuristic shows the robustness of the present algorithm and demonstrates the efficiency of the algorithm to find optimum design of structures.