원시데이터 수집 시스템
선정목록으로

A Python script for adaptive layout optimization of trusses

관련 산업용 섬유 · (9) 타이어코드

기본 정보

저자
  1. Linwei He — Department of Civil and Structural Engineering, University of Sheffield, Sir Frederick Mappin Building, Mappin Street, Sheffield, S1 3JD, UK
  2. Matthew Gilbert — Department of Civil and Structural Engineering, University of Sheffield, Sir Frederick Mappin Building, Mappin Street, Sheffield, S1 3JD, UK
  3. Xingyi Song — Department of Computer Science, University of Sheffield, Regent Court, 211 Portobello, Sheffield, S1 4DP, UK
DOI
10.1007/s00158-019-02226-6
저널
Structural and Multidisciplinary Optimization
발행년도
2019
발행기관
Springer Science+Business Media
피인용수
44
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1007/s00158-019-02226-6
토픽
Composite Structure Analysis and Optimization
OpenAlex ID
W2922624623

평가 내용

관련도
관련
사업분야
산업용 섬유 · (9) 타이어코드
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '산업용 섬유 > 타이어코드' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Numerical layout optimization employing an adaptive 'member adding' solution scheme provides a computationally efficient means of generating (near-)optimum trusses for problems involving single or multiple load cases. To encourage usage of the method, a Python script is presented, allowing medium to large-scale problems to be solved efficiently. As well as handling multiple load cases, the short (98 line) script presented can tackle truss optimization problems involving unequal limiting tensile and compressive stresses, joint costs, and non-convex polygonal domains, with or without holes. Various numerical examples are used to demonstrate the efficacy of the script presented.

본문 56,532자

