Hi,
I’m optimizing panels sizes using galapagos for grasshopper but it is not exactly working as I would expect it to. The way I optimize the panels is by reducing the number of different panels as much as possible by offsetting each triangle inward. Galapagos does the optimization by controlling the value of those offsets and I have 2 different set ups.
The first set up controls all the same sides for each triangle and offsets them at the same time. With this offset I go from 168 panels to 101 different panels.
The second set up controls each single side of all the triangles, which means that each side can be offset independently. With this set up I go from 168 panels to 117 Panels.
My expectation would be to get a lower number in the second case, not the first. I wonder if I did not set up galapagos correctly.
Please let me know if you have any thoughts.
Thanks
Nobody can see your Galapagos settings without your file…
May run more iterations, on long term, the second option sounds more promising.
Ever thought about defining a couple of panels, for example 3 different, and place them? So you don’t have to optimize them by an offset ? You will get more or less gaps with both solutions.
You could optimize these panelsize with the target for lowest gaps, but than you don‘t optimize 200 genepool slider, may just 3 or 5.
First thought about that alternative while on train. So excuse please no example.
From your 200 panels, you make 1 average panel. With a series component, you could set the offset. Than Place these panels on your facade. For example with find domain or something like that.
For Galapagos:
series count
series step size
So you will get just 2 genes. This could be a better approach, if it’s possible for your project.
Hi Michael,
My apologies if I created some confusion. I’m not quite sure how to join 2 discussions together but I guess we can keep talking here to make it easy and refer to the other discussion if needs be. I have attached the latest script from that discussion here.FacadePanels_OptimizedGrouping v4.gh (26.9 KB)
Hi Tim,
Thanks for your feedback. I tried the approach that you suggested by copying part of another code that uses lunchbox machine learning (Please find script here: FacadePanels_OptimizedGrouping v2.gh (58.4 KB)
).
The issue that I run into is that the joints between adjacent panels are not straight, which makes it hard to control the gap between them. That is the reason why I decided to do the optimization with galapagos by controlling each panel edge. It seems to me that galapagos should be able to significantly reduce the number of panels and I’m not sure why it’s not working as expected.
I made a test with a completely flat facade and galapagos still doesn’t reduce the number of different panels. It seems that genetic algorithm does not work in this case.
Still had no time to look at the file, but that’s nearly impossible. At least with luck, it should find a better solution. Are you sure, you set the right genomes and settings?
But when I run the optimization I still get a better result by using just 3 sliders than using one slider for each panel edge; so the question is still on. I tried using different optimizing components, namely goat and Neldermead but I get similar results. Which makes me think that maybe the issue is the way grasshopper is doing the offset. Here is the latest script:FacadePanels_OptimizedGrouping v4.gh (25.7 KB)
I would say it‘s a problem, of what you try to optimize. You have a facade on a double curved surface. This results in different angles of your triangles. With offset, you just change the size of the panel, not the angle. So your result just can be, same panels where you have the same angles. If you don‘t have triangles with the same angle, you can’t get any optimized panels. If I‘m not mistaken, I believe this is the main problem
In the future, can you please clean up and organize your GH files before uploading. It makes it harder to understand and ultimately help you.
I’m not sure I understand fully what you’re trying to accomplish (I’m also missing that grey component). It seems like the input to your Genetic algo is the offset distance that creates your triangle in different directions. I don’t see how what would greatly reduce the number of different panels in your system. Unfortunately, I can’t think of a simple way to change the way you’re generating your triangle that would give you a few inputs that would be likely make triangles more similar while keeping a consistent look.
With that said, the tolerance you’re using on your cull duplicates component seems way too small at 0.1mm. Try raising that and seeing how different the triangles in each family truly are. I tried 10mm (which may or may not be reasonable) and the number of different triangles dropped bellow 30. Also, you should try sorting the lengths before going into Pt2Num and remove the Rounding component.
Thank you very much Tim and Louis for your feedback it is really helpful. I cleaned up the script to make it more legible and I hope that it would be easier to understand my question.
10mm might be too high for the cull tolerance so I set it up at 1mm for now. If you take a look at the script, you can see that there are 2 sets of sliders for the optimization. FacadePanels_OptimizedGrouping v5.gh (24.8 KB)
The first set of sliders (one gene pool with 3 sliders) offsets the same edges of each triangular panel at the same time. When I use this set up, the optimization yields 95 panels.
The second set of sliders (group of 3 gene pools with 168 sliders each) offsets each edges of each triangular panel independently from one another. When I run the optimization with this set up, I get 104 panels.
My question is about the difference between the results. I would expect to get a lower number/ better optimization with the second method because I have more control over the offset of each edge independently. I feel that when I run the optimization with the second set up, galapagos seems not to run the optimization all the way, maybe because there are too many sliders.
Let me know if you need me to clarify anything.
You need to run longer the second one, but it should give a better result. You have way more possibilities, so you need more time to figure them out. Btw it’s always a bit luck with evolutionary solvers, so try to run them more than once and save your result.
Thanks for the update Cyrille, I wasn’t really understanding your second optimization step in your previous post.
I’m not the most experienced with optimization algorithms but I would imagine that trying to optimize over 501 dimensions at the same time might be your issue. I think the solution space increases exponentially for each dimension you add. You could try this by making your problem much smaller and then progressively adding triangles and seeing how much longer it takes the solver to converge for each triangle you add.
I do have a completely different solution you might want to consider. Increase the tolerance until you hit an acceptable number of different panels for you (10, 30, 50?). Then for each of those group of triangles, find the average. Then replace all the triangles in that group with the average. This would give you a solution very close to what you’re trying to accomplish with your second optimization step: slightly modify the triangles to lower number of different types you have. Not as cool but certainly less time consuming and bonus your CAD would match exactly the parts you would be getting fabricated.