Grasshopper

algorithmic modeling for Rhino

is there a way to get the fitness to solve for the smallest number, not the largest. 

Views: 1041

Replies to This Discussion

lets say you'r trying to move two points closer, you can make the fitness the negative of the distance between the points. galapagos will seeks to the make the distance zero. you should check out David's catenary example found on the first page of the latest release post.

http://www.grasshopper3d.com/forum/attachment/download?id=2985220%3...
i missed the negative put on the number, thanks
If you for example want to make two values as close as possible to each other, you may need to use a function like:

-abs(x)

Where x is the difference between the two vales.
Yeah this is planned. Unfortunately I thought about this too late and it is proving somewhat difficult to retrofit this. I'm also planning on adding a target fitness option, instead of indiscriminate maximize/minimize.

--
David Rutten
david@mcneel.com
London, UK

I am dealing with a similar issue I suppose: am trying to split a plan surface with a voronoi diagram in such a way to have two equal parts in area. the problem is that by putting as fitness the difference of the two areas it goes back and forth from negative to positive values, so far it seem useless to make it through galapagos. The next step i am targeting, once solvd this problem, is to have the surface divided in n parts equals in area. I post the definition if someonemight have already an approach to the problem.

 

Attachments:

You see where it says "Minimize" and "Maximize" in the Galapagos interface? Instead of clicking on the plus or minus symbols, just enter the value "0" (without the quotes) in the field and Galapagos will try to make the fitness match that value.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

I don't really see any difference in putting "0" in that field, since I don't really know exactly the meaning of that value. About the other issue, comparing many fractions of a surface in order to have N equal parts, I suppose that at this stage of galapagos the only way is by splitting in even parts by applying a split in 2 parts algorithm each time?

Minimize and Maximize are shortcuts for negative infinity and positive infinity respectively. Basically the solver tries to approach the target fitness as best it can. So when you Minimize, it will aim for lower and lower values, when you Maximize, it will aim for higher and higher values. You want the difference between the areas to be zero. Which means you want the solver to aim for zero.

 

Have you seen this blog post? It seems uncannily close to what you need.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

thanks, the post suites exactly the issue. By now am getting better results by putting the function without the square

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service