1 Introduction

The structures composed of trusses, beams, plates, or a combination of them, which usually mean more complex structures or combinational structures, have been widely applied in the engineering field, and it is indispensable to optimize their cross-sectional sizes as well as the topology layout. Since the sizes are usually selected from an available discrete value set in the practical design, the discrete size structural optimizations have been widely studied over the last two decades (Juang and Chang 2006; Stolpe 2016). These studies often focused on the optimization problem of truss or frame structures, and their cross-sectional sizes were directly determined with meta heuristics, notably GAs (Camp et al. 1998; Sawada et al. 2011). In GA process, a binary/integer decimal coding method was usually used to code the available sizes, then the optimal result could be derived with a series of GA operators following the fitness calculations (Rajeev and Krishnamoorthy 1992; Jenkins 2002; Lemonge and Barbosa 2004). However, the main obstacle of GAs is the tremendous computational cost, which is caused by numerous structural analyses of individuals and hardly reduced. Thus, these algorithms are hardly applied for the optimization of more complex structures. Besides GA, other meta heuristics were also used to solve the discrete size optimization problem, such as particle swarm optimization (PSO) algorithms (He et al. 2004; Kitayama et al. 2006; Lu et al. 2013) and differential evolution (DE) algorithms (Kitayama et al. 2012), yet these algorithms had the similar drawbacks as in GA and were still hardly applied for the optimization of the structures composed of trusses, beams, plates, or a combination of them. For particular types of structures, such as trusses and frames, optimization methods with guaranteed global optimality have been developed (Achtziger and Stolpe 2007, 2008, 2009; Rasmussen and Stolpe 2008; Kanno 2013, 2016a, b). However these methods should conduct a special process according to the properties of the designed structures, therefore they had some limitations to apply for general kind of structures. In addition, some studies focused on improving the efficiency of the method by combining a heuristic with an alternating direction method of multipliers (Kitayama et al. 2012).

The researches for the layout optimization problems have also attracted much attention in the last three decades. In the preliminary work, the truss topology optimization got great interest among the researchers. Based on the ground structure approach, such kind of optimization usually used 0/1 to replace the nonexistence/existence of the structural components, then an optimal layout could be determined with suitable optimization algorithms, such as the meta heuristics (Kawamura et al. 2002; Huang and Wang 2008; Rahami et al. 2008) and sequential integer programming approaches (Kureta and Kanno 2014). Nevertheless, as there exist discrete 0/1 variables, it would still take a large number of structural analyses to solve these topology optimization problems. To circumvent 0/1 variables, the concept of continuum topology optimization which aimed to find optimal material distribution in a continuous given space was put forward (Rozvany 2009). Some popular methods, such as the solid isotropic material with penalization (SIMP) methods (Pomezanski et al. 2005; Xu and Cheng 2010) and the level-set methods (Park and Youn 2008; Dijk et al. 2013), evolutionary structural optimization (ESO)/bidirectional ESO (BESO) methods (Huang and Xie 2010; Munk et al. 2015) and sequential (or hierarchical) integer programming approaches (Stolpe and Stidsen 2007; Svanberg and Werme 2007; Liang and Cheng 2019, 2020) have been extensively studied and developed in the last three decades. However, as these methods usually determined the structural layout by optimizing material distribution in the given space, they could be hardly applied for the cross-sectional size design of practical structures such as trusses or frames. Thus, these methods could not be applicable for the topology optimization of the structures mentioned in the first sentence. Actually, to the best knowledge of authors, there have been few methods for topology optimization of such structures (or complex structures) except for the work (Huang et al. 2019).

In recent years, Huang et al. (2019) presented an engineering method for continuous size and topology optimization of the structures composed of trusses, beams, plates, or a combination of them. This method constructed a special branched approximate multipoint (BMA) function to solve the problem that the approximate concepts could not be applied for 0/1 variables. Then with the BMA function, the primal optimization problem could be transformed into a series of approximate problems and further solved with the suitable optimization method. Numerical results showed that this method exhibited a great effectiveness and high efficiency on the structural topology optimization. In spite of that, it cannot still tackle discrete size variables.

Thus, in this work, an effective method that can tackle the structural discrete size and topology optimization problem is presented. By using the extended approximate concepts, the primal problem is firstly transformed into a series of explicitly approximate problems involving both 0/1 topology and discrete size variables. The 0/1 topology variables are determined with a GA, and the corresponding discrete size variables are optimized after determining 0/1 topology variables. In size optimization, the variables are firstly supposed as continuous and determined, as \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\), through the second-level approximate problems that can be solved with a dual method. Then the available discrete sizes adjacent to \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\) are selected from the original discrete value set, and the discrete size variables can be further determined from these values with a GA. A large number of structural analyses can be reduced because of introducing the extended approximate concepts. Numerical examples are given to verify the feasibility and efficiency of the proposed method, and the results indicate that this method is quite efficient for the discrete size and topology optimization problem.

The paper is organized as follows. In Sect. 2, a structural discrete size and topology optimization problem is presented. Section 3 elaborates the optimization method for this problem. In Sect. 4, several numerical examples are established to illustrate the effectiveness and efficiency of the proposed method. Section 5 makes a more in-depth analysis of this method, and the conclusion is given in Sect. 6.

2 Problem formulation

The 0/1 topology and the discrete size optimization problem in this work is established based on a ground structure method in which all possible components are involved. The final optimal design only keeps some necessary components in the ground structure. In order to keep the FE meshes unchanged during the optimization process, the removed components in the ground structure will be modeled with thin elements whose cross-sectional dimensions are set as small values. As these elements have almost no load-bearing capabilities, although they are still remained in the FE model, they will not influence the physical behavior of the final design.

Based on the aforementioned description, the optimization problem can be described as follows.

