Reducing the number of different members in truss layout optimization

Despite the long history of the truss layout optimization approach, its practical applications have been limited, partly due to high manufacturing costs associated with complex optimized structures consisting of members with different cross-sectional areas and member lengths. To address this issue, this study considers optimizing truss structures comprising limited types of members. On this topic, two distinct problems are considered, wherein the first problem, members of the same type share the same cross-sectional area (i.e., section-type problem); and in the second problem, members of the same type share the same cross-sectional area and length (i.e., member-type problem). A novel post-processing approach is proposed to tackle the target problems. In this approach, the optimized structures from the traditional layout and geometry optimization approaches are used as the starting points, members of which are then separated into groups by the k-means clustering approach. Subsequently, the clustered structures are geometrically optimized to reduce the area and length deviations (i.e., the differences between member area/length values and the corresponding cluster means). Several 2D and 3D examples are presented to demonstrate the capability of the proposed approaches. For the section-type problem, the area deviations can be reduced to near 0 for any given cluster number. The member-type problem is relatively more complex, but by providing more clusters, the maximum length deviation can be reduced below the target thresholds. Through the proposed clustering approach, the number of different members in the optimized trusses can be substantially decreased, thereby significantly reducing manufacturing costs.


Introduction
Trusses are widely used in countless projects worldwide. Due to the geometric complexity of truss structures, conventional design approaches are not only labour intensive but can also lead to inefficient designs. As an automatic design technique, the truss layout optimization approach is long-established. However, this approaches typically focus on identifying structures with lowest material consumption. Consequently, the optimized structures usually contain many structural members, each with different values of cross-sectional area and length, resulting in high manufacturing costs. Whilst the development of additive manufacturing (AM) techniques alleviates the manufacturing cost issue in small-scale projects (e.g., mechanical components), the applications of AM in large-scale projects (e.g., roofs and bridges) are limited. Therefore, this study aims to develop an approach to reduce the manufacturing costs of the optimized truss structures by controlling the number of member-types.
The classical layout optimization approach was pioneered by Dorn et al. (1964). Although the linear formulation of Dorn et al. (1964) guaranteed globally optimal solutions, this approach was numerically inefficient in large-scale problems and the optimized structures were usually complex. In recent decades, Gilbert and Tyas (2003) developed a member-adding approach that can significantly reduce computational costs without sacrificing solution optimality. He and Gilbert (2015) developed a geometry optimization approach that can rationalize the optimized truss structures. Therefore, state-of-art layout optimization can be used in 1 3 52 Page 2 of 16 the conceptual design of various projects, and examples are available in He et al. (2022). Recently, educational python codes were published in He et al. (2019b).
Previously, two categories of approaches have been considered to reduce manufacturing costs of optimized truss structures. The first category focused on reducing the number of members and nodes of the optimized structures. To achieve the targets, most studies in this category added integer variables to the optimization problem, which caused high computational costs. Therefore, different approaches have been proposed to address the numerical efficiency issue. For example, Asadpoure et al. (2015) and Torii et al. (2016) used step functions such as the Heaviside function to transform the continuous area values into integer values so that integer variables are avoided. Fairclough and Gilbert (2020) used runtime-generated constraints to speed up the integer programming solver.
The second category focused on designing structures consisting of members selected from given section lists. For example, Stolpe (2007, 2009) used discrete cross-sectional area variables in conjunction with the ground structure approach to obtain a series of 2D global optimal solutions. Later, similar problems were investigated by Kanno and Guo (2010) with considerations on load uncertainties added and by Mela (2014) with buckling constraints added. Ohsaki (2016) also considered the truss optimization problem with discrete area variables and treated the nodal positions as additional variables to achieve more efficient solutions. Besides the above studies based on the traditional layout optimization approach, many meta-heuristic-based studies also focused on the same topic, and a review can be found in Stolpe (2016). Meta-heuristic approaches are popular because of their versatility. However, their computational costs in large-scale problems are high, and therefore many studies fall into the category "size optimization" instead of "layout optimization" (Sigmund 2011). These studies in the second category are useful in designing structures with members selected from industrial manufacturers' section lists. Nevertheless, with the development of AM techniques, manufacturing members with customized sizes has become easier since arbitrary-shaped moulds can be additively manufactured (Kang et al. 2018). In light of this, more efficient solutions can be identified by relaxing the requirement that the sections must be selected from the given lists. Therefore, the current study investigates truss optimization with limited types of members used, but the area/length values for each member-type are determined by the optimization process.
To achieve the target, we combine the truss optimization with the k-means clustering approach, which aims to partition n elements into k clusters in which each element belongs to the cluster with the nearest mean. A traditional k-means clustering algorithm was available in Hartigan and Wong (1979). Recently, on the 1D k-means clustering problem, Wang and Song (2011) developed an algorithm that can guarantee global optimality. In continuum topology optimization, the k-means clustering approach was used to design modular structures in lattice or microstructure optimization problems. Qiu et al. (2021) considered modular structure design in topology optimization. By performing the k-means clustering based on the elemental principal stress directions, the design domain can be divided into several subregions, and then the modular structures within each subregion can be further determined. Besides the topology optimization area, the k-means clustering approach was also used with the structural form-finding approaches. Similar to the target of the current study, Brütting et al. (2021) utilized the k-means clustering approach to design structures comprising a limited number of different types of members and joints. However, this study focused on the geometrical properties, and the structural performance was not considered. Yu et al. (2022) combined the k-means clustering approach with the truss form-finding approach. By designing the structure with reference to the principal stress lines selected using the clustering approach, the geometric pattern can be controlled and the structural performance can be improved. In the computational graphics area, Lee et al. (2022) focused on the sphere meshing problem. By firstly clustering the mesh elements based on the elemental area and further carrying out a geometry optimization, a sphere can be divided into spherical pentagons of equal area. Previous studies have used the k-means clustering approach to design structures with limited types of modules or members. However, this approach was rarely used in conjunction with the traditional layout optimization approach.
Therefore, in this study, we combine the k-means clustering approach with the truss layout optimization approach to design structures formed by limited types of members. On this topic, two different problems are considered. In the first problem, members of the same type share the same crosssectional area (i.e. section-type problem). In the second problem, members of the same type share the same crosssectional area and length (i.e., member-type problem). To avoid using integer variables that cause high computational costs, we consider the member-type constraints in the postprocessing step only and use optimized structures from the traditional layout and geometry optimization as starting points. A few 2D and 3D examples demonstrate the effectiveness of the proposed approach. The rest of the paper is arranged as follows: Sect. 2 reviews the traditional layout and geometry optimization and then introduces the new post-processing approach; Sect. 3 presents a few 2D and 3D examples; Sect. 4 includes some relevant discussions, and the summary is in Sect. 5.