본문 펼치기
[eprints@whiterose.ac.uk](mailto:eprints@whiterose.ac.uk) [https://eprints.whiterose.ac.uk](https://eprints.whiterose.ac.uk/) Universities of Leeds, Sheffield and York Deposited via The University of Sheffield. White Rose Research Online URL for this paper: <u>[https://eprints.whiterose.ac.uk/id/eprint/142746/](https://eprints.whiterose.ac.uk/id/eprint/142746/)</u> Version: Accepted Version Article: He, L., Gilbert, M. and Song, X. (2019) A Python script for adaptive layout optimization of trusses. Structural and Multidisciplinary Optimization, 60 (2). pp. 835-847. ISSN: 1615147X <u>[https://doi.org/10.1007/s00158-019-02226-6](https://doi.org/10.1007/s00158-019-02226-6)</u> This is a post-peer-review, pre-copyedit version of an article published in Structural and Multidisciplinary Optimization. The final authenticated version is available online at: https://doi.org/10.1007/s00158-019-02226-6 Reuse Items deposited in White Rose Research Online are protected by copyright, with all rights reserved unless indicated otherwise. They may be downloaded and/or printed for private study, or other acts as permitted by national copyright laws. The publisher or other rights holders may allow further reproduction and re-use of the full text version. This is indicated by the licence information on the White Rose Research Online record for the item. Takedown If you consider content in White Rose Research Online to be in breach of UK law, please notify us by emailing eprints@whiterose.ac.uk including the URL of the record and the reason for the withdrawal request. Noname manuscript No. (will be inserted by the editor) # A Python script for adaptive layout optimization of trusses Linwei He - Matthew Gilbert - Xingyi Song Received: date / Accepted: date Abstract Numerical layout optimization employing an adaptive ‘member adding’ solution scheme provides a computationally efficient means of generating (near-)optimum trusses for problems involving single or multiple load cases. To encourage usage of the method a Python script is presented, allowing medium to large-scale problems to be solved efficiently. As well as handling multiple load cases, the short (98 line) script presented can tackle truss optimization problems involving unequal limiting tensile and compressive stresses, joint-costs, and non-convex polygonal domains, with or without holes. Various numerical examples are used to demonstrate the efficacy of the script presented. Keywords Truss · Layout optimization · Ground structure method · Python · Education 1 Introduction Truss layout optimization using the ‘ground structure’ approach provides a fully automated means of identifying (near-)optimum truss structures. Although first proposed in the 1960s by Dorn et al (1964), it has not been widely used in practice for various reasons. For example, the solutions generated appear impractical, at least when conventional L. He Department of Civil and Structural Engineering, University of Sheffield, Sir Frederick Mappin Building, Mappin Street, Sheffield, S1 3JD, UK. E-mail: linwei.he@sheffield.ac.uk M. Gilbert Department of Civil and Structural Engineering, University of Sheffield, Sir Frederick Mappin Building, Mappin Street, Sheffield, S1 3JD, UK. E-mail: m.gilbert@sheffield.ac.uk X. Song Department of Computer Science, University of Sheffield, Regent Court, 211 Portobello, Sheffield, S1 4DP, UK. E-mail: x.song@sheffield.ac.uk manufacturing techniques are envisaged. However, in recent decades new manufacturing techniques have been developing apace, e.g., additive manufacturing, and means of rationalizing the solutions obtained via layout optimization have also been developed (e.g., He and Gilbert 2015). Also, in 2003 an adaptive ‘member adding’ scheme was proposed by Gilbert and Tyas (2003), which allowed solutions to be obtained more quickly, and also for extremely large problems (e.g., >1,000,000,000 members) to be solved. This means that layout optimization can be used to obtain highly accurate benchmark solutions that can be used to validate analytical solutions (e.g., Sok´oł 2011b; Sok´oł and Rozvany 2012), and also to discover new optimum structural forms (e.g., Darwich et al 2010; Tyas et al 2011; Fairclough et al 2018). To increase the practical applicability of solutions, Pritchard et al (2005) extended the adaptive ‘member adding’ scheme to solve problems involving multiple load-cases whilst Tyas et al (2006) incorporated structural stability considerations. Also, Smith et al (2016) utilized layout optimization to design truss-like metallic components suitable for fabrication via additive manufacturing, with the techniques involved recently extended by He et al (2018). In parallel, the layout optimization technique has been successfully transferred to other applications. For example, Bolbotowski et al (2018) utilized layout optimization to design (near-)optimum grillages and Smith and Gilbert (2007); Gilbert et al (2014) proposed the ‘discontinuity layout optimization’ (DLO) method to identify critical patterns of discontinuities at collapse for in-plane and out-of-plane plasticity problems. However, although interest in numerical layout optimization has grown in recent years, the power of the method still appears under-appreciated in the structural optimization research community. One possible reason for this is that accessible educational resources for use by new researchers have been lacking. Although a script was made available by Sok´oł (2011a), the Mathematica language employed is 2 Linwei He et al. not commonly used in the community. Matlab scripts developed by Zegard and Paulino (2014, 2015) helped in this respect, although these contain relatively complex functions that could potentially limit uptake. Also, most significantly, although proposed in 2003, the ‘member adding’ scheme has not yet been incorporated in any of the aforementioned publicly available scripts, potentially leading researchers to underestimate the potential computational efficiency of the layout optimization method. In contrast, the 99-line Matlab script for SIMP (Sigmund 2001) helped pave the way for worldwide research in the field of continuum topology optimization. As an indication of the dominance of SIMP over numerical layout optimization in terms of published educational source codes, only one of the 22 scripts listed by Wei et al (2018) employ the latter. In order to provide an accessible yet computationally efficient educational implementation of numerical layout optimization, this paper introduces a simple Python script. With 98 lines, it incorporates the efficient adaptive ‘member adding’ scheme for 2D problems subject to multiple load cases, with the potential for unequal limiting tensile and compressive stresses, joint-costs, and non-convex polygonal domains (with or without holes). The paper is organized as follows: first, the mathematical layout optimization formulation is introduced; second, important code sections are explained; third, numerical examples are shown to demonstrate the efficacy of the script; finally, conclusions are drawn. 2 Formulation of layout optimization 2.1 Single load case problem The standard layout optimization process (Dorn et al 1964; Gilbert and Tyas 2003; Pritchard et al 2005) involves a number of steps, as shown in Fig. 1. Firstly the design domain, load and support conditions are specified, Fig. 1(a); secondly, the design domain is discretized using nodes, Fig. 1(b); thirdly, these nodes are interconnected with potential members to create a ‘ground structure’, Fig. 1(c); finally, an optimum layout is identified by solving the optimization problem below (Fig. 1(d)): mina,q <sup>V</sup> <sup>= lTa</sup> (1a) s.t. Bq = f (1b) q ≥−σ <sup>−</sup> a (1c) q ≤ σ <sup>+</sup> a (1d) a ≥ 0, (1e) where, V is the structural volume, a = [a1, a2, ..., am] <sup>T</sup> is a vector containing member cross-sectional areas, with m (a) (b) (c) (d) Fig. 1: Steps in layout optimization: (a) specify design domain, loads and supports; (b) discretize domain using nodes; (c) interconnect nodes with potential truss members; (d) use optimization to identify the optimal structural layout denoting the number of members. l = [l1, l2, ..., lm] <sup>T</sup> is a vector of member lengths. B is a 2n × m equilibrium matrix comprising direction cosines, with n denoting the number of nodes and q is vector containing the internal member forces; a simple example of the equilibrium constraint is presented in Fig. 2. f is a vector containing the external forces; σ <sup>+</sup> and σ <sup>−</sup> are limiting tensile and compressive stresses respectively. Fig. 2: Equilibrium condition at a typical (unloaded) node 2.2 Multiple load case problem Problem (1) can easily be extended to obtain solutions for multiple load case plastic design problems. In this case the equilibrium constraint (1b), stress limits (1c) and (1d) must be satisfied in each load case, e.g., the former gives: Bq <sup>k</sup> = f <sup>k</sup>, for k = 1, 2, ..., p, (2) A Python script for adaptive layout optimization of trusses 3 where, k is the load case identifier and p represents the total number of load cases. 2.3 Joint costs It was found in previous studies (e.g., Gilbert and Tyas 2003; Pritchard et al 2005) that layout optimization will often generate structures that are complex in form, containing large numbers of short members. A simple means of addressing this is to include a notional joint cost (Parkes 1978), which has the effect of penalizing short members and hence simplifying the solution in many cases: <sup>˜</sup> l = [l1 + s, l2 + s, ..., lm + s] <sup>T</sup> in the objective function (1a), where <sup>˜</sup> l is the augmented member length vector with predefined joint cost (or length) s. 2.4 Full problem Considering multiple load cases and joint costs, the full problem can now be written as: mina,q <sup>V</sup> <sup>=</sup> <sup>˜lTa</sup> (3a) all potential members (readers who are interested in derivation of (4) can refer to Appendix A): <sup>k</sup> <u>i</u> <sup><u>,</u></sup> <sup><u>−σ−B</u></sup> <u>i</u> <sup>T</sup> <sup>k</sup> <u>i</u> <sup><u>,</u></sup> <sup><u>−σ−B</u></sup> <u>i</u> <sup>Tuk</sup> <u>i</u> <sup><u>}</u></sup> ˜li <u>i</u> <sup>Tuk</sup> <u>i</u> ≤ 1, ǫi = p k=1 <u>max {σ</u> <sup>+</sup> <u>B</u> <sup>T</sup> <u>i</u> <sup>T</sup> <u>i</u> <sup><u>uk</u></sup> <u>i</u> (4) s.t. Bq <sup>k</sup> = f <sup>k</sup> q <sup>k</sup> ≥−σ <sup>−</sup> a q <sup>k</sup> ≤ σ <sup>+</sup> a (3b)   <sup>for k</sup> <sup>= 1, 2, ..., p</sup>   (for i = 1, ..., m), where ǫi is the summed maximum virtual strain of member i in all load cases; u <sup>k</sup> i <sup>is a vector containing virtual displace-</sup> ment of nodes connected by member i, under load case k. Note that, when a primal-dual interior point method is used to solve problem (3), u <sup>k</sup> i <sup>is</sup> <sup>obtained</sup> <sup>automatically</sup> <sup>with</sup> <sup>no</sup> extra cost. Although only a reduced set of members are used in (3), a full virtual displacement field u <sup>k</sup> of all nodes can still be generated. If any violation of (4) is found in the virtual displacement field, the most violated potential members can be added to the reduced set of members. Then (3) can be solved again, this time generating an improved virtual displacement field in which (4) is no longer violated for the newly added members. This adaptive ‘member adding’ process continues until no violation is detected; according to duality theory, the solution obtained will then be equivalent to that obtained by solving the full problem from the outset. The entire process is shown in Fig. 3. Fig. 3: Flowchart of the adaptive ‘member adding’ process 3 Python implementation Python is an open source interpreted high-level programming language that is becoming increasingly popular for solving scientific and engineering problems. Unlike Matlab, where built-in toolboxes are automatically loaded when a ≥ 0, (3c) which is, like (1), a linear programming (LP) problem that can be solved efficiently using modern optimization solvers. However, when using the ground structure approach the number of potential numbers grows rapidly with the number of nodes employed, with up to <sup><u>n(n</u></sup> 2 <sup>−1)</sup> members required. This can easily lead to extremely large optimization problems that are computationally expensive to solve. To address this, a ‘member adding’ scheme, which is based on the ‘column generation’ approach (Dantzig and Wolfe 1960) was proposed by Gilbert and Tyas (2003). This allows problem (3) to be decomposed into a number of smaller subproblems, with information from the dual problem used to guide the process. 2.5 Adaptive ‘member adding’ scheme Using the adaptive ‘member adding’ scheme (Gilbert and Tyas 2003; Pritchard et al 2005), initially only a reduced set of members are used to solve problem (3), and remaining potential members in the ‘ground structure’ are gradually added to the set, until the following constraint is satisfied for 4 Linwei He et al. started, in Python such tools are imported using the `import` keyword at the beginning of the script. These extra `import` lines allow dependencies on external tools to be clearly seen. In this paper, a number of freely available tools are used, including mathematical tools such as `scipy` and `numpy`, the convex optimization tool `cvxpy` (Diamond and Boyd 2016; Agrawal et al 2018), and the geometry tool `shapely` . In this section the various functions used to construct and solve the layout optimization problem (3) are first introduced, then the main workflow is outlined. As Python is, like Matlab, an interpreted language, loop structures are generally inefficient. Therefore, to improve execution speed, vectorized operations are utilized in place of loop structures wherever possible. 3.1 Equilibrium matrix B For a member i, interconnecting nodes I and II, its contribution to equilibrium matrix B can be written as: 3.3 Check dual violation When the primal problem (3) is solved via the primal-dual interior point method, the virtual displacements in u for each load case are obtained from the equilibrium constraints defined in `eqn` . Therefore, violation of constraint (4) can be calculated for every member in the full ‘ground structure’ (except for those already present in the reduced set, where this is unnecessary as there will be no violation). All potential members are then sorted by their constraint violation numbers, and the most violating ones are added to the primal problem, with the number of new members calculated using: Δm =    αmV, mV ≥ βmP, αβmP, βmP - mV - αβmP, mV, αβmP ≥ mV, (7) (5) �T, Bi = �−Xi/li −Yi/li Xi/li Yi/li i <sup>II</sup> - x <sup>I</sup> i i <sup>II</sup> - yi <sup>I</sup> where, Xi = xi <sup>II</sup> <sup>I</sup> i <sup>and Yi</sup> <sup>= y</sup> i <sup>II</sup> where, Xi = xi <sup>II</sup> - x <sup>I</sup> i <sup>and Yi</sup> <sup>= y</sup> i <sup>II</sup> - yi <sup>I</sup> <sup>are the projected</sup> length of the member of length li in the x and y axis directions respectively, and where [x <sup>I</sup> i <sup>, y</sup> i <sup>I</sup> <sup>] and [x</sup> i <sup>II</sup> <sup>, y</sup> i <sup>II</sup> <sup>] are the</sup> co-ordinates of nodes I and II are respectively. If a connected node is supported, then the coefficients of the corresponding row are set to zero (i.e. supported degrees of freedom are removed). Thus taking into account boundary conditions, the above formulation can be expressed as: i <sup>I</sup> <sup>] and [x</sup> i <sup>II</sup> <sup>I</sup> i <sup>, y</sup> i <sup>I</sup> i <sup>II</sup> <sup>, y</sup> i <sup>II</sup> where, Δm is the number of new members to be added, mP and mV are, respectively, the numbers of remaining members in the potential member list (i.e., members not yet included in (3)), and those violating (4). α and β are control parameters, both set to 0.05 in this paper. Using the adaptive ‘member adding’ scheme, the size of problem (3) gradually increases, with (7) used to control the growth rate. When number of violations is large, only a small proportion are added into (3); on the other hand, when the number of violations is small, most (or all) are added in a given iteration. This balances problem size with the number of iterations required in order to achieve an efficient iterative process. Various alternative heuristics can be used to determine the priority and number of members to be added at each iteration, e.g., the two-stage high pass filter in Gilbert and Tyas (2003) and the active member set method described in Sok´oł (2014). It is important to note that, although a heuristic algorithm is used here to improve computational efficiency, the final solution, obtained when (4) is satisfied for all members in the ground structure, is equivalent to the solution obtained by solving the full problem, due to the strong duality nature of LP problems (Vanderbei 2001). (6) �T, Bi = �−d0Xi/li −d1Yi/li d2Xi/li d3Yi/li where d0, d1, d2, d3 are 0-1 coefficients describing the degree of freedom in the x and y directions for the connected nodes The equilibrium matrix B is then assembled using the Bi matrices for all members. B is a sparse matrix, which can be expressed using a row-column-value format comprising only non-zero entries, constructed by concatenating the coefficients calculated in (6) as well as their corresponding row (degree of freedom at nodes) and column (member) numbers. 3.2 Solving the LP problem In the script, problem (3) is solved in function `solveLP` . In Python, the use of object oriented programming (OOP) allows problem (3) to be written in a format that is very similar to its natural expression, improving readability. For example, using the optimization tool `cvxpy`, the stress constraints in (3b) are expressed as `q[k]` `>=` `-sc` `*` `a` and ``` q[k] <= st * a. ``` 3.4 Visualization The solutions are visualized in function `plotTrusses` . Members with areas greater than a threshold number (e.g., 1 × 10 <sup>−3</sup> of the maximum member area) are plotted in red or blue, depending on the sign of their internal forces. When the signs of internal forces vary in different load cases, gray is used instead. 3.5 Main workflow The main `trussopt` function contains several steps to define the design domain, load and support conditions for any A Python script for adaptive layout optimization of trusses 5 given layout optimization problem, to create the ‘ground structure’ and to solve LP problem (3) using the adaptive ‘member adding’ scheme. – Firstly, a polygonal design domain is specified using the `Polygon` function imported from `shapely`, and then its convexity checked. – Secondly, a uniformly distributed grid of nodes is cre ated using the `meshgrid` function, with points lying inside the design domain added to node list `Nd` ; then support and load conditions are added. – Thirdly, the ‘ground structure’ is created by generating all valid potential members, excluding overlapping lines (checked using the greatest common divider, function `gcd`, when joint costs are not specified), and lines crossing the polygonal boundary (using function `contains` from `shapely` ). – Finally, the initial reduced set of members is created by including only short member connections. The adaptive ‘member adding’ process then starts, in which potential members are added to this reduced set until no violation of (4) is found in any member in the ‘ground structure’. 4 Numerical examples A number of examples serve to demonstrate the efficacy of the script. Firstly, a simple cantilever problem (Fig. 4) can be solved by running the following command in a terminal: ``` python trussopt.py ``` Fig. 4: Cantilever example: problem definition Alternatively, the script can be imported as a module in Python using: ``` >>>from trussopt import trussopt ``` And then function `trussopt` can be called to perform a layout optimization with the following input arguments: ``` >>>trussopt(20, 10, 1, 1, 0) ``` which solves the simple cantilever problem shown in Fig. 4 with width = 20, height = 10, limiting stress in tension = 1, in compression = 1 and joint cost = 0. In this section, all line numbers refer to the script in Appendix C, and all quoted CPU times were obtained using a laptop PC equipped with an Intel I7-7700HQ CPU and running 64-bit Windows 10. 4.1 Effect of using the adaptive ‘member adding’ scheme Using the adaptive ‘member adding’ scheme, a large-scale layout optimization problem is solved as a series of much smaller LP problems solved in succession; e.g., Fig. 5 shows steps in the solution of the cantilever design problem shown in Fig. 4. (a) (b) (c) (d) Fig. 5: Cantilever example: steps in the adaptive ‘member adding’ process following, (a) iteration 1, (b) iteration 2, (c) iteration 3, (d) final iteration When solving medium or large-scale problems, the adaptive ‘member adding’ scheme reduces memory consumption and can result in significant speed improvements, as indicated in Table 1. Whilst the resulting structural volumes are identical (to five significant figures), the latter becomes increasingly efficient with increasing problem size, e.g., 7.5 times faster when 60 × 30 nodal divisions are used. Note that ‘member adding’ can be switched off by increasing the maximum initial member connection distance in line 85, for example changing this to: ``` for pm in [p for p in PML if p[2] <= 1000]: ``` for the purposes of this paper. 4.2 Alternative LP solvers By default, the LP problem (3) is solved using the opensource solver ECOS (Domahidi et al 2013) distributed with `cvxpy` . Alternatively, a range of other, potentially more efficient, LP solvers such as GUROBI and MOSEK can be used with `cvxpy` . To use MOSEK, for example, line 29 is 6 Linwei He et al. Table 1: Cantilever example: effect of using ‘member adding’ scheme (small problems) Nodal divisions Number of nodes Number of members Without ‘member adding’ With ‘member adding’ With ‘member adding’ speed Volume CPU time (s) Volume CPU time (s) up factor ( <sup><u>P L</u></sup> σ0 <sup>)</sup> LP <sup>†</sup> ( <sup><u>P L</u></sup> σ0 <sup>)</sup> LP <sup>†</sup> Dual <sup>‡</sup> Total <sup><u>P L</u></sup> σ0 <sup>)</sup> LP <sup>†</sup> ( <sup><u>P L</u></sup> σ0 <sup><u>P L</u></sup> σ0 <sup>)</sup> LP <sup>†</sup> Dual <sup>‡</sup> Total 20 × 10 231 16,290 7.0747 1.0 7.0747 0.6 0.2 0.8 1.3 40 × 20 861 225,848 7.0454 47.7 7.0454 6.2 0.5 6.7 7.1 60 × 30 1,891 1,086,938 7.0376 579.0 7.0376 68.5 2.5 71.0 8.2 †: cumulative CPU time spent in function `solveLP` ‡: cumulative CPU time spent in function `stopViolation` replaced with the following (note that this requires MOSEK has already been added to Python environment; if not, guidance can be found in Appendix B): ``` vol = prob.solve(solver = cvx.MOSEK, \ mosek_params={"MSK_IPAR_INTPNT_BASIS":0}) ``` The MOSEK parameter `"MSK_IPAR_INTPNT_BASIS"` is optional; however this disables the unnecessary basis identification step to improve speed. Using MOSEK, the CPU cost required to solve problems is significantly reduced, making the layout optimization process very efficient. Table 2 shows sample solutions for the cantilever problem shown in Fig. 4, indicating that a numerical solution within 0.04% of the analytical solution can be obtained for this problem on a laptop PC. 4.3 Joint cost To approximately account for the costs associated with joints, a joint cost can be directly specified when calling the main function `trussopt` . For example, a joint cost of s = 1 unit length can be added using the following command; the simpler solution then generated is shown on Fig. 6. ``` >>>trussopt(20, 10, 1, 1, 1) ``` Fig. 6: Cantilever example: design obtained using a joint cost s = 1 4.4 Unequal stress limits Unequal stress limits can also be directly specified. For example, a compressive stress limit can be set to σ <sup>−</sup> = 0.1σ0 with the following input arguments: ``` >>>trussopt(40, 20, 1, 0.1, 0) ``` Alternatively, a different tensile stress limit can be set if desired. The corresponding results are shown in Fig. 7. (a) (b) Fig. 7: Cantilever example: effect of specifying unequal stress limits, (a) σ <sup>+</sup> = σ0, σ <sup>−</sup> = 0.1σ0; (b) σ <sup>+</sup> = 0.1σ0, σ <sup>−</sup> = σ0 4.5 Change load and support conditions Load and support conditions can be changed by modifying lines 73 and 74. For example, to generate the ‘half wheel’ example shown in Fig. 8, the pin and roller supports can be applied by replacing line 73 with: ``` if (nd == [0, 0]).all(): dof[i,:] = [0, 0] if (nd == [width, 0]).all(): dof[i,:] = [1, 0] ``` which locate the two corner nodes at the base of the domain and then set the appropriate degrees of freedom. Similarly, the point load can be applied by replacing the original line 74 with: ``` f+=[0,-1] if(nd==[width/2,0]).all() else [0,0] ``` 4.6 Multiple load cases Additional load cases can be included by appending load vector `f` after line 74. For the two load case cantilever example problem shown in Fig. 9, load case Q is added using the following lines: ``` for i, nd in enumerate(Nd): f+=[0, 1] if (nd==[width,height]).all()\ else [0, 0] ``` A Python script for adaptive layout optimization of trusses 7 Table 2: Cantilever example: effect of using Mosek LP solver (small to moderately large problems) Nodal divisions Number of nodes Number of members Volume ( <sup><u>P L</u></sup> σ0 <sup>)</sup> Error (%) <sup>∗</sup> With ‘member adding’ With ‘member adding’ speed LP time <sup>†</sup> (s) Dual time <sup>‡</sup> (s) Total time (s) <u>up factor</u> 20 × 10 231 16,290 7.0747 0.71 0.9 0.05 0.95 0.6 40 × 20 861 225,848 7.0454 0.30 3.3 0.6 3.9 2.4 60 × 30 1,891 1,086,938 7.0376 0.18 13.2 2.9 16.1 4.0 80 × 40 3,321 3,352,500 7.0337 0.13 37.7 7.8 45.5 5.6 100 × 50 5,151 8,067,890 7.0312 0.092 96.8 18.5 115.3 11.7 120 × 60 7,381 16,559,996 7.0300 0.075 270.6 48.1 318.7 ⋆ 140 × 70 10,011 30,462,670 7.0291 0.063 602.9 97.4 700.3 ⋆ 160 × 80 13,041 51,699,820 7.0284 0.053 1921.9 242.5 2164.4 ⋆ 180 × 90 16,471 82,475,558 7.0279 0.046 2496.6 264.6 2761.2 ⋆ 200 × 100 20,301 125,265,288 7.0275 0.039 6296.9 515.7 6812.6 ⋆ ∗: compared with the exact answer, V = 7.024707829 <sup><u>P L</u></sup> σ0 <sup>, given by Graczykowski and Lewi´nski (2010)</sup> †: cumulative CPU time spent in function `solveLP` ‡: cumulative CPU time spent in function `stopViolation` ⋆: problems with high numbers of nodal divisions could only be solved with ‘member adding’ due to memory usage 4.7 Non-convex domain Various polygonal domains can be specified using `shapely` . For example, to add a hole to the design domain, as shown in Fig. 10, the following lines can be added after line 65: ``` poly=poly.difference(Polygon([ \ (width/4, height/4),\ (width/4*3, height/4),\ (width/4*3, height/4*3),\ (width/4, height/4*3)])) ``` Fig. 8: ‘Half wheel’ example: problem definition and layout obtained using 20 × 10 nodal divisions And the point load P is moved to the bottom-right corner by replacing the original line 74 with: ``` f+=[0,-1] if (nd==[width,0]).all() else [0,0] ``` Initially all load cases are concatenated in vector `f`, which is then reformatted to a p × 2n array in line 83. Fig. 9: Two load case cantilever example: problem specification and layout obtained using 20 × 10 nodal divisions This subtracts a rectangular region from the original design domain in Fig. 4. Note that, when a non-convex domain is used, lines that intersect domain boundary should be excluded from the ‘ground structure’. Line 80 checks such intersections using the `contains` function from `shapely` . Since this can become computationally expensive when the number of potential connections is large, it is skipped when a convex domain is used. 5 Conclusions A simple Python implementation of truss layout optimization using an adaptive ‘member adding’ scheme has been presented for educational use. Various examples are used to demonstrate the efficacy of the script for problems involving single and multiple load cases, unequal limiting stresses in tension and compression, joint-costs, and nonconvex polygonal domains, with or without holes. The solutions obtained are globally optimal for the prescribed nodal discretization and can be used to benchmark other methods or to provide inspiration for structural designers. The 98-line Python script described is listed for reference in Appendix B and is also provided in the form of downloadable source code; see Supplementary material section. 8 Linwei He et al. (a) (b) Fig. 10: Cantilever example with hole: problem specification and layout obtained using: (a) 40 × 20 nodal divisions; (b) 120 × 60 nodal divisions 6 Acknowledgements The first two authors acknowledge the financial support of EPSRC, under grant reference EP/N023471/1. 7 Supplementary material Downloadable Python script, `trussopt.py`, and installation files: https://figshare.com/s/0ec40d238819ae4ec6ec 8 Conflict of interest On behalf of all authors, the corresponding author states that there is no conflict of interest. References Agrawal A, Verschueren R, Diamond S, Boyd S (2018) A rewriting system for convex optimization problems. J Control Decision 5(1):42–60 Bolbotowski K, He L, Gilbert M (2018) Design of optimum grillages using layout optimization. Struct Multidisc Optim 58(3):851–868 Boyd S, Vandenberghe L (2004) Convex optimization. Cam bridge University Press Dantzig GB, Wolfe P (1960) Decomposition principle for linear programs. Oper Res 8(1):101–111 Darwich W, Gilbert M, Tyas A (2010) Optimum structure to carry a uniform load between pinned supports. Struct Multidisc Optim 42(1):33–42 Diamond S, Boyd S (2016) CVXPY: A Python-embedded modeling language for convex optimization. J Mach Learn Res 17(83):1–5 Domahidi A, Chu E, Boyd S (2013) ECOS: An SOCP solver for embedded systems. In: European Control Conference (ECC), pp 3071–3076 Dorn WS, Gomory RE, Greenberg HJ (1964) Automatic de sign of optimal structures. J M`ecanique 3:25–52 Fairclough HE, Gilbert M, Pichugin AV, Tyas A, Firth I (2018) Theoretically optimal forms for very longspan bridges under gravity loading. Proc R Soc A 474(2217):20170,726 Gilbert M, Tyas A (2003) Layout optimization of large-scale pin-jointed frames. Eng Comput 20(8):1044–1064 Gilbert M, He L, Smith C, Le C (2014) Automatic yield-line analysis of slabs using discontinuity layout optimization. Proc R Soc A 470 Graczykowski C, Lewi´nski T (2010) Michell cantilevers constructed within a half strip. tabulation of selected benchmark results. Struct Multidisc Optim 42(6):869– 877 He L, Gilbert M (2015) Rationalization of trusses gen erated via layout optimization. Struct Multidisc Optim 52(4):677–694 He L, Gilbert M, Johnson T, Pritchard T (2018) Conceptual design of am components using layout and geometry optimization. Computers & Mathematics with Applications (in press) Parkes E (1978) Joints in optimum frameworks. Int J Solids Struct 11(9):1017–1022 Pritchard T, Gilbert M, Tyas A (2005) Plastic layout op timization of large-scale frameworks subject to multiple load cases, member self-weight and with joint length penalties. 6th World Congresses of Structural and Multidisciplinary Optimization, Rio de Janeiro, Brazil Sigmund O (2001) A 99 line topology optimization code written in Matlab. Struct Multidisc Optim 21(2):120–127 Smith C, Gilbert M (2007) Application of discontinuity lay out optimization to plane plasticity problems. Proc R Soc A 463:2461–2484 Smith CJ, Gilbert M, Todd I, Derguti F (2016) Application of layout optimization to the design of additively manufactured metallic components. Struct Multidisc Optim 54(5):1297–1313 A Python script for adaptive layout optimization of trusses 9 Sok´oł T (2011a) A 99 line code for discretized Michell truss optimization written in Mathematica. Struct Multidisc Optim 43(2):181–190 Sok´oł T (2011b) Topology optimization of large-scale trusses using ground structure approach with selective subsets of active bars. In: 19th International Conference on ‘Computer Methods in Mechanics’, CMM2011, ACM Press, pp 457–458 Sok´oł T (2014) Multi-load truss topology optimization using the adaptive ground structure approach. In: Lodygowski T, Rakowski J, Litewka P (eds) Recent Advances in Computational Mechanics, CRC Press, pp 9–16 Sok´oł T, Rozvany GIN (2012) New analytical benchmarks for topology optimization and their implications. Part I: bi-symmetric trusses with two point loads between supports. Struct Multidisc Optim 46(4):477–486 Tyas A, Gilbert M, Pritchard TJ (2006) Practical plastic lay out optimization of trusses incorporating stability considerations. Comput Struct 84(3-4):115–126 Tyas A, Pichugin A, Gilbert M (2011) Optimum structure to carry a uniform load between pinned supports: exact analytical solution. Proc R Soc A 467(2128):1101–1120 Vanderbei RJ (2001) Linear programming: foundations and extensions, 2nd edn. Springer Verlag Wei P, Li Z, Li X, Wang MY (2018) An 88-line MATLAB code for the parameterized level set method based topology optimization using radial basis functions. Struct Multidisc Optim 58(2):831–849 Zegard T, Paulino GH (2014) GRAND - Ground structure based topology optimization for arbitrary 2D domains using MATLAB. Struct Multidisc Optim 50(5):861–882 Zegard T, Paulino GH (2015) GRAND3 - Ground structure based topology optimization for arbitrary 3D domains using MATLAB. Struct Multidisc Optim 52(6):1161–1184 A Dual problem formulation The adaptive solution scheme requires information from the dual problem, the derivation of which is now described. Firstly the objective function (3a) is augmented by taking into account constraints (3b) and (3c) using a weighted sum, formulating the so-called Lagrange function, written as: cases, and same for u, z1 and z2. The Lagrange dual of (3) can be derived using (readers interested in duality theory can refer e.g. to Boyd and Vandenberghe (2004)): u,zmax1,z2,z3 <sup>L(a, q, u, z1, z2, z3)</sup> (9a) s.t. ▽aL(a, q, u, z1, z2, z3) = 0 (9b) ▽qL(a, q, u, z1, z2, z3) = 0 (9c) z1, z2, z3 ≥ 0, (9d) which gives: u,zmax1,z2,z3 <sup>W</sup> <sup>=</sup> s.t. p k=1 f <sup>k</sup> <sup>T</sup> u <sup>k</sup> (10a) p k=1 �σ <sup>−</sup> z <sup>k</sup> 1 <sup>+ σ+z</sup> 2 <sup>k</sup> - + z3 = <sup>˜</sup> l (10b) B <sup>T</sup> u <sup>k</sup> + z <sup>k</sup> 1 <sup>−</sup> <sup>zk</sup> 2 <sup>= 0</sup> <sup>for k</sup> <sup>= 1, 2, ..., p</sup> <sup>(10c)</sup> z1, z2, z3 ≥ 0, (10d) where, W is the virtual work done by the applied loads. The Lagrange multiplier u <sup>k</sup> corresponds to the virtual displacement of nodes in load case k. Note that, since the two inequality constraints in (3b) will not be active simultaneously (as a member cannot be in both tension and compression under one load case), either z1 <sup>k</sup> <sup>or z</sup> 2 <sup>k</sup> <sup>must be zero for any</sup> member. Therefore, constraints (10b) and (10c) can be reformulated by converting the equality constraint to inequality constraints using nonnegative dual variables, as follows: p k=1 z <sup>k</sup> ≤ <sup>˜</sup> l (11a) - σ <sup><u>z−k</u></sup> σ <sup><u>z−k</u></sup> <sup>≤</sup> <sup>BTuk</sup> <sup>≤</sup> σ <sup><u>z+k</u></sup> σ <sup>+</sup> z <sup>k</sup> ≥ 0   (11b)   <sup>k</sup> <sup>= 1, 2, ...p,</sup> where, z <sup>k</sup> is a new variable which combines z <sup>k</sup> 1 where, z <sup>k</sup> is a new variable which combines z <sup>k</sup> 1 <sup>and z</sup> 2 <sup>k. For each mem-</sup> ber, (11) can alternatively be written as a single expression: <sup>T</sup> <u>i</u> <sup><u>uk</u></sup> <u>i</u> ≤ 1, <sup>k</sup> <u>i</u> <sup><u>,</u></sup> <sup><u>−σ−BT</u></sup> <u>i</u> <sup>k</sup> <u>i</u> <sup><u>,</u></sup> <sup><u>−σ−BT</u></sup> <u>i</u> <sup><u>uk</u></sup> <u>i</u> <sup><u>}</u></sup> ˜li (12) ǫi = p k=1 <u>max {σ</u> <sup>+</sup> <u>B</u> <sup>T</sup> <u>i</u> <sup>T</sup> <u>i</u> <sup><u>uk</u></sup> <u>i</u> L(a, q, u, z1, z2, z3) = <sup>˜</sup> l <sup>T</sup> a + p k=1 �f <sup>k</sup> - Bq <sup>k�T</sup> u <sup>k</sup> + + p k=1 p k=1 1 �−σ <sup>−</sup> a − q <sup>k�T</sup> z <sup>k</sup> 2 �−σ <sup>+</sup> a + q <sup>k�T</sup> z <sup>k</sup> −a <sup>T</sup> z3, (8) where, u <sup>k</sup>, z <sup>k</sup> 1 <sup>and</sup> <sup>zk</sup> 2 <sup>are</sup> <sup>Lagrange</sup> <sup>multipliers</sup> <sup>corresponding</sup> <sup>to</sup> constraints in (3b) in load case k, and z3 to area constraint in (3c). q = [q <sup>1T</sup>, ..., q <sup>pT</sup> ] <sup>T</sup> is a vector containing internal forces in all load (for i = 1, ..., m). where ǫi is the summed maximum virtual strain of member i in all load cases; this expression is reproduced in (4). B Setting up Python environment B.1 Basic setup The script is designed to run with Python 3 (version 3.5 and later; tested with version 3.7). The script can also be used with Python 2 but some modifications are required - see Appendix B.2 for details. The Anaconda package (64-bit version freely available at https://www.anaconda.com/download) includes a Python distribution and development environment and is recommended for new Python users. The following platform-specific instructions that install the required tools to allow the Python script to run assume that Anaconda is being used: Windows: An Anaconda Prompt window should be opened (in Anaconda Navigator, open a terminal from base(root) in the Environments tab) and the following batch file (provided with the Python script) executed: 10 Linwei He et al. ``` install.bat ``` Linux & Mac: Assuming that conda has is referenced in the `PATH` variable (e.g. via the `.bashrc` file), the following shell script (provided with the Python script) should be executed: ``` bash install.sh ``` Manual install: Alternatively the required tools can be installed on any platform one-by-one by starting an Anaconda Prompt window and entering the following commands: ``` conda install numpy=1.15.4 conda install scipy=1.1.0 conda install shapely=1.6.4 conda install -c cvxgrp cvxpy=0.4.* conda install matplotlib=2.2.3 ``` Note that the commands above, and the script and batch file, specify particular versions of the relevant tools, that have been tested to be compatible. Alternatively the version numbers can be omitted to ensure the latest versions of these tools are used, though in this case compatibility is not guaranteed. B.2 Installation with Python 2 It is possible to run the script with Python 2 (2.6 and later) by making minor modifications to the script, as detailed below. First, remove the `gcd` method from `math` in the first line: ``` from math import ceil ``` And instead import it from `fractions` instead, by adding the following new line: ``` from fractions import gcd ``` Also, line 47 is replaced with: ``` for i in range(int(num)): ``` to take into account the fact that function `ceil` returns a floating point rather than integer value in Python 2. B.3 Alternative solvers To use an alternative solver, as described in Section 4.2, this also needs be installed. For example, MOSEK can be installed using the following command: ``` conda install -c mosek mosek ``` In addition, a licence file is required, which can be freely obtained for academic use from the MOSEK website (https://www.mosek.com). B.4 Python IDE For beginners, the Spyder IDE (Integrated Development Environment) bundled with the Anaconda package provides an easy-to-use means of editing and running the script. A Python script for adaptive layout optimization of trusses 11 C Python script 1 <mark>`from`</mark> <mark>`math`</mark> <mark>`import`</mark> <mark>`gcd,`</mark> <mark>`ceil`</mark> 2 <mark>`import`</mark> <mark>`itertools`</mark> 3 <mark>`from`</mark> <mark>`scipy`</mark> <mark>`import`</mark> <mark>`sparse`</mark> 4 <mark>`import`</mark> <mark>`numpy`</mark> <mark>`as`</mark> <mark>`np`</mark> 5 <mark>`import`</mark> <mark>`cvxpy`</mark> <mark>`as`</mark> <mark>`cvx`</mark> 6 <mark>`import`</mark> <mark>`matplotlib.pyplot`</mark> <mark>`as`</mark> <mark>`plt`</mark> 7 <mark>`from`</mark> <mark>`shapely.geometry`</mark> <mark>`import`</mark> <mark>`Point,`</mark> <mark>`LineString,`</mark> <mark>`Polygon`</mark> 8 <mark>`#Calculate`</mark> <mark>`equilibrium`</mark> <mark>`matrix`</mark> <mark>`B`</mark> 9 <mark>`def`</mark> <mark>`calcB(Nd,`</mark> <mark>`Cn,`</mark> <mark>`dof):`</mark> 10 <mark>`m,`</mark> <mark>`n1,`</mark> <mark>`n2`</mark> <mark>`=`</mark> <mark>`len(Cn),`</mark> <mark>`Cn[:,0].astype(int),`</mark> <mark>`Cn[:,1].astype(int)`</mark> 11 <mark>`l,`</mark> <mark>`X,`</mark> <mark>`Y`</mark> <mark>`=`</mark> <mark>`Cn[:,2],`</mark> <mark>`Nd[n2,0]-Nd[n1,0],`</mark> <mark>`Nd[n2,1]-Nd[n1,1]`</mark> 12 <mark>`d0,`</mark> <mark>`d1,`</mark> <mark>`d2,`</mark> <mark>`d3`</mark> <mark>`=`</mark> <mark>`dof[n1*2],`</mark> <mark>`dof[n1*2+1],`</mark> <mark>`dof[n2*2],`</mark> <mark>`dof[n2*2+1]`</mark> 13 <mark>`s`</mark> <mark>`=`</mark> <mark>`np.concatenate((-X/l`</mark> <mark>`*`</mark> <mark>`d0,`</mark> <mark>`-Y/l`</mark> <mark>`*`</mark> <mark>`d1,`</mark> <mark>`X/l`</mark> <mark>`*`</mark> <mark>`d2,`</mark> <mark>`Y/l`</mark> <mark>`*`</mark> <mark>`d3))`</mark> 14 <mark>`r`</mark> <mark>`=`</mark> <mark>`np.concatenate((n1*2,`</mark> <mark>`n1*2+1,`</mark> <mark>`n2*2,`</mark> <mark>`n2*2+1))`</mark> 15 <mark>`c`</mark> <mark>`=`</mark> <mark>`np.concatenate((np.arange(m),`</mark> <mark>`np.arange(m),`</mark> <mark>`np.arange(m),`</mark> <mark>`np.arange(m)))`</mark> 16 <mark>`return`</mark> <mark>`sparse.coo_matrix((s,`</mark> <mark>`(r,`</mark> <mark>`c)),`</mark> <mark>`shape`</mark> <mark>`=`</mark> <mark>`(len(Nd)*2,`</mark> <mark>`m))`</mark> 17 <mark>`#Solve`</mark> <mark>`linear`</mark> <mark>`programming`</mark> <mark>`problem`</mark> 18 <mark>`def`</mark> <mark>`solveLP(Nd,`</mark> <mark>`Cn,`</mark> <mark>`f,`</mark> <mark>`dof,`</mark> <mark>`st,`</mark> <mark>`sc,`</mark> <mark>`jc):`</mark> 19 <mark>`l`</mark> <mark>`=`</mark> <mark>`[col[2]`</mark> <mark>`+`</mark> <mark>`jc`</mark> <mark>`for`</mark> <mark>`col`</mark> <mark>`in`</mark> <mark>`Cn]`</mark> 20 <mark>`B`</mark> <mark>`=`</mark> <mark>`calcB(Nd,`</mark> <mark>`Cn,`</mark> <mark>`dof)`</mark> 21 <mark>`a`</mark> <mark>`=`</mark> <mark>`cvx.Variable(len(Cn))`</mark> 22 <mark>`obj`</mark> <mark>`=`</mark> <mark>`cvx.Minimize(np.transpose(l)`</mark> <mark>`*`</mark> <mark>`a)`</mark> 23 <mark>`q,`</mark> <mark>`eqn,`</mark> <mark>`cons=`</mark> <mark>`[],`</mark> <mark>`[],`</mark> <mark>`[a>=0]`</mark> 24 <mark>`for`</mark> <mark>`k,`</mark> <mark>`fk`</mark> <mark>`in`</mark> <mark>`enumerate(f):`</mark> 25 <mark>`q.append(cvx.Variable(len(Cn)))`</mark> 26 <mark>`eqn.append(B`</mark> <mark>`*`</mark> <mark>`q[k]`</mark> <mark>`==`</mark> <mark>`fk`</mark> <mark>`*`</mark> <mark>`dof)`</mark> 27 <mark>`cons.extend([eqn[k],`</mark> <mark>`q[k]`</mark> <mark>`>=`</mark> <mark>`-sc`</mark> <mark>`*`</mark> <mark>`a,`</mark> <mark>`q[k]`</mark> <mark>`<=`</mark> <mark>`st`</mark> <mark>`*`</mark> <mark>`a])`</mark> 28 <mark>`prob`</mark> <mark>`=`</mark> <mark>`cvx.Problem(obj,`</mark> <mark>`cons)`</mark> 29 <mark>`vol`</mark> <mark>`=`</mark> <mark>`prob.solve()`</mark> 30 <mark>`q`</mark> <mark>`=`</mark> <mark>`[np.array(qi.value).flatten()`</mark> <mark>`for`</mark> <mark>`qi`</mark> <mark>`in`</mark> <mark>`q]`</mark> 31 <mark>`a`</mark> <mark>`=`</mark> <mark>`np.array(a.value).flatten()`</mark> 32 <mark>`u`</mark> <mark>`=`</mark> <mark>`[-np.array(eqnk.dual_value).flatten()`</mark> <mark>`for`</mark> <mark>`eqnk`</mark> <mark>`in`</mark> <mark>`eqn]`</mark> 33 <mark>`return`</mark> <mark>`vol,`</mark> <mark>`a,`</mark> <mark>`q,`</mark> <mark>`u`</mark> 34 <mark>`#Check`</mark> <mark>`dual`</mark> <mark>`violation`</mark> 35 <mark>`def`</mark> <mark>`stopViolation(Nd,`</mark> <mark>`PML,`</mark> <mark>`dof,`</mark> <mark>`st,`</mark> <mark>`sc,`</mark> <mark>`u,`</mark> <mark>`jc):`</mark> 36 <mark>`lst`</mark> <mark>`=`</mark> <mark>`np.where(PML[:,3]==False)[0]`</mark> 37 <mark>`Cn`</mark> <mark>`=`</mark> <mark>`PML[lst]`</mark> 38 <mark>`l`</mark> <mark>`=`</mark> <mark>`Cn[:,2]`</mark> <mark>`+`</mark> <mark>`jc`</mark> 39 <mark>`B`</mark> <mark>`=`</mark> <mark>`calcB(Nd,`</mark> <mark>`Cn,`</mark> <mark>`dof).tocsc()`</mark> 40 <mark>`y`</mark> <mark>`=`</mark> <mark>`np.zeros(len(Cn))`</mark> 41 <mark>`for`</mark> <mark>`uk`</mark> <mark>`in`</mark> <mark>`u:`</mark> 42 <mark>`yk`</mark> <mark>`=`</mark> <mark>`np.multiply(B.transpose().dot(uk)`</mark> <mark>`/`</mark> <mark>`l,`</mark> <mark>`np.array([[st],`</mark> <mark>`[-sc]]))`</mark> 43 <mark>`y`</mark> <mark>`+=`</mark> <mark>`np.amax(yk,`</mark> <mark>`axis=0)`</mark> 44 <mark>`vioCn`</mark> <mark>`=`</mark> <mark>`np.where(y>1.0001)[0]`</mark> 45 <mark>`vioSort`</mark> <mark>`=`</mark> <mark>`np.flipud(np.argsort(y[vioCn]))`</mark> 46 <mark>`num`</mark> <mark>`=`</mark> <mark>`ceil(min(len(vioSort),`</mark> <mark>`0.05*max(`</mark> <mark>`[len(Cn)*0.05,`</mark> <mark>`len(vioSort)])))`</mark> 47 <mark>`for`</mark> <mark>`i`</mark> <mark>`in`</mark> <mark>`range(num):`</mark> 48 <mark>`PML[lst[vioCn[vioSort[i]]]][3]`</mark> <mark>`=`</mark> <mark>`True`</mark> 49 <mark>`return`</mark> <mark>`num`</mark> <mark>`==`</mark> <mark>`0`</mark> 50 <mark>`#Visualize`</mark> <mark>`truss`</mark> 51 <mark>`def`</mark> <mark>`plotTruss(Nd,`</mark> <mark>`Cn,`</mark> <mark>`a,`</mark> <mark>`q,`</mark> <mark>`threshold,`</mark> <mark>`str,`</mark> <mark>`update`</mark> <mark>`=`</mark> <mark>`True):`</mark> 52 <mark>`plt.ion()`</mark> <mark>`if`</mark> <mark>`update`</mark> <mark>`else`</mark> <mark>`plt.ioff()`</mark> 53 <mark>`plt.clf();`</mark> <mark>`plt.axis(’off’);`</mark> <mark>`plt.axis(’equal’);`</mark> <mark>`plt.draw()`</mark> 54 <mark>`plt.title(str)`</mark> 55 <mark>`tk`</mark> <mark>`=`</mark> <mark>`5`</mark> <mark>`/`</mark> <mark>`max(a)`</mark> 56 <mark>`for`</mark> <mark>`i`</mark> <mark>`in`</mark> <mark>`[i`</mark> <mark>`for`</mark> <mark>`i`</mark> <mark>`in`</mark> <mark>`range(len(a))`</mark> <mark>`if`</mark> <mark>`a[i]`</mark> <mark>`>=`</mark> <mark>`threshold]:`</mark> 57 <mark>`if`</mark> <mark>`all([q[lc][i]>=0`</mark> <mark>`for`</mark> <mark>`lc`</mark> <mark>`in`</mark> <mark>`range(len(q))]):`</mark> <mark>`c`</mark> <mark>`=`</mark> <mark>`’r’`</mark> 58 <mark>`elif`</mark> <mark>`all([q[lc][i]<=0`</mark> <mark>`for`</mark> <mark>`lc`</mark> <mark>`in`</mark> <mark>`range(len(q))]):`</mark> <mark>`c`</mark> <mark>`=`</mark> <mark>`’b’`</mark> 59 <mark>`else:`</mark> <mark>`c`</mark> <mark>`=`</mark> <mark>`’tab:gray’`</mark> 60 <mark>`pos`</mark> <mark>`=`</mark> <mark>`Nd[Cn[i,`</mark> <mark>`[0,`</mark> <mark>`1]].astype(int),`</mark> <mark>`:]`</mark> 61 <mark>`plt.plot(pos[:,`</mark> <mark>`0],`</mark> <mark>`pos[:,`</mark> <mark>`1],`</mark> <mark>`c,`</mark> <mark>`linewidth`</mark> <mark>`=`</mark> <mark>`a[i]`</mark> <mark>`*`</mark> <mark>`tk)`</mark> 62 <mark>`plt.pause(0.01)`</mark> <mark>`if`</mark> <mark>`update`</mark> <mark>`else`</mark> <mark>`plt.show()`</mark> 63 <mark>`#Main`</mark> <mark>`function`</mark> 64 <mark>`def`</mark> <mark>`trussopt(width,`</mark> <mark>`height,`</mark> <mark>`st,`</mark> <mark>`sc,`</mark> <mark>`jc):`</mark> 65 <mark>`poly`</mark> <mark>`=`</mark> <mark>`Polygon([(0,`</mark> <mark>`0),`</mark> <mark>`(width,`</mark> <mark>`0),`</mark> <mark>`(width,`</mark> <mark>`height),`</mark> <mark>`(0,`</mark> <mark>`height)])`</mark> 66 <mark>`convex`</mark> <mark>`=`</mark> <mark>`True`</mark> <mark>`if`</mark> <mark>`poly.convex_hull.area`</mark> <mark>`==`</mark> <mark>`poly.area`</mark> <mark>`else`</mark> <mark>`False`</mark> 67 <mark>`xv,`</mark> <mark>`yv`</mark> <mark>`=`</mark> <mark>`np.meshgrid(range(width+1),`</mark> <mark>`range(height+1))`</mark> 68 <mark>`pts`</mark> <mark>`=`</mark> <mark>`[Point(xv.flat[i],`</mark> <mark>`yv.flat[i])`</mark> <mark>`for`</mark> <mark>`i`</mark> <mark>`in`</mark> <mark>`range(xv.size)]`</mark> 69 <mark>`Nd`</mark> <mark>`=`</mark> <mark>`np.array([[pt.x,`</mark> <mark>`pt.y]`</mark> <mark>`for`</mark> <mark>`pt`</mark> <mark>`in`</mark> <mark>`pts`</mark> <mark>`if`</mark> <mark>`poly.intersects(pt)])`</mark> 12 Linwei He et al. 70 <mark>`dof,`</mark> <mark>`f,`</mark> <mark>`PML`</mark> <mark>`=`</mark> <mark>`np.ones((len(Nd),2)),`</mark> <mark>`[],`</mark> <mark>`[]`</mark> 71 <mark>`#Load`</mark> <mark>`and`</mark> <mark>`support`</mark> <mark>`conditions`</mark> 72 <mark>`for`</mark> <mark>`i,`</mark> <mark>`nd`</mark> <mark>`in`</mark> <mark>`enumerate(Nd):`</mark> 73 <mark>`if`</mark> <mark>`nd[0]`</mark> <mark>`==`</mark> <mark>`0:`</mark> <mark>`dof[i,:]`</mark> <mark>`=`</mark> <mark>`[0,`</mark> <mark>`0]`</mark> 74 <mark>`f`</mark> <mark>`+=`</mark> <mark>`[0,`</mark> <mark>`-1]`</mark> <mark>`if`</mark> <mark>`(nd`</mark> <mark>`==`</mark> <mark>`[width,`</mark> <mark>`height/2]).all()`</mark> <mark>`else`</mark> <mark>`[0,`</mark> <mark>`0]`</mark> 75 <mark>`#Create`</mark> <mark>`the`</mark> <mark>`’ground`</mark> <mark>`structure’`</mark> 76 <mark>`for`</mark> <mark>`i,`</mark> <mark>`j`</mark> <mark>`in`</mark> <mark>`itertools.combinations(range(len(Nd)),`</mark> <mark>`2):`</mark> 77 <mark>`dx,`</mark> <mark>`dy`</mark> <mark>`=`</mark> <mark>`abs(Nd[i][0]`</mark> <mark>`-`</mark> <mark>`Nd[j][0]),`</mark> <mark>`abs(Nd[i][1]`</mark> <mark>`-`</mark> <mark>`Nd[j][1])`</mark> 78 <mark>`if`</mark> <mark>`gcd(int(dx),`</mark> <mark>`int(dy))`</mark> <mark>`==`</mark> <mark>`1`</mark> <mark>`or`</mark> <mark>`jc`</mark> <mark>`!=`</mark> <mark>`0:`</mark> 79 <mark>`seg`</mark> <mark>`=`</mark> <mark>`[]`</mark> <mark>`if`</mark> <mark>`convex`</mark> <mark>`else`</mark> <mark>`LineString([Nd[i],`</mark> <mark>`Nd[j]])`</mark> 80 <mark>`if`</mark> <mark>`convex`</mark> <mark>`or`</mark> <mark>`poly.contains(seg)`</mark> <mark>`or`</mark> <mark>`poly.boundary.contains(seg):`</mark> 81 <mark>`PML.append(`</mark> <mark>`[i,`</mark> <mark>`j,`</mark> <mark>`np.sqrt(dx2`</mark> <mark>`+`</mark> <mark>`dy2),`</mark> <mark>`False]`</mark> <mark>`)`</mark> 82 <mark>`PML,`</mark> <mark>`dof`</mark> <mark>`=`</mark> <mark>`np.array(PML),`</mark> <mark>`np.array(dof).flatten()`</mark> 83 <mark>`f`</mark> <mark>`=`</mark> <mark>`[f[i:i+len(Nd)*2]`</mark> <mark>`for`</mark> <mark>`i`</mark> <mark>`in`</mark> <mark>`range(0,`</mark> <mark>`len(f),`</mark> <mark>`len(Nd)*2)]`</mark> 84 <mark>`print(’Nodes:`</mark> <mark>`%d`</mark> <mark>`Members:`</mark> <mark>`%d’`</mark> <mark>`%`</mark> <mark>`(len(Nd),`</mark> <mark>`len(PML)))`</mark> 85 <mark>`for`</mark> <mark>`pm`</mark> <mark>`in`</mark> <mark>`[p`</mark> <mark>`for`</mark> <mark>`p`</mark> <mark>`in`</mark> <mark>`PML`</mark> <mark>`if`</mark> <mark>`p[2]`</mark> <mark>`<=`</mark> <mark>`1.42]:`</mark> 86 <mark>`pm[3]`</mark> <mark>`=`</mark> <mark>`True`</mark> 87 <mark>`#Start`</mark> <mark>`the`</mark> <mark>`’member`</mark> <mark>`adding’`</mark> <mark>`loop`</mark> 88 <mark>`for`</mark> <mark>`itr`</mark> <mark>`in`</mark> <mark>`range(1,`</mark> <mark>`100):`</mark> 89 <mark>`Cn`</mark> <mark>`=`</mark> <mark>`PML[PML[:,3]`</mark> <mark>`==`</mark> <mark>`True]`</mark> 90 <mark>`vol,`</mark> <mark>`a,`</mark> <mark>`q,`</mark> <mark>`u`</mark> <mark>`=`</mark> <mark>`solveLP(Nd,`</mark> <mark>`Cn,`</mark> <mark>`f,`</mark> <mark>`dof,`</mark> <mark>`st,`</mark> <mark>`sc,`</mark> <mark>`jc)`</mark> 91 <mark>`print("Itr:`</mark> <mark>`%d,`</mark> <mark>`vol:`</mark> <mark>`%f,`</mark> <mark>`mems:`</mark> <mark>`%d"`</mark> <mark>`%`</mark> <mark>`(itr,`</mark> <mark>`vol,`</mark> <mark>`len(Cn)))`</mark> 92 <mark>`plotTruss(Nd,`</mark> <mark>`Cn,`</mark> <mark>`a,`</mark> <mark>`q,`</mark> <mark>`max(a)`</mark> <mark>`*`</mark> <mark>`1e-3,`</mark> <mark>`"Itr:"`</mark> <mark>`+`</mark> <mark>`str(itr))`</mark> 93 <mark>`if`</mark> <mark>`stopViolation(Nd,`</mark> <mark>`PML,`</mark> <mark>`dof,`</mark> <mark>`st,`</mark> <mark>`sc,`</mark> <mark>`u,`</mark> <mark>`jc):`</mark> <mark>`break`</mark> 94 <mark>`print("Volume:`</mark> <mark>`%f"`</mark> <mark>`%`</mark> <mark>`(vol))`</mark> 95 <mark>`plotTruss(Nd,`</mark> <mark>`Cn,`</mark> <mark>`a,`</mark> <mark>`q,`</mark> <mark>`max(a)`</mark> <mark>`*`</mark> <mark>`1e-3,`</mark> <mark>`"Finished",`</mark> <mark>`False)`</mark> 96 <mark>`#Execution`</mark> <mark>`function`</mark> <mark>`when`</mark> <mark>`called`</mark> <mark>`directly`</mark> <mark>`by`</mark> <mark>`Python`</mark> 97 <mark>`if`</mark> <mark>`__name__`</mark> <mark>`==’__main__’:`</mark> 98 <mark>`trussopt(width`</mark> <mark>`=`</mark> <mark>`20,`</mark> <mark>`height`</mark> <mark>`=`</mark> <mark>`10,`</mark> <mark>`st`</mark> <mark>`=`</mark> <mark>`1,`</mark> <mark>`sc`</mark> <mark>`=1,`</mark> <mark>`jc`</mark> <mark>`=`</mark> <mark>`0)`</mark> 99 <mark>`##########################################################################`</mark> 100 <mark>`#`</mark> <mark>`This`</mark> <mark>`Python`</mark> <mark>`script`</mark> <mark>`was`</mark> <mark>`written`</mark> <mark>`by`</mark> <mark>`L.`</mark> <mark>`He,`</mark> <mark>`M.`</mark> <mark>`Gilbert,`</mark> <mark>`X.`</mark> <mark>`Song`</mark> <mark>`#`</mark> 101 <mark>`#`</mark> <mark>`University`</mark> <mark>`of`</mark> <mark>`Sheffield,`</mark> <mark>`United`</mark> <mark>`Kingdom`</mark> <mark>`#`</mark> 102 <mark>`#`</mark> <mark>`Please`</mark> <mark>`send`</mark> <mark>`comments`</mark> <mark>`to:`</mark> <mark>`linwei.he@sheffield.ac.uk`</mark> <mark>`#`</mark> 103 <mark>`#`</mark> <mark>`The`</mark> <mark>`script`</mark> <mark>`is`</mark> <mark>`intended`</mark> <mark>`for`</mark> <mark>`educational`</mark> <mark>`purposes`</mark> <mark>`-`</mark> <mark>`theoretical`</mark> <mark>`details`</mark> <mark>`#`</mark> 104 <mark>`#`</mark> <mark>`are`</mark> <mark>`discussed`</mark> <mark>`in`</mark> <mark>`the`</mark> <mark>`following`</mark> <mark>`paper,`</mark> <mark>`which`</mark> <mark>`should`</mark> <mark>`be`</mark> <mark>`cited`</mark> <mark>`in`</mark> <mark>`any`</mark> <mark>`#`</mark> 105 <mark>`#`</mark> <mark>`derivative`</mark> <mark>`works`</mark> <mark>`or`</mark> <mark>`technical`</mark> <mark>`papers`</mark> <mark>`which`</mark> <mark>`use`</mark> <mark>`the`</mark> <mark>`script:`</mark> <mark>`#`</mark> 106 <mark>`#`</mark> <mark>`#`</mark> 107 <mark>`#`</mark> <mark>`"A`</mark> <mark>`Python`</mark> <mark>`script`</mark> <mark>`for`</mark> <mark>`adaptive`</mark> <mark>`layout`</mark> <mark>`optimization`</mark> <mark>`of`</mark> <mark>`trusses",`</mark> <mark>`#`</mark> 108 <mark>`#`</mark> <mark>`L.`</mark> <mark>`He,`</mark> <mark>`M.`</mark> <mark>`Gilbert,`</mark> <mark>`X.`</mark> <mark>`Song,`</mark> <mark>`Struct.`</mark> <mark>`Multidisc.`</mark> <mark>`Optim.,`</mark> <mark>`2018`</mark> <mark>`#`</mark> 109 <mark>`#`</mark> <mark>`#`</mark> 110 <mark>`#`</mark> <mark>`Disclaimer:`</mark> <mark>`#`</mark> 111 <mark>`#`</mark> <mark>`The`</mark> <mark>`authors`</mark> <mark>`reserve`</mark> <mark>`all`</mark> <mark>`rights`</mark> <mark>`but`</mark> <mark>`do`</mark> <mark>`not`</mark> <mark>`guarantee`</mark> <mark>`that`</mark> <mark>`the`</mark> <mark>`script`</mark> <mark>`is`</mark> <mark>`#`</mark> 112 <mark>`#`</mark> <mark>`free`</mark> <mark>`from`</mark> <mark>`errors.`</mark> <mark>`Furthermore,`</mark> <mark>`the`</mark> <mark>`authors`</mark> <mark>`are`</mark> <mark>`not`</mark> <mark>`liable`</mark> <mark>`for`</mark> <mark>`any`</mark> <mark>`#`</mark> 113 <mark>`#`</mark> <mark>`issues`</mark> <mark>`caused`</mark> <mark>`by`</mark> <mark>`the`</mark> <mark>`use`</mark> <mark>`of`</mark> <mark>`the`</mark> <mark>`program.`</mark> <mark>`#`</mark> 114 <mark>`##########################################################################`</mark>

섹션 본문 107문단 · 41,221자

(제목 없음)

1Numerical layout optimization employing an adaptive 'member adding' solution scheme provides a computationally efficient means of generating (near-)optimum trusses for problems involving single or multiple load cases. To encourage usage of the method, a Python script is presented, allowing medium to large-scale problems to be solved efficiently. As well as handling multiple load cases, the short (98 line) script presented can tackle truss optimization problems involving unequal limiting tensile and compressive stresses, joint costs, and non-convex polygonal domains, with or without holes.Various numerical examples are used to demonstrate the efficacy of the script presented.

Introduction

2Truss layout optimization using the 'ground structure' approach provides a fully automated means of identifying (near-)optimum truss structures. Although first proposed in the 1960s by Dorn et al. (1964), it has not been widely used in practice for various reasons. For example, the solutions generated can appear impractical, at least when conventional manufacturing techniques are envisaged. However, in recent decades new manufacturing techniques have been developing apace, e.g. additive manufacturing, and means of rationalizing the solutions obtained via layout optimization have also been developed (e.g. He and Gilbert 2015). Also, in 2003, an adaptive 'member adding' scheme was proposed by Gilbert and Tyas (2003), which allowed solutions to be obtained more quickly, and also for extremely large problems (e.g. >1,000,000,000 members) to be solved. This means that layout optimization can be used to obtain highly accurate benchmark solutions that can be used to validate analytical solutions (e.g. Sokół 2011b; Sokół and Rozvany 2012), and also to discover new optimum structural forms (e.g. Darwich et al. 2010;Tyas et al. 2011;Fairclough et al. 2018). To increase the practical applicability of solutions, Pritchard et al. (2005) extended the adaptive 'member adding' scheme to solve problems involving multiple load cases whilst Tyas et al. (2006) incorporated structural stability considerations. Also, Smith et al. (2016) utilized layout optimization to design truss-like metallic components suitable for fabrication via additive manufacturing, with the techniques involved recently extended by He et al. (2018). In parallel, the layout optimization technique has been successfully transferred to other applications. For example, Bolbotowski et al. (2018) utilized layout optimization to design (near-)optimum grillages and Smith and Gilbert (2007) and Gilbert et al. (2014) proposed the 'discontinuity layout optimization' (DLO) method to identify critical patterns of discontinuities at collapse for in-plane and out-of-plane plasticity problems.

3However, although interest in numerical layout optimization has grown in recent years, the power of the method still appears under-appreciated in the structural optimization research community. One possible reason for this is that accessible educational resources for use by new researchers have been lacking. Although a script was made available by Sokół (2011a), the Mathematica language employed is not commonly used in the community. Matlab scripts developed by Zegard and Paulino (2014) and Zegard and Paulino (2015) helped in this respect, although these contain relatively complex functions that could potentially reduce uptake. Also, most significantly, although proposed in 2003, the 'member adding' scheme has not yet been incorporated in any of the aforementioned publicly available scripts, potentially leading researchers to underestimate the potential computational efficiency of the layout optimization method. In contrast, the 99-line Matlab script for SIMP (Sigmund 2001) helped pave the way for worldwide research in the field of continuum topology optimization. As an indication of the dominance of SIMP over numerical layout optimization in terms of published educational source codes, only one of the 22 scripts listed by Wei et al. (2018) employ the latter.

4In order to provide an accessible yet computationally efficient educational implementation of numerical layout optimization, this paper introduces a simple Python script. With 98 lines, it incorporates the efficient adaptive 'member adding' scheme for 2D problems subject to multiple load cases, with the potential for unequal limiting tensile and compressive stresses, joint costs, and non-convex polygonal domains (with or without holes). The paper is organized as follows: first, the mathematical layout optimization formulation is introduced; second, important code sections are explained; third, numerical examples are shown to demonstrate the efficacy of the script; finally, conclusions are drawn.

Single-load case problem

5The standard layout optimization process (Dorn et al. 1964;Gilbert and Tyas 2003;Pritchard et al. 2005) involves a number of steps, as shown in Fig. 1. Firstly the design domain, load and support conditions are specified, Fig. 1a; secondly, the design domain is discretized using nodes, Fig. 1 Steps in layout optimization: a specify design domain, loads and supports; b discretize domain using nodes; c interconnect nodes with potential truss members; d use optimization to identify the optimal structural layout (a) (b) (c) (d) Fig. 1b; thirdly, these nodes are interconnected with potential members to create a 'ground structure', Fig. 1c; finally, an optimum layout is identified by solving the optimization problem below (Fig. 1d):

6where, V is the structural volume, a = [a 1 , a 2 , ..., a m ] T is a vector containing member cross-sectional areas, with m denoting the number of members. l = [l 1 , l 2 , ..., l m ] T is a vector of member lengths. B is a 2n × m equilibrium matrix comprising direction cosines, with n denoting the number of nodes and q is vector containing the internal member forces; a simple example of the equilibrium constraint is presented in Fig. 2. f is a vector containing the external forces; σ + and σ − are limiting tensile and compressive stresses respectively.

Multiple load case problem

7Problem (1) can easily be extended to obtain solutions for multiple load case plastic design problems. In this case the equilibrium constraint (1b), stress limits (1c) and (1d) must be satisfied in each load case, e.g. the former gives:

8Bq k = f k , for k = 1, 2, ..., p,

9where, k is the load case identifier and p represents the total number of load cases.

Joint costs

10It was found in previous studies (e.g. Gilbert and Tyas 2003;Pritchard et al. 2005) that layout optimization will often generate structures that are complex in form, containing large numbers of short members. A simple means of addressing this is to include a notional joint cost (Parkes 1978), which has the effect of penalizing short members and hence simplifying the solution in many cases:l = [l 1 + s, l 2 +s, ..., l m +s] T in the objective function (1a), wherel is the augmented member length vector with predefined joint cost (or length) s.

Full problem

11Considering multiple load cases and joint costs, the full problem can now be written as:

12which is, like (1), a linear programming (LP) problem that can be solved efficiently using modern optimization solvers. However, when using the ground structure approach the number of potential numbers grows rapidly with the number of nodes employed, with up to n(n−1) 2 members required. This can lead to extremely large optimization problems that are computationally expensive to solve. To address this, a 'member adding' scheme, which is based on the 'column generation' approach (Dantzig and Wolfe 1960) was proposed by Gilbert and Tyas (2003). This allows problem (3) to be decomposed into a number of smaller subproblems, with information from the dual problem used to guide the process.

Adaptive 'member adding' scheme

13Using the adaptive 'member adding' scheme (Gilbert and Tyas 2003;Pritchard et al. 2005), initially only a reduced set of members are used to solve problem (3), and remaining potential members in the 'ground structure' are gradually added to the set, until the following constraint is satisfied for all potential members (readers who are interested in derivation of Eq. 4 can refer to Appendix A):

14where i is the summed maximum virtual strain of member i in all load cases; u k i is a vector containing virtual displacement of nodes connected by member i, under load case k. Note that, when a primal-dual interior point method is used to solve problem (3), u k i is obtained automatically with no extra cost. Although only a reduced set of members are used in Eq. 3, a full virtual displacement field u k of all nodes can still be generated. If any violation of Eq. 4 is found in the virtual displacement field, the most violated potential members can be added to the reduced set of members. Then (3) can be solved again, this time generating an improved virtual displacement field in which (4) is no longer violated for the newly added members. This adaptive 'member adding' process continues until no violation is detected; according to duality theory, the solution obtained will then be equivalent to that obtained by solving the full problem from the outset. The entire process is shown in Fig. 3.

Python implementation

15Python is an open-source interpreted high-level programming language that is becoming increasingly popular for solving scientific and engineering problems. Unlike Matlab, where built-in toolboxes are automatically loaded when started, in Python such tools are imported using the keyword at the beginning of the script. These extra lines allow dependencies on external tools to be clearly seen.

16In this paper, a number of freely available tools are used, including mathematical tools such as scipy and numpy, the convex optimization tool cvxpy (Diamond and Boyd 2016;Agrawal et al. 2018), and the geometry tool shapely.

17In this section the various functions used to construct and solve the layout optimization problem (3) are first Fig. 3 Flowchart of the adaptive 'member adding' process introduced; then the main workflow is outlined. As Python is, like Matlab, an interpreted language, loop structures are generally inefficient. Therefore, to improve execution speed, vectorized operations are utilized in place of loop structures wherever possible.

Equilibrium matrix B

18For a member i, interconnecting nodes I and I I , its contribution to equilibrium matrix B can be written as:

19where, X i = x I I i − x I i and Y i = y I I i − y I i are the projected length of the member of length l i in the x and y axis directions respectively, and where [x I i , y I i ] and [x I I i , y I I i ] are the co-ordinates of nodes I and I I respectively. If a connected node is supported, then the coefficients of the corresponding row are set to zero (i.e. supported degrees of freedom are removed). Thus, taking into account boundary conditions, the above formulation can be expressed as:

20where d 0 , d 1 , d 2 , d 3 are 0-1 coefficients describing the degree of freedom in the x and y directions for the connected nodes The equilibrium matrix B is then assembled using the B i matrices for all members. B is a sparse matrix, which can be expressed using a row-column-value format comprising only non-zero entries, constructed by concatenating the coefficients calculated in Eq. 6 as well as their corresponding row (degree of freedom at nodes) and column (member) numbers.

Solving the LP problem

21In the script, problem (3) is solved in function solveLP.

22In Python, the use of object oriented programming (OOP) allows problem (3) to be written in a format that is very similar to its natural expression, improving readability. For example, using the optimization tool cvxpy, the stress constraints in Eq. 3b are expressed as q[k] >= -sc * a and q[k] <= st * a.

Check dual violation

23When the primal problem (3) is solved via the primal-dual interior point method, the virtual displacements in u for each load case are obtained from the equilibrium constraints defined in eqn. Therefore, violation of constraint (4) Fig. 4 Cantilever example: problem definition can be calculated for every member in the full 'ground structure' (except for those already present in the reduced set, where this is unnecessary as there will be no violation). All potential members are then sorted by their constraint violation numbers, and the most violating ones are added to the primal problem, with the number of new members calculated using:

24m P and m V are, respectively, the numbers of remaining members in the potential member list (i.e. members not yet included in Eq. 3), and those violating (4). α and β are control parameters, both set to 0.05 in this paper. Using the adaptive 'member adding' scheme, the size of problem (3) gradually increases, with Eq. 7 used to control the growth rate. When number of violations is large, only a small proportion are added into (3); on the other hand, when the number of violations is small, most (or all) are added in a given iteration. This balances problem size with the number of iterations required in order to achieve an efficient iterative process. Various alternative heuristics can be used to determine the priority and number of members to be added at each iteration, e.g. the two-stage high-pass filter in Gilbert and Tyas (2003) and the active member set method described in Sokół (2014). It is important to note that, although a heuristic algorithm is used here to improve computational efficiency, the final solution, obtained when (4) is satisfied for all members in the ground structure, is equivalent to the solution obtained by solving the full problem, due to the strong duality nature of LP problems (Vanderbei 2001).

Visualization

25The solutions are visualized in function plotTrusses. Members with areas greater than a threshold number (e.g. 1 × 10 −3 of the maximum member area) are plotted in red or blue, depending on the sign of their internal forces. When the signs of internal forces vary in different load cases, grey is used instead.

Main workflow

26The main trussopt function contains several steps to define the design domain, load, and support conditions for any given layout optimization problem, to create the 'ground structure', and to solve the LP problem (3c) using the adaptive 'member adding' scheme.

27-Firstly, a polygonal design domain is specified using the Polygon function imported from shapely, and then its convexity checked. (c) (d) -Secondly, a uniformly distributed grid of nodes is created using the meshgrid function, with points lying inside the design domain added to node list Nd; then support and load conditions are added. -Thirdly, the 'ground structure' is created by generating all valid potential members, excluding overlapping lines (checked using the greatest common divider, function gcd, when joint costs are not specified), and lines crossing the polygonal boundary (using function contains from shapely). -Finally, the initial reduced set of members is created by including only short member connections. The adaptive 'member adding' process then starts, in which potential members are added to this reduced set until no violation of Eq. 4 is found in any member in the 'ground structure'.

Numerical examples

28A number of examples serve to demonstrate the efficacy of the script. Firstly, a simple cantilever problem (Fig. 4) can be solved by running the following command in a terminal: Alternatively, the script can be imported as a module in Python using:

29And then function trussopt can be called to perform a layout optimization with the following input arguments: which solves the simple cantilever problem shown in Fig. 4 with width = 20, height = 10, limiting stress in tension = 1, in compression = 1 and joint cost = 0. In this section, all line numbers refer to the script in Appendix C, and all quoted CPU times were obtained using a laptop PC equipped with an Intel I7-7700HQ CPU and running 64-bit Windows 10.

Effect of using the adaptive 'member adding' scheme

30Using the adaptive 'member adding' scheme, a large-scale layout optimization problem is solved as a series of much smaller LP problems solved in succession; e.g. Fig. 5 shows steps in the solution of the cantilever design problem shown in Fig. 4.

31When solving medium or large-scale problems, the adaptive 'member adding' scheme reduces memory consumption and can result in significant speed improvements, as indicated in Table 1. Whilst the resulting structural volumes are identical (to five significant figures), the latter becomes increasingly efficient with increasing problem size, e.g. 8.2 times faster when 60 × 30 nodal divisions are used. Note that 'member adding' can be switched off by increasing the maximum initial member connection distance in line 85, for example changing this to:

32for the purposes of this paper.

Alternative LP solvers

33By default, the LP problem (3c) is solved using the opensource solver ECOS (Domahidi et al. 2013) distributed with cvxpy. Alternatively, a range of other, potentially more efficient, LP solvers such as GUROBI and MOSEK can be used with cvxpy. To use MOSEK, for example, line 29 is replaced with the following (note that this requires MOSEK has already been added to Python environment; if not, guidance can be found in Appendix B):

34The MOSEK parameter "MSK IPAR INTPNT BASIS" is optional; however this disables the unnecessary basis identification step to improve speed. Using MOSEK, the CPU cost required to solve problems is significantly reduced, making the layout optimization process very efficient. Table 2 shows sample solutions for the cantilever

Joint cost

35To approximately account for the costs associated with joints, a joint cost can be directly specified when calling the main function trussopt. For example, a joint cost of s = 1 unit length can be added using the following command; the simpler solution then generated is shown on Fig. 6.

Unequal stress limits

36Unequal stress limits can also be directly specified. For example, a compressive stress limit can be set to σ − = 0.1σ 0 with the following input arguments:

37Alternatively, a different tensile stress limit can be set if desired. The corresponding results are shown in Fig. 7.

Change load and support conditions

38Load and support conditions can be changed by modifying lines 73 and 74. For example, to generate the 'half wheel' example shown in Fig. 8, the pin and roller supports can be applied by replacing line 73 with:

39which locates the two corner nodes at the base of the domain and then sets the appropriate degrees of freedom. Similarly, the point load can be applied by replacing the original line 74 with:

Multiple load cases

40Additional load cases can be included by appending load vector f after line 74. For the two load case cantilever example problem shown in Fig. 9, load case Q is added using the following lines:

41And the point load P is moved to the bottom-right corner by replacing the original line 74 with:

42Initially all load cases are concatenated in vector f, which is then reformatted to a p × 2n array in line 83.

Non-convex domain

43Various polygonal domains can be specified using shapely. For example, to add a hole to the design domain, as shown in Fig. 10, the following lines can be added after line 65: This subtracts a rectangular region from the original design domain in Fig. 4. Note that, when a non-convex domain is used, lines that intersect domain boundary should be excluded from the 'ground structure'. Line 80 checks such intersections using the contains function from shapely. Since this can become computationally expensive when the number of potential connections is large, it is skipped when a convex domain is used.

Conclusions

44A simple Python implementation of truss layout optimization using an adaptive 'member adding' scheme has been presented for educational use. Various examples are used to demonstrate the efficacy of the script for problems involving single and multiple load cases, unequal limiting stresses in tension and compression, joint costs, and non-convex polygonal domains, with or without holes. The solutions obtained are globally optimal for the prescribed nodal discretization and can be used to benchmark other methods or to provide inspiration for structural designers.

45The 98-line Python script described is listed for reference in Appendix B and is also provided in the form of downloadable source code; see Supplementary material section.

46Supplementary material Downloadable Python script, trussopt.py, and installation files: https://doi.org/10.15131/shef.data.7271678.

B.2 Installation with Python 2

47It is possible to run the script with Python 2 (2.6 and later) by making minor modifications to the script, as detailed below.

48First, remove the gcd method from math in the first line:

49And instead import it from fractions instead, by adding the following new line:

50Also, line 47 is replaced with:

51to take into account the fact that function ceil returns a floating point rather than integer value in Python 2.

B.3 Alternative solvers

52To use an alternative solver, as described in Section 4.2, this also needs be installed. For example, MOSEK can be installed using the following command:

53In addition, a licence file is required, which can be freely obtained for academic use from the MOSEK website (https://www.mosek.com).

B.4 Python IDE

54For beginners, the Spyder IDE (Integrated Development Environment) bundled with the Anaconda package provides an easy-to-use means of editing and running the script.

Introduction

55Truss layout optimization using the 'ground structure' approach provides a fully automated means of identifying (near-)optimum truss structures. Although first proposed in the 1960s by Dorn et al. (1964), it has not been widely used in practice for various reasons. For example, the solutions generated can appear impractical, at least when conventional manufacturing techniques are envisaged. However, in recent decades new manufacturing techniques have been developing apace, e.g. additive manufacturing, and means of rationalizing the solutions obtained via layout optimization have also been developed (e.g. He and Gilbert 2015). Also, in 2003, an adaptive 'member adding' scheme was proposed by Gilbert and Tyas (2003), which allowed solutions to be obtained more quickly, and also for extremely large problems (e.g. >1,000,000,000 members) to be solved. This means that layout optimization can be used to obtain highly accurate benchmark solutions that can be used to validate analytical solutions (e.g. Sokół 2011b; Sokół and Rozvany 2012), and also to discover new optimum structural forms (e.g. Darwich et al. 2010;Tyas et al. 2011;Fairclough et al. 2018). To increase the practical applicability of solutions, Pritchard et al. (2005) extended the adaptive 'member adding' scheme to solve problems involving multiple load cases whilst Tyas et al. (2006) incorporated structural stability considerations. Also, Smith et al. (2016) utilized layout optimization to design truss-like metallic components suitable for fabrication via additive manufacturing, with the techniques involved recently extended by He et al. (2018). In parallel, the layout optimization technique has been successfully transferred to other applications. For example, Bolbotowski et al. (2018) utilized layout optimization to design (near-)optimum grillages and Smith and Gilbert (2007) and Gilbert et al. (2014) proposed the 'discontinuity layout optimization' (DLO) method to identify critical patterns of discontinuities at collapse for in-plane and out-of-plane plasticity problems.

56However, although interest in numerical layout optimization has grown in recent years, the power of the method still appears under-appreciated in the structural optimization research community. One possible reason for this is that accessible educational resources for use by new researchers have been lacking. Although a script was made available by Sokół (2011a), the Mathematica language employed is not commonly used in the community. Matlab scripts developed by Zegard and Paulino (2014) and Zegard and Paulino (2015) helped in this respect, although these contain relatively complex functions that could potentially reduce uptake. Also, most significantly, although proposed in 2003, the 'member adding' scheme has not yet been incorporated in any of the aforementioned publicly available scripts, potentially leading researchers to underestimate the potential computational efficiency of the layout optimization method. In contrast, the 99-line Matlab script for SIMP (Sigmund 2001) helped pave the way for worldwide research in the field of continuum topology optimization. As an indication of the dominance of SIMP over numerical layout optimization in terms of published educational source codes, only one of the 22 scripts listed by Wei et al. (2018) employ the latter.

57In order to provide an accessible yet computationally efficient educational implementation of numerical layout optimization, this paper introduces a simple Python script. With 98 lines, it incorporates the efficient adaptive 'member adding' scheme for 2D problems subject to multiple load cases, with the potential for unequal limiting tensile and compressive stresses, joint costs, and non-convex polygonal domains (with or without holes). The paper is organized as follows: first, the mathematical layout optimization formulation is introduced; second, important code sections are explained; third, numerical examples are shown to demonstrate the efficacy of the script; finally, conclusions are drawn.

Single-load case problem

58The standard layout optimization process (Dorn et al. 1964;Gilbert and Tyas 2003;Pritchard et al. 2005) involves a number of steps, as shown in Fig. 1. Firstly the design domain, load and support conditions are specified, Fig. 1a; secondly, the design domain is discretized using nodes, Fig. 1 Steps in layout optimization: a specify design domain, loads and supports; b discretize domain using nodes; c interconnect nodes with potential truss members; d use optimization to identify the optimal structural layout (a) (b) (c) (d) Fig. 1b; thirdly, these nodes are interconnected with potential members to create a 'ground structure', Fig. 1c; finally, an optimum layout is identified by solving the optimization problem below (Fig. 1d):

59where, V is the structural volume, a = [a 1 , a 2 , ..., a m ] T is a vector containing member cross-sectional areas, with m denoting the number of members. l = [l 1 , l 2 , ..., l m ] T is a vector of member lengths. B is a 2n × m equilibrium matrix comprising direction cosines, with n denoting the number of nodes and q is vector containing the internal member forces; a simple example of the equilibrium constraint is presented in Fig. 2. f is a vector containing the external forces; σ + and σ − are limiting tensile and compressive stresses respectively.

Multiple load case problem

60Problem (1) can easily be extended to obtain solutions for multiple load case plastic design problems. In this case the equilibrium constraint (1b), stress limits (1c) and (1d) must be satisfied in each load case, e.g. the former gives:

61Bq k = f k , for k = 1, 2, ..., p,

62where, k is the load case identifier and p represents the total number of load cases.

Joint costs

63It was found in previous studies (e.g. Gilbert and Tyas 2003;Pritchard et al. 2005) that layout optimization will often generate structures that are complex in form, containing large numbers of short members. A simple means of addressing this is to include a notional joint cost (Parkes 1978), which has the effect of penalizing short members and hence simplifying the solution in many cases:l = [l 1 + s, l 2 +s, ..., l m +s] T in the objective function (1a), wherel is the augmented member length vector with predefined joint cost (or length) s.

Full problem

64Considering multiple load cases and joint costs, the full problem can now be written as:

65which is, like (1), a linear programming (LP) problem that can be solved efficiently using modern optimization solvers. However, when using the ground structure approach the number of potential numbers grows rapidly with the number of nodes employed, with up to n(n−1) 2 members required. This can lead to extremely large optimization problems that are computationally expensive to solve. To address this, a 'member adding' scheme, which is based on the 'column generation' approach (Dantzig and Wolfe 1960) was proposed by Gilbert and Tyas (2003). This allows problem (3) to be decomposed into a number of smaller subproblems, with information from the dual problem used to guide the process.

Adaptive 'member adding' scheme

66Using the adaptive 'member adding' scheme (Gilbert and Tyas 2003;Pritchard et al. 2005), initially only a reduced set of members are used to solve problem (3), and remaining potential members in the 'ground structure' are gradually added to the set, until the following constraint is satisfied for all potential members (readers who are interested in derivation of Eq. 4 can refer to Appendix A):

67where i is the summed maximum virtual strain of member i in all load cases; u k i is a vector containing virtual displacement of nodes connected by member i, under load case k. Note that, when a primal-dual interior point method is used to solve problem (3), u k i is obtained automatically with no extra cost. Although only a reduced set of members are used in Eq. 3, a full virtual displacement field u k of all nodes can still be generated. If any violation of Eq. 4 is found in the virtual displacement field, the most violated potential members can be added to the reduced set of members. Then (3) can be solved again, this time generating an improved virtual displacement field in which (4) is no longer violated for the newly added members. This adaptive 'member adding' process continues until no violation is detected; according to duality theory, the solution obtained will then be equivalent to that obtained by solving the full problem from the outset. The entire process is shown in Fig. 3.

Python implementation

68Python is an open-source interpreted high-level programming language that is becoming increasingly popular for solving scientific and engineering problems. Unlike Matlab, where built-in toolboxes are automatically loaded when started, in Python such tools are imported using the keyword at the beginning of the script. These extra lines allow dependencies on external tools to be clearly seen.

69In this paper, a number of freely available tools are used, including mathematical tools such as scipy and numpy, the convex optimization tool cvxpy (Diamond and Boyd 2016;Agrawal et al. 2018), and the geometry tool shapely.

70In this section the various functions used to construct and solve the layout optimization problem (3) are first Fig. 3 Flowchart of the adaptive 'member adding' process introduced; then the main workflow is outlined. As Python is, like Matlab, an interpreted language, loop structures are generally inefficient. Therefore, to improve execution speed, vectorized operations are utilized in place of loop structures wherever possible.

Equilibrium matrix B

71For a member i, interconnecting nodes I and I I , its contribution to equilibrium matrix B can be written as:

72where, X i = x I I i − x I i and Y i = y I I i − y I i are the projected length of the member of length l i in the x and y axis directions respectively, and where [x I i , y I i ] and [x I I i , y I I i ] are the co-ordinates of nodes I and I I respectively. If a connected node is supported, then the coefficients of the corresponding row are set to zero (i.e. supported degrees of freedom are removed). Thus, taking into account boundary conditions, the above formulation can be expressed as:

73where d 0 , d 1 , d 2 , d 3 are 0-1 coefficients describing the degree of freedom in the x and y directions for the connected nodes The equilibrium matrix B is then assembled using the B i matrices for all members. B is a sparse matrix, which can be expressed using a row-column-value format comprising only non-zero entries, constructed by concatenating the coefficients calculated in Eq. 6 as well as their corresponding row (degree of freedom at nodes) and column (member) numbers.

Solving the LP problem

74In the script, problem (3) is solved in function solveLP.

75In Python, the use of object oriented programming (OOP) allows problem (3) to be written in a format that is very similar to its natural expression, improving readability. For example, using the optimization tool cvxpy, the stress constraints in Eq. 3b are expressed as q[k] >= -sc * a and q[k] <= st * a.

Check dual violation

76When the primal problem (3) is solved via the primal-dual interior point method, the virtual displacements in u for each load case are obtained from the equilibrium constraints defined in eqn. Therefore, violation of constraint (4) Fig. 4 Cantilever example: problem definition can be calculated for every member in the full 'ground structure' (except for those already present in the reduced set, where this is unnecessary as there will be no violation). All potential members are then sorted by their constraint violation numbers, and the most violating ones are added to the primal problem, with the number of new members calculated using:

77m P and m V are, respectively, the numbers of remaining members in the potential member list (i.e. members not yet included in Eq. 3), and those violating (4). α and β are control parameters, both set to 0.05 in this paper. Using the adaptive 'member adding' scheme, the size of problem (3) gradually increases, with Eq. 7 used to control the growth rate. When number of violations is large, only a small proportion are added into (3); on the other hand, when the number of violations is small, most (or all) are added in a given iteration. This balances problem size with the number of iterations required in order to achieve an efficient iterative process. Various alternative heuristics can be used to determine the priority and number of members to be added at each iteration, e.g. the two-stage high-pass filter in Gilbert and Tyas (2003) and the active member set method described in Sokół (2014). It is important to note that, although a heuristic algorithm is used here to improve computational efficiency, the final solution, obtained when (4) is satisfied for all members in the ground structure, is equivalent to the solution obtained by solving the full problem, due to the strong duality nature of LP problems (Vanderbei 2001).

Visualization

78The solutions are visualized in function plotTrusses. Members with areas greater than a threshold number (e.g. 1 × 10 −3 of the maximum member area) are plotted in red or blue, depending on the sign of their internal forces. When the signs of internal forces vary in different load cases, grey is used instead.

Main workflow

79The main trussopt function contains several steps to define the design domain, load, and support conditions for any given layout optimization problem, to create the 'ground structure', and to solve the LP problem (3c) using the adaptive 'member adding' scheme.

80-Firstly, a polygonal design domain is specified using the Polygon function imported from shapely, and then its convexity checked. (c) (d) -Secondly, a uniformly distributed grid of nodes is created using the meshgrid function, with points lying inside the design domain added to node list Nd; then support and load conditions are added. -Thirdly, the 'ground structure' is created by generating all valid potential members, excluding overlapping lines (checked using the greatest common divider, function gcd, when joint costs are not specified), and lines crossing the polygonal boundary (using function contains from shapely). -Finally, the initial reduced set of members is created by including only short member connections. The adaptive 'member adding' process then starts, in which potential members are added to this reduced set until no violation of Eq. 4 is found in any member in the 'ground structure'.

Numerical examples

81A number of examples serve to demonstrate the efficacy of the script. Firstly, a simple cantilever problem (Fig. 4) can be solved by running the following command in a terminal: Alternatively, the script can be imported as a module in Python using:

82And then function trussopt can be called to perform a layout optimization with the following input arguments: which solves the simple cantilever problem shown in Fig. 4 with width = 20, height = 10, limiting stress in tension = 1, in compression = 1 and joint cost = 0. In this section, all line numbers refer to the script in Appendix C, and all quoted CPU times were obtained using a laptop PC equipped with an Intel I7-7700HQ CPU and running 64-bit Windows 10.

Effect of using the adaptive 'member adding' scheme

83Using the adaptive 'member adding' scheme, a large-scale layout optimization problem is solved as a series of much smaller LP problems solved in succession; e.g. Fig. 5 shows steps in the solution of the cantilever design problem shown in Fig. 4.

84When solving medium or large-scale problems, the adaptive 'member adding' scheme reduces memory consumption and can result in significant speed improvements, as indicated in Table 1. Whilst the resulting structural volumes are identical (to five significant figures), the latter becomes increasingly efficient with increasing problem size, e.g. 8.2 times faster when 60 × 30 nodal divisions are used. Note that 'member adding' can be switched off by increasing the maximum initial member connection distance in line 85, for example changing this to:

85for the purposes of this paper.

Alternative LP solvers

86By default, the LP problem (3c) is solved using the opensource solver ECOS (Domahidi et al. 2013) distributed with cvxpy. Alternatively, a range of other, potentially more efficient, LP solvers such as GUROBI and MOSEK can be used with cvxpy. To use MOSEK, for example, line 29 is replaced with the following (note that this requires MOSEK has already been added to Python environment; if not, guidance can be found in Appendix B):

87The MOSEK parameter "MSK IPAR INTPNT BASIS" is optional; however this disables the unnecessary basis identification step to improve speed. Using MOSEK, the CPU cost required to solve problems is significantly reduced, making the layout optimization process very efficient. Table 2 shows sample solutions for the cantilever

Joint cost

88To approximately account for the costs associated with joints, a joint cost can be directly specified when calling the main function trussopt. For example, a joint cost of s = 1 unit length can be added using the following command; the simpler solution then generated is shown on Fig. 6.

Unequal stress limits

89Unequal stress limits can also be directly specified. For example, a compressive stress limit can be set to σ − = 0.1σ 0 with the following input arguments:

90Alternatively, a different tensile stress limit can be set if desired. The corresponding results are shown in Fig. 7.

Change load and support conditions

91Load and support conditions can be changed by modifying lines 73 and 74. For example, to generate the 'half wheel' example shown in Fig. 8, the pin and roller supports can be applied by replacing line 73 with:

92which locates the two corner nodes at the base of the domain and then sets the appropriate degrees of freedom. Similarly, the point load can be applied by replacing the original line 74 with:

Multiple load cases

93Additional load cases can be included by appending load vector f after line 74. For the two load case cantilever example problem shown in Fig. 9, load case Q is added using the following lines:

94And the point load P is moved to the bottom-right corner by replacing the original line 74 with:

95Initially all load cases are concatenated in vector f, which is then reformatted to a p × 2n array in line 83.

Non-convex domain

96Various polygonal domains can be specified using shapely. For example, to add a hole to the design domain, as shown in Fig. 10, the following lines can be added after line 65: This subtracts a rectangular region from the original design domain in Fig. 4. Note that, when a non-convex domain is used, lines that intersect domain boundary should be excluded from the 'ground structure'. Line 80 checks such intersections using the contains function from shapely. Since this can become computationally expensive when the number of potential connections is large, it is skipped when a convex domain is used.

Conclusions

97A simple Python implementation of truss layout optimization using an adaptive 'member adding' scheme has been presented for educational use. Various examples are used to demonstrate the efficacy of the script for problems involving single and multiple load cases, unequal limiting stresses in tension and compression, joint costs, and non-convex polygonal domains, with or without holes. The solutions obtained are globally optimal for the prescribed nodal discretization and can be used to benchmark other methods or to provide inspiration for structural designers.

98The 98-line Python script described is listed for reference in Appendix B and is also provided in the form of downloadable source code; see Supplementary material section.

99Supplementary material Downloadable Python script, trussopt.py, and installation files: https://doi.org/10.15131/shef.data.7271678.

B.2 Installation with Python 2

100It is possible to run the script with Python 2 (2.6 and later) by making minor modifications to the script, as detailed below.

101First, remove the gcd method from math in the first line:

102And instead import it from fractions instead, by adding the following new line:

103Also, line 47 is replaced with:

104to take into account the fact that function ceil returns a floating point rather than integer value in Python 2.

B.3 Alternative solvers

105To use an alternative solver, as described in Section 4.2, this also needs be installed. For example, MOSEK can be installed using the following command:

106In addition, a licence file is required, which can be freely obtained for academic use from the MOSEK website (https://www.mosek.com).

B.4 Python IDE

107For beginners, the Spyder IDE (Integrated Development Environment) bundled with the Anaconda package provides an easy-to-use means of editing and running the script.

참고문헌 30건

  1. Domain-Adversarial Training of Neural Networks Advances in computer vision and pattern recognition · Springer International Publishing · 2017 10.1007/978-3-319-58347-1_10
  2. Layout optimization of large‐scale pin‐jointed frames Engineering Computations · Emerald Publishing Limited · 2003 10.1108/02644400310503017
  3. GRAND — Ground structure based topology optimization for arbitrary 2D domains using MATLAB Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2014 10.1007/s00158-014-1085-z
  4. Linear Programming: Foundations and Extensions Journal of the Operational Research Society · Palgrave Macmillan · 1998 10.1038/sj.jors.2600987
  5. A 99 line code for discretized Michell truss optimization written in Mathematica Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2010 10.1007/s00158-010-0557-z
  6. New analytical benchmarks for topology optimization and their implications. Part I: bi-symmetric trusses with two point loads between supports Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2012 10.1007/s00158-012-0786-4
  7. Application of discontinuity layout optimization to plane plasticity problems Proceedings of the Royal Society A Mathematical Physical and Engineering Sciences · Royal Society · 2007 10.1098/rspa.2006.1788
  8. Practical plastic layout optimization of trusses incorporating stability considerations Computers & Structures · Elsevier BV · 2005 10.1016/j.compstruc.2005.09.032
  9. Joints in optimum frameworks International Journal of Solids and Structures · Elsevier BV · 1975 10.1016/0020-7683(75)90044-x
  10. Optimum structure to carry a uniform load between pinned supports Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2010 10.1007/s00158-009-0467-0
  11. Decomposition Principle for Linear Programs Operations Research · Institute for Operations Research and the Management Sciences · 1960 10.1287/opre.8.1.101
  12. Automatic yield-line analysis of slabs using discontinuity layout optimization Proceedings of the Royal Society A Mathematical Physical and Engineering Sciences · Royal Society · 2014 10.1098/rspa.2014.0071
  13. ECOS: An SOCP solver for embedded systems 2022 European Control Conference (ECC) · 2013 10.23919/ecc.2013.6669541
  14. A 99 line topology optimization code written in Matlab Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2001 10.1007/s001580050176
  15. Optimum structure to carry a uniform load between pinned supports: exact analytical solution Proceedings of the Royal Society A Mathematical Physical and Engineering Sciences · Royal Society · 2010 10.1098/rspa.2010.0376
  16. Michell cantilevers constructed within a half strip. Tabulation of selected benchmark results Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2010 10.1007/s00158-010-0525-7
  17. Rationalization of trusses generated via layout optimization Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2015 10.1007/s00158-015-1260-x
  18. Topology optimization of large-scale trusses using ground structure approach with selective subsets of active bars 2011
  19. Convex Optimization Cambridge University Press eBooks · Cambridge University Press · 2004 10.1017/cbo9780511804441
  20. Application of layout optimization to the design of additively manufactured metallic components Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2016 10.1007/s00158-016-1426-1
  21. Design of optimum grillages using layout optimization Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2018 10.1007/s00158-018-1930-6
  22. An 88-line MATLAB code for the parameterized level set method based topology optimization using radial basis functions Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2018 10.1007/s00158-018-1904-8
  23. Conceptual design of AM components using layout and geometry optimization Computers & Mathematics with Applications · Elsevier BV · 2018 10.1016/j.camwa.2018.07.012
  24. Theoretically optimal forms for very long-span bridges under gravity loading Proceedings of the Royal Society A Mathematical Physical and Engineering Sciences · Royal Society · 2018 10.1098/rspa.2017.0726
  25. CVXPY: A Python-Embedded Modeling Language for Convex Optimization arXiv (Cornell University) · Cornell University · 2016
  26. A rewriting system for convex optimization problems Journal of Control and Decision · Taylor & Francis · 2018 10.1080/23307706.2017.1397554
  27. AUTOMATIC DESIGN OF OPTIMAL STRUCTURES 1964
  28. Damage and contact mechanics CRC Press eBooks · Informa · 2014 10.1201/b16513-4
  29. GRAND3 — Ground structure based topology optimization for arbitrary 3D domains using MATLAB Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2015 10.1007/s00158-015-1284-2
  30. Convex Optimization 2004 10.1017/cbo9780511804441