$$\left\{ \begin{gathered} Find\,\,\,\,\,\,\,\,\,\,\,{\mathbf{X}} = \{ x_{1} ,\,x_{2} ,...,\,x_{m} \}^{T} \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,{{\varvec{\upalpha}}} = \{ \alpha_{1} ,\,\alpha_{2} ,...,\,\alpha_{n} \}^{T} \hfill \\ Min\,\,\,\,\,\,\,\,\,\,\,f({\mathbf{X}},\,{{\varvec{\upalpha}}}) \hfill \\ s.t\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,g_{j} ({\mathbf{X}},{{\varvec{\upalpha}}}) \le 0\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,j = 1,...,J_{0} \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\alpha_{i} = 0{\text{ or }}\alpha_{i} = 1\,\,\,\,\,\,\,\,\,\,\,i = 1,...,\,n \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,x_{k} \in \{ x_{k,1} ,\,x_{k,2} ,...,\,x_{{k,s_{k} }} \} \,\,\,\,if \, x_{k} \in X_{k}^{I} \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,x_{k} = x_{k}^{b} \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,if \, x_{k} \in X_{k}^{II} \hfill \\ \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,k = 1,...,\,m \hfill \\ \end{gathered} \right.$$
(1)

here, \({\mathbf{X}}\) is the discrete size variable vector in which \(x_{k} (k = 1,...,\,m)\) is the \(k - th\) component,\(m\) is the total number of size variables. \({{\varvec{\upalpha}}}\) is the 0/1 topology variable vector in which \(\alpha_{i}\) represents the presence(\(\alpha_{i} = 1\)) or absence (\(\alpha_{i} = 0\)) of the components governed by \(\alpha_{i} (i = 1,...,n)\), and \(n\) is the total number of these variables. \(\{ x_{k,1} ,\,x_{k,2} ,...,\,x_{{k,s_{k} }} \}\) is the discrete value set for \(x_{k}\) if \(x_{k} \in X_{k}^{I}\), and \(s_{k}\) is the number of elements in the set; \(x_{k}^{b}\) is a small value for \(x_{k}\) if \(x_{k} \in X_{k}^{II}\). \(X_{k}^{I}\) and \(X_{k}^{II}\) are two domains defined as follows:

$$X_{k}^{I} = \left\{ {\left. {x_{k} } \right|x_{k} \in \{ x_{k,1} ,\,x_{k,2} ,...,\,x_{{k,s_{k} }} \} } \right\},\,k = 1,...,\,m$$
(2)
$$X_{k}^{II} = \left\{ {\left. {x_{k} } \right|x_{k} = x_{k}^{b} } \right\},\,k = 1,...,\,m$$
(3)

If \(\alpha_{i} = 1\), the components governed by \(\alpha_{i}\) are remained and the related size variables \(x_{k}\) can only change within the discrete set \(\{ x_{k,1} ,\,x_{k,2} ,...,\,x_{{k,s_{k} }} \}\), as in the domain \(X_{k}^{I}\). Likewise, if \(\alpha_{i} = 0\), the corresponding components would be removed and the corresponding size variables are assigned with small values \(x_{k}^{b}\), as in the domain \(X_{k}^{II}\). \(f({\mathbf{X}},\,{{\varvec{\upalpha}}})\) and \(g_{j} ({\mathbf{X}},\,{{\varvec{\upalpha}}})\) represent the objective function and the \(j - th\) constraint function, respectively, while \(J_{0}\) is the number of constraints. It is noteworthy that for the components that are constantly retained in the ground structure, their 0/1 topology variables are unnecessary to be considered and only the size variables should be optimized.

3 Optimization method

3.1 The first-level approximate problem with 0/1 topology and discrete size variables

As the primal problem (1) is usually implicit and nonlinear, it is difficult to be directly solved using conventional optimization methods. Thus, in this work, this problem is solved through a series of approximate problems (called the first-level approximate problems) by introducing the extended approximate concepts. In the p-th step, the first-level problem can be formulated as follows, which is similar as in Huang et al. (2019) except the size variables are discrete.

$$\left\{ {\begin{array}{*{20}l} {Min} \hfill & {f^{(p)} ({\mathbf{X}},\,{{\varvec{\upalpha}}})} \hfill & {} \hfill \\ {s.t.} \hfill & {g_{j}^{(p)} ({\mathbf{X}},\,{{\varvec{\upalpha}}}) \le 0} \hfill & {j = 1,...,\,J_{1} } \hfill \\ {} \hfill & {\alpha_{i} = 0\,{\text{or}}\,\alpha_{i} = 1} \hfill & {i = 1,...,\,n} \hfill \\ {} \hfill & {x_{k} \in \{ x_{k,1} ,\,x_{k,2} ,...,\,x_{{k,s_{k} }} \} } \hfill & {if \, x_{k} \in X_{k}^{I} } \hfill \\ {} \hfill & {x_{k} = x_{k}^{b} } \hfill & {if \, x_{k} \in X_{k}^{II} } \hfill \\ {} \hfill & {} \hfill & {k = 1,...,\,m} \hfill \\ \end{array} } \right.$$
(4)

here, \(f^{(p)} ({\mathbf{X}},\,{{\varvec{\upalpha}}})\) and \(g_{j}^{(p)} ({\mathbf{X}},\,{{\varvec{\upalpha}}})\) represent the approximate objective and constraint functions with 0/1 topology and discrete size variables, respectively, while \(J_{1}\) is the number of active constraints related to the problem (1). Only those with relatively large constraint function values at the current design point are selected as the active constraints. The active constraint is actually the constraint whose value is larger than a threshold value, here the threshold value is set as − 0.1.

The approximate functions \(f^{(p)} ({\mathbf{X}},\,{{\varvec{\upalpha}}})\) and \(g_{j}^{(p)} ({\mathbf{X}},\,{{\varvec{\upalpha}}})\) can be explicitly constructed with the following extended approximate concepts. The size variables are temporally taken as continuous, these functions can be firstly established as continuous ones by using the BMA function in Huang et al. (2019). Then considering the discontinuity of variables, only the BMA function values on the discrete size variable values are considered to construct the discrete functions \(f^{(p)} ({\mathbf{X}},\,{{\varvec{\upalpha}}})\) and \(g_{j}^{(p)} ({\mathbf{X}},\,{{\varvec{\upalpha}}})\). Therefore, the BMA function is a discrete function in this work. For simple representation, both \(f^{(p)} ({\mathbf{X}},\,{{\varvec{\upalpha}}})\) and \(g_{j}^{(p)} ({\mathbf{X}},\,{{\varvec{\upalpha}}})\) are substituted with an unified \(w^{(p)} ({\mathbf{X}},{{\varvec{\upalpha}}})\), which is as shown in the following:

$$w^{(p)} ({\mathbf{X}},{{\varvec{\upalpha}}}) = \sum\limits_{t = 1}^{H} {\tilde{w}_{t} ({\mathbf{X}},{{\varvec{\upalpha}}})} h_{t} ({\mathbf{X}},{{\varvec{\upalpha}}})$$
(5)
$$\tilde{w}_{t} ({\mathbf{X}},{{\varvec{\upalpha}}}){ = }w({\mathbf{X}}_{t} ,{{\varvec{\upalpha}}}_{t} ){ + }\sum\limits_{k = 1}^{m} \Delta w_{k,t} ({\mathbf{X}},{{\varvec{\upalpha}}})$$
(6)
$$\Delta w_{k,t} ({\mathbf{X}},{{\varvec{\upalpha}}}){ = }\left\{ {\begin{array}{*{20}c} {\frac{1}{{r_{o,t} }}\frac{{\partial w({\mathbf{X}}_{t} ,{{\varvec{\upalpha}}}_{t} )}}{{\partial x_{k} }}x_{k,t}^{{1 - r_{o,t} }} \left( {x_{k}^{{r_{o,t} }} - x_{k,t}^{{r_{o,t} }} } \right)} & {if \, x_{k} \in X_{k}^{I} } \\ {\frac{1}{{r_{m,t} }}\frac{{\partial w({\mathbf{X}}_{t} ,{{\varvec{\upalpha}}}_{t} )}}{{\partial x_{k} }}\left( {1 - e^{{ - r_{m,t} \left( {x_{k} - x_{k,t} } \right)}} } \right)} & {if \, x_{k} \in X_{k}^{II} } \\ \end{array} } \right.$$
(7)
$$h_{t} \left( {{\mathbf{X}},{\mkern 1mu} {\mathbf{\alpha }}} \right) = \frac{{\bar{h}_{t} \left( {{\mathbf{X}},{\mkern 1mu} {\mathbf{\alpha }}} \right)}}{{\sum\nolimits_{{l = 1}}^{H} {\bar{h}_{l} \left( {{\mathbf{X}},{\mkern 1mu} {\mathbf{\alpha }}} \right)} }},{\mkern 1mu} t = 1,...,{\mkern 1mu} H$$
(8)
$$\overline{h}_{l} \left( {{\mathbf{X}},\,{{\varvec{\upalpha}}}} \right){ = }\prod\limits_{\begin{subarray}{l} s = 1 \\ s \ne l \end{subarray} }^{H} {\left( {{\mathbf{X}} - {\mathbf{X}}_{{\mathbf{s}}} } \right)^{T} \left( {{\mathbf{X}} - {\mathbf{X}}_{{\mathbf{s}}} } \right)}$$
(9)

here, \({\mathbf{X}}_{t}\) or \({{\varvec{\upalpha}}}_{{\text{t}}}\) is the t-th known point, and H is the number of the known points that are counted in Eq.  (8) with an upper bound \(H_{\max }\) which is suggested as 5. \(w({\mathbf{X}}_{t} ,\,{{\varvec{\upalpha}}}_{t} )\) and \(\frac{{\partial w({\mathbf{X}}_{t} ,\,{{\varvec{\upalpha}}}_{t} )}}{{\partial x_{k} }}\) are the primal function value and corresponding partial derivative with respect to \(x_{k}\) on the known point \(\left( {{\mathbf{X}}_{t} ,\,{{\varvec{\upalpha}}}_{t} } \right)\), respectively. \(r_{o,t}\) and \(r_{m,t}\) are the adaptive parameters used to control the nonlinearity of the approximation, respectively, and the process of determining these parameters is same as the work (Huang et al. 2019). As the domain \(X_{k}^{I}\) in Eq.  (7) is discrete, the function \(w^{(p)} ({\mathbf{X}},\,{{\varvec{\upalpha}}})\) is actually a discrete function which is different from that in Huang et al. (2019). However, other aspects to establish the BMA function, such as the process of selecting known points, are same as that work. This function can sufficiently make use of the information of the known points to construct the high-quality approximate problem without increasing the calculation amount. It should be noted that the various parameters are mainly used to control the stability of iterations, and they can also help to reach the convergence. Actually, these parameters above were firstly used in the previous method (Huang and Xia 1995) which had shown great effectiveness in solving the structural optimization problems. For details, you are suggested to read the work (Huang and Xia 1995).

The above procedure can be further explained with Fig. 1 in which the multi-dimensional size variables are simplified as horizontal axis X. Here, the solid and dotted curves denote the primal and BMA functions under the given topology α by supposing that the size variables were continuous. However, as these variables are actually discrete, both the primal and the BMA functions in fact can only take their values at the available discrete points, such as \(w({\mathbf{X}}_{{{\mathbf{i}} - 1}} ,\,{{\varvec{\upalpha}}})\), \(w({\mathbf{X}}_{{\mathbf{i}}} ,\,{{\varvec{\upalpha}}})\), \(w({\mathbf{X}}_{{{\mathbf{i}} + 1}} ,\,{{\varvec{\upalpha}}})\), or \(w^{\left( p \right)} ({\mathbf{X}}_{{{\mathbf{i}} - 1}} ,\,{{\varvec{\upalpha}}})\), \(w^{\left( p \right)} ({\mathbf{X}}_{{\mathbf{i}}} ,\,{{\varvec{\upalpha}}})\), \(w^{\left( p \right)} ({\mathbf{X}}_{{{\mathbf{i}} + 1}} ,\,{{\varvec{\upalpha}}})\). Only at the known point \({\mathbf{X}}_{{\mathbf{t}}}\) which is used to construct the BMA function, we have \(w({\mathbf{X}}_{{\mathbf{t}}} ,\,{{\varvec{\upalpha}}}) = w^{\left( p \right)} ({\mathbf{X}}_{{\mathbf{t}}} ,\,{{\varvec{\upalpha}}})\).

Fig. 1
figure 1

The procedure of constructing the approximate function

3.2 The strategy to solve the first-level approximate problem

The first-level approximate problem (4) involves the 0/1 topology variables and the discrete size variables. In order to sufficiently make use of the previous achievements (Huang et al. 2019) to solve this problem, a layered optimization strategy is still introduced. The 0/1 topology variables \({{\varvec{\upalpha}}}\) are determined GA same as (Huang et al. 2019) in the external layer, and the size variables \({\mathbf{X}}\) are optimized in the internal layer. In the size optimization, two steps are contained. Firstly, the size variables are temporally supposed as continuous, then for a given topology, i.e. a member in GA for \({{\varvec{\upalpha}}}\) optimization in the external layer, the optimal sizes \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\) can be obtained through a series of second-level approximate problems that can be solved by the dual method. Secondly, by considering the available discrete sizes adjacent to \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\), each size variable \(x_{k}\) for the remained components is further determined in the discrete set \(X_{k}^{I}\). The details of the optimization process are presented as below.

3.2.1 The second-level approximate problem with continuous size variables

For a given topology \({{\varvec{\upalpha}}}_{{\mathbf{S}}}\) from the external layer, i.e. when the structural layout is given, the size variables of the removed components would be fixed as small values, only the size variables of the remained components should be optimized. When determining the size variables of the remained components, they are temporally supposed as continuous firstly, then the continuous optimal sizes \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\) can be obtained through a series of second-level approximate problems. In the q-th step, the second-level approximate problem can be written as follows.