Review of the traditional layout and geometry optimization
Since layout optimization is used in this study, it is firstly reviewed in this section. The standard process involves three steps, as shown in Fig. 1a-c. Firstly, the design domain, load and support conditions are specified (Fig. 1a); secondly, nodes are generated inside the design domain and potential members are created by interconnecting these nodes, forming a "ground structure" (Fig. 1b); finally, the optimal layout is identified by solving the underlying optimization problem (Fig. 1c). The basic 2D rigid-plastic layout optimization formulation can be written as follows: where V represents total str ucture volume; l = [l 1 , … , l m ] T is the length vector of the structural members with m denoting the number of members; a = [a 1 , a 2 , … , a m ] T is a vector containing the member cross-sectional areas; q = [q 1 , q 2 , … , q m ] T is a vector containing the internal member forces; f = [f 1x , f 1y , f 2x , f 2y , … , f nx , f ny ] T is the vector containing the external forces, with n denoting the number of nodes. Also, t and c are limiting tensile and compressive stresses, respectively. B is a 2n × m equilibrium matrix consisting of direction cosines.
Problem (1) is a linear programming problem which can be solved efficiently by interior point solvers such as MOSEK (2019).
In practice, the structure obtained by solving Problem (1) may contain many members having non-zero areas, leading to complex truss layouts. To address this problem, geometry optimization can be used as a post-processing rationalization step (e.g., Fig. 1d). In the geometry optimization, the nodal positions are treated as additional variables: where x = [x 1 , x 2 , … , x n ] T and y = [y 1 , y 2 , … , y n ] T are vectors of nodal x-and y-coordinates with n denoting the number of nodes.
With the node positions added as variables, the optimization problem becomes non-convex and non-linear. Therefore, the non-linear interior point solver IPOPT (Wächter and Biegler 2006) is used. Geometry operations such as merging close nodes and creating crossovers are carried out in between the iterations. More details about the geometry optimization approach can be found in He and Gilbert (2015).

