Optimization of parametric truss


I have constructed a truss and want to optimize the placing of the diagonals for minimum mass. The problem is that I cannot find a way to limit Galapagos so that I don’t get too high deformations. I have put in a C# script, that adds 1000000kg if the solution is not within the limit of deformation. Galapagos still doesn’t want to throw away the solutions with too high deformations, and forms rectangles instead of triangles.

Does anyone have any tips on how to get Galapagos on the right track? Do I need to set more restrictions in GH? And if yes, how/where?

I don’t have a lot of experience with GH, Karamba and Galapagos, so I would really appreciate your help.

Truss_24.04.19.gh (115.0 KB)


1 Like


you can set up fitness function for galapagos like this:

It will multiply fitness number by 100 if deflection is overreached and therefore disadvantage the gene in galapagos so it should be kicked out of pool.

For the other things… Pay attantion to buckling lengths! As default, they are considered for lengths between connection points, not between your lateral supports. You can tell by checking details on your calculations. Ncry = Ncrz which means if symetrical cross section is used that buckling lengths are same in both directions. Correct me if Im wrong… @karamba3d could comment on that.

As from the previous post, it seems you could model lateral beams in the position of lateral supports to get the correct buckling lengths. But I would recommed to verify by checking on details of utilisation for buckling lengths.

Other option would be to use buckling mode as initial shape for structure , calculate with second order effects and check on stresses.

This might be affecting your optimised geometry.


Hello Daniel,
you can manually set the element buckling length via the ‘Modify Element’-component in the submenu ‘2nd Order’.
By default the buckling length of an element is calculated as the distance between the two nearest nodes with more than two elements connected. See the manual for details.


1 Like