Optimisation Error

Galapagos Optimisation

I am trying to optimise the building position (block position) to maximize views at a given point. I am using ladybug view rose in conjuction with galapagos. The rhino file keeps crashing and creating a dump file. I am sure it is not an error with memory space because rhino does not use all my memory. The idea behind the optimisation is that the brep should not move out of a given plot, and this is used as a failsafe ( if it moves out when translating, the value returned is 0, so the computer keeps optimizing.) Also wanted to know the difference between the 2 different types of optimisation in galapagos and which one to use when.
Thank you.

Would appreciate any help.

1 Like

Can’t help you from a screenshot, but first thing what comes to my mind while reading your question: Galapagos can‘t recognize your 0 value if brep is out of boundary. Try octopus and use Boolean if it’s not inside.

If you want to pay, here’s a nice tutorial:

internalised.gh (65.1 KB)

The geometry internalised with the script. The scripts works well for the first few values but it gives an error and rhino force dumps and shuts down. I can see that the optimisation process is working and I get a few results but the script stops running due to some error in the move.

Thank you.

Yes, as mentioned above, I think the problem is, that Galapagos can‘t recognize your 0 value if brep is outside.
Try octopus, it‘s a multi objective optimizer and can handle booleans.

Thank you Tim. Actually modified the script a bit to make it work. I didnt know that 0 value is not recognized by Galapagos. As for Octopus, are you aware of any tutorials online for it? I cant seem to find any. Does octopus work better than galapagos?

Thank you

Can’t generalize it, but it should work better in your case.
I remember just the one I posted above.
Look for it in google. I think they uploaded an example file on food4rhino.

On another note, I was also thinking to optimize for another variable lets say solar heat gain of the building which directly relates to the orientation of the building. Lets say I have an example of a tropical city where the recommended orientation is of north south ( the longer side should face north south). That means if I try to optimize for heat gain for lets say 10 buildings, all of them would rotate to the north south orientation. How do I then ensure that I still have some variation? Do I try to reinstate some of the middle solution ( not the most optimum).

I hope I am making some sense.
Thank you

In principle, there is no problem with Galapagos accepting 0.
But your definition produces mostly 0s, which makes it impossible for the optimization to progress.
(I suspect using Octopus with a boolean constraint would have the same problem.)

So you should make sure that your definition produces less “infeasible” (i.e., unwanted) designs.
Ideally, all possibilities should be acceptable in principle.

Difference between the two algorithms in Galapagos:

The first one (GA) isn’t very good, the second (SA) is much better, at least in my (pretty extensive) tests.
(But, depending on the problem, other algorithms will be even better.)

Not sure about Octopus: I’ve never used it with a Boolean constraint (which is what @tim.stark is suggesting.)
Note though that Octopus is typically used for multiple optimization objectives, which is exponentially more difficult than having only one objective.

Regarding the question about heat gain: Yes, reinstating a non-optimal solution can work.
But then, depending on your definition, Galapagos might struggle to find the optimum anyway :wink:

Hope that helps! :wink:

Was just my experience. To be true never extensive tested it with Galapagos. Mostly when I set something like if not inside = 0, I couldn’t get to a good solution. So I mostly switched to octopus. (Personal feeling was just a bit better) but I will try it again next time :slight_smile:

In general, it’ll be easier for the optimization algorithms if there’s something to differentiate infeasible solutions. For example, instead of giving 0, reducing the visibility score based on how much the building is out of bounds.
Such an approach with penalties needs a bit of trial and error in terms of the magnitude of the penalty, though, to make sure that the optimized solutions are all inside.

In general, the penalty should be as small as possible, while ensuring that the resulting solutions are feasible.

1 Like