Truss optimization with limited types of members
The layout and geometry optimization approaches can obtain efficient and rationalized structures. However, the manufacturing costs are high because each member has its unique crosssectional area and member length. To address this problem, we Fig. 1 Four steps of the layout optimization approach (He et al. 2019a): a discretizing the design domain into a node grid; b building the ground structure which includes every possible interconnections between the nodes; c using the layout optimization formulation to select the optimal subset structure from the ground structure; d using geometry optimization to further rationalize the structure; red and blue bars represent members take tension and compression forces, respectively target to design a structure formed by limited types of members. The manufacturing costs can be significantly reduced if members in the same group share the same area and length. Nevertheless, in projects such as timber structures, the costs of member cutting are relatively low. In these situations, more effective structures can be obtained by relaxing the type requirement on the member length. Therefore, we consider two types of problems: the section-type problem (i.e., members of the same type have the same cross-sectional area) and the member-type problem (i.e., members of the same type have the same cross-sectional area and length).

Approach for the section-type problem
We propose a novel two-step post-processing approach to obtain optimized designs that are formed by a limited number of section types. The optimized structures from the traditional layout and geometry optimization (i.e., Problems (1) and (2)) are used as the starting points. Then in the first step, the k-means clustering approach is used to separate the members into clusters based on the cross-sectional areas: where ℂ = {1, 2, … , , … , k} is the cluster index set with k denoting the cluster number and denoting the cluster index; is the area mean value for the -th cluster; a = [a i |∀i ∈ ] T is the area vector of the -th cluster; e = [1, 1, …] T is an all-one vector with proper length; is the member index set for the -th cluster and = { 1 , 2 , … , , … , k } is the total cluster set. Since Problem (3) is a 1D clustering problem, we use the algorithm proposed by Wang and Song (2011), which can guarantee the global optimality of the clustering solution.
After the clustering step, the area deviation D A,i of the i-th member can be evaluated by: where f ∶ ↦ ℂ is a mapping between the member index set and the cluster index set ℂ.
In order to satisfy the member-type constraints on the area values, the area deviations D A need to be close to zero. To achieve that, in the second step, we do further geometry optimization, with D A penalized in the objective function: where V is the penalized and normalized volume; w is a pre-defined weighting factor to balance the reduction of structural volume and the reduction of area deviations and 0 ≤ w ≤ 1 ; p is a penalty factor; here p = 10 is used; the volume and the area deviation penalty terms are normalized by V 0 and D A, 0 , which are the volume and the sum of the area deviations of the starting point structure, respectively; By combining (2), (4) and (5), the post-processing optimization problem is: T is the vector containing the corresponding mean area values.
Note that in Problem (6), the cluster mean values are treated as design variables for more design freedom of the optimization problem. Since Problem (6) is non-linear nonconvex, it is tackled by the interior point solver IPOPT (Wächter and Biegler 2006). An iterative scheme similar to the geometry optimization is used for the post-processing step. In each iteration, the k-means clustering approach is conducted first, then Problem (6) is solved to reduce the member area deviations. In addition, same as the geometry optimization, geometry modifications such as merging close nodes and creating cross-overs are carried out in between iterations (see He and Gilbert (2015)). The iterative scheme stops when the following condition is satisfied: where V is the penalized and normalized volume value for the -th iteration; t is a convergence tolerance, here 0.1% is used.
For clarity, a flow chart for the approach used to tackle the section-type problem is shown in Fig. 2.

