Truss optimization in Python, C++, and AMPL with a Multi-Objective Function of Weight, Stiffness, and Constructability

I am deriving a mathematical model – and writing optimization code in Python, C++, and AMPL – to be able to optimize trusses (which could be a skyscraper, bridge, crane, etc…) to support a given set of loads, or multiple sets of loads, while (1) minimizing weight, (2) maximizing stiffness, (3) minimizing construction difficulty, or (4) for any multi-objective function that combines these factors. So far, I have been able to optimize for the any of the three factors on their own – albeit only with smaller problems for construction difficulty, due to the discrete variables inherent in evaluating construction difficulty – as well as with for combinations of minimizing weight and maximizing stiffness.

The code is being published under an open-source license on my GitHub. A full document with detailed mathematical derivations and optimization routines for many truss optimization examples is available, also on my GitHub here: TrussOptimizationDoc. Below are some fun examples of optimized trusses.

Minimizing Number of Members and Adding Member Length Constraint

Volume Minimization with Joint Cost to Simplify Constructability

Code adapted from “A Python script for adaptive layout optimization of trusses”, L. He, M. Gilbert, X. Song, Struct.
Multidisc. Optim., 2019.

Optimizing a Balance Between Low Weight and High Stiffness

Create a website or blog at

Up ↑