Minimum-mass sizing of isostatic trusses as one linear programme.
In a statically determinate truss the member forces are linear in the member areas, so minimum-mass sizing under stress limits becomes a single linear programme. This is a Python re-implementation of the method in the paper below.
git clone https://github.com/EngFlavioMartins/truss-sizing-optimisation.git
cd truss-sizing-optimisation
python run.pyrun.py sizes the paper's 37-member benchmark truss and prints its mass: 13.15 kg (the paper reports 13.35 kg and 13.23 kg). The first time, it installs what it needs into a private .venv folder (a minute or so); after that it starts at once. All you need is Python 3.10 or newer.
Prefer conda?
conda env create -f environment.yml
conda activate truss-sizing-optimisation
python examples/truss_37.pyNext: The method lives in src/truss_sizing/; examples/truss_37.py shows how to describe your own truss.
The same mass of steel before and after sizing, coloured by stress over admissible stress (teal compression, red tension).
sh scripts/render/make_figure.sh # the figure
python scripts/render/make_animation.py # the animation at the topBoth need ParaView; the figure also needs LaTeX.
This code re-implements the method of the paper below. If you use it, please cite:
@article{martins2019truss,
author = {Martins, Flavio A. C. and Avila, J. P. J. and da Silva, M. A.},
title = {A Linear Approach for Sizing Optimization of Isostatic Trussed Structures Subjected to External and Self-Weight Loads},
journal = {International Journal of Steel Structures},
volume = {19},
number = {4},
pages = {1146--1157},
year = {2019},
doi = {10.1007/s13296-018-0194-8}
}GitHub's Cite this repository button (from CITATION.cff) gives the same reference in other formats.
Apache 2.0: you are free to use, change and share this code, also commercially. If you pass it on, keep the NOTICE file with it; it says where the code comes from and how to cite it.