$$\left\{ {\begin{array}{*{20}l} {Find} \hfill & {{\tilde{\mathbf{X}}} = \{ \tilde{x}_{1} ,\,\tilde{x}_{2} ,...,\,\tilde{x}_{I} \}^{T} } \hfill & {} \hfill \\ {Min} \hfill & {\tilde{f}^{(q)} ({\tilde{\mathbf{X}}}) = f^{(p)} ({\mathbf{X}}_{(q)} ,\,{{\varvec{\upalpha}}}_{{\mathbf{S}}} ) + \sum\limits_{k = 1}^{I} {\frac{{\partial f^{(p)} ({\mathbf{X}}_{(q)} ,\,{{\varvec{\upalpha}}}_{{\mathbf{S}}} )}}{{\partial \tilde{x}_{k} }}\left( {\tilde{x}_{k} - \tilde{x}_{k(q)} } \right)} } \hfill & {} \hfill \\ {s.t.} \hfill & {\tilde{g}_{j}^{(q)} ({\tilde{\mathbf{X}}}) = g_{j}^{(p)} ({\mathbf{X}}_{(q)} ,\,{{\varvec{\upalpha}}}_{{\mathbf{S}}} ) - \sum\limits_{k = 1}^{I} {\tilde{x}_{k(q)}^{2} \frac{{\partial g_{j}^{(p)} ({\mathbf{X}}_{(q)} ,\,{{\varvec{\upalpha}}}_{{\mathbf{S}}} )}}{{\partial \tilde{x}_{k} }}\left( {\frac{1}{{\tilde{x}_{k} }} - \frac{1}{{\tilde{x}_{k(q)} }}} \right)} \le 0} \hfill & {j = 1,....,\,J_{2} } \hfill \\ {} \hfill & {\overline{x}_{k(q)}^{L} \le \tilde{x}_{k} \le \overline{x}_{k(q)}^{U} } \hfill & {k = 1,...,\,I} \hfill \\ \end{array} } \right.$$
(10)

where \({\tilde{\mathbf{X}}}\) denotes the vector of continuous size variables corresponding to the remained components and \(I\) is the number of these size variables. \(\tilde{f}^{(q)} ({\tilde{\mathbf{X}}})\) and \(\tilde{g}_{j}^{(q)} ({\tilde{\mathbf{X}}})\) are the objective and constraint functions at the q-th step second-level approximate problem (10), respectively; \(J_{2}\) represents the number of remained constraints. \({\mathbf{X}}_{(q)}\) denotes the design vector which consists of all the elements of \({\tilde{\mathbf{X}}}_{(q)} = \left\{ {\tilde{x}_{1(q)} ,...,\,\tilde{x}_{I(q)} } \right\}^{T}\), i.e. the expansion point at the q-th step, and the small values corresponding to zero values in the topology \({{\varvec{\upalpha}}}_{{\mathbf{S}}}\). \(\overline{x}_{k(q)}^{U}\) and \(\overline{x}_{k(q)}^{L}\) are the upper and lower bounds for \(\tilde{x}_{k}\) at the q-th step, i.e. \(\overline{x}_{k(q)}^{U} = \min \left\{ {\tilde{x}_{k}^{(\max )} ,\,\tilde{x}_{k(q)}^{U} } \right\}\),\(\overline{x}_{k(q)}^{L} = \max \left\{ {\tilde{x}_{k}^{(\min )} ,\,\tilde{x}_{k(q)}^{L} } \right\}(k = 1,...,\,I)\); \(\tilde{x}_{k(q)}^{L}\) and \(\tilde{x}_{k(q)}^{U}\) denote the move limits of \(\tilde{x}_{k}\) at the q-th step, initially set as 20%; and \(\tilde{x}_{k}^{(\max )}\) and \(\tilde{x}_{k}^{(\min )}\) denote the maximum and minimum values of the discrete set for \(\tilde{x}_{k}\), respectively.

The second-level approximate problem (10) is in fact a variable-separable problem, and it can be solved with the dual method (Fleury and Schmit 1981). Therefore, the optimal sizes \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}} = \left\{ {\overline{x}_{1}^{\left( p \right)} , \ldots ,\,\overline{x}_{I}^{\left( p \right)} } \right\}^{{\text{T}}}\) can be obtained through iterations.