Approach for the member-type problem
A similar process as the section-type problem can be used in the member-type problem. Nevertheless, it has been found that reducing the length deviations to 0 is much more difficult than reducing the area deviations. Whilst members can be nonfully stressed (i.e., a > |q∕ | ) to make the area deviations 0, length deviations are mainly reduced by modifying the node coordinates, which is a challenging geometrical problem (see detailed reasons in Sect. 4). Therefore, instead of considering both area and length values in a 2D clustering problem, we (6a) min a,q,x,y, consider a 1D clustering problem of length values only to get a starting point with lower length deviations: where is the mean for the -th cluster; l = [l i |∀i ∈ ] T is the length vector of the -th cluster.
After the clustering step, the length deviation D L,i of the i-th member can be computed by: The area deviations can be computed by Eq. (4) using the clustering solution from Problem (8).
In the length deviation penalization term, the length deviations are multiplied by the member areas so that the algorithm has the option to make the members with large length deviations "vanish": vector and the length deviation value vector of the starting point structure, respectively. By combining (2), (9), and (10), the post-processing optimization problem is: T is the vector containing the corresponding mean length values for the members in every clusters.
Due to the difficulty in reducing the length deviations, the optimization scheme is also adjusted for the membertype problem. Here we set a target threshold D L, max for the maximum length deviation. During the iterative process, if Criterion (7) is satisfied but the maximum length deviation value D L, max is not reduced below D L, max , the optimization process will continue with the cluster number increased by 1. The optimization process terminates when Criterion (7) is satisfied and D L, max is reached. For the sake of clarity, a flowchart for the approach used to tackle the member-type problem is shown in Fig. 3.

Numerical examples
The capability of the proposed approach is demonstrated through a few 2D and 3D examples. w = 0.8 is used for Problem (6) and Problem (11). The optimized structures are presented as solid models with members treated as cylinders and nodes as spheres.

Cantilever
The first example is a simple cantilever. The problem conditions and the nominal design are shown in Fig. 4. To obtain the nominal design, a 20 × 10 node grid is used in the traditional layout and geometry optimization scheme (i.e., Problems (1) and (2)). The nominal design contains 88 members, each has different cross-sectional areas.

Fig. 2
Approach for the section-type problem, where ΔV represents change in the objective function value between two consecutive iterations; t is a convergence tolerance In the section-type problem, members in the nominal design (i.e., Fig. 4) are first separated into clusters by solving Problem (3). After this step, members with similar crosssectional area values are assigned to the same cluster, but within each cluster, area deviations exist. With 3 clusters used, the initial maximum area deviation for all the clusters is 0.257P∕ ; with 5 clusters used, the maximum area deviation is 0.086P∕ . To reduce the area deviations, the postprocessing step (i.e., Fig. 2) is carried out. The further optimized designs for 3 and 5 clusters are shown in Fig. 5a and b, respectively. Both of these designs have near 0 maximum area deviation (i.e., D A, max = 1.37×10 -7 P∕ for Fig. 5a and D A, max = 1.65×10 -7 P∕ for Fig. 5b). Although only 3 or 5 types of sections are used, the volumes of the structures in Fig. 5 are close to the benchmark in Fig. 4, highlighting the superiority of the proposed approach. In addition, Fig. 5 shows that when the cluster number increases from 3 to 5, the range of the member area values is expanded from [0.244P∕ , 1.057P∕ ] to [0.116P∕ , 1.078P∕ ] , leading to the lower volume in Fig. 5b.

Influence of node grid density
Due to the non-linear and non-convex nature of the proposed formulation, the optimized results are influenced by the starting points (Haftka and Gürdal 2012). Therefore, the effect of different starting structures is investigated in this section. The same problem in Fig. 4 is used, and different starting points are generated using 10 × 5, 20 × 10 and 40 × 20 nodes in the layout optimization stage (i.e., Fig. 6a,  b and c). The used cluster number is 6 and the optimized results are shown in Fig. 6. The maximum area deviations for Fig. 6d, e and f are all near 0 (i.e., < 1×10 −6 P∕ ). It   Fig. 4; the cross-sectional areas are listed on the right; P is the applied load (see Fig. 4) and is the stress limit can be observed from Fig. 6 that more complex starting points lead to more complex optimized results. However, contrary to the traditional layout and geometry optimization, the use of a denser node grid causes an increase in volume in this approach. This is because the member-type constraints are only considered in the post-processing stage and not in Problems (1) and (2). Consequently, using a denser node grid in Problem (1) does not guarantee better starting points for Problem (6). Furthermore, the results show that denser node grids are associated with higher volumes because the increased structural complexity of the starting points makes the section-type constraints difficult to be satisfied. This reveals the limitations of the post-processing approach and will be discussed in detail in Sect. 4.3. Nevertheless, in this example, considering that Fig. 6d, e and f have similar volumes, the simplest design Fig. 6d may be the favourable solution because of its lowest manufacturing costs.

