Hello guys,

I was doing a form finding exercise for a wood truss using Galapagos, but since Galapagos can do this by optimizing one single goal (one parameter, for example minimizing the weight of the truss), my exercise cannot be done because I need to optimize two or more goals in the same form finding iteration process.

How can I do this with Galapagos ? or is there another user friendly plug-in that it is similar to Galapagos but with many goals ?

I appreciate your help, Thanks.

Octopus is what you need!

(Although it’s usually more efficent to fold several objectives into one if possible.)

What are your goals?

If you optimise for more than one goal, you will (ideally) end up with a family of solutions rather than a single one. You then still need to either manually or programmatically select one specific instance out of this family before you have your actual truss shape.

It is true that Galapagos has no tools for exploring Pareto fronts, but are you sure that you really need to optimise along multiple axes, rather than optimise for a compound fitness function? I.e. minimise weight, while maximising strength, while minimising the number of beams that exceed some length range *at the same time*?

Thank you,

I have downloaded octopus, seems to be a bit complicated not like Galapagos … Is there any manual to get familiar with it ?

Thanks David,

I was doing a mini-wood truss made of “Balsa wood” (included in a box of 70cm length by 15 to 30cm height 12cm by width) and trying to reach the best shape that can support as much vertical load as possible (the record is 33 Kg), say 34 Kg.

Yes, what I need to do is to minimize two factors (compression forces and buckling forces) by varying the geometry of the truss included in the original box.

Varying only one of the above factors will not give me structural working shape without failure of the system, I.e. if minimizing the compression force only, the system could fail due to buckling forces and vice versa.

Any ideas ?

Thanks for your help.

In such a case, I would use a single-objective algorithm (not necessarily Galapagos, though), and optimize the weight of the truss, plus a penalty weight if the compressive and/or buckling stresses are exceeded.

`minimize f(x) = weight(x) + (penalty_weight * square_root (compressive_stress(x) / max_compressive_stress + buckling stress(x) / max._buckling_stress))`

Hope that makes sense, I have a paper that explains this approach with a bit more detail (and, as a bonus, discusses different optimization algorithms in Grasshopper ;-))

It definitely sounds like a compound fitness function (albeit a complicated one). So Galapagos is in principle capable of doing this.

For example, assuming the compression strength C of the structure ranges from 0.0 to 50.0 (with higher values being better), the buckling resistance B ranges from 0.0 to 3000.0 (I know, nonsense units, just making a point here), and the weight W can reach from 1.0 to 3.0 and should be as low as possible.

The compound fitness function here must thus be in the form f = C + B - W. However just writing it like this will not give you the results you’re after, since the equation is dominated by B since it has the largest range. If you’re lucky you can apply a linear transformation to your equation to bring all components into the same numeric range. This will look like f = (aC+b) + (cB+d) - (eW+g), where the multiplication factors (a, c, e) scale each element, while the additions (b, d, g) move each element into the same range.

So let’s say that we want to remap C to go from zero to one, B to also go from zero to one and W to go from zero to two. We’d then need the following constants: f = \frac{1}{50}C + \frac{1}{3000}B - (W-1). If we now imagine the *ideal* truss (i.e. maximum compression and buckling strengths, no weight) we end up with f = 1 + 1 - 0. Of course any weakening in either C or B will lower that value. Any increase in W will also lower that value.

If you’re not lucky you may have to use non-linear adjustments (polynomials, logarithms, look-up-tables, …). Crafting a correct fitness function is the responsibility of the user. Galapagos doesn’t understand anything about the problems it’s presented with, all the ‘smarts’ must ultimately come from you.

Nevermind, I didn’t read your post carefully enough.

You can still use the suggested approach, though:

Maximize the vertical load, with penalties for compression and buckling.

(Since we’re maximizing, the penalties would be negative.)

`maximize f(x) = vertical_load(x) - (penalty_load * square_root(compressive_stress(x) / max_compressive_stress + buckling_stress(x) / max_buckling_stress))`