3.2.2 Size variables further determined in the discrete set

Since \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\) is continuous, it usually does not satisfy the discrete requirement for the size variables. To solve this problem, we firstly consider the two available discrete sizes values that are respectively located on the both sides and most closely adjacent to each component \(\overline{x}_{k}^{\left( p \right)} \left( {k = 1, \ldots ,\,I} \right)\) in \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\), then the optimal discrete size design can be further determined through the following problem.

$$\left\{ {\begin{array}{*{20}l} {Find} \hfill & {{\tilde{\mathbf{X}}} = \left\{ {\tilde{x}_{1} ,\tilde{x}_{2} ...,\tilde{x}_{I} } \right\}^{T} } \hfill & {} \hfill \\ {Min} \hfill & {f^{(p)} \left( {{\mathbf{X}},{{\varvec{\upalpha}}}_{{\mathbf{S}}} } \right)} \hfill & {} \hfill \\ {s.t.} \hfill & {g_{j}^{(p)} \left( {{\mathbf{X}},{{\varvec{\upalpha}}}_{{\mathbf{S}}} } \right) \le 0} \hfill & {j = 1,...,J_{2} } \hfill \\ {} \hfill & {\tilde{x}_{k} = \tilde{x}_{k}^{(1)} \, or \, \tilde{x}_{k} = \tilde{x}_{k}^{(2)} } \hfill & {k = 1,...,I} \hfill \\ \end{array} } \right.$$
(11)

where \({\tilde{\mathbf{X}}}\) is the discrete design variable vector of the remained components. \({\mathbf{X}}\) is the design vector corresponding to the topology \({{\varvec{\upalpha}}}_{{\mathbf{S}}}\), and it is composed of all the elements of \({\tilde{\mathbf{X}}} = \left\{ {\tilde{x}_{1} ,\,\tilde{x}_{2} ...,\,\tilde{x}_{I} } \right\}^{T}\) and the small values corresponding to zero values in \({{\varvec{\upalpha}}}_{{\mathbf{S}}}\). \(\tilde{x}_{k}^{(1)}\) and \(\tilde{x}_{k}^{(2)}\) denote the two available values adjacent to the each component \(\overline{x}_{k}^{\left( p \right)}\) in \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\),i.e. \(\tilde{x}_{k}^{(1)} \le \overline{x}_{k}^{\left( p \right)} \le \tilde{x}_{k}^{(2)}\), respectively.