Cantilever with circular support
In Sect. 3.1.1, solutions with lower volumes can be achieved using more cluster numbers. Therefore, a parametric study on the cluster number is carried out in this section. A cantilever example with pinned supports around a circumference is considered. The problem description and the nominal design are shown in Fig. 7. A 20×13 node grid is used in the initial layout optimization.
In this parametric study, the cluster number is increased from 1 to 10, and the optimized results are shown in Fig. 8. Note that all the solutions presented in Fig. 8 have near 0 area deviations. ΔV (i.e., volume increase compared to the nominal design) reduces rapidly from 42.75% to 4.75% when the cluster number increase from 1 to 3; then ΔV reduces slowly from 3.89 to 0.41% as the cluster number increases from 4 to 10. In addition, Fig. 8 shows that the complexity of the optimized structures increases gradually as the number of clusters increases.
Upon closer examination of the volume values, it is found that the solution with 8 clusters has a slightly higher (i.e., 1.7% higher) volume than the solution with 7 clusters. This is due to the non-linear and non-convex nature of Problem (6) and the fact that geometry modifications, such as merging nodes and creating cross-overs, are performed between optimization iterations, which can result in locally optimal solutions. To assess the optimality of the solutions, the volumes of the nominal designs were used as a reference. Since the nominal design process (i.e., Problems (1)  (2)) does not consider member-type constraints, the resulting structures are lower bound solutions. In the current example, although the solution with 8 clusters is locally optimal, it still approaches the global optimum because the volume increase is only 1.49% compared to the nominal design.

Michel sphere
The proposed approach can be extended to 3D by adding the z coordinates as variables. The Michell sphere example is used to demonstrate the effectiveness of this approach in 3D cases. The case description is shown in Fig. 9a. By taking advantage of the symmetry, 1/8 of a full sphere is used as the design domain; and a 10×10×10 nodal grid is used. The torsional load is considered as 20 point loads (with equal magnitude P) applied circumferentially in the full problem (i.e., 20/4 + 1 = 6 nodes in the reduced problem). A nominal design from the layout and geometry optimization step is shown in Fig. 9b, with only half of the Michell sphere shown for clarity. The optimized Michell sphere with 4, 5 and 6 types of cross-sectional areas are shown in Fig. 10. The initial maximum area deviations for Figs. 10a, b and c are 0.102P∕ , 0.088P∕ and 0.073P∕ . After the post-processing optimization, the maximum area deviations are reduced to 1.58×10 −7 P∕ , 6.78×10 −7 P∕ and 1.41×10 −7 P∕ , which are small enough to be considered as 0. One eighth of the full Michell sphere (i.e., 1/4 of the structure in Fig. 9b) contains 248 members. Although the member number is high, the members are arranged in a grid pattern. Figure 10b and c show that by taking advantage of the grid pattern, low volume increases can be achieved using 5 or 6 section types.

Examples for the member-type problem
Examples in this section focus on the member-type problem. The previous results show that the area deviations can be reduced to near 0 for any given cluster number in the section-type problem. This point stays the same in the member-type problem, and all the presented results in this section also have near 0 area deviations. Therefore, in this section, the discussions are focused on the length deviations. In addition, for the approach shown in Fig. 3, k = 5 is used in the first iteration for all examples in this section.

Fig. 8
Relation between number of the cross-sectional area types and the volume increases, where k is the number of the cross-sectional area types; ΔV is the volume increase relative to the nominal design in Fig. 7 (a) (b) Fig. 9 Michell sphere example: a the problem description; b the nominal design from the layout and geometry optimization. T is the applied torque and L is the radius of the Michell sphere, = 18 • is used