In this case, it might make sense to use 33kg as the penalty load, btw. Generally, it should be similar to the value you’re trying to achieve. If the penalty is too large, the problem becomes unnecessarily difficult. If it is too small, you might get “optimal” solutions where the maximal stresses are exceeded. You definitely should try different formulations, though (for example, David’s), and see what works best.

Ok now I see what is behind all of this, I will try to figure out a “SAMRT FORMULATION” **(the tricky part)** that needs to be maximized or minimized to get the best truss design.

Thank you so much for your help.

I will get back to you once my problem is solved.

No problem!

Btw, how many variables does your problem have?

If the number is small (<=10), I would use the DIRECT algorithm from Goat.

Yes I have less than 10 parameters, 3 parameters in total.

What is this “DIRECT - GOET” about ?

Thanks.

Goat is another optimization plug-in for Grasshopper, you can get it on

food4 rhino. The DIRECT algorithm is another type of algorithm, which is

very effective on problems with small numbers of variables.

In case someone is interested, I have a brand new article comparing optimization tools in Grasshopper (Galapagos, Goat, Silvereye, Octopus, and Opossum).

You can go to ResearchGate and request a private copy there:

https://www.researchgate.net/publication/321346979_Model-based_Optimization_for_Architectural_Design-Optimizing_Daylight_and_Glare_in_Grasshopper

I also have a couple of other papers on there that are related to optimization in Grasshopper.

Otherwise, send me a message with your email, and I’ll send you a copy.

Very interesting read! Your results will improve my simulations significantly.

I’m not into architectural design though. I use heuristics in perfoming “Point Inclusion test” on meshes, where the parameters most often control the form, size, position and inclination of the “volume” (Brep) used for “catching” (inlcude) mesh vertices, like:

- Position X
- Position Y
- Position Z
- Radius
- Height/length
- Inclination X-axis
- Inclination Y-axis
- Inclination X-axis

Fitness = maximum or mimnimum number of point inclusions (applying penalty or reward on a specified direction or proximity of radius etc.,).

Revaluation time per inclusion test typically between 5-50 ms. and using typically less than 10 parameters, preferably achieveing realtime performance for user-interaction (< 300 ms avoiding disturbing lag).

Very useful info! Thanks. (this forum is awesome)

// Rolf

Thanks for sharing, very interesting!

Hi Rolf,

Glad you find the article useful, that’s the point!

I think in your case, PSO (Silverye) or the Galapagos SA might be good choices.

From my (limited) experience with point inclusion, these problems can be quite tough, so it will probably be difficult to get real-time results.

DIRECT (Goat) or RBFOpt (Opossum) might be less good, since calculating the next step in this case would take longer than evaluating the result (performing the point inclusion test).

With RBFOpt, it’s maybe around 1 second per step, so there’s no way to get real-time results.

Depending on what you’re trying to do, maybe it’s better to formulate the objective the other way around:

For example, minimize volume, penalized by the points that are not included.

Cheers,

Thomas

Point inclusion can quite fast actually if designing dedicated algorithms for specific shapes. See example in this thread where point inclusion optimized for a Cylinder is done in ~1 ms for ~50.000 points and half a million points in 5-6 ms (@RadovanG beat us all on this one):

In my case I also quite often can have a “good start” which means I can intelligently limit the Search Space (say within a 5^3 up to 10^3 mm cube), so I’ve been pondering upon whether to make my own algorithms or using generic optimization algorithms.

I will try PSO (Silverye) since Galapagos SA didn’t really cut it.

// Rolf

I meant that point inclusion is tough as an optimization problem.

I.e., it’s fast to evaluate candidate solutions, but hard to find the optimum.

When possible, dedicated algorithms are almost always better than general ones!

I have a hunch that Subplex (Goat) might work well on this problem. The

algorithm is very hit-and-miss, but it might just be that it’ll love this

problem.

Or, if you have a good starting point, use one of the local solvers in Goat

(e.g., BOBYQA).

Thanks Thomas, this looks interesting, but the downloads have run out. Any chance you could send me a copy or post one here?

Cheers,

Steven