The problem (11) only involves discrete size variables and can be tackled with GA. This problem is firstly transformed into an unconstrained minimization problem by using an exterior penalty function method (Liu et al. 2012; An et al. 2015; An and Huang 2017), then it can be solved through the GA procedure. The unconstrained minimization problem, which is also the fitness function in GA, can be written in the following:

$$F({\tilde{\mathbf{X}}}) = \left\{ {\begin{array}{*{20}l} {f^{(p)} \left( {{\mathbf{X}},{{\varvec{\upalpha}}}_{{\mathbf{S}}} } \right) - \left\langle {f^{(p)} \left( {{\mathbf{X}},\,{{\varvec{\upalpha}}}_{{\mathbf{S}}} } \right)} \right\rangle \varepsilon \left| {\max \left\{ {g_{1}^{(p)} \left( {{\mathbf{X}},\,{{\varvec{\upalpha}}}_{{\mathbf{S}}} } \right),...,g_{{J_{2} }}^{(p)} \left( {{\mathbf{X}},\,{{\varvec{\upalpha}}}_{{\mathbf{S}}} } \right)} \right\}} \right|} \hfill & {if\,\left( {{\mathbf{X}},\,{{\varvec{\upalpha}}}_{{\mathbf{S}}} } \right)\,is\,feasible} \hfill \\ {\overline{f}^{(p)} ({\mathbf{X}},{{\varvec{\upalpha}}}_{{\mathbf{S}}} ) + \left\langle {f^{(p)} ({\mathbf{X}},{{\varvec{\upalpha}}}_{{\mathbf{S}}} )} \right\rangle \left[ {\left( {1 + \sum\limits_{j = 1}^{{J_{2} }} {\frac{{\overline{g}_{j}^{(p)} }}{{\sum\limits_{l = 1}^{{J_{2} }} {\overline{g}_{l}^{(p)} } }}g_{j}^{(p)} ({\mathbf{X}},{{\varvec{\upalpha}}}_{{\mathbf{S}}} )} } \right)^{2} - 1} \right]} \hfill & {otherwise} \hfill \\ \end{array} } \right.$$
(12)

where

$$\overline{f}^{(p)} \left( {{\mathbf{X}},\,{{\varvec{\upalpha}}}_{{\mathbf{S}}} } \right) = \left\{ {\begin{array}{*{20}l} {f^{(p)} ({\mathbf{X}},{{\varvec{\upalpha}}}_{{\mathbf{S}}} )} \hfill & {if\,f^{(p)} ({\mathbf{X}},{{\varvec{\upalpha}}}_{{\mathbf{S}}} ) > \left\langle {f^{(p)} ({\mathbf{X}},{{\varvec{\upalpha}}}_{{\mathbf{S}}} )} \right\rangle ,} \hfill \\ {\left\langle {f^{(p)} ({\mathbf{X}},{{\varvec{\upalpha}}}_{{\mathbf{S}}} )} \right\rangle } \hfill & {otherwise.} \hfill \\ \end{array} } \right.$$
(13)

In addition, \(\left\langle {f^{(p)} ({\mathbf{X}},{{\varvec{\upalpha}}}_{{\mathbf{S}}} )} \right\rangle\) is the average objective value among the current population, and \(\overline{g}_{j}^{(p)}\) is the violation of the j-th constraint averaged over the current population. \(\varepsilon\) is a small value of the maximum constraint to be subtracted from the objective to discriminate between multiple designs with the same objective value. (In this study, this parameter is assigned as 0.00001.)

When the GA terminates, the optimal discrete sizes \({\tilde{\mathbf{X}}}_{{\mathbf{S}}}\) can be obtained, as well as the corresponding fitness function value \(F({\tilde{\mathbf{X}}}_{{\mathbf{S}}} )\).

It should be pointed out that the solution of the problem (11) obtained with GA could be located in infeasible domain, then the corresponding fitness would be a large or worse value, and corresponding design \(({\mathbf{X}}_{{\text{S}}} ,{{\varvec{\upalpha}}}_{{\mathbf{S}}} )\) would not be selected in the external layer optimization, except all the group members/designs in the current generation are infeasible. That means the outer loop solution is infeasible. In such kind of case, the design with a relatively small but worse fitness will be selected and used to establish the next first-level approximate problem (4). If this worse-fitness case continuously appears, the optimization process will be automatically stopped by the program and return a message. This reminds the program users to check the problem data, which also indicates that the problem might have no feasible solution.

As described above, GA is used in solving approximate problems (4) and (11) in which there are discrete variables. Besides GA, actually other methods for discrete optimization can be also used for these problems. Normally, GA has the advantages in global optimum search, although its efficiency could be lower. On the contrary, other discrete optimization methods could be more efficient, but more likely get a local optimum. Anyway, as discrete optimization is focused on the approximate problems in this work, no matter GA or another method used, it will not directly affect the number of structural analyses needed for solving the primal structural optimization problem.

3.3 Steps and flow chart

Figure 2 is the flow chart of the proposed method, shown as follows.

Fig. 2
figure 2

Flow chart of the proposed method

This flow chart can be further explained by using the following steps:

Step 1:

Give an initial design \({\mathbf{X}}^{{{\mathbf{(p)}}}}\), p = 1.

Step 2:

Conduct the structural analysis with FEM for the current design \({\mathbf{X}}^{{{\mathbf{(p)}}}}\), check the feasibility and determine the active constraints according to the analysis results. Then execute the sensitivity analysis for them.

Step 3:

Establish the p-th step of first-level approximate problems (4) with the structural and the sensitivity information above.

Step 4:

Generate an initial population of GA for 0/1 topology variables, i.e. G = 1.

Step 5:

Execute the configuration valid check for all the members\topologies in the current population.

Step 6:

Conduct the size variable optimization for each valid member\topology \({{\varvec{\upalpha}}}_{{\mathbf{S}}}\) in the current population to obtain the optimal discrete sizes \({\tilde{\mathbf{X}}}_{{\mathbf{S}}}\). The size variable optimization will be detailed as follows:

  1. 1.

    Create the second-level approximate problem (10) with continuous size variables and solve it by using the dual method to obtain \({ }{\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\).

  2. 2.

    Establish an optimization problem (11) in which each size variable could be determined from two available discrete values that are adjacent to \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\).

  3. 3.

    Solve the problem (11) with GA and obtain the optimal sizes \({\tilde{\mathbf{X}}}_{{\mathbf{S}}}\) as well as the corresponding fitness (or fitness function value) \(F({\tilde{\mathbf{X}}}_{{\mathbf{S}}} )\).

Step 7:

Determine the fitness values for all the members in the current population. For each valid member/topology \({{\varvec{\upalpha}}}_{{\mathbf{S}}}\) of them, the fitness is determined as \(F({\tilde{\mathbf{X}}}_{{\mathbf{S}}} )\); and for the invalid members/topologies, they are removed from the current population. Obtain the optimal size of the member/topology whose fitness is the best in the current population, supposed as \({\mathbf{X}}_{{\mathbf{G}}}^{{{\mathbf{(p)}}}}\).

Step 8:

Execute the reproduction operator with the simulated roulette wheel selection method which needs fitness information, as well as the crossover and mutation operators, to generate a new or next population, i.e. G = G + 1.

Step 9:

If the generation number (G) does not reach the maximum generation number, MaxG, return to Step 5; otherwise, i.e. G = MaxG, set \({\mathbf{X}}^{{{\mathbf{(p + 1)}}}} { = }{\mathbf{X}}_{{\mathbf{G}}}^{{{\mathbf{(p)}}}}\) and conduct Step 10.

Step 10:

If \({\mathbf{X}}^{{{\mathbf{(p + 1)}}}}\) is close to the previous design \({\mathbf{X}}^{{{\mathbf{(p)}}}}\) and in the feasible field, it is the final optimum; otherwise, set p = p + 1 and return to Step 2.

It should be illustrated that even if \({\mathbf{X}}^{{{\mathbf{(p + 1)}}}}\) is close to \({\mathbf{X}}^{{{\mathbf{(p)}}}}\) in Step 10, actually, we still set p = p + 1, and Step 2 is conducted. If the current design \({\mathbf{X}}^{{{\mathbf{(p)}}}}\) is checked in the feasible field, then it will be taken as optimum and the iteration is stopped.

According to the steps above, it can be found that the proposed method could be used for both the topology and discrete size optimization. In addition, if only considering the discrete size optimization which is also very common in engineering design, this method could be still effective. Under this circumstance, the GA procedure for 0/1 topology variables in Fig. 2 is not considered, only the size variable optimization, as shown in the right side of Fig. 2, is executed to determine the discrete size variables.

It should be noticed that no additional structural analysis is needed during calculating the derivatives of the stresses, displacements or frequencies. In fact, the sensitivities of an active stress or displacement constraint can be obtained mainly based on the responses of the same structure under a virtual loading case, which only needs a time of back substitute in solving the stiffness equations under this virtual load instead of completely solving this system of equations again since the stiffness matrix decomposition has been completed after structural analysis. The time cost for the back substitute procedure is much less compared with the structural analysis which needs the whole procedure of solving the stiffness equations.

4 Numerical examples

Several numerical examples are given to verify the effectiveness and efficiency of the proposed method for the topology and discrete size optimization. These examples include design optimizations for the truss, the frame and the stiffened box structures. In addition, to exactly compare with the former works, two examples of them (Example 1 and 3) only consider the discrete size optimization.

For GA used in the following examples, the parameters are all set as follows. The population number is 50, the maximum generation number is 50, the crossover and mutation probability are set as 0.9 and 0.05, respectively.

4.1 Example 1: ten-bar truss (case 1)

The ten-bar truss structure is a benchmark example that only considers discrete size optimization. The structural configuration, as well as the boundary and the loading conditions, is fixed and shown in Fig. 3. The Young’s modulus E is \(10^{7} {\text{lb/in}}^{{2}}\), and the density ρ is \(0.1{\text{ lb/in}}^{{3}}\). The cross-sectional areas of all bars are considered as independent variables, and their values could only be taken from the discrete set D = {1.62, 1.80, 1.99, 2.13, 2.38, 2.62, 2.88, 2.93, 3.09, 3.13, 3.38, 3.47, 3.55, 3.63, 3.84, 3.87, 3.88, 4.18, 4.22, 4.49, 4.59, 4.80, 4.97, 5.12, 5.74, 7.22, 7.97, 11.5, 13.5, 13.9, 14.2, 15.5, 16.0, 16.9, 18.8, 19.9, 22.0, 22.9, 26.5, 30.0, 33.5}(in.2). The initial areas of all the bars are 16.9 in2. The limitations for displacements of the free nodes in both x and y directions are less than ± 2 in and the allowable stress for each bar is \(2.5 \times 10^{4} {\text{ lb/in}}^{{2}}\).

Fig. 3
figure 3

Ten-bar truss

With the proposed method, the optimization results are shown in Table 1 and Fig. 4, respectively. From Fig. 4, it can be observed that some bars are greatly strengthened with large areas, while other bars are just set as small areas for lightening the structural mass. Table 1 also compares the present result with those obtained in other literatures. According to the comparison, it can be seen that this result is completely same as those in (Sonmez 2011; Schevenels et al. 2014), while it is lighter than that in Sadollah et al. (2012). Meanwhile, since the primal problem (1) is tackled through a series of explicitly first-level approximate problems, a large number of structural analyses could be reduced. Here, the proposed method only needs 12 times of structural analyses, which is much faster than others. The iteration history of the ten-bar structural masses is shown in Fig. 5. And in order to further illustrate the GA process for optimizing the current design, the iteration histories of GA fitness values in some cycles are also shown in Fig. 5.

Table 1 Optimization results for ten-bar truss in Example 1
Fig. 4
figure 4

Optimal cross-sectional areas [in2] of ten-bar truss in this work

Fig. 5
figure 5

Iteration history of structural masses

4.2 Example 2: ten-bar truss (case 2)

In this example, a ten-bar truss (Vazquez-Espi and Vazquez-Espi 1997; Tang et al. 2005) considering both topology and discrete size optimization was established. The ground structure is shown in Fig. 3. Other details are identical in Example 1 except for the discrete set. Here, the discrete set D = {1.62, 1.80, 2.38, 2.62, 2.88, 3.09, 3.13, 3.38, 3.63, 3.84, 3.87, 4.18, 4.49, 4.80, 4.97, 5.12, 5.74, 7.22, 7.97, 11.5, 13.5, 13.9, 14.2, 15.5, 16.0, 18.8, 19.9, 22.0, 22.9, 26.5, 30.0, 33.5}(in.2). The initial areas of all the bars are set as 33.5 in2.

With the proposed method, the optimization results are shown in Table 2 and Fig. 6, respectively, and the iteration history of the structural masses is shown in Fig. 7. From the results, it can be seen that the final design is not only statically determinate, but also can satisfy all the constraint requirements. Table 2 also compares this design with those in other literatures. According to the comparison, it can be found that this design has the same topology configuration as other literatures. Meanwhile, although the structural mass obtained with the proposed method is slightly heavier than those in other literatures, the computational cost could be quite small. Here, the number of the structural analyses is only 16.

Table 2 Optimization results for ten-bar truss in Example 2
Fig. 6
figure 6

Topology configuration of the results in this work

Fig. 7
figure 7

Iteration history of structural masses

Based on the earlier description, it can be found that this method could obtain a reasonable design with high efficiency.

4.3 Example 3: eight-story frame

To verify the effectiveness and efficiency of the proposed method for optimizing other types of structures, an eight-story frame example (Camp et al. 1998; Schevenels et al. 2014; Talatahari et al. 2015) was established. This example is also a benchmark example in discrete size optimization, and its structure configuration, as well as the loading and the boundary conditions, is as shown in Fig. 8. The Young’s modulus of the material is 200 GPa, and the density and the Poisson's ratio are 7833 kg/m3 and 0.3, respectively. The beams are categorized into 8 groups, and each group is assigned with a W-shape beam section, as shown in Fig. 9. The sizes of the W-shape section (H2, Ht, t, W) are considered as the design variables, and their values could only be taken from the available W-shape sections in the American Institute of Steel Construction (AISC) database (American Institute of Steel Construction 1994). (The available section can be written as a unified form ‘W number1 × number2’, e.g. W18 × 40, W18 × 50, and so on.) The initial values of these variables are set as the sizes of W18 × 50, respectively. In the previous work, the lateral displacement limitation of the top left node is 0.0508 m. Here by using MSC. Patran/Nastran, this structure is analyzed with the results obtained from the aforementioned work, and it is found that the displacement of the top left node could reach 0.057 m, as shown in Table 3. For a suitable comparison, the displacement limitation in this work is set as 0.057 mm.

Fig. 8
figure 8

The eight-story frame

Fig. 9
figure 9

The W-shape section of each beam and its four sizes

Table 3 Optimization results for 8-story frame

Table 3 shows the optimization results in this work as well as in other literatures. From Table 3, it can be seen the final design in this work can satisfy the displacement limitation. Although its structural mass is a little bit heavier, the proposed method is extremely faster than those in other literatures. Here, the number of structural analyses is only 20, which illustrates the effectiveness and the high efficiency of the proposed method. The iteration history of structural masses is shown in Fig. 10.

Fig. 10
figure 10

Iteration history of the structural mass

It is noted that for each beam in this structure, since the four cross-sectional size variables are determined by the same available W-shape section in the AISC database, these variables actually have a combinatorial relationship and not independent. In order to optimize them, the following strategy was introduced for this example. Firstly we considered only the size W of the W-shape section (as shown in Fig. 9) as an independent variable and determined its two available values adjacent to the corresponding component of \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\) in the problem (11); for each available value of W, we could find several W-shape sections containing this value from the AISC database; among them we could find the section whose area is closest to the one obtained by the corresponding sizes of \({\overline{\mathbf{X}}}^{{\left( {\mathbf{p}} \right)}}\), and the available values of other three sizes could be further determined according to the size relationship of this section. And although this strategy could be approximate, the optimization results in Table 3 show that it is still effective.

Figure 10 also shows that the mass oscillates over the iterations, the reason is that the set of active constraints could change from iteration to iteration. Since the set of active constraints in the current iteration only contains the constraints whose constraint function values are larger than the threshold one, the relatively small constraints, i.e. inactive constraints, are actually not be taken into account in the approximate problems and the optimization process of each iteration. Therefore when the current iteration is completed, the inactive constraints could become active ones in the next iteration. In this case, the result obtained from the next iteration could be quite different from the current one because the active constraint set is changed, which can cause the oscillation of the mass over the iterations.

4.4 Example 4: stiffened box

To further investigate the performance of the proposed method on topology and discrete size optimization for more complex structures, a stiffened box example is constructed. In this example, both the topology and discrete size optimization and the pure discrete size optimization are considered. The ground structure contains 5 panels [numbered from (1) to (5)] and 52 stiffeners, as shown in Fig. 11. Each stiffener has a rectangle section, as shown in Fig. 12. This structure is fixed with the 4 bottom edges, and loaded on each panel by a distributed pressure, as shown in Table 4. The material density is \(7833kg/m^{3}\), and the Young’s modulus and the Poisson’s ratio are \(2.0 \times 10^{11} Pa\) and 0.3, respectively. The required constraint is that the maximum displacement of each panel is no more than 0.005 m.

Fig. 11
figure 11

Ground structure of stiffened box. a the view of four side panels; b the view of bottom panel

Fig. 12
figure 12

Rectangle section of the stiffener (unit: m)

Table 4 Distributed pressures loaded on the panels

In this example, the 52 stiffeners are categorized into 15 size groups by using symmetry, as shown in Fig. 11. The cross-sectional sizes (H and W) of stiffeners and the panel thicknesses (T) are all considered as the discrete size variables, whereas only the presence/absence of stiffeners, regarded as topology 0/1 variables, can be designed. Therefore, there are totally 35 size variables and 15 topology variables. The cross-sectional size variables H and W could only be determined from the following available rectangle sections, i.e. D1 = {0.005 × 0.005, 0.005 × 0.01, 0.005 × 0.015, 0.005 × 0.02, 0.005 × 0.025, 0.01 × 0.01, 0.01 × 0.015, 0.01 × 0.02, 0.01 × 0.025, 0.015 × 0.015, 0.015 × 0.02, 0.015 × 0.025, 0.02 × 0.02, 0.02 × 0.025, 0.025 × 0.025} (unit: m), while the panel thickness variables could be determined from D2 = {0.002, 0.004, 0.006, 0.008, 0.01, 0.012, 0.014, 0.016, 0.018, 0.02} (unit: m).The initial values for all the size variables are set as 0.01 m.

The structural FE model of the stiffened box is as shown in Fig. 13. Here, stiffeners and panels are modeled with beam and shell elements, respectively, and there are totally 4425 elements and 3176 nodes in this model. No offset is considered between a panel and a stiffener on it, which means that the section center of the stiffener is located in the center plane of the panel. In this work, the model is analyzed with linear FEM.

Fig. 13
figure 13

FE model of example 4

With the proposed method, the topology and discrete size optimization results are shown in Table 5 and Fig. 14, respectively. From the results, it can be seen that in the final design, only the stiffeners adjacent to the top edges are remained, yet the maximum displacement could still satisfy the constraint requirement. Meanwhile, the number of the structural analyses is quite small, only requires 19 times, exhibiting the high efficiency of the proposed method. For a suitable comparison, we also consider a pure discrete size optimization for this example, and the corresponding results are given in Table 5. It can be observed that by removing the unnecessary stiffeners from the ground structure, the structural mass of topology and discrete size optimization can be decreased by 11.75 kg compared with that of the pure size optimization, yet the numbers of their structural analyses could be comparable. Therefore, the effectiveness and the high efficiency of the proposed method could be illustrated. The iteration history of structural masses is shown in Fig. 15.

Table 5 Optimization results of the stiffened box
Fig. 14
figure 14

Optimal layout of the stiffeners in topology and discrete size optimization

Fig. 15
figure 15

Iteration of structural masses

In addition, the cross-sectional size variables H and W are not independent. Thus when optimizing these variables, we also take the same strategy as that in Example 3, here the rectangle width W (as shown in Fig. 12) is considered as the independent variable.

5 More in-depth analysis about the proposed method

In this method, GAs are actually used to solve the explicit approximation problems instead of the primal one. Therefore for each individual in GA, its fitness function can be directly evaluated by using the approximate function instead of conducting structural analysis, tremendously reducing the number of structural analyses. Actually, the proposed method is developed from our former work (Huang et al. 2019), thus it can sufficiently inherit the advantages of previous one. However, since all the fitness function evaluations are carried out in approximate manners, the optimization result may be affected by the inexactness of function evaluations. In fact, the optimization result is affected by the convergence accuracy. And because of existing discrete variables, the convergence accuracy can hardly be set too high, which could cause that the solutions obtained by the proposed method are sometimes slightly inferior to those found by other existing methods that need much more structural analyses. Besides in sizing optimization, as the number of available discrete size values can be decreased to only two, the scale of group or population required in GA can be largely reduced. Although it could be better for optimization to consider more available values, the weakness of considering only two values would be relieved with the iterations.

The proposed method is an engineering structural optimization method (which actually could be supposed as a special sequential approximation method). Although the convergence of the proposed method could not be proved mathematically, the results of numerical examples show that this method has a good convergence effect. In fact, for most structural optimization methods, their convergence is usually verified by numerical examples.

6 Conclusion

In this study, an effective method based on extended approximate concepts is presented to solve the structural discrete size and 0/1 topology optimization problem. And by using several numerical examples to verify the proposed method, we can get the following conclusions.

  1. (1)

    This method can effectively solve the structural optimization problems with 0/1 topology and discrete size variables, usually the number of structural analyses is no more than 30 times.

  2. (2)

    Although the structural masses obtained with this method are a litter bit heavier than those of other methods in some examples, the computational efficiency is quite high and can be hundreds of times faster than other methods.

  3. (3)

    This method could be expected for optimizing more complex combinational structures (i.e. the structures composed of multiple types of components) that are widely adopted in the engineering field.