2D examples for the member-type problem
In this section, three 2D examples have been investigated for the member-type problem. Cases 1 and 2 are the cantilever problems in Figs. 4 and 7. Case 3 is shown in Fig. 11, which contains a nominal design obtained using a 26 × 20 node grid. As mentioned in Sect. 2.2.2, in the member-type problem, the cluster number gradually increases until the target length deviation is reached. We consider three target length deviation values: high allowance -0.025 L, low allowance -0.01 L and near 0 allowance -1×10 -4 L. Note that L is a unit length, see Figs. 4, 7 and 11. The optimized results are shown in Figs. 12, 13 and 14, and the corresponding data are shown in Table 1. Note that for Fig. 14a, a starting point structure obtained using a 9 × 7 node grid is used to reach a sensible solution, and all the other results in Figs. 12, 13 and 14 are obtained using the starting point structures in Figs. 4, 7 and 11, respectively. For comparison, the length deviations obtained directly with the clustering approach (i.e., without the post-processing optimization) are shown in the table as well. It can be seen that initially all D L, max values are higher than the targets; and after the post-processing step, the maximum length deviations are reduced below the targets. In addition, Table 1 shows that for the 3 cases, approximately 6 clusters are needed to reach D L, max = 0.025L , around 10 clusters are needed to reach D L, max = 0.01L , and more than 10 clusters are needed to reach D L, max = 1×10 -4 L . Compared to the section-type problem, the increased cluster number demonstrates the influence of the length type requirements. Table 1 also indicates that the ΔV decreases as the D L, max decreases. This is because achieving lower target length deviations requires more clusters, resulting in a larger number of crosssectional area types, which in turn leads to lower ΔV (i.e., same as Fig. 8).
The results in Figs. 12 and 14 resemble the layout of the nominal designs to some extent. However, in Fig. 13 the layout changed significantly compared to the nominal design. This is because the nominal designs contain fan-shaped structures for Case 1 and 3. The members in the fan-shaped structure share similar member lengths and areas, making them tend to be kept in the post-processing process. In particular, in Case 3, where the fan-shaped structure takes a large proportion, the volume increases are relatively low for Figs. 14b and c. On the other hand, the nominal design of Case 2 (Fig. 7) is formed by grid-shaped structures, where the member length gradually increases from the support position to the loading position. Unlike the section-type problem, where area deviations can be easily reduced, the variation of the member lengths makes it difficult to reduce    Table 1 Fig. 13 2D Case 2 for the member-type problem -cantilever with circular supports: a D L, max = 0.025L and 7 member-types used; b D L, max = 0.010L and 9 types used; c D L, max = 1×10 -4 L and 11 types used. D L, max is the target maximum length difference among all the member clusters; more supplementary information is available in Table 1 Fig. 14 2D Case 3 for the member-type problem -example with two point loads: a D L, max = 0.025L and 5 member-types used; b D L, max = 0.010L and 10 types used; c D L, max = 1×10 -4 L and 16 types used. D L, max is the target maximum length difference among all the member clusters; more supplementary information is available in  the length deviations. Consequently, the optimized results shown in Fig. 13 have significantly different layouts from the nominal design. In addition, it can be observed from Table 1 that number of members is reduced during the optimization process. This is because in Function (11a) the penalty term for the length deviation is multiplied by the cross-sectional area. Therefore, the algorithm deletes some members to reduce the maximum length deviation.

3D examples for the member-type problem
Same as the section-type problem, the member-type problem can be easily extended to 3D. Therefore, two 3D examples are investigated in this section. The first case is a 3D cantilever with three pinned point supports (see Fig. 15a).
Half of the problem is considered by exploiting the symmetry, and a nominal design obtained from layout and geometry optimization is shown in Fig. 15b. The second case is the Michell sphere example shown in Fig. 9. For these two cases, the same target length deviations (i.e., 0.025 L, 0.01 L, and 1×10 -4 L) are used. The optimized results are shown in Figs. 16 and 17, with supplementary data available in Table 2. In the 3D cantilever example, the algorithm is able to achieve the target length deviation with relatively fewer clusters, and the volume increases are relatively low. On the other hand, the Michell sphere example requires more clusters to reach the target length deviations due to the progressively varying length and area values of the members in its nominal design, and the optimized structural volumes are relatively high (as shown in Table 2). This is similar to the behaviour observed in the 2D circular cantilever example (Fig. 13).

