Grasshopper

algorithmic modeling for Rhino

Imagine there is an initial cube, divided by 6 horizontal planes (let's say floors of a building)  and from this cube, volume is subtracted by two inclining planes (green ones in the jpg) cutting the cube and moving along an axis (purple in jpg attached). Also, a cylinder (green - see jpg) affects the horizontal planes (floors of the building) like an "atrium" while crossing them.

In a further step I want to use Galapagos in order to specify the optimum summed floor area, let's say 4600m2. The sliders which Galapagos uses as a gene pool are the ones controlling the movement of the 2 planes and the radius of the cylinder, therefore affecting the floors area.

I managed to make it work in a way but I'm not sure whether the "smaller than" relation is the proper one for Galapagos (see jpg).. How can I specify a relation which is proper for it? That's my main question. Because I am not really sure if it works right!

I am attaching both Rhino file and GH definition (don't get scared by its chaotic appearance, its rather repetitive..) and a jpg showing a printscreen of the model and a part of grasshopper definition where galapagos is entered in the game.

If anyone is willing to help, please contact me!

Views: 1104

Attachments:

Replies to This Discussion

You can type into the Galapagos "Threshold": 4600, and run the solver.
Have in mind that because these there sliders of yours have 3 decimal numbers, it might take a couple of hours for a Galapagos to find a solution. At least it looks that way on my PC.

I lowered the number of decimal places to 1 (to save the time), and this is the closest result:

http://www.dodaj.rs/f/3Y/Ih/4QqtFuQy/proba.jpg

Something is wrong with the server again. Upload of files and images do not work.
Here is your file:

Attachments:

great :D

thanks for your response!!!

cheers!

Hi Stratis...

I think you've made things much harder on yourself with your setup! I've simplified your definition significantly just so you can see how much easier things can be if you start to think of objects like building floors as lists instead of individual items. It may be trickier to understand the flow, but I highly recommend that you try to get into it...it will make your grasshoppering life much simpler and less prone to little errors.


I hadn't realized until seeing djordje's response that there is a threshold built into galapagos...which is amazing...thanks djordje! :)  The way I have always done it (and which allows for the "wanted" value to be visible on the canvas as another parameter) is to use a conditional expression...in your case, if the sum total of the floors (R) is greater than the "wanted" floor area (W), then return a value of 0...otherwise, return a value equal to R. Then in galapagos, set your Fitness to "maximize"...galapagos will then try to get as close to your W value without going over (because every time it goes over, it will instead be fed a value of 0).

Either way, I do suggest you take a look at the adjustments I made to your file for some tips about how to make your definitions simpler...

Attachments:

No need, for thanking.
I just wish I could be as good as you one day.

First, Treshold should be used as a kind of Tolerance to how close you need the Fitness to be to 0 when minimizing and how big a sufficient maximum should be.

When starting from a very large configuration, the "optimal" solution will not be 4600 but something like 5621. When minimizing from a configuration smaller than 4600, the best result will be something way smaller 4600. Both cases will abort after the first generation.

Use a distance measure to your "wanted value" instead and minimize this distance:

abs(value-wanted) -> min

Second, your "Plane B" slider has no effenct on the resulting Area. You should check on that.

...of course...I still had my head in another definition where there was a hard ceiling to a value...using the absolute variance is definitely the way to go.

Thank you everybody on your remarks!

Really helpful as is my first atempt to use galapagos....

As for the definition indeed it is messy and long with no reason but i started it last night quite.. drunk after new years eve celebration, the series logic is the best indeed

THNAKS :D

Happy new year by the way

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service