Optimization of diagonals in truss structures

Hi,

I’m have a problem with how I can optimize my diagonals in my truss element. The challenge I have is to construct the diagonals so that they can move independent of each other. I would like Galapagos to find the optimal number of diagonals and placement of these for a given load case.
How can I construct the geometry so that the diagonals can move freely? Does anyone have any good solutions or tips for how to solve this problem?

Truss_optimization_diagonals.gh (44.6 KB)

This example from Karamba is similar to what I want, but can’t see how they construct the geometry.
https://www.karamba3d.com/examples/simple/optimization-of-truss-diagonals/

I’m new to Rhino and Grasshopper.

Mari