Electricity transmission tower example
In this section, we apply the proposed approach for the member-type problem to the conceptual design of a lowprofile electricity transmission tower (Zhang et al. 2022). The case description is shown in Fig. 18. By exploiting the symmetry of the problem, we considered half of the tower. The weight of electricity cables and conductors are (a) (b) Fig. 15 Cantilever with three pinned supports: a case description; b nominal design with layout and geometry optimization; red and blue bars represent members in tension and compression Table 2 Supplementary data for the 3D member-type cases, where Case 1 corresponds to Fig. 16; Case 2 corresponds to Fig. 16; D L, max is the target maximum length deviation; k is the cluster number; D L, max and m are the maximum length deviation and the number of members, respectively; note that the m values for 3D Case 1 and 2 correspond to the half problem and 1∕8 problem, respectively; ΔV is the volume increase compared to the corresponding nominal design Using the traditional layout and geometry optimization, a nominal design is obtained and shown in Fig. 19a. The nominal design consists of 92 members (for the half problem). Separating the members in the nominal design into 15 clusters using Problem (8) results in a maximum length deviation of 0.153 m, and a maximum area deviation of 257 mm 2 . After the post-processing, these values are reduced to 0.081 m, and 3.65×10 -5 mm 2 (i.e., near 0), respectively. The optimized result is shown in Figs. 19b and c, with members represented as hollow cylinders with an inner radius equal to 95% of the outer radius. Compared to the nominal design in Fig. 19a, the relative volume increase is 17.2%.

Numerical efficiency
In this study, we proposed a novel post-processing approach to control the number of different types of members in optimized truss structures. The approach involves two additional steps beyond the traditional layout and Fig. 16 3D Case 1 for the member-type problem -cantilever with three pinned supports: a D L, max = 0.025L and 6 member-types used; b D L, max = 0.010L and 7 types used; c D L, max = 1×10 -4 L and 8 types used. D L, max is the target maximum length difference among all the member clusters; more supplementary information is available in Table 2 Fig. 17 3D Case 2 for the member-type problem -Michell sphere: a D L, max = 0.025L and 10 member-types used; b D L, max = 0.010L and 15 types used; c D L, max = 1×10 -4 L and 19 types used. D L, max is the target maximum length difference among all the member clusters; more supplementary information is available in Table 2 Fig. 18 Electric transmission tower case description geometry optimization: (1) member clustering (using either Problem (3) or Problem (8)) and (2) post-processing geometry optimization (using either Problem (6) or Problem (11)). The computational cost of the clustering step is negligible for the problems considered in this study. For example, it takes only 0.089 s on a personal laptop with an AMD 5900HX CPU to cluster the 248 members in Fig. 9b into 6 area types. The post-processing step involves additional linear constraints (i.e., relative to Problem (2)), the number of which is proportional to the number of members (i.e., two times the number of members in Problem (6) and four times the number of members in Problem (11)). As a result, the computational cost of solving Problem (6) is similar to that of traditional geometry optimization. of several selected members, D A, max is reduced to 0, ΔV = 20.88% ; e further optimized structure with geometry optimization, ΔV = 4.67% ; D A, max represents the maximum area deviation; ΔV is the relative volume increase compared to (c); k represents the cluster number; red and blue bars represent members in tension and compression For example, it takes 26 iterations to obtain the solution in Fig. 10c, with the IPOPT solving time for each iteration ranging from 3.678 to 7.194 s. Overall, the proposed approach has a similar computational cost to traditional geometry optimization and can therefore be applied to large-scale problems.

Numerical effectiveness
The effectiveness of the proposed approach has been shown with the numerical examples in Sect. 3. For the section-type problem, the proposed approach can reduce the area deviations to near 0 for any given cluster number, and the optimized volumes are relatively low compared with the nominal designs. The reason for such effectiveness is demonstrated through two examples in Fig. 20. The first example is a simple two-bar structure, where a fully stressed nominal design is shown in Fig. 20a. When one cluster is used, the maximum area deviation is 0.21P∕ . To reduce the maximum area deviation to 0, the area of the horizontal member can be increased to 1.44P∕ , which leads to the non-fully stressed structure as shown in Fig. 20b. The same principle applies to a relative complex cantilever example in Fig. 20c. By increasing the area of several selected members and preserving the nodal positions, as shown in Fig. 20d, the maximum area deviation can be reduced to 0. Although Fig. 20d has a 20.88% ΔV relative to Fig. 20c, further geometry optimization can reduce this value to 4.67% (Fig. 20e). The steps in Fig. 20d and e are carried out simultaneously in the solving process of Problem (6), which leads to solutions with near 0 maximum area deviations and low volumes. As for the member-type problem, the required number of clusters and the structural volume are increased compared to the section-type problem. The member-type problem is more challenging than the section-type problem because reducing the length deviations is a geometrical problem. Most members in the nominal design have initial length deviations after the clustering step. These length deviations can be reduced by moving the position of the nodes. However, since the optimized structures usually have much more members than the nodes, the design freedom provided by the nodal movement is not enough to reduce all the length deviations to zero. Therefore, the algorithm tends to reach the target maximum length deviation by (1) simplifying the structure (i.e., reducing the member number); (2) increasing the cluster number. The results in Sect. 3 show that the post-processing step can achieve the target length deviations in all the example investigated.

