Do you know if it’s possible to set multiple goals on Grasshopper ?
I have an excel file as input, and I have a different goal for each line of the file !

It seems to me that the tools Opossum, Goat only work with one specific goal.

I guess that you are after MOO (Multi Objective Optimization). There’s various algos (notably related with the objective Goal(s) value/weight calculation - Google “MOO, Pareto Front, etc etc”).

Rather easy with code.

I’m not aware if there’s an add-on that does “multi” MOO (because I don’t work with add-ons). In case that there’s none around I could provide a very simple C# on that matter (with Pareto Fronts and the likes). Here’s a PF demo with 8 random objective Goals values (min/max) per Node (170 nodes shown):

Opossum has now multi objective algorithms (latest version)
But the guy behind it always suggest to use single objective when possible, let me show simple example of a single objective optimization for 2 objectives.

If possible, you could manually set weights to each value to optimize (here I give them different interpolation as they vary, but I simply add them together giving them the same weight).
If you were to multiply what comes of the first graph by 2 before adding to the one below, you’d give it 2 times more importance on the final value to optimize. (it could also be a more complex formula)

Thanks for your help.
But I’m not sure my case is a Multi Objective Optimization. Or I don’t know how to use it …!

The thing is that I have a Brep that I’m putting in a particular position, thanks to three number sliders. This position gives me a specific volume.
I’m giving an excel file as input with different positions. So if my file has 5 lines, I will have 5 Volumes on Grasshopper.
And I want to optimize each one of this volume, by changing the third slider for each case.

So I have 5 different objectives for one variable.

Mmmh if I understood correctly, you’re basically trying to run separate optimizations but at the same time? Meaning you’re trying to optimize each volume individually.

I don’t think such thing is available from the get go. Galapagos, for example will take the average of the values in the different branches

But something that could be done is to try to increase the sum of all the volume added together (or average), while also trying to reduce the standard deviation between all the 4 or 5 volumes.

Either you combine the two objectives as one like I showed above, or you can set them up in a multiobjective optimisation… If the computation time of your script is low, and you only have two objectives, the second option isn’t a bad idea (and is easier to set up)

If anyone else here has a better solution on the subject, I’d be interested to know too.

3 sliders are x,y,z for some orientation/pos/whatever Vector ? And how’s possible a variable Volume that way?

Or the vars control the size of the Brep?

Anyway - given the opportunity - here’s a simple description of a bounce solver approach:

Let’s define an oriented Box box for some Brep/Mesh and then Point3d[ ] bp = box.GetCorners();

Assume that you want a portion of the Brep that has a given Volume (via some percentage double [0-1] value: say t) . That portion could be due to a Brep Section via a Plane defined by a point at Line(bp[4], bp[0]).PointAt(searchT). and with Normal: bp[4[-bp[0].

So the t defines explicitly a target Volume (i.e. Volume * t)… but if the Brep is some sort of wild Blop then the required Plane position - i.e. the searchT (and thus the portion Brep with that target Volume) is a different kind of fish.

If you are after a “similar” sort of thing … then MOO has no meaning ( your problem MAY require a classic bounce solver).

But if this is not the case for you … if you can crearly define objective goals (+ weights - or not) I can provide an enty level MOO demo (no matter how many the goals are).