Grasshopper

algorithmic modeling for Rhino

I am trying to wrap my brain around galapagos, so I thought I would create something very simplistic to test what it does, and how to set things up.  Apparently things don't seem to be working for me.
In my test a put 2 points in the model (which are on the same plane, I am ignoring the z axis for the moment).  So I thought I would see if I could solve where the distance of a third point equals the distance from the other 2. So I set up to distance components and then was going to set up component for the fitness portion of galapagos.  This is where I got stuck.  
So I am looking for when the 2 dist components equal each other, so I tried subtracting the 2 thinking that the closer to zero the better.  The problem is if I set the "fitness target" to be minimum the solver starts getting negative values and thinks that those are better.  
So then I tried dividing the 2 distance components thinking that the closer to 1 the better.  No luck either, because neither maximum or minimum would work as I am looking for a specific value.  So this is where I decided that my simple test wasn't so simple.  Any thoughts or suggestions greatly appreciative.  Here is an image showing what I had so far.

Also 1 more question.  Galapagos with only solve within the limits of the sliders correct.  So in my example above if I don't the have limits set high enough then I may never find the correct answer, only the closest within the limits.

Views: 1141

Replies to This Discussion

Hi Dennis,

So it works.

Ciao Renzo
Attachments:
Thanks for reply/help.

Ah the absolute value of the subtracted distances. Makes sense now.

Dennis
Dennis:

Aside from "Minimize" and "Maximize", you can specify a numeric value for Fitness Target (just select the contents of the field and specify a number....I didn't realize this at first either). With that in mind, you could use either the subtraction method (set the fitness target to 0) or the division method (set the fitness target to 1).

I know the problem you are trying to solve is just a way to get to know Galapagos, but be aware that there are an infinite number of solution to your problem (there is a infinite line along which all points are equidistant to your two reference points). If you are trying to create an equilateral triangle, the distance between the two reference points needs to figure into your solution.

I do believe that Galapagos works within the limits of the sliders, although it does not seem to pay any heed to the numerical accuracy (so even if the slider floats to 3 decimal places, Galapagos will examine solutions to 8 or 9 decimal places).
Thanks for the input I will give that a try.

I know the problem you are trying to solve is just a way to get to know Galapagos, but be aware that there are an infinite number of solution to your problem (there is a infinite line along which all points are equidistant to your two reference points). If you are trying to create an equilateral triangle, the distance between the two reference points needs to figure into your solution.

Yep any point along the perpendicular bisector is a correct answer. I realized that after running a few solutions. I am now trying to set it up to solve an equilateral triangle.
Thanks to your post I discovered Galapagos! (really cool!)
If you are interested you can take a look at some tests I did (very basic for now):

LINK

I added the definition at the end of the post, so you can grab it and play with it. (I hope soon to add more stuff and tests)

Thanks again for your post, was very helpful to start!
Hi

In fact, Galapagos is a very interesting toy. Thanks for the nice four-point example. I have added another three-point example. Enjoy

ciao Renzo
Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service