Limitations, advantages and future developments
The optimized results presented in Fig. 6 indicate that using a denser node grid for obtaining starting points results in optimized solutions with higher volumes. This suggests that, in contrast to the traditional layout optimization approach, the post-processing scheme proposed in this study does not exhibit a larger search region when a denser node grid is employed, potentially causing sub-optimal solutions. In addition, the results in Fig. 8, Tables 1 and 2 demonstrate that, the algorithms (i.e., Figs. 2 and 3) reduce the number of members and nodes during the iterative process when the member-type constraints are challenging to be satisfied (i.e., complex starting point structures or small k values). Consequently, this post-processing approach may struggle to simultaneously satisfy the member-type constrains and preserve the complexity of the given starting points. Due to this reason, it may be beneficial to test various starting points for the same problem in order to achieve a favourable result, as starting points with an excessive number of members may lead to unfavourable results due to the difficulty in satisfying the member-type constraints, while starting points with too few members may also result in unfavourable results due to their own sub-optimality. Nevertheless, the advantages of using this post-processing approach are that: (1) by considering member-type constraints in the post-processing step only, the computational costs are controlled in a reasonable low level (i.e., Sect. 4.1); (2) for the section-type problem, due to the reason described in Sect. 4.2, the type constraints are easily get satisfied and the volumes of the obtained solutions are close to the lower bound solutions; (3) while the proposed approach may not preserve the complexity of the starting points, from a practical standpoint, reducing the number of nodes and members can lead to lower manufacturing costs, which aligns with the target of this study. For the member-type problem, due to the difficulty of reducing the length deviations, the volume sacrifices (i.e., brought by the member-type constraints) are relatively high in examples with complex structures (e.g., Fig. 17). This means the propose approach still has the potential to be improved. In realistic projects, a long structural member can be considered as a combination of two (or more) raw material members (i.e., by adding joints), or a long raw material member can be cut into several structural members. By taking advantage of these two points in future studies, an improved approach that can lead to fewer clusters and lower volumes may be developed.

Conclusion
This study aims to reduce the manufacturing costs of optimized truss structures by controlling the number of member types. Two problems are considered: in the first problem, members in the same group share the same crosssectional area (i.e., section-type problem); in the second problem, members in the same group share the same cross-sectional area and member length (i.e., member-type problem). In order to obtain efficient solutions, the optimized structures from the traditional layout and geometry optimization scheme are used as the starting points. The k-means clustering approach is used to separate the members into groups. Then the structure is further optimized in a post-processing optimization step to reduce the length/ area deviations (i.e., the differences between the member area/length values and the corresponding cluster mean values). Since the post-processing optimization problem is non-linear and non-convex, potentially leading to locally optimal solutions, the optimized designs are compared to the lower bound solutions for efficiency check.
Several 2D and 3D examples are presented to demonstrate the effectiveness of the proposed approaches. For the section-type problem, it is found that for any given cluster number, the proposed approach can reduce the area difference within all the member groups to near 0. In addition, in the problems investigated, the results show that with 6 clusters provided, the volume increases compared to the nominal designs are small (i.e., <3%).
The member-type problem is more challenging than the section-type problem. Therefore, in order to achieve designs with lower length deviations, the algorithm is adjusted to allow members that have large length deviations to "vanish", and the cluster number gradually increases during the iterative process until the target length deviation is reached. In the problems investigated, near 0 maximum length deviation can be achieved with less than 20 clusters provided. However, the volume sacrifices (i.e., brought by the member-type constraints) are relatively high when less clusters are allowed. This is worth investigating in future studies.