Grasshopper

algorithmic modeling for Rhino

Hello everyone,

Talking about optimization...

Is it possible to solve the tipical can problem (try to find the shape with maximum volume using minimum surface, which is the usual can shape using galapagos?

Usually this problems are solved using "deriveds and integrals" (sorry, I don't know if it is the right word/translation)

Genomes would be radio from circular base and height from cylinder... fitness would be the volume and area from that cylinder.

What do you think?

Views: 2067

Replies to This Discussion

Hi Edion,

since these are opposing constraints*, you need to specify the relationship between them. Basically, your fitness function needs to be based on both the area and the volume. Just saying that you want to minimize area but maximize volume is like saying that you want to buy paint for your house that is as green as possible but also as red as possible. There's no colour which is both very green and very red at the same time. There is however a continuum between fully green and fully red and you want Galapagos to find a solution somewhere on this continuum.

Per example, let's say we create a cylinder which yields money for every cubic unit of volume but costs money for every square unit of surface. In this case we have yield-cost=gains and we want to maximize our gains. So the fitness function would be (Y*V) - (C*A) where Y is the return on investment per cubic meter, V is the number of cubic meters, C is the construction cost per square meter and A is the total number of square meters.

However I noticed that either the yield is better than the investment in which case the cylinder becomes as big as possible, or the investment overpowers the yield in which case the cylinder becomes as small as possible.

You'll have to tell us more about your actual goals before I can suggest a fitness function which will suit you.

--

David Rutten

david@mcneel.com

Seattle, WA

* I assume they are, if you want a cylinder with maximum volume and maximum area, then the bigger the better. You don't need Galapagos to solve that problem.

Thanks a lot for your time David,

Exactly, they are opposing constraints, maybe there's the mistake. Coming back to the tipical can problem (maybe is just tipical for me jejje), usually you have a volume which can not vary. In other words, you have to waste the least possible surface for a given volume (which is 33cl).

So, I guess is more about minimizing the area with a volume constrain...

Ok, that's an excellent optimization problem and totally do-able. In fact since your volume is fixed it means your radius and height variables are not independent. One follows logically from the other, resulting in a single variable problem:

--

David Rutten

david@mcneel.com

Seattle, WA

Attachments:

Exactly that. Now looks so easy…

That's a great way to solve it. Now it time to apply it to more complex things. 

Really thankful for your help. 

Well, just to confirm, galapagos and math's derivatives gave same result. Similar but not exactly to real soda-cans (probably because comfort and structural necessities).

my mistake, the "radius" panel in DERIVANDO is "diameter"

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service